fix(client): применить HandshakeSem к VLESS-диалеру
dtlsdial.Dialer в VLESS-режиме теперь несёт тот же HandshakeSem (cap-3), что и UDP-диалер, предотвращая неограниченное число конкурентных DTLS-handshake на пути VLESS/bond.
This commit is contained in:
1 parent
f54f59bff9
commit
14376016aa
1 file changed
+4
-1
+4
-1
@@ -104,7 +104,10 @@ func main() {
|
||||
})
|
||||
|
||||
if cfg.Proxy.Mode != config.ProxyModeUDP {
|
||||
vlessDtlsDialer := &dtlsdial.Dialer{HandshakeTimeout: 30 * time.Second}
|
||||
vlessDtlsDialer := &dtlsdial.Dialer{
|
||||
HandshakeTimeout: 30 * time.Second,
|
||||
HandshakeSem: make(chan struct{}, 3),
|
||||
}
|
||||
bondH := &bondclient.Handler{Deps: bondclient.Deps{Log: logger}}
|
||||
vlessDeps := &tcpfwd.Deps{
|
||||
DTLSDialer: vlessDtlsDialer,
|
||||
|
||||
Reference in new issue
Block a user