mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-09-19 22:46:01 +00:00
feat: server SOCKS5 outbound
This commit is contained in:
@@ -144,6 +144,17 @@ func server(config *serverConfig) {
|
||||
if config.IPv6Only {
|
||||
transport.DefaultServerTransport.IPv6Only = true
|
||||
}
|
||||
// SOCKS5 outbound
|
||||
if config.SOCKS5Outbound.Server != "" {
|
||||
ob, err := transport.NewSOCKS5Client(config.SOCKS5Outbound.Server,
|
||||
config.SOCKS5Outbound.User, config.SOCKS5Outbound.Password, 10*time.Second)
|
||||
if err != nil {
|
||||
logrus.WithFields(logrus.Fields{
|
||||
"error": err,
|
||||
}).Fatal("Failed to initialize SOCKS5 outbound")
|
||||
}
|
||||
transport.DefaultServerTransport.SOCKS5Client = ob
|
||||
}
|
||||
// ACL
|
||||
var aclEngine *acl.Engine
|
||||
if len(config.ACL) > 0 {
|
||||
|
Reference in New Issue
Block a user