1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-18 03:29:12 -04:00

feat: add network to Shadowsocks simplified config

This commit is contained in:
秋のかえで
2021-09-06 22:48:54 +08:00
committed by Shelikhoo
parent 6d7220bd6c
commit 383bd4ce62
5 changed files with 66 additions and 35 deletions

View File

@@ -59,16 +59,7 @@ func (v *Address) Build() *net.IPOrDomain {
type Network string
func (v Network) Build() net.Network {
switch strings.ToLower(string(v)) {
case "tcp":
return net.Network_TCP
case "udp":
return net.Network_UDP
case "unix":
return net.Network_UNIX
default:
return net.Network_Unknown
}
return net.ParseNetwork(string(v))
}
type NetworkList []Network