sudo cp -a /etc/sing-box/config.json \
/etc/sing-box/config.json.backup
sudo nano /etc/sing-box/config.json
{
"log": {
"level": "info"
},
"dns": {
"servers": [
{
"type": "https",
"tag": "remote-dns",
"server": "1.1.1.1",
"path": "/dns-query",
"detour": "proxy"
}
],
"final": "remote-dns",
"strategy": "prefer_ipv4"
},
"inbounds": [
{
"type": "tun",
"tag": "tun-in",
"interface_name": "sb-tun",
"address": [
"172.19.0.1/30",
"fdfe:dcba:9876::1/126"
],
"mtu": 1400,
"auto_route": true,
"auto_redirect": true,
"strict_route": true,
"route_exclude_address": [
"192.168.0.0/16",
"10.0.0.0/8",
"172.16.0.0/12",
"fc00::/7",
"fe80::/10"
]
}
],
"outbounds": [
{
"type": "vless",
"tag": "proxy",
"server": "SERVER_IP",
"server_port": 443,
"uuid": "UUID",
"flow": "xtls-rprx-vision",
"tls": {
"enabled": true,
"server_name": "www.apple.com",
"utls": {
"enabled": true,
"fingerprint": "chrome"
},
"reality": {
"enabled": true,
"public_key": "MY_PBK",
"short_id": "acab1312"
}
}
},
{
"type": "direct",
"tag": "direct"
}
],
"route": {
"auto_detect_interface": true,
"default_domain_resolver": {
"server": "remote-dns",
"strategy": "prefer_ipv4"
},
"rules": [
{
"action": "sniff"
},
{
"protocol": "dns",
"action": "hijack-dns"
}
],
"final": "proxy"
}
}
sudo sing-box check -c /etc/sing-box/config.json
sudo systemctl restart sing-box
sudo systemctl status sing-box --no-pager -l
curl -4 https://api.ipify.org
curl -6 --connect-timeout 10 https://api64.ipify.org