fix probe tproxy and tun device

This commit is contained in:
llyc
2023-02-16 22:36:44 +07:00
parent 6b1b3e63a7
commit ee98c28def

View File

@@ -48,8 +48,10 @@ intranet=(0.0.0.0/8 10.0.0.0/8 100.64.0.0/10 127.0.0.0/8 169.254.0.0/16 192.0.0.
intranet6=(::/128 ::1/128 ::ffff:0:0/96 100::/64 64:ff9b::/96 2001::/32 2001:10::/28 2001:20::/28 2001:db8::/32 2002::/16 fe80::/10 ff00::/8)
network_port () {
$(/system/bin/netstat -tnulp | grep -q "${tproxy_port}") || \
if [ "${network_mode}" = "tproxy" ] ; then
$(/system/bin/netstat -tnulp | grep -q "${tproxy_port}") || \
log error "tproxy_port out of sync with config"
fi
if [ "${network_mode}" = "mixed" ] || [ "${proxy_mode}" = "core" ] ; then
$(/system/bin/ifconfig | grep -q ${tun_device}) || \
log error "tun_device: ${tun_device} not found"