mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 23:03:08 +00:00
move host from net/json to net
This commit is contained in:
1 parent
1f1f79b90a
commit
5ceac7a6e2
7 files changed
+74
-111
No files matched your search
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
"github.com/v2ray/v2ray-core/common/log"
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
v2netjson "github.com/v2ray/v2ray-core/common/net/json"
|
||||
"github.com/v2ray/v2ray-core/proxy/internal"
|
||||
"github.com/v2ray/v2ray-core/proxy/internal/config"
|
||||
)
|
||||
@@ -26,10 +25,10 @@ func init() {
|
||||
}
|
||||
|
||||
type SocksConfig struct {
|
||||
AuthMethod string `json:"auth"`
|
||||
Accounts []*SocksAccount `json:"accounts"`
|
||||
UDP bool `json:"udp"`
|
||||
Host *v2netjson.Host `json:"ip"`
|
||||
AuthMethod string `json:"auth"`
|
||||
Accounts []*SocksAccount `json:"accounts"`
|
||||
UDP bool `json:"udp"`
|
||||
Host *v2net.AddressJson `json:"ip"`
|
||||
}
|
||||
|
||||
rawConfig := new(SocksConfig)
|
||||
@@ -55,7 +54,7 @@ func init() {
|
||||
|
||||
socksConfig.UDPEnabled = rawConfig.UDP
|
||||
if rawConfig.Host != nil {
|
||||
socksConfig.Address = rawConfig.Host.Address()
|
||||
socksConfig.Address = rawConfig.Host.Address
|
||||
} else {
|
||||
socksConfig.Address = v2net.IPAddress([]byte{127, 0, 0, 1})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user