luci-app-ssr-plus: bump to 183-6

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
Mattraks 2021-01-28 16:00:10 +08:00 committed by CN_SZTL
parent dfd65ee0b8
commit 23e1be48cb
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
9 changed files with 7200 additions and 6928 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=183 PKG_VERSION:=183
PKG_RELEASE:=5 PKG_RELEASE:=6
PKG_CONFIG_DEPENDS:= \ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \

View File

@ -143,15 +143,15 @@ o.template = "shadowsocksr/ssrurl"
o.value = sid o.value = sid
o = s:option(ListValue, "type", translate("Server Node Type")) o = s:option(ListValue, "type", translate("Server Node Type"))
if is_finded("xray") or is_finded("v2ray") then
o:value("v2ray", translate("V2Ray/XRay"))
end
if is_finded("ssr-redir") then if is_finded("ssr-redir") then
o:value("ssr", translate("ShadowsocksR")) o:value("ssr", translate("ShadowsocksR"))
end end
if is_finded("ss-redir") then if is_finded("ss-redir") then
o:value("ss", translate("Shadowsocks New Version")) o:value("ss", translate("Shadowsocks New Version"))
end end
if is_finded("xray") or is_finded("v2ray") then
o:value("v2ray", translate("V2Ray/XRay"))
end
if is_finded("trojan") then if is_finded("trojan") then
o:value("trojan", translate("Trojan")) o:value("trojan", translate("Trojan"))
end end
@ -183,8 +183,8 @@ o:depends("type", "tun")
o.description = translate("Redirect traffic to this network interface") o.description = translate("Redirect traffic to this network interface")
o = s:option(ListValue, "v2ray_protocol", translate("V2Ray/XRay protocol")) o = s:option(ListValue, "v2ray_protocol", translate("V2Ray/XRay protocol"))
o:value("vmess", translate("VMess"))
o:value("vless", translate("VLESS")) o:value("vless", translate("VLESS"))
o:value("vmess", translate("VMess"))
o:value("trojan", translate("Trojan")) o:value("trojan", translate("Trojan"))
o:value("shadowsocks", translate("Shadowsocks")) o:value("shadowsocks", translate("Shadowsocks"))
o:value("socks", translate("Socks")) o:value("socks", translate("Socks"))
@ -546,8 +546,15 @@ o = s:option(ListValue, "fingerprint", translate("Finger Print"))
o:value("disable", translate("disable")) o:value("disable", translate("disable"))
o:value("firefox", translate("firefox")) o:value("firefox", translate("firefox"))
o:value("chrome", translate("chrome")) o:value("chrome", translate("chrome"))
if is_finded("Trojan-go") then
o:value("ios", translate("ios")) o:value("ios", translate("ios"))
end
if is_finded("xray") then
o:value("safari", translate("safari"))
o:value("randomized", translate("random"))
end
o:depends({type = "trojan-go", tls = true}) o:depends({type = "trojan-go", tls = true})
o:depends({type = "v2ray", tls = true})
o.default = "firefox" o.default = "firefox"
o = s:option(Value, "tls_host", translate("TLS Host")) o = s:option(Value, "tls_host", translate("TLS Host"))

View File

@ -87,8 +87,8 @@ function s.create(...)
end end
o = s:option(DummyValue, "type", translate("Type")) o = s:option(DummyValue, "type", translate("Type"))
function o.cfgvalue(...) function o.cfgvalue(self, section)
return Value.cfgvalue(...) return m:get(section, "v2ray_protocol") or Value.cfgvalue(self, section) or translate("None")
end end
o = s:option(DummyValue, "alias", translate("Alias")) o = s:option(DummyValue, "alias", translate("Alias"))

View File

