agent: Allow agent to connect to hub via SOCKS5 proxy

This commit is contained in:
Rafael Marmelo
2026-04-14 01:42:35 +01:00
committed by hank
parent be0b708064
commit f5576759de

View File

@@ -20,6 +20,7 @@ import (
"github.com/fxamacker/cbor/v2"
"github.com/lxzan/gws"
"golang.org/x/crypto/ssh"
"golang.org/x/net/proxy"
)
const (
@@ -112,6 +113,9 @@ func (client *WebSocketClient) getOptions() *gws.ClientOption {
"X-Token": []string{client.token},
"X-Beszel": []string{beszel.Version},
},
NewDialer: func() (gws.Dialer, error) {
return proxy.FromEnvironment(), nil
},
}
return client.options
}