sing-box/constant/proxy.go

87 lines
1.7 KiB
Go
Raw Normal View History

2022-06-30 21:27:56 +08:00
package constant
const (
2022-09-12 17:30:54 +08:00
TypeTun = "tun"
TypeRedirect = "redirect"
TypeTProxy = "tproxy"
TypeDirect = "direct"
TypeBlock = "block"
TypeDNS = "dns"
2023-08-04 17:13:46 +08:00
TypeSOCKS = "socks"
2022-09-12 17:30:54 +08:00
TypeHTTP = "http"
TypeMixed = "mixed"
TypeShadowsocks = "shadowsocks"
TypeVMess = "vmess"
TypeTrojan = "trojan"
TypeNaive = "naive"
TypeWireGuard = "wireguard"
TypeHysteria = "hysteria"
TypeTor = "tor"
TypeSSH = "ssh"
TypeShadowTLS = "shadowtls"
TypeShadowsocksR = "shadowsocksr"
2022-09-12 21:59:27 +08:00
TypeVLESS = "vless"
2023-07-23 14:42:19 +08:00
TypeTUIC = "tuic"
2023-08-31 20:07:32 +08:00
TypeHysteria2 = "hysteria2"
2022-06-30 21:27:56 +08:00
)
2022-07-21 21:03:41 +08:00
const (
TypeSelector = "selector"
2022-09-15 15:22:08 +08:00
TypeURLTest = "urltest"
2022-07-21 21:03:41 +08:00
)
2023-08-04 17:13:46 +08:00
func ProxyDisplayName(proxyType string) string {
switch proxyType {
2024-06-11 21:16:33 +08:00
case TypeTun:
return "TUN"
case TypeRedirect:
return "Redirect"
case TypeTProxy:
return "TProxy"
2023-08-04 17:13:46 +08:00
case TypeDirect:
return "Direct"
case TypeBlock:
return "Block"
case TypeDNS:
return "DNS"
case TypeSOCKS:
return "SOCKS"
case TypeHTTP:
return "HTTP"
2024-06-11 21:16:33 +08:00
case TypeMixed:
return "Mixed"
2023-08-04 17:13:46 +08:00
case TypeShadowsocks:
return "Shadowsocks"
case TypeVMess:
return "VMess"
case TypeTrojan:
return "Trojan"
case TypeNaive:
return "Naive"
case TypeWireGuard:
return "WireGuard"
case TypeHysteria:
return "Hysteria"
case TypeTor:
return "Tor"
case TypeSSH:
return "SSH"
case TypeShadowTLS:
return "ShadowTLS"
case TypeShadowsocksR:
return "ShadowsocksR"
case TypeVLESS:
return "VLESS"
2023-07-23 14:42:19 +08:00
case TypeTUIC:
return "TUIC"
2023-08-31 20:07:32 +08:00
case TypeHysteria2:
return "Hysteria2"
2023-08-04 17:13:46 +08:00
case TypeSelector:
return "Selector"
case TypeURLTest:
return "URLTest"
default:
return "Unknown"
}
}