Dawnline 0.20.0
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / Backend (Go: vet, tests, a real ubusd and uhttpd) (push) Blocked by required conditions
CI / Package files (push) Blocked by required conditions
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / Backend (Go: vet, tests, a real ubusd and uhttpd) (push) Blocked by required conditions
CI / Package files (push) Blocked by required conditions
- **Backend rewritten in Go.** One daemon, `dawnlined`, replaces the whole ucode backend: the rpcd plugin, the agent, the CLI and the updater. The package no longer depends on ucode. - **Per-architecture builds.** The release carries the backend for arm64, ARMv7, mips, mipsle and amd64; the router fetches its own after the package is installed and checks its sha256. Dawnline does not run on other architectures (older ARM, 32-bit x86, RISC-V). - **Faster on the router.** A firewall sync takes 0.06 s instead of 0.9 s; a full apply takes about 300 ms. The portal is served by the daemon itself, without a CGI process per request. - **Live pages.** The admin and the portal follow a live stream from the router instead of re-fetching the whole state every 30 seconds. - **Admin redesigned in the portal's style.** Three sections (Overview · Log · Settings); a server is a page of its own with People, Places and Settings; a device opens as a dialog over its person. - **Changes wait for «Apply».** Every setting, and a person's access, is staged in one dock before it reaches the router. - **Configuration rollout.** After a change that makes devices fetch their configuration again, the admin shows how many have fetched it and who has not. Every setting shows beforehand (⟳N) how many devices it will touch. - **Waiting for a decision.** Overview and People put first the people who need one (access ended, limit reached, a device that does not connect), each with its one action a tap away. - **Bulk actions on people.** «Select» (or a long press on a card) picks several people to extend by a month, pause or resume at once. - **Undo.** An action done from a card or a request is undone from its toast. - **Update dialogs redesigned.** An update is one view from its question to its result; Dawnline's own update runs in it like every other, and the page reloads itself once the new version answers. Other versions are a list, each with its notes and Install on a page of its own. - **Site to site: networks behind a router.** A router connected as a device can have networks behind it (up to eight, /16 to /30): the server routes them and applies the router's access to them. A network that shares addresses with a tunnel, the router's own networks or another site is refused by name. - **Routers from the portal.** People can add a router and name its networks on their own page; the admin accepts or declines with a reason, or lets them through without asking. - **Check access and Health know the networks behind routers.** - **Usage limits reworked.** A monthly limit no longer follows the calendar. A person's month starts with their first traffic and ends a month later; the next one starts only when they connect again, so time away uses up none of it. Before, everyone's limit reset on the 1st. - Extra data lasts until that person's month ends; «Reset usage» starts the month anew. - A limit is for a month or for the whole term; the admin and the portal show when it resets. - Charts that said «this month» show the last 30 days. - After the update nobody loses what was counted: the month that was running becomes the person's first and ends on the 1st. - **Access by time of day removed.** The Hours limit is gone from the admin, the portal and the backend; saved hours are dropped. - **Expiry simplified.** An end date always stops access, with a heads-up three days before; the per-person choice is gone. - **No false disconnects from sleeping phones.** A phone or a tablet stays online through ten minutes of silence. - **Mobile Safari fixes.** Pressing a control no longer sends the page to its top; tab tracks that do not fit scroll; switches animate after a press.
This commit is contained in:
1 parent
f8130e39a8
commit
ac90575b0b
788 files changed
+139244
-41720
No files matched your search
@@ -0,0 +1,197 @@
|
||||
// Package disguise checks a server's disguise values (AmneziaWG's obfuscation) as dawnline.awg does.
|
||||
//
|
||||
// Unsafe is obf_unsafe: what AmneziaWG would refuse, crash on or break devices with. Its sentences are in
|
||||
// English, as ucode writes them for a reader with no language; held to ucode's own output on made-up values
|
||||
// (testdata/trace.uc, scripts/ucode-golden.sh).
|
||||
package disguise
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/tickcount/luci-app-dawnline/backend/awg"
|
||||
)
|
||||
|
||||
// Conf names a value as .conf files do (dawnline.awg OBF_CONF).
|
||||
var Conf = map[string]string{
|
||||
"jc": "Jc", "jmin": "Jmin", "jmax": "Jmax", "s1": "S1", "s2": "S2", "s3": "S3", "s4": "S4",
|
||||
"h1": "H1", "h2": "H2", "h3": "H3", "h4": "H4", "i1": "I1", "i2": "I2", "i3": "I3", "i4": "I4", "i5": "I5",
|
||||
"header_protection_key": "HeaderProtectionKey", "content_padding_addition": "ContentPaddingAddition",
|
||||
"rekey_after_time": "RekeyAfterTime", "rekey_timeout": "RekeyTimeout", "reject_after_time": "RejectAfterTime",
|
||||
"keepalive_timeout": "KeepaliveTimeout", "max_handshake_attempts": "MaxHandshakeAttempts",
|
||||
"random_trailers": "RandomTrailers", "disable_cookies": "DisableCookies",
|
||||
}
|
||||
|
||||
const space = " \t\r\n\v\f"
|
||||
|
||||
// uint is a whole number in digits up to top; ok false for anything else.
|
||||
func uint(s string, top int64) (int64, bool) {
|
||||
if s == "" || len(s) > 10 {
|
||||
return 0, false
|
||||
}
|
||||
var n int64
|
||||
for i := 0; i < len(s); i++ {
|
||||
if s[i] < '0' || s[i] > '9' {
|
||||
return 0, false
|
||||
}
|
||||
n = n*10 + int64(s[i]-'0')
|
||||
}
|
||||
return n, n <= top
|
||||
}
|
||||
|
||||
// span is a number or a range as AmneziaWG writes them ("5", "5-15"), each end up to top.
|
||||
func span(v string, top int64) (lo, hi int64, ok bool) {
|
||||
p := strings.Split(strings.Trim(v, space), "-")
|
||||
if len(p) > 2 {
|
||||
return 0, 0, false
|
||||
}
|
||||
if lo, ok = uint(p[0], top); !ok {
|
||||
return 0, 0, false
|
||||
}
|
||||
hi = lo
|
||||
if len(p) == 2 {
|
||||
if hi, ok = uint(p[1], top); !ok {
|
||||
return 0, 0, false
|
||||
}
|
||||
}
|
||||
return lo, hi, lo <= hi
|
||||
}
|
||||
|
||||
// tagOK tells one tag of a signature packet both the kernel and amneziawg-go read.
|
||||
func tagOK(tag string) bool {
|
||||
if tag == "t" {
|
||||
return true
|
||||
}
|
||||
key, val, found := strings.Cut(tag, " ")
|
||||
if !found {
|
||||
return false
|
||||
}
|
||||
switch key {
|
||||
case "b":
|
||||
return len(val) > 2 && len(val)%2 == 0 && val[:2] == "0x" && strings.TrimLeft(val[2:], "0123456789abcdefABCDEF") == ""
|
||||
case "r", "rc", "rd":
|
||||
n, ok := uint(val, 1000)
|
||||
return ok && n >= 1
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// tagError is what is wrong with signature packet name holding s, or "".
|
||||
func tagError(name, s string) string {
|
||||
if strings.ContainsAny(s, "#\n\r") {
|
||||
return name + " may not contain # or a line break."
|
||||
}
|
||||
for a := strings.Index(s, "<"); a >= 0; a = strings.Index(s, "<") {
|
||||
b := strings.Index(s[a:], ">")
|
||||
if b < 0 {
|
||||
return name + " has a tag that is not closed with >."
|
||||
}
|
||||
tag := s[a+1 : a+b]
|
||||
if !tagOK(tag) {
|
||||
if len(tag) > 24 {
|
||||
tag = tag[:24] + "…"
|
||||
}
|
||||
return fmt.Sprintf("%s: <%s> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.", name, tag)
|
||||
}
|
||||
s = s[a+b+1:]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Unsafe lists what in disguise values o must never be handed to the kernel; empty when they are safe.
|
||||
func Unsafe(o map[string]string) []string {
|
||||
errs := []string{}
|
||||
given := func(k string) bool { return o[k] != "" }
|
||||
// a value not given counts as 0
|
||||
num := func(k string) (int64, bool) {
|
||||
if !given(k) {
|
||||
return 0, true
|
||||
}
|
||||
return uint(strings.Trim(o[k], space), 65535)
|
||||
}
|
||||
for _, k := range []string{"jc", "jmin", "jmax", "s1", "s2", "s3", "s4"} {
|
||||
if _, ok := num(k); !ok {
|
||||
errs = append(errs, Conf[k]+" must be a whole number from 0 to 65535.")
|
||||
}
|
||||
}
|
||||
if given("jmin") && given("jmax") {
|
||||
lo, ok1 := num("jmin")
|
||||
hi, ok2 := num("jmax")
|
||||
if ok1 && ok2 && lo > hi {
|
||||
errs = append(errs, "Jmin must not be larger than Jmax.")
|
||||
}
|
||||
}
|
||||
// packet types: a number or a range each, apart from the others; one not given keeps WireGuard's own
|
||||
type rng struct {
|
||||
lo, hi int64
|
||||
ok bool
|
||||
}
|
||||
var hs [4]rng
|
||||
for i := 0; i < 4; i++ {
|
||||
k := fmt.Sprintf("h%d", i+1)
|
||||
hs[i] = rng{int64(i + 1), int64(i + 1), true}
|
||||
if given(k) {
|
||||
lo, hi, ok := span(o[k], 4294967295)
|
||||
hs[i] = rng{lo, hi, ok}
|
||||
if !ok {
|
||||
errs = append(errs, Conf[k]+" must be a number or a range like 100-200, up to 4294967295.")
|
||||
}
|
||||
}
|
||||
}
|
||||
for i := 0; i < 4; i++ {
|
||||
for j := i + 1; j < 4; j++ {
|
||||
if hs[i].ok && hs[j].ok && hs[i].lo <= hs[j].hi && hs[j].lo <= hs[i].hi {
|
||||
errs = append(errs, fmt.Sprintf("%s and %s overlap: each packet type needs values of its own.", Conf[fmt.Sprintf("h%d", i+1)], Conf[fmt.Sprintf("h%d", j+1)]))
|
||||
}
|
||||
}
|
||||
}
|
||||
// header protection: a 32-byte key, and every padding at least the 12 bytes of its nonce
|
||||
if given("header_protection_key") {
|
||||
if !awg.ValidKey(o["header_protection_key"]) {
|
||||
errs = append(errs, "The header protection key is not a key.")
|
||||
}
|
||||
for _, k := range []string{"s1", "s2", "s3", "s4"} {
|
||||
if n, ok := num(k); ok && n < 12 {
|
||||
errs = append(errs, Conf[k]+" must be at least 12 with header protection.")
|
||||
}
|
||||
}
|
||||
}
|
||||
// 3.1 timers and counts: 0 alone is the kernel's default, a 0 in a range would fire at once
|
||||
for _, k := range []string{"rekey_after_time", "rekey_timeout", "reject_after_time", "keepalive_timeout", "max_handshake_attempts"} {
|
||||
var lo, hi int64
|
||||
ok := true
|
||||
if given(k) {
|
||||
lo, hi, ok = span(o[k], 65535)
|
||||
}
|
||||
if !ok || (lo == 0 && hi > 0) {
|
||||
errs = append(errs, Conf[k]+" must be a number or a range like 5-15, from 1 to 65535.")
|
||||
} else if k == "reject_after_time" && hi > 180 {
|
||||
errs = append(errs, "RejectAfterTime must be at most 180 seconds.")
|
||||
}
|
||||
}
|
||||
if given("content_padding_addition") {
|
||||
if _, _, ok := span(o["content_padding_addition"], 65535); !ok {
|
||||
errs = append(errs, Conf["content_padding_addition"]+" must be a number or a range like 10-100, up to 65535.")
|
||||
}
|
||||
}
|
||||
for _, k := range []string{"random_trailers", "disable_cookies"} {
|
||||
if v := o[k]; given(k) && v != "on" && v != "off" && v != "1" && v != "0" {
|
||||
errs = append(errs, Conf[k]+" must be on or off.")
|
||||
}
|
||||
}
|
||||
// signature packets: their tags, and all of them in one device's configuration (one QR code)
|
||||
total := 0
|
||||
for _, k := range []string{"i1", "i2", "i3", "i4", "i5"} {
|
||||
if !given(k) {
|
||||
continue
|
||||
}
|
||||
total += len(o[k])
|
||||
if e := tagError(Conf[k], o[k]); e != "" {
|
||||
errs = append(errs, e)
|
||||
}
|
||||
}
|
||||
if total > 2000 {
|
||||
errs = append(errs, fmt.Sprintf("I1-I5 together must be at most 2000 characters, not %d.", total))
|
||||
}
|
||||
return errs
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package disguise
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Each made-up set of values gets the sentences ucode gives it (testdata/trace.uc, scripts/ucode-golden.sh).
|
||||
func TestUnsafeAsUcode(t *testing.T) {
|
||||
raw, err := os.ReadFile("testdata/trace.json")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var golden struct {
|
||||
Sets []struct {
|
||||
O map[string]string `json:"o"`
|
||||
Errs []string `json:"errs"`
|
||||
All []string `json:"all"`
|
||||
} `json:"sets"`
|
||||
}
|
||||
if err := json.Unmarshal(raw, &golden); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
rows := golden.Sets
|
||||
if len(rows) < 30 {
|
||||
t.Fatalf("only %d rows", len(rows))
|
||||
}
|
||||
said := 0
|
||||
for i, r := range rows {
|
||||
got := Unsafe(r.O)
|
||||
said += len(got)
|
||||
if !reflect.DeepEqual(got, r.Errs) {
|
||||
t.Errorf("row %d %v:\n go: %q\n ucode: %q", i, r.O, got, r.Errs)
|
||||
}
|
||||
if all := Errors(r.O); !reflect.DeepEqual(all, r.All) {
|
||||
t.Errorf("row %d %v, with Dawnline's own bounds:\n go: %q\n ucode: %q", i, r.O, all, r.All)
|
||||
}
|
||||
}
|
||||
if said < 40 {
|
||||
t.Fatalf("the rows exercise too little: %d sentences", said)
|
||||
}
|
||||
}
|
||||
|
||||
// shape is a value with what the dice decide taken out: digits as 9, hex bytes of a tag as x.
|
||||
func shape(key, v string) string {
|
||||
if key == "header_protection_key" {
|
||||
return fmt.Sprint("key of ", len(v))
|
||||
}
|
||||
v = regexp.MustCompile(`0x[0-9a-f]+`).ReplaceAllStringFunc(v, func(s string) string { return "0x" + strings.Repeat("x", len(s)-2) })
|
||||
// how many digits a drawn number has is the dice's too
|
||||
return regexp.MustCompile(`[0-9]+`).ReplaceAllString(v, "9")
|
||||
}
|
||||
|
||||
// A preset made here has the names, the order and the shapes of the ones ucode makes, passes its own check,
|
||||
// and ucode's presets pass it too.
|
||||
func TestPresets(t *testing.T) {
|
||||
raw, _ := os.ReadFile("testdata/presets.json")
|
||||
var golden struct {
|
||||
Presets map[string][]map[string]string `json:"presets"`
|
||||
}
|
||||
json.Unmarshal(raw, &golden)
|
||||
for _, name := range Methods {
|
||||
theirs := golden.Presets[name]
|
||||
if len(theirs) == 0 {
|
||||
t.Fatalf("the golden has no %s preset", name)
|
||||
}
|
||||
shapes := map[string]map[string]bool{}
|
||||
for _, o := range theirs {
|
||||
if errs := Errors(o); len(errs) != 0 {
|
||||
t.Errorf("ucode's own %s preset is refused: %q", name, errs)
|
||||
}
|
||||
for k, v := range o {
|
||||
if shapes[k] == nil {
|
||||
shapes[k] = map[string]bool{}
|
||||
}
|
||||
shapes[k][shape(k, v)] = true
|
||||
}
|
||||
}
|
||||
for i := 0; i < 200; i++ {
|
||||
mine := Preset(name)
|
||||
o := map[string]string{}
|
||||
for _, p := range mine {
|
||||
if _, twice := o[p.Key]; twice {
|
||||
t.Fatalf("%s: %s twice", name, p.Key)
|
||||
}
|
||||
o[p.Key] = p.Value
|
||||
if !shapes[p.Key][shape(p.Key, p.Value)] {
|
||||
t.Fatalf("%s: %s = %q has a shape ucode never makes (%v)", name, p.Key, p.Value, shapes[p.Key])
|
||||
}
|
||||
}
|
||||
if len(o) != len(theirs[0]) {
|
||||
t.Fatalf("%s: %d values, ucode makes %d", name, len(o), len(theirs[0]))
|
||||
}
|
||||
if errs := Errors(o); len(errs) != 0 {
|
||||
t.Fatalf("%s: a preset its own check refuses: %q\n%v", name, errs, o)
|
||||
}
|
||||
}
|
||||
}
|
||||
if !reflect.DeepEqual(Preset("off"), []Pair{{"jc", "0"}, {"jmin", "0"}, {"jmax", "0"}, {"s1", "0"}, {"s2", "0"}, {"h1", "1"}, {"h2", "2"}, {"h3", "3"}, {"h4", "4"}}) {
|
||||
t.Fatal("no disguise is not what it was")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package disguise
|
||||
|
||||
import (
|
||||
crand "crypto/rand"
|
||||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Pair is one disguise value by its name; a preset is a row of them, in the order they are written.
|
||||
type Pair struct{ Key, Value string }
|
||||
|
||||
// randInt is a whole number from lo to hi, both in, as dawnline.util rand_int draws it.
|
||||
func randInt(lo, hi int) int {
|
||||
var b [4]byte
|
||||
crand.Read(b[:])
|
||||
n := int(binary.BigEndian.Uint32(b[:]) & 0x7fffffff)
|
||||
return lo + n%(hi-lo+1)
|
||||
}
|
||||
|
||||
// A name of the server's own for its signature packets, as tags: <r N> random bytes, <rc N> random
|
||||
// letters, <b 0x..> fixed bytes.
|
||||
func dnsName() string {
|
||||
tld := []string{"com", "net", "org", "io"}[randInt(0, 3)]
|
||||
n := randInt(5, 9)
|
||||
return fmt.Sprintf("<b 0x%02x><rc %d><b 0x%02x%s00>", n, n, len(tld), hex.EncodeToString([]byte(tld)))
|
||||
}
|
||||
|
||||
// Signature packets shaped like DNS, made fresh for each server: a query and an answer about a name of
|
||||
// its own, with its own TTL and address. The same fixed bytes on every router would be one rule to match.
|
||||
func dnsQuery() string {
|
||||
// id, flags (standard query, recursion desired), 1 question, name, type A, class IN
|
||||
return "<r 2><b 0x01000001000000000000>" + dnsName() + "<b 0x00010001>"
|
||||
}
|
||||
|
||||
func dnsAnswer() string {
|
||||
// id, flags (answer, authoritative, recursion), 1 question, 1 answer, name, A IN, pointer, A IN, ttl, 4 bytes
|
||||
return "<r 2><b 0x85800001000100000000>" + dnsName() + fmt.Sprintf("<b 0x00010001c00c00010001%08x0004><r 4>", randInt(300, 86400))
|
||||
}
|
||||
|
||||
// Methods are the disguises a server may be given: none, AmneziaWG 2.0's, AmneziaWG 3.1's.
|
||||
var Methods = []string{"off", "balanced", "max"}
|
||||
|
||||
// Preset makes the disguise values of a method (dawnline.awg obf_preset):
|
||||
//
|
||||
// off plain WireGuard-compatible packets
|
||||
// balanced AmneziaWG 2.0: junk packets, random headers, padded cookie and data packets, DNS-shaped
|
||||
// signature packets
|
||||
// max AmneziaWG 3.1: protected headers, random trailers, padding, jittered timers and a DNS-like
|
||||
// first packet, the values AmneziaVPN itself uses for 3.1 servers
|
||||
func Preset(name string) []Pair {
|
||||
i := strconv.Itoa
|
||||
switch name {
|
||||
case "max":
|
||||
// 32 random bytes, as `awg genkey` makes them
|
||||
key := make([]byte, 32)
|
||||
crand.Read(key)
|
||||
return []Pair{
|
||||
{"jc", i(randInt(4, 6))}, {"jmin", "10"}, {"jmax", "50"},
|
||||
{"s1", "12"}, {"s2", "12"}, {"s3", "12"}, {"s4", "12"},
|
||||
{"h1", "1"}, {"h2", "2"}, {"h3", "3"}, {"h4", "4"},
|
||||
{"i1", dnsQuery()}, {"i2", dnsAnswer()},
|
||||
{"header_protection_key", base64.StdEncoding.EncodeToString(key)},
|
||||
{"content_padding_addition", "10-100"},
|
||||
{"rekey_after_time", "100-120"}, {"rekey_timeout", "3-7"}, {"reject_after_time", "150-180"},
|
||||
{"keepalive_timeout", "5-15"}, {"max_handshake_attempts", "15-20"},
|
||||
{"random_trailers", "on"}, {"disable_cookies", "on"},
|
||||
}
|
||||
case "off":
|
||||
return []Pair{{"jc", "0"}, {"jmin", "0"}, {"jmax", "0"}, {"s1", "0"}, {"s2", "0"}, {"h1", "1"}, {"h2", "2"}, {"h3", "3"}, {"h4", "4"}}
|
||||
}
|
||||
jmin := randInt(64, 128)
|
||||
s1, s2 := randInt(15, 64), randInt(15, 64)
|
||||
// a handshake initiation and response never share a size
|
||||
for s1+56 == s2 {
|
||||
s2 = randInt(15, 64)
|
||||
}
|
||||
o := []Pair{{"jc", i(randInt(4, 8))}, {"jmin", i(jmin)}, {"jmax", i(jmin + randInt(150, 400))}, {"s1", i(s1)}, {"s2", i(s2)}}
|
||||
used := map[int]bool{}
|
||||
for _, k := range []string{"h1", "h2", "h3", "h4"} {
|
||||
v := randInt(5, 2147483647)
|
||||
for used[v] {
|
||||
v = randInt(5, 2147483647)
|
||||
}
|
||||
used[v] = true
|
||||
o = append(o, Pair{k, i(v)})
|
||||
}
|
||||
// AmneziaWG 2.0: padded cookie and data packets (S4 costs MTU, kept small) and DNS-shaped signature
|
||||
// packets before each handshake: what 1.0 traffic lacks and gets recognised by
|
||||
return append(o, Pair{"s3", i(randInt(8, 48))}, Pair{"s4", i(randInt(4, 16))}, Pair{"i1", dnsQuery()}, Pair{"i2", dnsAnswer()})
|
||||
}
|
||||
|
||||
// Junk packets may be tiny; the ceiling keeps them under the path MTU.
|
||||
var bounds = []struct {
|
||||
key string
|
||||
lo, hi int64
|
||||
}{{"jc", 0, 10}, {"jmin", 0, 1024}, {"jmax", 0, 1024}, {"s1", 0, 64}, {"s2", 0, 64}, {"s3", 0, 64}, {"s4", 0, 32}}
|
||||
|
||||
// plus is a value as ucode's unary plus reads it, for the one check that adds two of them.
|
||||
func plus(s string) (float64, bool) {
|
||||
s = strings.Trim(s, space)
|
||||
if n, err := strconv.ParseInt(s, 0, 64); err == nil {
|
||||
return float64(n), true
|
||||
}
|
||||
n, err := strconv.ParseFloat(s, 64)
|
||||
return n, err == nil
|
||||
}
|
||||
|
||||
// Errors is what is wrong with the disguise values of a server Dawnline sets up: what AmneziaWG refuses
|
||||
// (Unsafe), and Dawnline's own bounds on top. Its presets pass it. dawnline.awg obf_errors.
|
||||
func Errors(o map[string]string) []string {
|
||||
errs := Unsafe(o)
|
||||
for _, b := range bounds {
|
||||
if o[b.key] == "" {
|
||||
continue
|
||||
}
|
||||
if n, ok := uint(strings.Trim(o[b.key], space), 65535); ok && (n < b.lo || n > b.hi) {
|
||||
errs = append(errs, fmt.Sprintf("%s must be from %d to %d.", Conf[b.key], b.lo, b.hi))
|
||||
}
|
||||
}
|
||||
_, has1 := o["s1"]
|
||||
_, has2 := o["s2"]
|
||||
if a, ok1 := plus(o["s1"]); has1 && has2 && ok1 {
|
||||
if b, ok2 := plus(o["s2"]); ok2 && a+56 == b {
|
||||
errs = append(errs, "S2 must not be S1 + 56: the handshake initiation and response would have the same size.")
|
||||
}
|
||||
}
|
||||
return errs
|
||||
}
|
||||
+1581
File diff suppressed because it is too large.
Load diff
Vendored
+576
@@ -0,0 +1,576 @@
|
||||
{
|
||||
"sets": [
|
||||
{
|
||||
"o": {
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"jc": "4",
|
||||
"jmin": "10",
|
||||
"jmax": "50",
|
||||
"s1": "20",
|
||||
"s2": "30",
|
||||
"h1": "100",
|
||||
"h2": "200",
|
||||
"h3": "300",
|
||||
"h4": "400"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"jc": "70000",
|
||||
"jmin": "x",
|
||||
"jmax": "",
|
||||
"s1": " 12 ",
|
||||
"s2": "1 2",
|
||||
"s3": "-1",
|
||||
"s4": "00000000012"
|
||||
},
|
||||
"errs": [
|
||||
"Jc must be a whole number from 0 to 65535.",
|
||||
"Jmin must be a whole number from 0 to 65535.",
|
||||
"S2 must be a whole number from 0 to 65535.",
|
||||
"S3 must be a whole number from 0 to 65535.",
|
||||
"S4 must be a whole number from 0 to 65535."
|
||||
],
|
||||
"all": [
|
||||
"Jc must be a whole number from 0 to 65535.",
|
||||
"Jmin must be a whole number from 0 to 65535.",
|
||||
"S2 must be a whole number from 0 to 65535.",
|
||||
"S3 must be a whole number from 0 to 65535.",
|
||||
"S4 must be a whole number from 0 to 65535."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"jmin": "60",
|
||||
"jmax": "50"
|
||||
},
|
||||
"errs": [
|
||||
"Jmin must not be larger than Jmax."
|
||||
],
|
||||
"all": [
|
||||
"Jmin must not be larger than Jmax."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"jmin": "60"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"h1": "100-200",
|
||||
"h2": "150-300",
|
||||
"h3": "5",
|
||||
"h4": "4294967295"
|
||||
},
|
||||
"errs": [
|
||||
"H1 and H2 overlap: each packet type needs values of its own."
|
||||
],
|
||||
"all": [
|
||||
"H1 and H2 overlap: each packet type needs values of its own."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"h1": "1",
|
||||
"h2": "1"
|
||||
},
|
||||
"errs": [
|
||||
"H1 and H2 overlap: each packet type needs values of its own."
|
||||
],
|
||||
"all": [
|
||||
"H1 and H2 overlap: each packet type needs values of its own."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"h1": "3"
|
||||
},
|
||||
"errs": [
|
||||
"H1 and H3 overlap: each packet type needs values of its own."
|
||||
],
|
||||
"all": [
|
||||
"H1 and H3 overlap: each packet type needs values of its own."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"h1": "200-100",
|
||||
"h2": "5-",
|
||||
"h3": "-5",
|
||||
"h4": "1-2-3"
|
||||
},
|
||||
"errs": [
|
||||
"H1 must be a number or a range like 100-200, up to 4294967295.",
|
||||
"H2 must be a number or a range like 100-200, up to 4294967295.",
|
||||
"H3 must be a number or a range like 100-200, up to 4294967295.",
|
||||
"H4 must be a number or a range like 100-200, up to 4294967295."
|
||||
],
|
||||
"all": [
|
||||
"H1 must be a number or a range like 100-200, up to 4294967295.",
|
||||
"H2 must be a number or a range like 100-200, up to 4294967295.",
|
||||
"H3 must be a number or a range like 100-200, up to 4294967295.",
|
||||
"H4 must be a number or a range like 100-200, up to 4294967295."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"h1": "4294967296",
|
||||
"h2": " 77 "
|
||||
},
|
||||
"errs": [
|
||||
"H1 must be a number or a range like 100-200, up to 4294967295."
|
||||
],
|
||||
"all": [
|
||||
"H1 must be a number or a range like 100-200, up to 4294967295."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"header_protection_key": "yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk=",
|
||||
"s1": "12",
|
||||
"s2": "11",
|
||||
"s3": "64",
|
||||
"s4": "0"
|
||||
},
|
||||
"errs": [
|
||||
"S2 must be at least 12 with header protection.",
|
||||
"S4 must be at least 12 with header protection."
|
||||
],
|
||||
"all": [
|
||||
"S2 must be at least 12 with header protection.",
|
||||
"S4 must be at least 12 with header protection."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"header_protection_key": "yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk="
|
||||
},
|
||||
"errs": [
|
||||
"S1 must be at least 12 with header protection.",
|
||||
"S2 must be at least 12 with header protection.",
|
||||
"S3 must be at least 12 with header protection.",
|
||||
"S4 must be at least 12 with header protection."
|
||||
],
|
||||
"all": [
|
||||
"S1 must be at least 12 with header protection.",
|
||||
"S2 must be at least 12 with header protection.",
|
||||
"S3 must be at least 12 with header protection.",
|
||||
"S4 must be at least 12 with header protection."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"header_protection_key": "not a key",
|
||||
"s1": "20",
|
||||
"s2": "20",
|
||||
"s3": "20",
|
||||
"s4": "20"
|
||||
},
|
||||
"errs": [
|
||||
"The header protection key is not a key."
|
||||
],
|
||||
"all": [
|
||||
"The header protection key is not a key."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"header_protection_key": "yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBml=",
|
||||
"s1": "99999"
|
||||
},
|
||||
"errs": [
|
||||
"S1 must be a whole number from 0 to 65535.",
|
||||
"The header protection key is not a key.",
|
||||
"S2 must be at least 12 with header protection.",
|
||||
"S3 must be at least 12 with header protection.",
|
||||
"S4 must be at least 12 with header protection."
|
||||
],
|
||||
"all": [
|
||||
"S1 must be a whole number from 0 to 65535.",
|
||||
"The header protection key is not a key.",
|
||||
"S2 must be at least 12 with header protection.",
|
||||
"S3 must be at least 12 with header protection.",
|
||||
"S4 must be at least 12 with header protection."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"rekey_after_time": "0",
|
||||
"rekey_timeout": "0-5",
|
||||
"reject_after_time": "181",
|
||||
"keepalive_timeout": "5-15",
|
||||
"max_handshake_attempts": "many"
|
||||
},
|
||||
"errs": [
|
||||
"RekeyTimeout must be a number or a range like 5-15, from 1 to 65535.",
|
||||
"RejectAfterTime must be at most 180 seconds.",
|
||||
"MaxHandshakeAttempts must be a number or a range like 5-15, from 1 to 65535."
|
||||
],
|
||||
"all": [
|
||||
"RekeyTimeout must be a number or a range like 5-15, from 1 to 65535.",
|
||||
"RejectAfterTime must be at most 180 seconds.",
|
||||
"MaxHandshakeAttempts must be a number or a range like 5-15, from 1 to 65535."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"rekey_after_time": "120",
|
||||
"rekey_timeout": "5",
|
||||
"reject_after_time": "100-180",
|
||||
"keepalive_timeout": "65536",
|
||||
"max_handshake_attempts": "0-0"
|
||||
},
|
||||
"errs": [
|
||||
"KeepaliveTimeout must be a number or a range like 5-15, from 1 to 65535."
|
||||
],
|
||||
"all": [
|
||||
"KeepaliveTimeout must be a number or a range like 5-15, from 1 to 65535."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"reject_after_time": "10-999"
|
||||
},
|
||||
"errs": [
|
||||
"RejectAfterTime must be at most 180 seconds."
|
||||
],
|
||||
"all": [
|
||||
"RejectAfterTime must be at most 180 seconds."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"content_padding_addition": "10-100"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"content_padding_addition": "100-10"
|
||||
},
|
||||
"errs": [
|
||||
"ContentPaddingAddition must be a number or a range like 10-100, up to 65535."
|
||||
],
|
||||
"all": [
|
||||
"ContentPaddingAddition must be a number or a range like 10-100, up to 65535."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"content_padding_addition": "0"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"content_padding_addition": "lots"
|
||||
},
|
||||
"errs": [
|
||||
"ContentPaddingAddition must be a number or a range like 10-100, up to 65535."
|
||||
],
|
||||
"all": [
|
||||
"ContentPaddingAddition must be a number or a range like 10-100, up to 65535."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"random_trailers": "on",
|
||||
"disable_cookies": "0"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"random_trailers": "yes",
|
||||
"disable_cookies": "true"
|
||||
},
|
||||
"errs": [
|
||||
"RandomTrailers must be on or off.",
|
||||
"DisableCookies must be on or off."
|
||||
],
|
||||
"all": [
|
||||
"RandomTrailers must be on or off.",
|
||||
"DisableCookies must be on or off."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"i1": "<b 0x0a0b><r 16><t>",
|
||||
"i2": "text <rc 8> between <rd 1000>",
|
||||
"i3": "<t>"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"i1": "<b 0xabc>",
|
||||
"i2": "<b 0x>",
|
||||
"i3": "<b 0xzz>",
|
||||
"i4": "<b abcd>",
|
||||
"i5": "<B 0x00>"
|
||||
},
|
||||
"errs": [
|
||||
"I1: <b 0xabc> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I2: <b 0x> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I3: <b 0xzz> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I4: <b abcd> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I5: <B 0x00> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>."
|
||||
],
|
||||
"all": [
|
||||
"I1: <b 0xabc> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I2: <b 0x> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I3: <b 0xzz> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I4: <b abcd> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I5: <B 0x00> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"i1": "<r 0>",
|
||||
"i2": "<r 1001>",
|
||||
"i3": "<r -5>",
|
||||
"i4": "<rc>",
|
||||
"i5": "<c>"
|
||||
},
|
||||
"errs": [
|
||||
"I1: <r 0> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I2: <r 1001> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I3: <r -5> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I4: <rc> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I5: <c> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>."
|
||||
],
|
||||
"all": [
|
||||
"I1: <r 0> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I2: <r 1001> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I3: <r -5> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I4: <rc> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I5: <c> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"i1": "<d>",
|
||||
"i2": "<ds 4>",
|
||||
"i3": "<dz 4>",
|
||||
"i4": "<r 5",
|
||||
"i5": "no tags at all"
|
||||
},
|
||||
"errs": [
|
||||
"I1: <d> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I2: <ds 4> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I3: <dz 4> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I4 has a tag that is not closed with >."
|
||||
],
|
||||
"all": [
|
||||
"I1: <d> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I2: <ds 4> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I3: <dz 4> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I4 has a tag that is not closed with >."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"i1": "<b 0x00> # a comment",
|
||||
"i2": "<r 5>\n<r 6>",
|
||||
"i3": "<r 5>\r"
|
||||
},
|
||||
"errs": [
|
||||
"I1 may not contain # or a line break.",
|
||||
"I2 may not contain # or a line break.",
|
||||
"I3 may not contain # or a line break."
|
||||
],
|
||||
"all": [
|
||||
"I1 may not contain # or a line break.",
|
||||
"I2 may not contain # or a line break.",
|
||||
"I3 may not contain # or a line break."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"i1": "<this tag is far longer than twenty-four characters>",
|
||||
"i2": "<t><t ><r 5>"
|
||||
},
|
||||
"errs": [
|
||||
"I1: <this tag is far longer t…> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I2: <t > is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>."
|
||||
],
|
||||
"all": [
|
||||
"I1: <this tag is far longer t…> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>.",
|
||||
"I2: <t > is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"i1": "<b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899><b 0x0011223344556677889900112233445566778899>",
|
||||
"i2": "<t>"
|
||||
},
|
||||
"errs": [
|
||||
"I1-I5 together must be at most 2000 characters, not 2073."
|
||||
],
|
||||
"all": [
|
||||
"I1-I5 together must be at most 2000 characters, not 2073."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"i1": "<r 1>>",
|
||||
"i2": "><t>",
|
||||
"i3": "<<t>"
|
||||
},
|
||||
"errs": [
|
||||
"I3: <<t> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>."
|
||||
],
|
||||
"all": [
|
||||
"I3: <<t> is not a tag AmneziaWG apps accept: use <b 0x…> with an even number of hex digits, <r N>, <rc N> or <rd N> with N from 1 to 1000, or <t>."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"jc": "5",
|
||||
"jmin": "50",
|
||||
"jmax": "1000",
|
||||
"s1": "15",
|
||||
"s2": "20",
|
||||
"s3": "25",
|
||||
"s4": "30",
|
||||
"h1": "1000-2000",
|
||||
"h2": "3000-4000",
|
||||
"h3": "5000-6000",
|
||||
"h4": "7000-8000",
|
||||
"i1": "<b 0x1234><r 20>",
|
||||
"header_protection_key": "yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk=",
|
||||
"content_padding_addition": "5-50",
|
||||
"rekey_after_time": "100-120",
|
||||
"rekey_timeout": "4-6",
|
||||
"reject_after_time": "150-180",
|
||||
"keepalive_timeout": "8-12",
|
||||
"max_handshake_attempts": "15-20",
|
||||
"random_trailers": "off",
|
||||
"disable_cookies": "1"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"s1": "8",
|
||||
"s2": "64"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
"S2 must not be S1 + 56: the handshake initiation and response would have the same size."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"s1": "8",
|
||||
"s2": " 64 "
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
"S2 must not be S1 + 56: the handshake initiation and response would have the same size."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"s1": "0",
|
||||
"s2": "56"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
"S2 must not be S1 + 56: the handshake initiation and response would have the same size."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"jc": "11",
|
||||
"jmin": "1025",
|
||||
"jmax": "2000",
|
||||
"s1": "65",
|
||||
"s2": "70",
|
||||
"s3": "65",
|
||||
"s4": "33"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
"Jc must be from 0 to 10.",
|
||||
"Jmin must be from 0 to 1024.",
|
||||
"Jmax must be from 0 to 1024.",
|
||||
"S1 must be from 0 to 64.",
|
||||
"S2 must be from 0 to 64.",
|
||||
"S3 must be from 0 to 64.",
|
||||
"S4 must be from 0 to 32."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"jc": "10",
|
||||
"jmin": "1024",
|
||||
"jmax": "1024",
|
||||
"s1": "64",
|
||||
"s2": "64",
|
||||
"s3": "64",
|
||||
"s4": "32"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"s1": "x",
|
||||
"s2": "56"
|
||||
},
|
||||
"errs": [
|
||||
"S1 must be a whole number from 0 to 65535."
|
||||
],
|
||||
"all": [
|
||||
"S1 must be a whole number from 0 to 65535."
|
||||
]
|
||||
},
|
||||
{
|
||||
"o": {
|
||||
"s2": "56"
|
||||
},
|
||||
"errs": [
|
||||
],
|
||||
"all": [
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user