break!: выпил tcp-режим туннеля
убраны флаги -mode и -bond: остался только udp-релей для wireguard. удалены tcpfwd, tcpfwdserver, bondclient, bondserver, bondframe, kcptun, wire/relay; proxy/common переехал в udprelay/dial. BREAKING CHANGE: флаги -mode и -bond удалены; конфиги и ссылки freeturn:// с tcp-режимом больше не принимаются.
This commit is contained in:
1 parent
648c55415b
commit
74241de764
53 files changed
+105
-2547
No files matched your search
@@ -41,8 +41,6 @@ func TestAssembleRejectsRawEnums(t *testing.T) {
|
||||
want string
|
||||
}{
|
||||
{"transport", func(r *raw) { r.Transport = "sctp" }, "invalid -transport"},
|
||||
{"mode", func(r *raw) { r.Mode = "quic" }, "invalid -mode"},
|
||||
{"bond without tcp", func(r *raw) { r.Bond = true }, "-bond requires"},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
@@ -80,15 +78,13 @@ func TestApplyURIOverridesOnlyPresentFields(t *testing.T) {
|
||||
r.applyURI(&uri.Config{
|
||||
Peer: "uri-peer:2",
|
||||
Transport: TransportUDP,
|
||||
Mode: ModeTCP,
|
||||
Bond: true,
|
||||
N: 7,
|
||||
})
|
||||
|
||||
if r.Peer != "uri-peer:2" {
|
||||
t.Errorf("Peer = %q, want URI value", r.Peer)
|
||||
}
|
||||
if r.Transport != TransportUDP || r.Mode != ModeTCP || !r.Bond || r.N != 7 {
|
||||
if r.Transport != TransportUDP || r.N != 7 {
|
||||
t.Errorf("URI fields not applied: %+v", r)
|
||||
}
|
||||
if r.ClientID != "flag-id" || r.Links != "https://vk.ru/call/join/FROMFLAG" {
|
||||
@@ -100,12 +96,10 @@ func TestApplyURIIgnoresZeroValues(t *testing.T) {
|
||||
r := defaultRaw()
|
||||
r.N = 5
|
||||
r.StreamsPerCred = 3
|
||||
r.Bond = true
|
||||
r.Mode = ModeTCP
|
||||
|
||||
r.applyURI(&uri.Config{})
|
||||
|
||||
if r.N != 5 || r.StreamsPerCred != 3 || !r.Bond || r.Mode != ModeTCP {
|
||||
if r.N != 5 || r.StreamsPerCred != 3 {
|
||||
t.Errorf("empty URI must not reset fields: %+v", r)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user