1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2024-01-18 00:52:26 +08:00
commit f01add5d0e
18 changed files with 48 additions and 58 deletions

View file

@ -1,2 +1,2 @@
#!/bin/sh
/etc/init.d/v2ray rules_up
[ "$(uci -q get v2ray.main_dns.enabled)" = "1" ] && /etc/init.d/v2ray rules_up

View file

@ -13,7 +13,7 @@ NAME=v2ray
CONFIG_FOLDER=/var/etc/$NAME
v2rrules_uc="/usr/share/v2ray-rules/v2r-rules.uc"
v2rrules_nft="/etc/nftables.d/90-proxy-rules.nft"
v2rrules_nft="/etc/nftables.d/90-proxy-v2ray-rules.nft"
FILE_V2RAY_DNSMASQ=/tmp/dnsmasq.d/$NAME
FILE_V2RAY_DNSMASQ_CACHE=/tmp/$NAME.dnsmasq.cache
@ -2090,7 +2090,7 @@ clear_transparent_proxy() {
fw4 -q restart
fi
v2ray-rules -f
#v2ray-rules -f
if [ -s "$FILE_V2RAY_DNSMASQ" ] ; then
rm -f "$FILE_V2RAY_DNSMASQ"
@ -2100,6 +2100,10 @@ clear_transparent_proxy() {
start_instance() {
local section="$1"
[ -n "$(uci -q get firewall.v2ray)" ] && {
uci -q del firewall.v2ray
uci -q commit firewall
}
if ! v2ray_section_validate "$section" ; then
_err "Invalid config."