mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add option to disable UDP transport via V2Ray
This commit is contained in:
parent
4f53ff1fba
commit
643dd1e00d
3 changed files with 17 additions and 2 deletions
|
@ -414,10 +414,15 @@ add_v2ray_redirect_rules() {
|
|||
|
||||
# This part need a rewrite
|
||||
v2ray-rules -f
|
||||
v2ray-rules -l ${port} -L ${port} -s $OUTBOUND_SERVERS_V4 --rule-name def --src-default forward --dst-default forward --local-default forward
|
||||
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" ] && commandline="$commandline -L ${port}"
|
||||
v2ray-rules $commandline
|
||||
[ "$(uci -q get v2ray.main.inbounds | grep omr6)" != "" ] && {
|
||||
v2ray-rules6 -f
|
||||
v2ray-rules6 -l $((port+1)) -L $((port+1)) -s $OUTBOUND_SERVERS_V6 --rule-name def --src-default forward --dst-default forward --local-default forward
|
||||
commandline="-l $((port+1)) -L $((port+1)) -s $OUTBOUND_SERVERS_V6 --rule-name def --src-default forward --dst-default forward --local-default forward"
|
||||
[ "$(uci -q get v2ray.main_transparent_proxy.redirect_udp)" = "1" ] && commandline="$commandline -L ${port+1}"
|
||||
v2ray-rules6 $commandline
|
||||
}
|
||||
[ -f /etc/init.d/omr-bypass ] && {
|
||||
logger -t "v2ray" "Reload omr-bypass rules"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue