Merge pull request #531 from hcwhan/patch-1

fix v2ray error
This commit is contained in:
coolsnowwolf 2018-09-07 15:35:44 +08:00 committed by GitHub
commit dffbd129af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for V2Ray (Please select lua-cjson package manually)
LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full +ca-certificates +v2ray
LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full +ca-certificates +v2ray +lua-cjson +luci-app-filetransfer
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=5

View File

@ -42,7 +42,7 @@ start()
local vt_safe_dns_port=`uci get v2ray.@v2ray[0].safe_dns_port 2>/dev/null`
local vt_safe_dns_tcp=`uci get v2ray.@v2ray[0].safe_dns_tcp 2>/dev/null`
local vt_proxy_mode=`uci get v2ray.@v2ray[0].proxy_mode`
local vt_server_addr='uci get v2ray.@v2ray[0].address'
local vt_server_addr=`uci get v2ray.@v2ray[0].address`
local cron_mode=`uci get v2ray.@v2ray[0].cron_mode 2>/dev/null`
local vt_gfwlist=`__gfwlist_by_mode $vt_proxy_mode`
local use_conf_file=`uci get v2ray.@v2ray[0].use_conf_file 2>/dev/null`
@ -299,8 +299,8 @@ add_rule()
iptables -N gameboost -t mangle
ipset -! create gameuser hash:ip maxelem 65536 2>/dev/null
/usr/bin/ip rule add fwmark 0x01/0x01 table 100
/usr/bin/ip route add local 0.0.0.0/0 dev lo table 100
ip rule add fwmark 0x01/0x01 table 100
ip route add local 0.0.0.0/0 dev lo table 100
iptables -t mangle -A gameboost -p udp -m set --match-set local dst -j RETURN
iptables -t mangle -A gameboost -p udp -m set --match-set china dst -j RETURN
iptables -t mangle -A gameboost -p udp --dport 53 -j RETURN
@ -364,8 +364,8 @@ del_rule()
iptables -t nat -D OUTPUT -p tcp -m multiport --dports 80,443 -m set --match-set china-banned dst -j REDIRECT --to $SS_REDIR_PORT 2>/dev/null
iptables -t nat -D OUTPUT -p tcp -m multiport --dports 80,443 -m set ! --match-set $vt_np_ipset dst -j REDIRECT --to $SS_REDIR_PORT 2>/dev/null
/usr/bin/ip rule del fwmark 0x01/0x01 table 100
/usr/bin/ip route del local 0.0.0.0/0 dev lo table 100
ip rule del fwmark 0x01/0x01 table 100
ip route del local 0.0.0.0/0 dev lo table 100
if iptables -t mangle -F gameboost 2>/dev/null; then
while iptables -t mangle -D PREROUTING -m set --match-set gameuser src -j gameboost 2>/dev/null; do :; done
iptables -t mangle -X gameboost 2>/dev/null