Хочу настроить sing-box, чтобы только определенные подсети и домены шли к VPS-серверу, а все остальное шло через bypass. После тестирования своего конфига было вроде все ок, но имеется проблема с udp трафиком.

На прокси сервере в локалке два правила для fw:
iptables -t nat -A PREROUTING -s 192.168.13.0/25 -p udp -j REDIRECT --to-port 100
iptables -t nat -A PREROUTING -s 192.168.13.0/25 -p tcp -j REDIRECT --to-port 100
Сам конфиг sing-box выглядит следующим образом:
{
"dns": {
"independent_cache": true,
"rules": [
{
"domain": [
"2ip.ru",
"youtube.com",
"googlevideo.com",
"ytimg.com",
"youtu.be",
"ggpht.com",
"youtubei.googleapis.com",
"yt4.ggpht.com",
"ytimg.l.google.com",
"nhacmp3youtube.com",
"googleusercontent.com",
"googleapis.com",
"gstatic.com"
],
"domain_keyword": [],
"domain_regex": [],
"domain_suffix": [],
"geosite": [],
"server": "dns-remote"
},
{
"query_type": [
32,
33
],
"server": "dns-block"
},
{
"domain_suffix": ".lan",
"server": "dns-block"
}
],
"servers": [
{
"address": "https://1.1.1.1/dns-query",
"address_resolver": "dns-local",
"detour": "proxy",
"strategy": "prefer_ipv4",
"tag": "dns-remote"
},
{
"address": "local",
"address_resolver": "dns-local",
"detour": "direct",
"strategy": "prefer_ipv4",
"tag": "dns-direct"
},
{
"address": "rcode://success",
"tag": "dns-block"
},
{
"address": "local",
"detour": "direct",
"tag": "dns-local"
}
]
},
"inbounds": [{
"type": "redirect",
"tag": "redirect-in",
"sniff": true,
"listen": "0.0.0.0",
"listen_port": 100
}],
"log": {
"level": "info"
},
"outbounds": [
{
"domain_strategy": "",
"flow": "xtls-rprx-vision",
"packet_encoding": "",
"server": "111.111.111.111",
"server_port": 44444,
"tag": "proxy",
"tls": {
"enabled": true,
"reality": {
"enabled": true,
"public_key": "wwwwwwwwwwwwwwwwwwwwwwwwwww",
"short_id": "ccccccccc"
},
"server_name": "google.com",
"utls": {
"enabled": true,
"fingerprint": "safari"
}
},
"type": "vless",
"uuid": "66666666666666666666"
},
{
"tag": "direct",
"type": "direct"
},
{
"tag": "bypass",
"type": "direct"
},
{
"tag": "block",
"type": "block"
},
{
"tag": "dns-out",
"type": "dns"
}
],
"route": {
"final": "bypass",
"rules": [
{
"outbound": "dns-out",
"protocol": "dns"
},
{
"domain": [],
"domain_keyword": [],
"domain_regex": [],
"domain_suffix": [],
"geosite": [
"category-ads-all"
],
"outbound": "block"
},
{
"domain": [
"2ip.ru",
"youtube.com",
"googlevideo.com",
"ytimg.com",
"youtu.be",
"ggpht.com",
"youtubei.googleapis.com",
"yt4.ggpht.com",
"ytimg.l.google.com",
"nhacmp3youtube.com",
"googleusercontent.com",
"googleapis.com",
"gstatic.com"
],
"domain_keyword": [],
"domain_regex": [],
"domain_suffix": [],
"geosite": [],
"outbound": "proxy"
},
{
"geoip": [],
"ip_cidr": [
"147.75.208.0/20",
"185.89.216.0/22",
"31.13.24.0/21",
"31.13.64.0/19",
"31.13.96.0/19",
"45.64.40.0/22",
"66.220.144.0/20",
"69.63.176.0/20",
"69.171.224.0/19",
"74.119.76.0/22",
"102.132.96.0/20",
"103.4.96.0/22",
"129.134.0.0/16",
"157.240.0.0/16",
"173.252.64.0/18",
"179.60.192.0/22",
"185.60.216.0/22",
"204.15.20.0/22",
"102.221.188.0/22",
"163.114.128.0/20",
"164.163.191.64/26",
"199.201.64.0/22",
"64.233.160.0/19",
"66.102.0.0/20",
"66.249.64.0/18",
"72.14.192.0/18",
"74.125.0.0/16",
"209.85.128.0/17",
"216.239.32.0/19",
"64.18.0.0/20",
"108.177.8.0/21",
"172.217.0.0/19",
"173.194.0.0/16",
"207.126.144.0/20",
"216.58.192.0/19",
"3.2.40.0/25",
"3.4.3.0/24",
"3.4.4.0/24",
"3.4.6.0/24",
"3.5.76.0/22",
"3.5.80.0/21",
"13.34.14.128/26",
"13.34.23.96/27",
"13.34.23.128/25",
"13.34.24.96/27",
"13.34.24.128/26",
"13.34.24.192/27",
"13.34.25.64/26",
"13.34.25.128/26",
"13.34.26.0/25",
"13.34.28.0/24",
"13.34.42.128/26",
"13.34.54.96/27",
"13.34.54.128/25",
"13.34.55.0/27",
"13.34.57.0/26",
"13.34.61.192/26",
"13.34.67.64/26",
"13.34.67.128/25",
"13.34.68.0/26",
"13.34.70.64/26",
"13.34.79.64/26",
"13.34.82.64/26",
"13.34.82.128/25",
"13.34.85.64/26",
"13.34.86.192/26",
"13.34.88.192/26",
"13.34.93.128/26",
"13.248.112.0/24",
"15.177.80.0/24",
"15.181.0.0/19",
"15.181.64.0/20",
"15.181.116.0/22",
"15.181.128.0/20",
"15.181.245.0/24",
"15.181.248.0/24",
"15.181.250.0/23",
"15.181.252.0/23",
"15.193.7.0/24",
"15.220.0.0/19",
"15.220.32.0/21",
"15.220.40.0/22",
"15.220.200.0/21",
"15.220.208.128/26",
"15.220.224.0/23",
"15.220.226.0/24",
"15.220.252.0/22",
"15.221.1.0/24",
"15.221.7.0/24",
"15.221.148.0/23",
"15.230.67.192/26",
"15.230.68.0/25",
"15.230.92.0/24",
"15.230.240.0/24",
"15.230.247.0/24",
"15.248.40.0/22",
"15.248.80.0/20",
"15.253.0.0/16",
"15.254.0.0/16",
"18.34.48.0/20",
"18.34.244.0/22",
"18.88.128.0/18",
"18.236.0.0/15",
"18.246.0.0/16",
"34.208.0.0/12",
"35.71.64.0/22",
"35.80.0.0/12",
"35.155.0.0/16",
"35.160.0.0/13",
"44.224.0.0/11",
"50.112.0.0/16",
"52.10.0.0/15",
"52.12.0.0/15",
"52.24.0.0/14",
"52.32.0.0/13",
"52.40.0.0/14",
"52.46.180.0/22",
"52.46.216.0/22",
"52.46.249.0/24",
"52.75.0.0/16",
"52.88.0.0/15",
"52.92.128.0/17",
"52.93.12.12/31",
"52.93.14.18/31",
"52.93.20.0/24",
"52.93.120.179/32",
"52.93.122.218/32",
"52.93.240.146/31",
"52.93.240.148/31",
"52.93.240.152/29",
"52.93.240.160/27",
"52.93.240.192/29",
"52.93.240.200/30",
"52.93.240.204/31",
"52.94.10.0/24",
"52.94.28.0/23",
"52.94.76.0/22",
"52.94.116.0/22",
"52.94.120.0/22",
"52.94.128.0/22",
"52.94.176.0/20",
"52.94.197.0/24",
"52.94.208.0/21",
"52.94.248.96/28",
"52.94.249.64/28",
"52.95.40.0/24",
"52.95.230.0/24",
"52.95.247.0/24",
"52.95.255.112/28",
"52.119.160.0/20",
"52.119.252.0/22",
"52.144.194.64/26",
"52.144.194.128/26",
"52.144.197.128/25",
"52.218.128.0/17",
"54.68.0.0/14",
"54.148.0.0/15",
"54.184.0.0/13",
"54.200.0.0/14",
"54.212.0.0/15",
"54.214.0.0/16",
"54.218.0.0/16",
"54.239.0.32/28",
"54.239.2.0/23",
"54.239.48.0/22",
"54.240.230.0/23",
"54.240.248.0/21",
"54.244.0.0/15",
"64.252.65.0/24",
"64.252.70.0/23",
"64.252.72.0/23",
"70.224.192.0/18",
"99.77.130.0/24",
"99.77.152.0/24",
"99.77.186.0/24",
"99.77.232.0/24",
"99.77.253.0/24",
"99.78.196.0/22",
"99.150.56.0/21",
"99.151.186.0/23",
"100.20.0.0/14",
"108.166.224.0/21",
"108.166.240.0/21",
"142.4.160.16/29",
"142.4.160.32/29",
"142.4.160.56/29",
"142.4.160.64/29",
"142.4.160.96/28",
"142.4.160.224/29",
"150.222.15.132/31",
"150.222.74.0/23",
"150.222.102.0/24",
"150.222.176.0/22",
"150.222.180.0/24",
"150.222.196.0/24",
"150.222.214.0/24",
"151.148.33.0/24",
"162.222.148.0/22",
"176.32.125.0/25",
"176.32.125.128/26",
"184.32.0.0/12",
"205.251.232.0/22"
],
"outbound": "proxy"
},
{
"network": "udp",
"outbound": "block",
"port": [
135,
137,
138,
139,
5353
]
},
{
"ip_cidr": [
"224.0.0.0/3",
"ff00::/8"
],
"outbound": "block"
},
{
"outbound": "block",
"source_ip_cidr": [
"224.0.0.0/3",
"ff00::/8"
]
}
]
}
}
Что нужно добавить или убавить чтобы с udp все было ок?