feat: Client ID шлётся всегда, симметричный wire авторизации

Клиент всегда отправляет Client ID первой DTLS app-record, сервер
всегда читает. Флаг -auth и URI-параметр auth удалены — рассинхрон
client/server невозможен. -clients-file на сервере включает только
проверку ID по allowlist clients.json.

Также:
- clients.json и client_config.json пишутся с правами 0o600
- исправлены все находки golangci-lint (errcheck, gosec, govet shadow)

Примечание: удалён флаг -auth и URI-параметр auth; Client ID теперь
всегда в первой записи туннеля — старые клиенты/серверы несовместимы.
This commit is contained in:
samosvalishe committed 2026-05-25 00:33:26 +03:00
1 parent 198d314031
commit f1b047e9e5
14 files changed
+49 -63

No files matched your search

-5
View File
@@ -12,7 +12,6 @@ type Config struct {
Transport string
Mode string
Bond bool
Auth bool
ObfProfile string
ObfKey string
Peer string
@@ -71,7 +70,6 @@ func Parse(s string) (*Config, error) {
cfg.Mode = vals.Get("mode")
cfg.ObfProfile = vals.Get("obf-profile")
cfg.Bond = vals.Get("bond") == "true" || vals.Get("bond") == "1"
cfg.Auth = vals.Get("auth") == "true" || vals.Get("auth") == "1"
} else {
cfg.Transport = transportPart
}
@@ -95,9 +93,6 @@ func (c *Config) String() string {
if c.Bond {
payload = append(payload, "bond=1")
}
if c.Auth {
payload = append(payload, "auth=1")
}
transportStr := c.Transport
if len(payload) > 0 {