From fc60346c814b73715cef3a2bf3254860d90fe27c Mon Sep 17 00:00:00 2001 From: ownhere Date: Tue, 16 Apr 2019 21:14:35 +0800 Subject: [PATCH] v2ray pro init script fwmark change * change ip rule fwmark 0x01/0x01 to 0x100/0xfff for 0x1 is confilct with qos script. * v2raypro gen_config.lua allow insecure tls for which servername need use IP for speed startup process. --- package/lean/luci-app-v2ray-pro/root/etc/init.d/v2raypro | 6 +++--- .../lean/luci-app-v2ray-pro/root/etc/v2ray/gen_config.lua | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) mode change 100755 => 100644 package/lean/luci-app-v2ray-pro/root/etc/v2ray/gen_config.lua diff --git a/package/lean/luci-app-v2ray-pro/root/etc/init.d/v2raypro b/package/lean/luci-app-v2ray-pro/root/etc/init.d/v2raypro index 16362ce83..cfdfc5e1a 100755 --- a/package/lean/luci-app-v2ray-pro/root/etc/init.d/v2raypro +++ b/package/lean/luci-app-v2ray-pro/root/etc/init.d/v2raypro @@ -297,12 +297,12 @@ add_rule() iptables -N gameboost -t mangle ipset -! create gameuser hash:ip maxelem 65536 2>/dev/null - ip rule add fwmark 0x01/0x01 table 100 + ip rule add fwmark 0x100/0xfff 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 - iptables -t mangle -A gameboost -p udp -j TPROXY --on-port 7070 --tproxy-mark 0x01/0x01 + iptables -t mangle -A gameboost -p udp -j TPROXY --on-port 7070 --tproxy-mark 0x100/0xfff iptables -t mangle -A PREROUTING -m set --match-set gameuser src -j gameboost for i in $(seq 0 100) @@ -362,7 +362,7 @@ del_rule() iptables -t nat -D OUTPUT -p tcp -m multiport --dports 80,443 -m set --match-set china-banned dst -j REDIRECT --to $V2RAY_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 $V2RAY_REDIR_PORT 2>/dev/null - /usr/bin/ip rule del fwmark 0x01/0x01 table 100 + /usr/bin/ip rule del fwmark 0x100/0xfff table 100 /usr/bin/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 diff --git a/package/lean/luci-app-v2ray-pro/root/etc/v2ray/gen_config.lua b/package/lean/luci-app-v2ray-pro/root/etc/v2ray/gen_config.lua old mode 100755 new mode 100644 index ae65b30f6..8dbe24030 --- a/package/lean/luci-app-v2ray-pro/root/etc/v2ray/gen_config.lua +++ b/package/lean/luci-app-v2ray-pro/root/etc/v2ray/gen_config.lua @@ -86,6 +86,7 @@ v2ray_proxy={ }, streamSettings = { network = ucursor:get(conf_path, "v2raypro", "network_type"), + tlsSettings = { allowInsecure=true }, security = (ucursor:get(conf_path, "v2raypro", "tls") == '1') and "tls" or "none", tcpSettings = (v2ray_stream_mode == "tcp" and ucursor:get(conf_path, "v2raypro", "tcp_obfs") == "http") and { connectionReuse = true, @@ -182,6 +183,7 @@ if v2ray_enReverse then }, streamSettings = { network = ucursor:get(conf_path, "v2raypro", "rnetwork_type"), + tlsSettings = { allowInsecure=true }, security = (ucursor:get(conf_path, "v2raypro", "rtls") == '1') and "tls" or "none", tcpSettings = (v2ray_stream_tunnel_mode == "tcp" and ucursor:get(conf_path, "v2raypro", "rtcp_obfs") == "http") and { connectionReuse = true,