mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
V2Ray Trojan protocol can do UDP over TCP, disable UDP proxy using V2Ray by default
This commit is contained in:
parent
e27ec3fe47
commit
59074daba9
4 changed files with 6 additions and 7 deletions
|
@ -448,7 +448,7 @@ add_v2ray_redirect_rules() {
|
|||
v2ray-rules -f
|
||||
#logger -t "v2ray" "v2ray-rules -l ${port} -L ${port} -s $OUTBOUND_SERVERS_V4 --rule-name def --src-default forward --dst-default forward --local-default forward"
|
||||
commandline="-l ${port} -s $OUTBOUND_SERVERS_V4 --rule-name def --src-default forward --dst-default forward --local-default forward"
|
||||
[ "$(uci -q get v2ray.main_transparent_proxy.redirect_udp)" = "1" ] && ([ "$(uci -q get v2ray.omrout.protocol)" = "vless" ] || [ "$(uci -q get v2ray.omrout.protocol)" = "vmess" ]) && commandline="$commandline -L ${port}"
|
||||
[ "$(uci -q get v2ray.main_transparent_proxy.redirect_udp)" = "1" ] && [ "$(uci -q get v2ray.omrout.protocol)" != "socks" ] && commandline="$commandline -L ${port}"
|
||||
v2ray-rules $commandline
|
||||
[ "$(uci -q get v2ray.main.inbounds | grep omr6)" != "" ] && [ -n "$OUTBOUND_SERVERS_V6" ] && {
|
||||
v2ray-rules6 -f
|
||||
|
@ -1885,7 +1885,7 @@ init_transparent_proxy() {
|
|||
TRANSPARENT_PROXY_PORT="$redirect_port"
|
||||
TRANSPARENT_PROXY_USE_TPROXY="$use_tproxy"
|
||||
|
||||
if [ "x$redirect_udp" = "x1" ] && [ "$(uci -q get v2ray.omrout.protocol)" != "trojan" ] && [ "$(uci -q get v2ray.omrout.protocol)" != "socks" ]; then
|
||||
if [ "x$redirect_udp" = "x1" ] && [ "$(uci -q get v2ray.omrout.protocol)" != "socks" ]; then
|
||||
TRANSPARENT_PROXY_ADDITION="udp"
|
||||
elif [ "x$redirect_dns" = "x1" ] ; then
|
||||
TRANSPARENT_PROXY_ADDITION="dns"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue