mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-04 04:17:38 +03:00
Add more network names
This commit is contained in:
parent
4bbf5f2c30
commit
3e60222a1a
1 changed files with 7 additions and 2 deletions
|
@ -10,8 +10,11 @@ var ErrUnknownNetwork = E.New("unknown network")
|
|||
|
||||
//goland:noinspection GoNameStartsWithPackageName
|
||||
const (
|
||||
NetworkTCP = "tcp"
|
||||
NetworkUDP = "udp"
|
||||
NetworkIP = "ip"
|
||||
NetworkTCP = "tcp"
|
||||
NetworkUDP = "udp"
|
||||
NetworkICMPv4 = "icmpv4"
|
||||
NetworkICMPv6 = "icmpv6"
|
||||
)
|
||||
|
||||
//goland:noinspection GoNameStartsWithPackageName
|
||||
|
@ -20,6 +23,8 @@ func NetworkName(network string) string {
|
|||
return NetworkTCP
|
||||
} else if strings.HasPrefix(network, "udp") {
|
||||
return NetworkUDP
|
||||
} else if strings.HasPrefix(network, "ip") {
|
||||
return NetworkIP
|
||||
} else {
|
||||
return network
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue