sing-box/constant/proxy.go

88 lines
1.7 KiB
Go
Raw Normal View History

2022-06-30 13:27:56 +00:00
package constant
const (
2022-09-12 09:30:54 +00:00
TypeTun = "tun"
TypeRedirect = "redirect"
TypeTProxy = "tproxy"
TypeDirect = "direct"
TypeBlock = "block"
TypeDNS = "dns"
2023-08-04 09:13:46 +00:00
TypeSOCKS = "socks"
2022-09-12 09:30:54 +00: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 13:59:27 +00:00
TypeVLESS = "vless"
2023-07-23 06:42:19 +00:00
TypeTUIC = "tuic"
2023-08-31 12:07:32 +00:00
TypeHysteria2 = "hysteria2"
2024-11-04 03:06:39 +00:00
TypeTailscale = "tailscale"
2022-06-30 13:27:56 +00:00
)
2022-07-21 13:03:41 +00:00
const (
TypeSelector = "selector"
2022-09-15 07:22:08 +00:00
TypeURLTest = "urltest"
2022-07-21 13:03:41 +00:00
)
2023-08-04 09:13:46 +00:00
func ProxyDisplayName(proxyType string) string {
switch proxyType {
2024-06-11 13:16:33 +00:00
case TypeTun:
return "TUN"
case TypeRedirect:
return "Redirect"
case TypeTProxy:
return "TProxy"
2023-08-04 09:13:46 +00:00
case TypeDirect:
return "Direct"
case TypeBlock:
return "Block"
case TypeDNS:
return "DNS"
case TypeSOCKS:
return "SOCKS"
case TypeHTTP:
return "HTTP"
2024-06-11 13:16:33 +00:00
case TypeMixed:
return "Mixed"
2023-08-04 09:13:46 +00: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 06:42:19 +00:00
case TypeTUIC:
return "TUIC"
2023-08-31 12:07:32 +00:00
case TypeHysteria2:
return "Hysteria2"
2023-08-04 09:13:46 +00:00
case TypeSelector:
return "Selector"
case TypeURLTest:
return "URLTest"
default:
return "Unknown"
}
}