luci-app-vssr: sync with upstream source

This commit is contained in:
CN_SZTL 2020-03-07 20:34:41 +08:00
parent 7ce802083f
commit 2021ab3446
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
8 changed files with 33176 additions and 6395 deletions

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-vssr
PKG_VERSION:=1.18
PKG_RELEASE:=20200305-4
PKG_VERSION:=1.19
PKG_RELEASE:=20200307-4
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \

View File

@ -149,10 +149,8 @@ o.default = gfw
o = s:option(ListValue, "pdnsd_enable", translate("Resolve Dns Mode"))
o:value("0", translate("Use Local DNS Service listen port 5335"))
o:value("1", translate("Use Pdnsd tcp query and cache"))
o:value("2", translate("Use Pdnsd udp query and cache"))
if nixio.fs.access("/usr/bin/dnsforwarder") then
o:value("3", translate("Use dnsforwarder tcp query and cache"))
o:value("4", translate("Use dnsforwarder udp query and cache"))
end
if nixio.fs.access("/usr/bin/dnscrypt-proxy") then
o:value("5", translate("Use dnscrypt-proxy query and cache"))
@ -166,10 +164,8 @@ o.default = 1
o = s:option(ListValue, "chinadns_enable", translate("Chiadns Resolve Dns Mode"))
o:value("0", translate("Use Local DNS Service"))
o:value("1", translate("Use Pdnsd tcp query and cache"))
o:value("2", translate("Use Pdnsd udp query and cache"))
if nixio.fs.access("/usr/bin/dnsforwarder") then
o:value("3", translate("Use dnsforwarder tcp query and cache"))
o:value("4", translate("Use dnsforwarder udp query and cache"))
end
if nixio.fs.access("/usr/bin/dnscrypt-proxy") then
o:value("5", translate("Use dnscrypt-proxy query and cache"))
@ -205,6 +201,7 @@ o:depends("pdnsd_enable", "1")
o:depends("pdnsd_enable", "2")
o:depends("pdnsd_enable", "3")
o:depends("pdnsd_enable", "4")
o:depends("pdnsd_enable", "5")
o:depends("pdnsd_enable", "6")
o.default = "8.8.4.4:53"

View File

@ -1,7 +1,7 @@
-- Copyright (C) 2017 yushi studio <ywb94@qq.com>
-- Licensed to the public under the GNU General Public License v3.
local IPK_Version="20200305.1.18"
local IPK_Version="20200307.1.19"
local m, s, o
local redir_run=0
local reudp_run=0

View File

@ -746,7 +746,7 @@ msgid "UDPspeeder Project"
msgstr "UDPspeeder 项目"
msgid "Appointlist List"
msgstr "加速列表"
msgstr "DNS列表"
msgid "udp2raw tunnel"
msgstr "UDP隧道"

View File