@ -212,7 +212,6 @@ start_dns() {
oversea) ipset add oversea $dnsserver 2>/dev/null ;; oversea) ipset add oversea $dnsserver 2>/dev/null ;;
*) ipset add ss_spec_wan_ac $dnsserver nomatch 2>/dev/null ;; *) ipset add ss_spec_wan_ac $dnsserver nomatch 2>/dev/null ;;
esac esac
fi
case "$ssrplus_dns" in case "$ssrplus_dns" in
1) 1)
start_pdnsd $dnsserver $dnsport start_pdnsd $dnsserver $dnsport
@ -224,6 +223,7 @@ start_dns() {
pdnsd_enable_flag=2 pdnsd_enable_flag=2
;; ;;
esac esac
fi
} }
gen_service_file() { gen_service_file() {
@ -368,8 +368,8 @@ start_udp() {
;; ;;
trojan-go) trojan-go)
gen_config_file $UDP_RELAY_SERVER $type 2 $udp_config_file gen_config_file $UDP_RELAY_SERVER $type 2 $udp_config_file
ln_start_bin $(first_type trojan-go trojan) $type --config $udp_config_file ln_start_bin $(first_type trojan-go) $type --config $udp_config_file
echolog "UDP TPROXY Relay:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!" echolog "UDP TPROXY Relay:$($(first_type trojan-go) --version 2>&1 | head -1) Started!"
;; ;;
naiveproxy) naiveproxy)
echolog "NaïveProxy UDP TPROXY Relay not supported!" echolog "NaïveProxy UDP TPROXY Relay not supported!"
@ -603,7 +603,7 @@ load_config() {
nil) nil)
mode="tcp" mode="tcp"
;; ;;
same) $GLOBAL_SERVER | same)
mode="tcp,udp" mode="tcp,udp"
tcp_config_file=$TMP_PATH/tcp-udp-ssr-retcp.json tcp_config_file=$TMP_PATH/tcp-udp-ssr-retcp.json
ARG_UDP="-u" ARG_UDP="-u"
@ -611,12 +611,6 @@ load_config() {
UDP_RELAY_SERVER=$GLOBAL_SERVER UDP_RELAY_SERVER=$GLOBAL_SERVER
;; ;;
*) *)
if [ "$UDP_RELAY_SERVER" == "$GLOBAL_SERVER" ]; then
mode="tcp,udp"
tcp_config_file=$TMP_PATH/tcp-udp-ssr-retcp.json
ARG_UDP="-u"
ARG_OTA="-u"
else
mode="udp" mode="udp"
udp_config_file=$TMP_PATH/udp-only-ssr-reudp.json udp_config_file=$TMP_PATH/udp-only-ssr-reudp.json
ARG_UDP="-U" ARG_UDP="-U"
@ -624,14 +618,13 @@ load_config() {
start_udp start_udp
ARG_OTA="" ARG_OTA=""
mode="tcp" mode="tcp"
fi
;; ;;
esac esac
case "$LOCAL_SERVER" in case "$LOCAL_SERVER" in
nil) nil)
_local="0" _local="0"
;; ;;
same) $GLOBAL_SERVER | same)
_local="1" _local="1"
LOCAL_SERVER=$GLOBAL_SERVER LOCAL_SERVER=$GLOBAL_SERVER
local_config_file=$TMP_PATH/tcp-udp-ssr-local.json local_config_file=$TMP_PATH/tcp-udp-ssr-local.json
@ -639,35 +632,24 @@ load_config() {
local_enable=0 local_enable=0
;; ;;
*) *)
if [ "$LOCAL_SERVER" == "$GLOBAL_SERVER" ]; then
_local="1"
local_config_file=$TMP_PATH/tcp-udp-ssr-local.json
start_local
local_enable=0
else
_local="2" _local="2"
local_config_file=$TMP_PATH/tcp-udp-ssr-local.json local_config_file=$TMP_PATH/tcp-udp-ssr-local.json
start_local start_local
fi
;; ;;
esac esac
case "$SHUNT_SERVER" in case "$SHUNT_SERVER" in
nil) nil)
shunt="0" shunt="0"
;; ;;
same) $GLOBAL_SERVER | same)
shunt="1" shunt="1"
SHUNT_SERVER=$GLOBAL_SERVER SHUNT_SERVER=$GLOBAL_SERVER
;; ;;
*) *)
if [ "$SHUNT_SERVER" == "$GLOBAL_SERVER" ]; then
shunt="1"
else
shunt="$tmp_shunt_port" shunt="$tmp_shunt_port"
shunt_config_file=$TMP_PATH/shunt-ssr-retcp.json shunt_config_file=$TMP_PATH/shunt-ssr-retcp.json
shunt_dns_config_file=$TMP_PATH/shunt-dns-ssr-plus.json shunt_dns_config_file=$TMP_PATH/shunt-dns-ssr-plus.json
start_shunt start_shunt
fi
;; ;;
esac esac
return 0 return 0
@ -907,7 +889,7 @@ reset() {
set shadowsocksr.@global[0].switch_try_count='3' set shadowsocksr.@global[0].switch_try_count='3'
set shadowsocksr.@global[0].gfwlist_url='https://cdn.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt' set shadowsocksr.@global[0].gfwlist_url='https://cdn.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt'
set shadowsocksr.@global[0].chnroute_url='https://ispip.clang.cn/all_cn.txt' set shadowsocksr.@global[0].chnroute_url='https://ispip.clang.cn/all_cn.txt'
set shadowsocksr.@global[0].nfip_url='https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/getflix.txt' set shadowsocksr.@global[0].nfip_url='https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt'
set shadowsocksr.@global[0].adblock_url='https://anti-ad.net/anti-ad-for-dnsmasq.conf' set shadowsocksr.@global[0].adblock_url='https://anti-ad.net/anti-ad-for-dnsmasq.conf'
add shadowsocksr server_subscribe add shadowsocksr server_subscribe
set shadowsocksr.@server_subscribe[0].proxy='0' set shadowsocksr.@server_subscribe[0].proxy='0'

View File

@ -426,6 +426,8 @@
43.228.148.0/22 43.228.148.0/22
43.228.152.0/22 43.228.152.0/22
43.228.188.0/22 43.228.188.0/22
43.228.204.0/22
43.228.240.0/22
43.229.40.0/22 43.229.40.0/22
43.229.48.0/22 43.229.48.0/22
43.229.56.0/22 43.229.56.0/22
@ -1950,7 +1952,9 @@
101.234.96.0/19 101.234.96.0/19
101.236.0.0/14 101.236.0.0/14
101.240.0.0/14 101.240.0.0/14
101.244.0.0/14 101.244.0.0/16
101.245.0.0/16
101.246.0.0/15
101.248.0.0/15 101.248.0.0/15
101.251.0.0/22 101.251.0.0/22
101.251.8.0/21 101.251.8.0/21
@ -2538,6 +2542,7 @@
103.41.0.0/22 103.41.0.0/22
103.41.16.0/22 103.41.16.0/22
103.41.52.0/22 103.41.52.0/22
103.41.116.0/22
103.41.140.0/22 103.41.140.0/22
103.41.148.0/22 103.41.148.0/22
103.41.152.0/22 103.41.152.0/22
@ -2818,6 +2823,8 @@
103.56.60.0/22 103.56.60.0/22
103.56.72.0/22 103.56.72.0/22
103.56.76.0/22 103.56.76.0/22
103.56.100.0/22
103.56.104.0/22
103.56.140.0/22 103.56.140.0/22
103.56.152.0/22 103.56.152.0/22
103.56.184.0/22 103.56.184.0/22
@ -3916,7 +3923,6 @@
103.142.96.0/23 103.142.96.0/23
103.142.102.0/23 103.142.102.0/23
103.142.122.0/23 103.142.122.0/23
103.142.126.0/24
103.142.128.0/23 103.142.128.0/23
103.142.140.0/23 103.142.140.0/23
103.142.154.0/23 103.142.154.0/23
@ -4115,6 +4121,13 @@
103.160.254.0/23 103.160.254.0/23
103.161.14.0/23 103.161.14.0/23
103.161.102.0/23 103.161.102.0/23
103.161.138.0/23
103.161.208.0/23
103.161.220.0/23
103.161.254.0/23
103.162.10.0/23
103.162.32.0/23
103.162.38.0/23
103.192.0.0/22 103.192.0.0/22
103.192.4.0/22 103.192.4.0/22
103.192.8.0/22 103.192.8.0/22
@ -5541,7 +5554,9 @@
118.26.96.0/21 118.26.96.0/21
118.26.112.0/21 118.26.112.0/21
118.26.120.0/21 118.26.120.0/21
118.26.128.0/17 118.26.128.0/20
118.26.160.0/19
118.26.192.0/18
118.28.0.0/15 118.28.0.0/15
118.30.0.0/16 118.30.0.0/16
118.31.0.0/16 118.31.0.0/16

File diff suppressed because it is too large Load Diff

View File

@ -29,5 +29,6 @@ fi
sed -i "s/option type 'vmess'"/"option type 'v2ray'\n\toption v2ray_protocol 'vmess'/g" /etc/config/shadowsocksr sed -i "s/option type 'vmess'"/"option type 'v2ray'\n\toption v2ray_protocol 'vmess'/g" /etc/config/shadowsocksr
sed -i "s/option type 'vless'"/"option type 'v2ray'\n\toption v2ray_protocol 'vless'/g" /etc/config/shadowsocksr sed -i "s/option type 'vless'"/"option type 'v2ray'\n\toption v2ray_protocol 'vless'/g" /etc/config/shadowsocksr
sed -i "s/option type 'trojan'"/"option type 'v2ray'\n\toption v2ray_protocol 'trojan'/g" /etc/config/shadowsocksr sed -i "s/option type 'trojan'"/"option type 'v2ray'\n\toption v2ray_protocol 'trojan'/g" /etc/config/shadowsocksr
sed -i "s/option type 'socks5'"/"option type 'v2ray'\n\toption v2ray_protocol 'socks'/g" /etc/config/shadowsocksr
rm -rf /tmp/luci-modulecache /tmp/luci-indexcache rm -rf /tmp/luci-modulecache /tmp/luci-indexcache
exit 0 exit 0

View File

@ -40,15 +40,12 @@ function trojan_shadowsocks()
end end
function socks_http() function socks_http()
outbound_settings = { outbound_settings = {
--
servers = { servers = {
{ {
--
address = server.server, address = server.server,
port = tonumber(server.server_port), port = tonumber(server.server_port),
users = (server.auth_enable == "1") and { users = (server.auth_enable == "1") and {
{ {
--
user = server.username, user = server.username,
pass = server.password pass = server.password
} }
@ -115,18 +112,19 @@ local Xray = {
} or nil, } or nil,
-- 传出连接 -- 传出连接
outbound = { outbound = {
protocol = server.v2ray_protocol or "vmess", protocol = server.v2ray_protocol,
settings = outbound_settings, settings = outbound_settings,
-- 底层传输配置 -- 底层传输配置
streamSettings = { streamSettings = {
network = server.transport or "tcp", network = server.transport or "tcp",
security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil, security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil,
tlsSettings = (server.tls == '1' and (server.insecure == "1" or server.tls_host)) and { tlsSettings = (server.tls == '1') and {
-- tls -- tls
fingerprint = server.fingerprint,
allowInsecure = (server.insecure == "1") and true or nil, allowInsecure = (server.insecure == "1") and true or nil,
serverName = server.tls_host serverName = server.tls_host
} or nil, } or nil,
xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host)) and { xtlsSettings = (server.xtls == '1') and {
-- xtls -- xtls
allowInsecure = (server.insecure == "1") and true or nil, allowInsecure = (server.insecure == "1") and true or nil,
serverName = server.tls_host serverName = server.tls_host
@ -180,8 +178,7 @@ local Xray = {
} or nil } or nil
} or nil } or nil
} }
local cipher = local cipher = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-SHA:AES256-SHA:DES-CBC3-SHA"
"ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-SHA:AES256-SHA:DES-CBC3-SHA"
local cipher13 = "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384" local cipher13 = "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384"
local trojan = { local trojan = {
log_level = 3, log_level = 3,
@ -274,7 +271,7 @@ function config:handleIndex(index)
trojan.ssl.fingerprint = (server.fingerprint ~= nil and server.fingerprint ~= "disable") and server.fingerprint or "" trojan.ssl.fingerprint = (server.fingerprint ~= nil and server.fingerprint ~= "disable") and server.fingerprint or ""
trojan.ssl.alpn = server.trojan_transport == 'ws' and {} or {"h2", "http/1.1"} trojan.ssl.alpn = server.trojan_transport == 'ws' and {} or {"h2", "http/1.1"}
if server.tls ~= "1" and server.trojan_transport == "original" then if server.tls ~= "1" and server.trojan_transport == "original" then
-- -- tls
trojan.ssl = nil trojan.ssl = nil
trojan.transport_plugin = server.trojan_transport == "original" and { trojan.transport_plugin = server.trojan_transport == "original" and {
enabled = server.plugin_type ~= nil, enabled = server.plugin_type ~= nil,
@ -286,13 +283,13 @@ function config:handleIndex(index)
} or nil } or nil
end end
trojan.websocket = server.trojan_transport and server.trojan_transport:find('ws') and { trojan.websocket = server.trojan_transport and server.trojan_transport:find('ws') and {
-- -- ws
enabled = true, enabled = true,
path = server.ws_path or "/", path = server.ws_path or "/",
host = server.ws_host or (server.tls_host or server.server) host = server.ws_host or (server.tls_host or server.server)
} or nil } or nil
trojan.shadowsocks = (server.ss_aead == "1") and { trojan.shadowsocks = (server.ss_aead == "1") and {
-- -- ss
enabled = true, enabled = true,
method = server.ss_aead_method or "aead_aes_128_gcm", method = server.ss_aead_method or "aead_aes_128_gcm",
password = server.ss_aead_pwd or "" password = server.ss_aead_pwd or ""

View File

@ -18,7 +18,7 @@ case "$(uci_get_by_type global netflix_server nil)" in
nil) nil)
rm -f $TMP_DNSMASQ_PATH/netflix_forward.conf rm -f $TMP_DNSMASQ_PATH/netflix_forward.conf
;; ;;
same) $(uci_get_by_type global global_server nil) | same)
netflix 5335 netflix 5335
;; ;;
*) *)