Proxies URI & sing-box
Socks
URI
socks://base64(<username>:<password>)@<server>:<port>#remark
socks://ZWxkZW46ZDg0ZWYxMmQtMGMyYS00ZDNlLTg0NTYtN2M1MjIyOWY1MGU2@127.0.0.1:1080#idevSocks
Decode URI
socks://elden:d84ef12d-0c2a-4d3e-8456-7c52229f50e6@127.0.0.1:1080#idevSocks
sing-box inbound
{ "type": "socks", "tag": "socks-in", "listen": "::", "listen_port": 1080, "users": [ { "username": "elden", "password": "d84ef12d-0c2a-4d3e-8456-7c52229f50e6" } ] }
sing-box outbound
{ "type": "socks", "tag": "socks-out", "server": "127.0.0.1", "server_port": 1080, "version": "5", "username": "elden", "password": "d84ef12d-0c2a-4d3e-8456-7c52229f50e6" }
Shadowsocks
URI
ss://base64(<method>:<password>)@<server>:<port>#remark
ss://MjAyMi1ibGFrZTMtY2hhY2hhMjAtcG9seTEzMDU6ZDg0ZWYxMmQwYzJhNGQzZTg0NTY3YzUyMjI5ZjUwZTY=@ss.idev.dev:443#idevShadowsocks
Decode URI
ss://2022-blake3-chacha20-poly1305:d84ef12d0c2a4d3e84567c52229f50e6@ss.idev.dev:443#idevShadowsocks
sing-box inbound
{ "type": "shadowsocks", "tag": "ss-in", "listen": "::", "listen_port": 443, // 加密方法 "method": "2022-blake3-chacha20-poly1305", // UUID(需要移除“-”),base64编码 "password": "ZDg0ZWYxMmQwYzJhNGQzZTg0NTY3YzUyMjI5ZjUwZTY=", "multiplex": { "enabled": true, "padding": true } }
sing-box outbound
{ "type": "shadowsocks", "tag": "ss-out", "server": "你的域名或者服务器IP", "server_port": 443, // 加密方法 "method": "2022-blake3-chacha20-poly1305", // UUID(需要移除“-”),base64编码 "password": "ZDg0ZWYxMmQwYzJhNGQzZTg0NTY3YzUyMjI5ZjUwZTY=", "multiplex": { "enabled": true, "protocol": "smux", "max_connections": 4, "min_streams": 4, "max_streams": 0, "padding": true } }
VMess
vmess://base64(Decode URI)
tcp
URI
vmess://ewogICJ2IjogIjIiLAogICJwcyI6ICJpZGV2Vk1lc3NUY3AiLAogICJhZGQiOiAidm1lc3MuaWRldi5kZXYiLAogICJwb3J0IjogIjQ0MyIsCiAgImlkIjogImQ4NGVmMTJkLTBjMmEtNGQzZS04NDU2LTdjNTIyMjlmNTBlNiIsCiAgImFpZCI6ICIwIiwKICAic2N5IjogImF1dG8iLAogICJuZXQiOiAidGNwIiwKICAidHlwZSI6ICJub25lIiwKICAiaG9zdCI6ICIiLAogICJwYXRoIjogIiIsCiAgInRscyI6ICJ0bHMiLAogICJzbmkiOiAidm1lc3MuaWRldi5kZXYiLAogICJhbHBuIjogImgyLGh0dHAvMS4xIiwKICAiZnAiOiAiY2hyb21lIgp9
Decode URI
{ "v": "2", "ps": "idevVMessTcp", "add": "vmess.idev.dev", "port": "443", "id": "d84ef12d-0c2a-4d3e-8456-7c52229f50e6", "aid": "0", "scy": "auto", "net": "tcp", "type": "none", "host": "", "path": "", "tls": "tls", "sni": "vmess.idev.dev", "alpn": "h2,http/1.1", "fp": "chrome" }
sing-box inbound
{ "type": "vmess", "tag": "vmess-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "uuid": "你的密码", "alterId": 0 } ], "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "h2", "http/1.1" ] }, "multiplex": { "enabled": true, "padding": true } }
sing-box outbound
{ "type": "vmess", "tag": "vmess-out", "server": "你的域名或者服务器IP", "server_port": 443, "uuid": "你的密码", "security": "auto", "alter_id": 0, "tls": { "enabled": true, "server_name": "你的域名", "alpn": [ "h2", "http/1.1" ], "utls": { "enabled": true, "fingerprint": "chrome" } }, "multiplex": { "enabled": true, "protocol": "smux", "max_connections": 4, "min_streams": 4, "max_streams": 0, "padding": true }, "packet_encoding": "xudp" }
websocket
URI
vmess://ewogICJ2IjogIjIiLAogICJwcyI6ICJpZGV2Vm1lc3NXZWJzb2NrZXQiLAogICJhZGQiOiAidm1lc3MuaWRldi5kZXYiLAogICJwb3J0IjogIjQ0MyIsCiAgImlkIjogImQ4NGVmMTJkLTBjMmEtNGQzZS04NDU2LTdjNTIyMjlmNTBlNiIsCiAgImFpZCI6ICIwIiwKICAic2N5IjogImF1dG8iLAogICJuZXQiOiAid3MiLAogICJ0eXBlIjogIm5vbmUiLAogICJob3N0IjogInZtZXNzLmlkZXYuZGV2IiwKICAicGF0aCI6ICIvdmlkZW8iLAogICJ0bHMiOiAidGxzIiwKICAic25pIjogInZtZXNzLmlkZXYuZGV2IiwKICAiYWxwbiI6ICJodHRwLzEuMSIsCiAgImZwIjogImNocm9tZSIKfQ==
Decode URI
{ "v": "2", "ps": "idevVmessWebsocket", "add": "vmess.idev.dev", "port": "443", "id": "d84ef12d-0c2a-4d3e-8456-7c52229f50e6", "aid": "0", "scy": "auto", "net": "ws", "type": "none", "host": "vmess.idev.dev", "path": "/video", "tls": "tls", "sni": "vmess.idev.dev", "alpn": "http/1.1", "fp": "chrome" }
sing-box inbound
{ "type": "vmess", "tag": "vmess-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "uuid": "你的密码", "alterId": 0 } ], "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "http/1.1" ] }, "transport": { "type": "ws", "path": "你的ws path路径,如:'/myPath'", "headers": {}, "max_early_data": 0, "early_data_header_name": "" }, "multiplex": { "enabled": true, "padding": true } }
sing-box outbound
{ "type": "vmess", "tag": "vmess-out", "server": "你的域名或者服务器IP", "server_port": 443, "uuid": "你的密码", "security": "auto", "alter_id": 0, "tls": { "enabled": true, "server_name": "你的域名", "alpn": [ "http/1.1" ], "utls": { "enabled": true, "fingerprint": "chrome" } }, "transport": { "type": "ws", "path": "你的ws path路径,如:'/myPath'", "headers": {}, "max_early_data": 0, "early_data_header_name": "" }, "multiplex": { "enabled": true, "protocol": "smux", "max_connections": 4, "min_streams": 4, "max_streams": 0, "padding": true }, "packet_encoding": "xudp" }
grpc
URI
vmess://ewogICJ2IjogIjIiLAogICJwcyI6ICJpZGV2Vm1lc3NHcnBjIiwKICAiYWRkIjogInZtZXNzLmlkZXYuZGV2IiwKICAicG9ydCI6ICI0NDMiLAogICJpZCI6ICJkODRlZjEyZC0wYzJhLTRkM2UtODQ1Ni03YzUyMjI5ZjUwZTYiLAogICJhaWQiOiAiMCIsCiAgInNjeSI6ICJhdXRvIiwKICAibmV0IjogImdycGMiLAogICJ0eXBlIjogImd1biIsCiAgImhvc3QiOiAiIiwKICAicGF0aCI6ICJpZGV2R3JwYyIsCiAgInRscyI6ICJ0bHMiLAogICJzbmkiOiAidm1lc3MuaWRldi5kZXYiLAogICJhbHBuIjogImgyLGh0dHAvMS4xIiwKICAiZnAiOiAiY2hyb21lIgp9
Decode URI
{ "v": "2", "ps": "idevVmessGrpc", "add": "vmess.idev.dev", "port": "443", "id": "d84ef12d-0c2a-4d3e-8456-7c52229f50e6", "aid": "0", "scy": "auto", "net": "grpc", "type": "gun", "host": "", "path": "idevGrpc", "tls": "tls", "sni": "vmess.idev.dev", "alpn": "h2,http/1.1", "fp": "chrome" }
sing-box inbound
{ "type": "vmess", "tag": "vmess-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "uuid": "你的密码", "alterId": 0 } ], "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "h2", "http/1.1" ] }, "transport": { "type": "grpc", "service_name": "idevGrpc", "idle_timeout": "15s", "ping_timeout": "15s", "permit_without_stream": false } }
- sing-box outbound
{
"type": "vmess",
"tag": "vmess-out",
"server": "你的域名或者服务器IP",
"server_port": 443,
"uuid": "你的密码",
"security": "auto",
"alter_id": 0,
"tls": {
"enabled": true,
"server_name": "你的域名",
"alpn": [
"h2",
"http/1.1"
],
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
},
"transport": {
"type": "grpc",
"service_name": "idevGrpc",
"idle_timeout": "15s",
"ping_timeout": "15s",
"permit_without_stream": false
},
"packet_encoding": "xudp"
}
VLESS
websocket+tls
URI
vless://<password>@<server>:<port>?sni=<sni>&host=<host>&path=<path>&type=ws&encryption=none&flow=none&security=tls&alpn=http%2F1.1&fp=chrome#remark
vless://d84ef12d-0c2a-4d3e-8456-7c52229f50e6@vless.idev.dev:443?encryption=none&flow=none&security=tls&sni=vless.idev.dev&alpn=http%2F1.1&fp=chrome&type=ws&host=vless.idev.dev&path=%2Fvideo#idevVlessWebsocketTls
sing-box inbound
{ "type": "vless", "tag": "vless-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "uuid": "你的密码", "flow": "" } ], "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "http/1.1" ] }, "transport": { "type": "ws", "path": "/video", "headers": {}, "max_early_data": 0, "early_data_header_name": "" }, "multiplex": { "enabled": true, "padding": true } }
sing-box outbound
{ "type": "vless", "tag": "vless-out", "server": "你的域名或者服务器IP", "server_port": 443, "uuid": "你的密码", "flow": "", "tls": { "enabled": true, "server_name": "你的域名", "alpn": [ "http/1.1" ], "utls": { "enabled": true, "fingerprint": "chrome" } }, "transport": { "type": "ws", "path": "/video", "headers": {}, "max_early_data": 0, "early_data_header_name": "" }, "multiplex": { "enabled": true, "protocol": "smux", "max_connections": 4, "min_streams": 4, "max_streams": 0, "padding": true }, "packet_encoding": "xudp" }
sing-box httpUpgrade
{ "transport": { "type": "httpupgrade", "host": "你的域名", "path": "/video", "headers": {} } }
vision+tcp+reality
URI
vless://<password>@<server>:<port>?sni=<sni>&pbk=<public-key>&sid=<short-id>&spx=<spiderX>&type=tcp&encryption=none&flow=xtls-rprx-vision&security=reality&headerType=none&alpn=h2%2Chttp%2F1.1&fp=chrome#remark
vless://d84ef12d-0c2a-4d3e-8456-7c52229f50e6@vless.idev.dev:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=www.bing.com&alpn=h2%2Chttp%2F1.1&fp=chrome&pbk=STI4qtv9BMw3_Eiu3PJA8sTMBZjFo-lKSoI2G6Mruhk&sid=1688&spx=%2F&type=tcp&headerType=none#idevVlessVisionTcpReality
sing-box inbound
{ "type": "vless", "tag": "vless-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "uuid": "你的密码", "flow": "xtls-rprx-vision" } ], "tls": { "enabled": true, "server_name": "用于握手的目标网站", "alpn": [ "h2", "http/1.1" ], "reality": { "enabled": true, "handshake": { "server": "用于握手的目标网站", "server_port": 443 }, "private_key": "你的私钥", "short_id": [ "1688", "0123456789abcdef" ] } }, "multiplex": { "enabled": true, "padding": true } }
- sing-box outbound
{
"type": "vless",
"tag": "vless-out",
"server": "你的服务器IP",
"server_port": 443,
"uuid": "你的密码",
"flow": "xtls-rprx-vision",
"tls": {
"enabled": true,
"server_name": "用于握手的目标网站",
"alpn": [
"h2",
"http/1.1"
],
"utls": {
"enabled": true,
"fingerprint": "chrome"
},
"reality": {
"enabled": true,
"public_key": "你的公钥",
"short_id": "服务端short_id列表中的其一"
}
},
"multiplex": {
"enabled": true,
"protocol": "smux",
"max_connections": 4,
"min_streams": 4,
"max_streams": 0,
"padding": true
},
"packet_encoding": "xudp"
}
h2+reality
URI
vless://<password>@<server>:<port>?sni= <sni>&pbk=<public-key>&sid=<short-id>&spx=<spiderX>&encryption=none&security=reality&alpn=h2&fp=chrome&type=http&host=h2&path=#remark
vless://d84ef12d-0c2a-4d3e-8456-7c52229f50e6@vless.idev.dev:443?encryption=none&security=reality&sni=www.bing.com&alpn=h2&fp=chrome&pbk=STI4qtv9BMw3_Eiu3PJA8sTMBZjFo-lKSoI2G6Mruhk&sid=1688&spx=%2F&type=http&host=h2&path=#idevVlessH2Reality
sing-box inbound
{ "type": "vless", "tag": "vless-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "uuid": "你的密码", "flow": "" } ], "tls": { "enabled": true, "server_name": "用于握手的目标网站", "alpn": [ "h2" ], "reality": { "enabled": true, "handshake": { "server": "用于握手的目标网站", "server_port": 443 }, "private_key": "你的私钥", "short_id": [ "1688", "0123456789abcdef" ] } }, "transport": { "type": "http", "host": [ "h2" ] } }
sing-box outbound
{ "type": "vless", "tag": "vless-out", "server": "你的服务器IP", "server_port": 443, "uuid": "你的密码", "flow": "", "network": "tcp", "tls": { "enabled": true, "server_name": "用于握手的目标网站", "alpn": [ "h2" ], "utls": { "enabled": true, "fingerprint": "chrome" }, "reality": { "enabled": true, "public_key": "你的公钥", "short_id": "服务端short_id列表中的其一" } }, "transport": { "type": "http", "host": [ "h2" ] }, "packet_encoding": "xudp" }
grpc+reality
URI
vless://<password>@<server>:<port>?sni= <sni>&pbk=<public-key>&sid=<short-id>&spx=<spiderX>&serviceName=<service-name>&encryption=none&security=reality&alpn=h2%2Chttp%2F1.1&fp=chrome&type=grpc&mode=gun#remark
vless://d84ef12d-0c2a-4d3e-8456-7c52229f50e6@vless.idev.dev:443?encryption=none&security=reality&sni=www.bing.com&alpn=h2%2Chttp%2F1.1&fp=chrome&pbk=STI4qtv9BMw3_Eiu3PJA8sTMBZjFo-lKSoI2G6Mruhk&sid=1688&spx=%2F&type=grpc&serviceName=idevGrpc&mode=gun#idevVlessGrpcReality
sing-box inbound
{ "type": "vless", "tag": "vless-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "uuid": "你的密码", "flow": "" } ], "tls": { "enabled": true, "server_name": "用于握手的目标网站", "alpn": [ "h2", "http/1.1" ], "reality": { "enabled": true, "handshake": { "server": "用于握手的目标网站", "server_port": 443 }, "private_key": "你的私钥", "short_id": [ "1688", "0123456789abcdef" ] } }, "transport": { "type": "grpc", "service_name": "idevGrpc", "idle_timeout": "15s", "ping_timeout": "15s", "permit_without_stream": false } }
sing-box outbound
{ "type": "vless", "tag": "vless-out", "server": "你的服务器IP", "server_port": 443, "uuid": "你的密码", "flow": "", "network": "tcp", "tls": { "enabled": true, "server_name": "用于握手的目标网站", "alpn": [ "h2", "http/1.1" ], "utls": { "enabled": true, "fingerprint": "chrome" }, "reality": { "enabled": true, "public_key": "你的公钥", "short_id": "服务端short_id列表中的其一" } }, "transport": { "type": "grpc", "service_name": "idevGrpc", "idle_timeout": "15s", "ping_timeout": "15s", "permit_without_stream": false }, "packet_encoding": "xudp" }
Trojan
tcp
URI
trojan://<password>@<server>:<port>?sni=<sni>&security=tls&alpn=h2%2Chttp%2F1.1&fp=chrome&type=tcp&headerType=none#remark
trojan://d84ef12d-0c2a-4d3e-8456-7c52229f50e6@trojan.idev.dev:443?security=tls&sni=trojan.idev.dev&alpn=h2%2Chttp%2F1.1&fp=chrome&type=tcp&headerType=none#idevTrojanTcp
sing-box inbound
{ "type": "trojan", "tag": "trojan-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "password": "你的密码" } ], "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "h2", "http/1.1" ] }, "multiplex": { "enabled": true, "padding": true }, // 回落服务配置,更改为自己内网的服务端口,不配置则禁用回落 "fallback": { "server": "127.0.0.1", "server_port": 8080 }, "fallback_for_alpn": { "http/1.1": { "server": "127.0.0.1", "server_port": 8081 } } }
sing-box outbound
{ "type": "trojan", "tag": "trojan-out", "server": "你的域名或者服务器IP", "server_port": 443, "password": "你的密码", "tls": { "enabled": true, "server_name": "你的域名", "alpn": [ "h2", "http/1.1" ], "utls": { "enabled": true, "fingerprint": "chrome" } }, "multiplex": { "enabled": true, "protocol": "smux", "max_connections": 4, "min_streams": 4, "max_streams": 0, "padding": true } }
websocket
URI
trojan://<password>@<server>:<port>?sni=<sni>&host=<host>&path=<path>&security=tls&alpn=http%2F1.1&fp=chrome&type=ws#remark
trojan://d84ef12d-0c2a-4d3e-8456-7c52229f50e6@trojan.idev.dev:443?security=tls&sni=trojan.idev.dev&alpn=http%2F1.1&fp=chrome&type=ws&host=trojan.idev.dev&path=%2Fvideo#idevTrojanWebsocket
sing-box inbound
{ "type": "trojan", "tag": "trojan-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "password": "你的密码" } ], "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "http/1.1" ] }, "transport": { "type": "ws", "path": "你的ws path路径,如:'/myPath'", "headers": {}, "max_early_data": 0, "early_data_header_name": "" }, "multiplex": { "enabled": true, "padding": true }, // 回落服务配置,更改为自己内网的服务端口,不配置则禁用回落 "fallback": { "server": "127.0.0.1", "server_port": 8080 }, "fallback_for_alpn": { "http/1.1": { "server": "127.0.0.1", "server_port": 8081 } } }
sing-box outbound
{ "type": "trojan", "tag": "trojan-out", "server": "你的域名或者服务器IP", "server_port": 443, "password": "你的密码", "network": "tcp", "tls": { "enabled": true, "server_name": "你的域名", "alpn": [ "http/1.1" ], "utls": { "enabled": true, "fingerprint": "chrome" } }, "transport": { "type": "ws", "path": "你的ws path路径,如:'/myPath'", "headers": {}, "max_early_data": 0, "early_data_header_name": "" }, "multiplex": { "enabled": true, "protocol": "smux", "max_connections": 4, "min_streams": 4, "max_streams": 0, "padding": true } }
Hysteria2
with obfs
URI
hysteria2://[<username>:]<password>@<server>:<port>?obfs-password=<obfs-password>&sni=<sni>&insecure=0&obfs=salamander&alpn=h3#remark
hysteria2://elden:d84ef12d-0c2a-4d3e-8456-7c52229f50e6@hy2.idev.dev:443?insecure=0&obfs=salamander&obfs-password=d84ef12d-0c2a-4d3e-8456-7c52229f50e6&sni=hy2.idev.dev&alpn=h3#idevHysteria2
sing-box inbound
{ "type": "hysteria2", "tag": "hy2-in", "listen": "::", "listen_port": 443, // 根据自己服务器的带宽填写 "up_mbps": 100, "down_mbps": 100, "obfs": { "type": "salamander", "password": "你的混淆密码" }, "users": [ { "name": "elden", "password": "你的密码" } ], "ignore_client_bandwidth": false, "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "h3" ] }, "masquerade": "https://github.com", "brutal_debug": false }
sing-box outbound
{ "type": "hysteria2", "tag": "hy2-out", "server": "你的域名或者服务器IP", "server_port": 443, "up_mbps": 100, // 根据自己的带宽填写 "down_mbps": 100, "password": "你的密码", "obfs": { "type": "salamander", "password": "你的混淆密码" }, "tls": { "enabled": true, "server_name": "你的域名", "alpn": [ "h3" ] }, "brutal_debug": false }
without obfs
URI
hysteria2://[<username>:]<password>@<server>:<port>?sni=<sni>&insecure=0&obfs=none&alpn=h3#remark
hysteria2://d84ef12d-0c2a-4d3e-8456-7c52229f50e6@hy2.idev.dev:443?insecure=0&obfs=none&sni=hy2.idev.dev&alpn=h3#idevHysteria2
sing-box inbound
{ "type": "hysteria2", "tag": "hy2-in", "listen": "::", "listen_port": 443, // 根据自己服务器的带宽填写 "up_mbps": 100, "down_mbps": 100, "users": [ { "name": "elden", "password": "你的密码" } ], "ignore_client_bandwidth": false, "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "h3" ] }, "masquerade": "https://github.com", "brutal_debug": false }
sing-box outbound
{ "type": "hysteria2", "tag": "hy2-out", "server": "你的域名或者服务器IP", "server_port": 443, "up_mbps": 100, // 根据自己的带宽填写 "down_mbps": 100, "password": "你的密码", "tls": { "enabled": true, "server_name": "你的域名", "alpn": [ "h3" ] }, "brutal_debug": false }
NaiveProxy
URI部分客户端支持
URI
http2://base64(<username>:<password>@<server>:<port>)?tfo=true&padding=true#idevNaiveProxy
http2://ZWxkZW46ZDg0ZWYxMmQtMGMyYS00ZDNlLTg0NTYtN2M1MjIyOWY1MGU2QG5haXZlLmlkZXYuZGV2OjQ0Mw==?tfo=true&padding=true#remark
Decode URI
http2://elden:d84ef12d-0c2a-4d3e-8456-7c52229f50e6@naive.idev.dev:443?tfo=true&padding=true#idevNaiveProxy
sing-box inbound
{ "type": "naive", "tag": "naive-in", "listen": "::", "listen_port": 443, "users": [ { "username": "elden", "password": "你的密码" } ], "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "h2", "http/1.1" ] } }
TUIC
URI部分客户端支持
URI
tuic://<uuid>:<password>@<server>:<port>?sni=<sni>&congestion_control=<congestion-control>#remark
tuic://myUUID:myPassword@tuic.idev.dev:443?sni=tuic.idev.dev&congestion_control=cubic#idevTuic
sing-box inbound
{ "type": "tuic", "tag": "tuic-in", "listen": "::", "listen_port": 443, "users": [ { "name": "elden", "uuid": "你的UUID", "password": "你的密码" } ], "congestion_control": "cubic", "auth_timeout": "3s", "zero_rtt_handshake": false, "heartbeat": "10s", "tls": { "enabled": true, "server_name": "你的域名", "certificate_path": "你的证书路径", "key_path": "你的密钥路径", "alpn": [ "h3" ] } }
sing-box outbound
{ "type": "tuic", "tag": "tuic-out", "server": "你的域名或者服务器IP", "server_port": 443, "uuid": "你的UUID", "password": "你的密码", "congestion_control": "cubic", "udp_relay_mode": "native", "udp_over_stream": false, "zero_rtt_handshake": false, "heartbeat": "10s", "tls": { "enabled": true, "server_name": "你的域名", "alpn": [ "h3" ] } }
ShadowTLS
singbox inbound
{ "type": "shadowtls", "tag": "st-in", "listen": "::", "listen_port": 443, "version": 3, "users": [ { "name": "elden", "password": "你的密码" } ], "handshake": { "server": "www.bing.com", "server_port": 443 }, "strict_mode": true, "detour": "shadowsocks-in" }, { "type": "shadowsocks", "tag": "shadowsocks-in", "listen": "127.0.0.1", "method": "2022-blake3-chacha20-poly1305", "password": "ZDg0ZWYxMmQwYzJhNGQzZTg0NTY3YzUyMjI5ZjUwZTY=" }
- singbox outbound
{
"type": "shadowsocks",
"tag": "proxy",
"detour": "st-out",
"method": "2022-blake3-chacha20-poly1305",
"password": "ZDg0ZWYxMmQwYzJhNGQzZTg0NTY3YzUyMjI5ZjUwZTY="
},
{
"type": "shadowtls",
"tag": "st-out",
"server": "你的域名或者服务器IP",
"server_port": 443,
"version": 3,
"password": "你的密码",
"tls": {
"enabled": true,
"server_name": "www.bing.com",
"alpn": [
"h2",
"http/1.1"
],
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
}
}
ACME
以上配置大部分均使用自定义TLS证书
若使用acme自动签发证书,将inbound中的
certificate_path
和key_path
改为acme配置,修改domain、default\_server\_name、email
{
"tls": {
"acme": {
"domain": [
"idev.dev",
"sing-box.idev.dev"
],
"data_directory": "/etc/ssl/certs/sing-box",
"default_server_name": "idev.dev",
"email": "idev@example.com",
"provider": "letsencrypt"
}
}
}
sing-box Test
client configuration
{
"dns": {
"servers": [
{
"tag": "alidns",
"address": "https://223.5.5.5/dns-query",
"strategy": "ipv4_only",
"detour": "direct"
},
{
"tag": "cloudflare",
"address": "https://1.1.1.1/dns-query",
"strategy": "ipv4_only",
"detour": "proxy"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"rules": [
{
"outbound": [
"any"
],
"server": "alidns"
},
{
"domain_suffix": [
".cn"
],
"server": "alidns"
},
{
"rule_set": [
"geosite-cn"
],
"server": "alidns"
},
{
"rule_set": [
"geosite-category-ads-all"
],
"server": "block"
}
],
"final": "cloudflare",
"strategy": "",
"disable_cache": false,
"disable_expire": false
},
"inbounds": [
// mixed、tun二选一。ios设备必须tun
{
"type": "mixed",
"tag": "mixed-in",
"listen": "::",
"listen_port": 5353,
"tcp_fast_open": true,
"udp_fragment": true,
"sniff": true,
"sniff_override_destination": true,
"set_system_proxy": true
},
{
"type": "tun",
"tag": "tun-in",
"stack": "system",
"interface_name": "utun",
"address": ["172.19.0.1/30"],
"domain_strategy": "",
"mtu": 1420,
"auto_route": true,
"strict_route": true,
"sniff": true,
"sniff_timeout": "300ms",
"sniff_override_destination": true,
"udp_timeout": 300
}
],
"outbounds": [
{
// 你的出站配置,tag改为proxy
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"ip_is_private": true,
"outbound": "direct"
},
{
"domain_suffix": [
".cn"
],
"outbound": "direct"
},
{
"rule_set": [
"geoip-cn",
"geosite-cn",
"geosite-private"
],
"outbound": "direct"
},
{
"rule_set": [
"geosite-category-ads-all"
],
"outbound": "block"
}
],
"rule_set": [
{
"tag": "geoip-cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "proxy"
},
{
"tag": "geosite-cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
"download_detour": "proxy"
},
{
"tag": "geosite-private",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-private.srs",
"download_detour": "proxy"
},
{
"tag": "geosite-category-ads-all",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs",
"download_detour": "proxy"
}
],
"auto_detect_interface": true,
"final": "proxy"
},
"experimental": {
"cache_file": {
"enabled": true,
"path": "cache.db",
"cache_id": "mycacheid",
"store_fakeip": true
}
}
}
server configuration
{
"log": {
"disabled": false,
"level": "info",
"output": "/var/log/sing-box.log",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "cloudflare",
"address": "https://1.1.1.1/dns-query",
"strategy": "ipv4_only",
"detour": "direct"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"final": "cloudflare",
"strategy": "",
"disable_cache": false,
"disable_expire": false
},
"inbounds": [
{
// 你的入站配置
}
],
"outbounds": [
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"ip_is_private": true,
"outbound": "direct"
}
],
"auto_detect_interface": true,
"final": "direct"
},
"experimental": {
"cache_file": {
"enabled": true,
"path": "cache.db",
"cache_id": "mycacheid",
"store_fakeip": true
}
}
}