@ -119,7 +119,6 @@
27.116.44.0/22
27.121.72.0/21
27.121.120.0/21
27.123.232.0/22
27.128.0.0/15
27.131.220.0/22
27.144.0.0/16
@ -158,7 +157,6 @@
36.255.164.0/22
36.255.172.0/22
36.255.176.0/22
36.255.220.0/22
39.0.0.0/24
39.0.2.0/23
39.0.4.0/22
@ -425,7 +423,6 @@
43.228.148.0/22
43.228.152.0/22
43.228.188.0/22
43.229.16.0/22
43.229.40.0/22
43.229.48.0/22
43.229.56.0/22
@ -453,7 +450,6 @@
43.230.84.0/22
43.230.124.0/22
43.230.136.0/22
43.230.168.0/22
43.230.220.0/22
43.230.224.0/22
43.230.228.0/22
@ -696,7 +692,6 @@
43.239.172.0/22
43.239.176.0/22
43.240.0.0/22
43.240.48.0/22
43.240.56.0/22
43.240.60.0/22
43.240.68.0/22
@ -707,6 +702,7 @@
43.240.128.0/22
43.240.132.0/22
43.240.136.0/22
43.240.144.0/22
43.240.156.0/22
43.240.160.0/22
43.240.164.0/22
@ -910,7 +906,6 @@
43.248.244.0/22
43.249.4.0/22
43.249.8.0/22
43.249.24.0/22
43.249.120.0/22
43.249.132.0/22
43.249.136.0/22
@ -952,7 +947,6 @@
43.250.244.0/22
43.251.4.0/22
43.251.8.0/22
43.251.12.0/22
43.251.36.0/22
43.251.100.0/22
43.251.116.0/22
@ -1036,8 +1030,7 @@
45.65.28.0/22
45.112.132.0/22
45.112.188.0/22
45.112.208.0/22
45.112.212.0/22
45.112.208.0/21
45.112.216.0/22
45.112.220.0/22
45.112.228.0/22
@ -1092,7 +1085,6 @@
45.115.236.0/22
45.115.244.0/22
45.115.248.0/22
45.116.12.0/22
45.116.16.0/22
45.116.24.0/22
45.116.32.0/22
@ -1128,7 +1120,6 @@
45.121.72.0/22
45.121.92.0/22
45.121.96.0/22
45.121.104.0/22
45.121.172.0/22
45.121.176.0/22
45.121.212.0/22
@ -1229,7 +1220,6 @@
45.124.176.0/22
45.124.208.0/22
45.124.248.0/22
45.124.252.0/22
45.125.12.0/22
45.125.16.0/22
45.125.24.0/22
@ -1481,9 +1471,6 @@
45.253.232.0/22
45.253.236.0/22
45.253.240.0/22
45.253.244.0/22
45.253.248.0/22
45.253.252.0/22
45.254.0.0/22
45.254.4.0/22
45.254.8.0/22
@ -1795,7 +1782,6 @@
61.29.128.0/18
61.29.192.0/19
61.29.224.0/20
61.29.240.0/20
61.45.128.0/18
61.45.224.0/20
61.47.128.0/18
@ -1890,12 +1876,15 @@
101.2.172.0/22
101.4.0.0/14
101.16.0.0/12
101.32.0.0/14
101.33.128.0/17
101.34.0.0/15
101.36.0.0/17
101.36.128.0/17
101.37.0.0/16
101.38.0.0/15
101.40.0.0/13
101.40.0.0/15
101.42.0.0/15
101.44.0.0/14
101.48.0.0/15
101.50.8.0/22
101.50.12.0/22
@ -2053,7 +2042,6 @@
103.12.184.0/22
103.12.232.0/22
103.13.12.0/22
103.13.72.0/23
103.13.124.0/22
103.13.144.0/22
103.13.196.0/22
@ -2428,7 +2416,6 @@
103.35.180.0/22
103.35.200.0/22
103.35.220.0/22
103.36.20.0/22
103.36.28.0/22
103.36.36.0/22
103.36.56.0/22
@ -2538,7 +2525,6 @@
103.40.44.0/22
103.40.88.0/22
103.40.100.0/22
103.40.112.0/22
103.40.192.0/22
103.40.212.0/22
103.40.220.0/22
@ -2583,7 +2569,6 @@
103.43.208.0/22
103.43.220.0/22
103.43.224.0/22
103.43.232.0/22
103.43.240.0/22
103.44.56.0/22
103.44.80.0/22
@ -2719,7 +2704,6 @@
103.47.136.0/22
103.47.140.0/22
103.47.212.0/22
103.48.20.0/22
103.48.52.0/22
103.48.92.0/22
103.48.144.0/22
@ -2746,7 +2730,6 @@
103.49.176.0/22
103.49.180.0/22
103.49.196.0/22
103.49.248.0/22
103.50.36.0/22
103.50.44.0/22
103.50.48.0/22
@ -3175,7 +3158,6 @@
103.76.72.0/22
103.76.84.0/22
103.76.92.0/22
103.76.104.0/22
103.76.216.0/22
103.76.220.0/22
103.76.224.0/22
@ -3828,8 +3810,21 @@
103.124.216.0/22
103.125.20.0/22
103.125.44.0/22
103.125.132.0/22
103.125.164.0/22
103.125.196.0/22
103.125.236.0/22
103.125.248.0/22
103.126.0.0/22
103.126.16.0/22
103.126.44.0/22
103.126.100.0/22
103.126.124.0/22
103.126.128.0/22
103.126.132.0/22
103.126.208.0/22
103.126.241.0/24
103.129.52.0/22
103.129.148.0/22
103.130.132.0/22
103.130.152.0/24
103.130.160.0/22
@ -3842,6 +3837,164 @@
103.131.224.0/22
103.131.228.0/22
103.131.240.0/22
103.132.60.0/22
103.132.64.0/22
103.132.68.0/22
103.132.72.0/22
103.132.76.0/22
103.132.80.0/22
103.132.104.0/22
103.132.108.0/22
103.132.112.0/22
103.132.116.0/22
103.132.120.0/22
103.132.160.0/22
103.132.164.0/22
103.132.188.0/22
103.132.208.0/22
103.132.212.0/22
103.132.234.0/23
103.133.12.0/22
103.133.40.0/22
103.133.128.0/22
103.133.136.0/22
103.133.176.0/22
103.133.232.0/22
103.134.12.0/24
103.134.196.0/22
103.135.80.0/22
103.135.124.0/22
103.135.148.0/22
103.135.156.0/22
103.135.160.0/22
103.135.164.0/22
103.135.176.0/22
103.135.184.0/22
103.135.192.0/22
103.135.196.0/22
103.135.236.0/22
103.136.128.0/22
103.136.232.0/22
103.137.58.0/23
103.137.60.0/24
103.137.76.0/22
103.137.136.0/23
103.137.149.0/24
103.137.180.0/22
103.137.236.0/22
103.138.2.0/23
103.138.12.0/23
103.138.80.0/22
103.138.134.0/23
103.138.156.0/23
103.138.208.0/23
103.138.220.0/23
103.138.246.0/23
103.138.248.0/23
103.139.0.0/23
103.139.2.0/23
103.139.22.0/23
103.139.113.0/24
103.139.134.0/23
103.139.136.0/23
103.139.172.0/23
103.139.200.0/23
103.139.204.0/23
103.139.212.0/23
103.140.8.0/23
103.140.14.0/23
103.140.46.0/23
103.140.70.0/23
103.140.126.0/23
103.140.140.0/23
103.140.144.0/23
103.140.152.0/23
103.140.192.0/23
103.140.194.0/23
103.140.228.0/23
103.141.10.0/23
103.141.36.0/23
103.141.58.0/23
103.141.128.0/23
103.141.186.0/23
103.141.190.0/23
103.141.242.0/23
103.142.0.0/23
103.142.28.0/23
103.142.58.0/23
103.142.82.0/23
103.142.96.0/23
103.142.102.0/23
103.142.122.0/23
103.142.126.0/24
103.142.128.0/23
103.142.140.0/23
103.142.154.0/23
103.142.156.0/23
103.142.172.0/23
103.142.180.0/23
103.142.186.0/23
103.142.190.0/23
103.142.220.0/23
103.142.230.0/24
103.142.234.0/23
103.142.238.0/23
103.142.248.0/23
103.143.16.0/23
103.143.18.0/23
103.143.31.0/24
103.143.74.0/23
103.143.120.0/23
103.143.124.0/23
103.143.132.0/23
103.143.134.0/23
103.143.174.0/23
103.143.228.0/23
103.144.40.0/23
103.144.52.0/23
103.144.66.0/23
103.144.70.0/23
103.144.72.0/23
103.144.88.0/24
103.144.108.0/23
103.144.136.0/23
103.144.148.0/23
103.144.158.0/23
103.144.240.0/23
103.145.38.0/23
103.145.40.0/23
103.145.42.0/23
103.145.60.0/23
103.145.72.0/23
103.145.80.0/23
103.145.86.0/23
103.145.92.0/23
103.145.94.0/23
103.145.98.0/23
103.145.106.0/23
103.145.122.0/23
103.145.188.0/23
103.145.190.0/23
103.146.6.0/23
103.146.72.0/23
103.146.88.0/23
103.146.90.0/23
103.146.124.0/23
103.146.126.0/23
103.146.138.0/23
103.146.147.0/24
103.146.230.0/23
103.146.236.0/23
103.146.252.0/23
103.147.12.0/23
103.147.124.0/23
103.147.198.0/23
103.147.206.0/23
103.147.211.0/24
103.148.174.0/23
103.149.6.0/23
103.149.17.0/24
103.149.44.0/23
103.192.0.0/22
103.192.4.0/22
103.192.8.0/22
@ -4560,7 +4713,6 @@
103.227.228.0/22
103.228.12.0/22
103.228.28.0/22
103.228.68.0/22
103.228.88.0/22
103.228.128.0/22
103.228.136.0/22
@ -4902,7 +5054,8 @@
106.4.0.0/14
106.8.0.0/15
106.11.0.0/16
106.12.0.0/14
106.12.0.0/15
106.14.0.0/15
106.16.0.0/12
106.32.0.0/12
106.48.0.0/15
@ -5064,6 +5217,8 @@
113.208.128.0/17
113.209.0.0/16
113.212.0.0/18
113.212.64.0/22
113.212.88.0/22
113.212.100.0/22
113.212.184.0/21
113.213.0.0/17
@ -5093,7 +5248,6 @@
114.117.0.0/16
114.118.0.0/16
114.119.0.0/17
114.119.128.0/18
114.119.192.0/21
114.119.200.0/22
114.119.204.0/22
@ -5204,9 +5358,11 @@
116.204.132.0/22
116.204.168.0/22
116.204.216.0/22
116.204.232.0/22
116.204.236.0/22
116.204.244.0/22
116.205.0.0/16
116.206.92.0/22
116.206.100.0/22
116.206.176.0/22
116.207.0.0/16
116.208.0.0/14
@ -5237,7 +5393,10 @@
117.32.0.0/13
117.40.0.0/14
117.44.0.0/15
117.48.0.0/14
117.48.0.0/17
117.48.128.0/17
117.49.0.0/16
117.50.0.0/15
117.53.48.0/20
117.53.176.0/20
117.57.0.0/16
@ -5316,7 +5475,20 @@
118.186.0.0/15
118.188.0.0/16
118.190.0.0/16
118.191.0.0/16
118.191.0.0/21
118.191.8.0/22
118.191.12.0/24
118.191.16.0/21
118.191.64.0/20
118.191.80.0/22
118.191.128.0/19
118.191.176.0/20
118.191.192.0/20
118.191.208.0/24
118.191.216.0/22
118.191.223.0/24
118.191.224.0/24
118.191.240.0/20
118.192.0.0/16
118.193.0.0/21
118.193.8.0/21
@ -5346,7 +5518,6 @@
119.2.128.0/17
119.3.0.0/16
119.4.0.0/14
119.8.0.0/16
119.10.0.0/17
119.15.136.0/21
119.16.0.0/16
@ -5512,17 +5683,17 @@
122.9.0.0/16
122.10.128.0/22
122.10.132.0/23
122.10.134.0/23
122.10.136.0/23
122.10.138.0/23
122.10.140.0/22
122.10.144.0/20
122.10.160.0/19
122.10.192.0/20
122.10.164.0/22
122.10.168.0/21
122.10.176.0/20
122.10.192.0/22
122.10.200.0/21
122.10.208.0/21
122.10.216.0/22
122.10.220.0/22
122.10.224.0/19
122.10.228.0/22
122.10.232.0/21
122.10.240.0/22
122.11.0.0/17
122.12.0.0/16
122.13.0.0/16
@ -5627,6 +5798,8 @@
123.242.196.0/22
123.244.0.0/14
123.249.0.0/16
123.253.108.0/22
123.253.240.0/22
123.254.96.0/22
123.254.100.0/22
124.6.64.0/18
@ -5652,7 +5825,8 @@
124.64.0.0/15
124.66.0.0/17
124.67.0.0/16
124.68.0.0/14
124.68.0.0/15
124.70.0.0/15
124.72.0.0/16
124.73.0.0/16
124.74.0.0/15
@ -6047,7 +6221,9 @@
180.178.112.0/22
180.178.116.0/22
180.178.192.0/18
180.184.0.0/14
180.184.0.0/15
180.186.0.0/16
180.187.0.0/16
180.188.0.0/17
180.189.148.0/22
180.200.252.0/22
@ -6064,7 +6240,6 @@
180.233.144.0/22
180.235.64.0/19
180.235.112.0/22
180.235.136.0/22
182.16.144.0/22
182.16.148.0/22
182.16.192.0/19
@ -6122,7 +6297,9 @@
183.182.0.0/19
183.184.0.0/13
183.192.0.0/10
185.203.36.0/22
188.131.128.0/17
192.51.188.0/24
192.55.46.0/24
192.55.68.0/22
192.102.204.0/23
@ -6146,12 +6323,15 @@
192.140.208.0/22
192.140.212.0/22
192.144.128.0/17
192.197.113.0/24
193.112.0.0/16
198.175.100.0/22
199.212.57.0/24
202.0.100.0/23
202.0.122.0/23
202.0.176.0/22
202.3.128.0/23
202.3.134.0/24
202.4.128.0/19
202.4.252.0/22
202.5.208.0/22
@ -6174,6 +6354,7 @@
202.8.12.0/24
202.8.24.0/24
202.8.77.0/24
202.8.120.0/22
202.8.128.0/19
202.8.192.0/20
202.9.32.0/24
@ -6359,6 +6540,7 @@
202.52.34.0/24
202.52.47.0/24
202.52.143.0/24
202.52.144.0/24
202.53.140.0/24
202.53.143.0/24
202.57.192.0/22
@ -6369,6 +6551,7 @@
202.57.216.0/22
202.57.240.0/20
202.58.0.0/24
202.58.101.0/24
202.58.104.0/22
202.58.112.0/22
202.59.0.0/24
@ -6493,6 +6676,7 @@
202.92.252.0/22
202.93.0.0/22
202.93.252.0/22
202.94.68.0/24
202.94.74.0/24
202.94.81.0/24
202.94.92.0/22
@ -6954,7 +7138,6 @@
203.8.0.0/24
203.8.8.0/24
203.8.23.0/24
203.8.24.0/21
203.8.70.0/24
203.8.82.0/24
203.8.86.0/23
@ -7018,7 +7201,6 @@
203.12.66.0/24
203.12.70.0/23
203.12.87.0/24
203.12.88.0/21
203.12.100.0/23
203.12.103.0/24
203.12.114.0/24
@ -7026,7 +7208,6 @@
203.12.130.0/24
203.12.137.0/24
203.12.196.0/22
203.12.200.0/21
203.12.211.0/24
203.12.219.0/24
203.12.226.0/24
@ -7034,7 +7215,6 @@
203.13.18.0/24
203.13.24.0/24
203.13.44.0/23
203.13.80.0/21
203.13.88.0/23
203.13.92.0/22
203.13.173.0/24
@ -7050,7 +7230,6 @@
203.14.114.0/23
203.14.118.0/24
203.14.162.0/24
203.14.184.0/21
203.14.192.0/24
203.14.194.0/23
203.14.214.0/24
@ -7676,6 +7855,7 @@
203.86.250.0/24
203.86.254.0/23
203.88.32.0/19
203.88.100.0/22
203.88.192.0/19
203.89.0.0/22
203.89.8.0/21
@ -7862,9 +8042,9 @@
203.212.80.0/20
203.215.232.0/21
203.217.164.0/22
203.222.192.0/20
203.223.0.0/20
203.223.16.0/21
204.52.191.0/24
210.2.0.0/20
210.2.16.0/20
210.5.0.0/19
@ -7992,7 +8172,6 @@
211.164.0.0/14
212.64.0.0/17
212.129.128.0/17
216.250.108.0/22
218.0.0.0/16
218.1.0.0/16
218.2.0.0/15

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,7 @@ kcp_flag=0
pdnsd_enable_flag=0
dnsforwarder_enable_flag=0
chinadns_enable_flag=0
dnscrypt-proxy_enable_flag=0
switch_enable=0
ssserver_enable=0
ssrserver_enable=0
@ -69,34 +70,50 @@ del_cron() {
}
run_mode=$(uci_get_by_type global run_mode)
v2ray_path=$(uci_get_by_type server_subscribe v2ray_path)
gen_config_file() {
local host=$(uci_get_by_name $1 server)
if echo $host|grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$">/dev/null; then
hostip=${host}
elif [ "$host" != "${host#*:[0-9a-fA-F]}" ] ;then
hostip=${host}
else
hostip=`ping ${host} -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1`
if echo $hostip|grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$">/dev/null; then
hostip=${hostip}
else
hostip=`cat /etc/ssr_ip`
fi
fi
[ $2 = "0" -a $kcp_flag = "1" ] && hostip="127.0.0.1"
local use_conf_file=$(uci_get_by_name $1 use_conf_file)
local conf_file_path=$(uci_get_by_name $1 conf_file_path)
local host=$(uci_get_by_name $1 server)
if echo $host|grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$">/dev/null; then
hostip=${host}
elif [ "$host" != "${host#*:[0-9a-fA-F]}" ] ;then
hostip=${host}
else
hostip=`nslookup ${host} | grep 'Address 1' | sed 's/Address 1: //g'`
if echo $hostip|grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$">/dev/null; then
hostip=${hostip}
else
hostip=`cat /etc/ssr_ip`
fi
fi
[ $2 = "0" -a $kcp_flag = "1" ] && hostip="127.0.0.1"
if [ $2 = "0" ] ;then
config_file=$CONFIG_FILE
elif [ $2 = "1" ]; then
config_file=$CONFIG_UDP_FILE
else
config_file=$CONFIG_SOCK5_FILE
fi
if [ $(uci_get_by_name $1 fast_open 0) = "1" ] ;then
fastopen="true";
else
fastopen="false";
fi
if [ $2 = "0" ] ;then
config_file=$CONFIG_FILE
elif [ $2 = "1" ]; then
config_file=$CONFIG_UDP_FILE
else
config_file=$CONFIG_SOCK5_FILE
fi
if [ $(uci_get_by_name $1 fast_open 0) = "1" ] ;then
fastopen="true";
else
fastopen="false";
fi
local port=$(uci_get_by_name $1 server_port)
if [ $HAPROXY_MODE = "1" ]; then
hostip="0.0.0.0"
port="4433"
fi
local local_port=$(uci_get_by_name $1 local_port)
iptables -A SS_WAN_DROP -p tcp --dport $local_port -j DROP
local stype=$(uci_get_by_name $1 type)
local plugin=$(uci_get_by_name $1 plugin)
@ -105,9 +122,9 @@ gen_config_file() {
cat <<-EOF >$config_file
{
"server": "$hostip",
"server_port": $(uci_get_by_name $1 server_port),
"server_port": $port,
"local_address": "0.0.0.0",
"local_port": $(uci_get_by_name $1 local_port),
"local_port": $local_port,
"password": "$(uci_get_by_name $1 password)",
"timeout": $(uci_get_by_name $1 timeout 60),
"method": "$(uci_get_by_name $1 encrypt_method_ss)",
@ -119,9 +136,9 @@ EOF
cat <<-EOF >$config_file
{
"server": "$hostip",
"server_port": $(uci_get_by_name $1 server_port),
"server_port": $port,
"local_address": "0.0.0.0",
"local_port": $(uci_get_by_name $1 local_port),
"local_port": $local_port,
"password": "$(uci_get_by_name $1 password)",
"timeout": $(uci_get_by_name $1 timeout 60),
"method": "$(uci_get_by_name $1 encrypt_method_ss)",
@ -133,30 +150,42 @@ EOF
EOF
fi
elif [ "$stype" == "ssr" ] ;then
cat <<-EOF >$config_file
{
"server": "$hostip",
"server_port": $(uci_get_by_name $1 server_port),
"local_address": "0.0.0.0",
"local_port": $(uci_get_by_name $1 local_port),
"password": "$(uci_get_by_name $1 password)",
"timeout": $(uci_get_by_name $1 timeout 60),
"method": "$(uci_get_by_name $1 encrypt_method)",
"protocol": "$(uci_get_by_name $1 protocol)",
"protocol_param": "$(uci_get_by_name $1 protocol_param)",
"obfs": "$(uci_get_by_name $1 obfs)",
"obfs_param": "$(uci_get_by_name $1 obfs_param)",
"reuse_port": true,
"fast_open": $fastopen
cat <<-EOF >$config_file
{
"server": "$hostip",
"server_port": $port,
"local_address": "0.0.0.0",
"local_port": $local_port,
"password": "$(uci_get_by_name $1 password)",
"timeout": $(uci_get_by_name $1 timeout 60),
"method": "$(uci_get_by_name $1 encrypt_method)",
"protocol": "$(uci_get_by_name $1 protocol)",
"protocol_param": "$(uci_get_by_name $1 protocol_param)",
"obfs": "$(uci_get_by_name $1 obfs)",
"obfs_param": "$(uci_get_by_name $1 obfs_param)",
"reuse_port": true,
"fast_open": $fastopen
}
EOF
elif [ "$stype" == "v2ray" ] ;then
lua /usr/share/vssr/genv2config.lua $GLOBAL_SERVER tcp $(uci_get_by_name $1 local_port) > /var/etc/v2-ssr-retcp.json
sed -i 's/\\//g' /var/etc/v2-ssr-retcp.json
elif [ "$stype" == "trojan" ] ;then
if [ "$use_conf_file" -eq 1 ] ;then
cp $conf_file_path /var/etc/v2-ssr-retcp.json
else
global_server=$(uci_get_by_type global global_server)
if [ "$global_server" = "__haproxy__" ]; then
local haproxy_server=$(uci -X show vssr | grep servers | awk -F'[.=]' '{print $2}' | sed -n 2p)
lua /usr/share/vssr/genv2config_haproxy.lua $haproxy_server tcp $local_port > /var/etc/v2-ssr-retcp.json
else
lua /usr/share/vssr/genv2config.lua $GLOBAL_SERVER tcp $(uci_get_by_name $1 local_port) > /var/etc/v2-ssr-retcp.json
fi
sed -i 's/\\//g' /var/etc/v2-ssr-retcp.json
fi
elif [ "$stype" == "trojan" ] ;then
lua /usr/share/vssr/gentrojanconfig.lua $GLOBAL_SERVER nat $(uci_get_by_name $1 local_port) > /var/etc/trojan-ssr-retcp.json
sed -i 's/\\//g' /var/etc/trojan-ssr-retcp.json
fi
sed -i 's/\\//g' /var/etc/trojan-ssr-retcp.json
fi
}
get_arg_out() {
case "$(uci_get_by_type access_control router_proxy 1)" in
@ -733,6 +762,7 @@ fi
elif [ "$(uci_get_by_type global pdnsd_enable)" = "5" ] ;then
dnscrypt_config_file
/etc/init.d/dnscrypt-proxy enable && /etc/init.d/dnscrypt-proxy start
elif [ "$(uci_get_by_type global pdnsd_enable)" = "6" ] ;then
if [ "$(uci_get_by_type global chinadns_enable)" = "1" ] || [ "$(uci_get_by_type global chinadns_enable)" = "2" ] ;then
start_pdnsd $dnsserver $dnsport
@ -746,6 +776,7 @@ fi
dnscrypt_config_file
/etc/init.d/dnscrypt-proxy enable && /etc/init.d/dnscrypt-proxy start
dnsstrs="0.0.0.0:5337"
else
dnsstrs="$(uci_get_by_type global tunnel_forward 8.8.4.4:53)"
fi
@ -1031,6 +1062,13 @@ EOF
ln -s /etc/dnsmasq.oversea/* /var/etc/dnsmasq.oversea/
ln -s /etc/dnsmasq.ssr/appoint_list.conf /var/etc/dnsmasq.oversea/appoint_list.conf
EOF
fi
if [ -e "/tmp/dnsmasq.d/ad.conf" ]; then
rm -f /tmp/dnsmasq.d/ad.conf
fi
if [ $(uci_get_by_type global adblock 0) == "0" ]; then
rm -f /tmp/dnsmasq.ssr/ad.conf
fi
/usr/share/vssr/gfw2ipset.sh
@ -1042,11 +1080,11 @@ EOF
start_local
if [ $(uci_get_by_type global monitor_enable) = 1 ] ;then
let total_count=server_count+redir_tcp+redir_udp+tunnel_enable+kcp_enable_flag+local_enable+pdnsd_enable_flag+dnsforwarder_enable_flag+switch_enable+ssserver_enable+ssrserver_enable+v2rayserver_enable+haproxy_enable+privoxy_enable+chinadns_enable_flag
let total_count=server_count+redir_tcp+redir_udp+tunnel_enable+kcp_enable_flag+local_enable+pdnsd_enable_flag+dnsforwarder_enable_flag+switch_enable+ssserver_enable+ssrserver_enable+v2rayserver_enable+haproxy_enable+privoxy_enable+chinadns_enable_flag+dnscrypt-proxy_enable_flag
if [ $total_count -gt 0 ] ;then
#param:server(count) redir_tcp(0:no,1:yes) redir_udp tunnel kcp local gfw
service_start /usr/bin/vssr-monitor $server_count $redir_tcp $redir_udp $tunnel_enable $kcp_enable_flag $local_enable $pdnsd_enable_flag $dnsforwarder_enable_flag $switch_enable $ssserver_enable $ssrserver_enable $v2rayserver_enable $haproxy_enable $privoxy_enable $chinadns_enable_flag
service_start /usr/bin/vssr-monitor $server_count $redir_tcp $redir_udp $tunnel_enable $kcp_enable_flag $local_enable $pdnsd_enable_flag $dnsforwarder_enable_flag $switch_enable $ssserver_enable $ssrserver_enable $v2rayserver_enable $haproxy_enable $privoxy_enable $chinadns_enable_flag $dnscrypt-proxy_enable_flag
fi
fi
@ -1083,7 +1121,7 @@ stop() {
killall -q -9 vssr-monitor
killall -q -9 ss-redir
killall -q -9 ssr-redir
killall -q -9 trojan
killall -q -9 trojan
killall -q -9 v2ray
killall -q -9 ssr-server
killall -q -9 ss-server
@ -1092,15 +1130,15 @@ stop() {
killall -q -9 ss-local
killall -q -9 haproxy
killall -q -9 privoxy
killall -q -9 ipt2socks
killall -q -9 ipt2socks
killall -q -9 v2ray-plugin
killall -q -9 gq-client
killall -q -9 gq-server
killall -q -9 obfs-local
killall -q -9 obfs-server
killall -q -9 chinadns
killall -q -9 udp2raw
killall -q -9 udpspeeder
killall -q -9 udp2raw
killall -q -9 udpspeeder
/usr/bin/udp2raw --clear >/dev/null
if [ -f /var/run/pdnsd.pid ] ;then
kill $(cat /var/run/pdnsd.pid) >/dev/null 2>&1
@ -1111,7 +1149,12 @@ stop() {
kill $(pidof dnsparsing) >/dev/null 2>&1 || killall -9 dnsparsing >/dev/null 2>&1
rm -rf /var/run/dnsparsing
if [ $(uci_get_by_type global adblock 0) == "0" ]; then
rm -f /tmp/dnsmasq.d/ad.conf
else
cp -f /etc/dnsmasq.ssr/ad.conf /tmp/dnsmasq.d/ad.conf
fi
if [ -f "/tmp/dnsmasq.d/dnsmasq-ssr.conf" ]; then
rm -f /tmp/dnsmasq.d/dnsmasq-ssr.conf
@ -1132,6 +1175,3 @@ stop() {
del_cron
}

View File

@ -247,7 +247,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
line-height: 1;
font-family: inherit;
min-width: inherit;
padding: 6px 10px 7px 8px;
padding: 5px 5px 5px 8px;
overflow-x: auto;
overflow-y: hidden;
border: 1px solid rgba(0, 0, 0, .05);
@ -320,7 +320,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
position: relative;
background: #f3f9f1;
margin: 10px !important;
padding: 18px 18px 18px 108px;
padding: 18px 18px 18px 110px;
box-shadow: 0 0 5px 0 rgba(136, 152, 170, .75);
border-radius: .5rem;
border: 0;
@ -337,7 +337,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
}
.cbi-section-table-row.fast{
background: #5e72e4;
background: #C01818;
color: #fff;
}