mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-25 07:16:29 +03:00
Add SOCKS proxy auth (closes #423)
This commit is contained in:
@@ -61,6 +61,7 @@ type tcpOptions struct {
|
||||
linkOptions
|
||||
upgrade *TcpUpgrade
|
||||
socksProxyAddr string
|
||||
socksProxyAuth *proxy.Auth
|
||||
socksPeerAddr string
|
||||
}
|
||||
|
||||
@@ -282,7 +283,7 @@ func (t *tcp) call(saddr string, options tcpOptions, sintf string) {
|
||||
return
|
||||
}
|
||||
var dialer proxy.Dialer
|
||||
dialer, err = proxy.SOCKS5("tcp", dialerdst.String(), nil, proxy.Direct)
|
||||
dialer, err = proxy.SOCKS5("tcp", dialerdst.String(), options.socksProxyAuth, proxy.Direct)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user