luci-app-ssr-plus: bump to 183-8
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
10596c7e40
commit
3fa68f1ff4
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=183
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=8
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \
|
||||
|
||||
@ -6,7 +6,10 @@ function index()
|
||||
if not nixio.fs.access("/etc/config/shadowsocksr") then
|
||||
return
|
||||
end
|
||||
entry({"admin", "services", "shadowsocksr"}, alias("admin", "services", "shadowsocksr", "client"), _("ShadowSocksR Plus+"), 10).dependent = true
|
||||
local page
|
||||
page = entry({"admin", "services", "shadowsocksr"}, alias("admin", "services", "shadowsocksr", "client"), _("ShadowSocksR Plus+"), 10)
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-ssr-plus" }
|
||||
entry({"admin", "services", "shadowsocksr", "client"}, cbi("shadowsocksr/client"), _("SSR Client"), 10).leaf = true
|
||||
entry({"admin", "services", "shadowsocksr", "servers"}, arcombine(cbi("shadowsocksr/servers", {autoapply = true}), cbi("shadowsocksr/client-config")), _("Severs Nodes"), 20).leaf = true
|
||||
entry({"admin", "services", "shadowsocksr", "control"}, cbi("shadowsocksr/control"), _("Access Control"), 30).leaf = true
|
||||
|
||||
@ -155,14 +155,10 @@ end
|
||||
if is_finded("trojan") then
|
||||
o:value("trojan", translate("Trojan"))
|
||||
end
|
||||
if is_finded("trojan-go") then
|
||||
o:value("trojan", translate("Trojan"))
|
||||
o:value("trojan-go", translate("Trojan-Go"))
|
||||
end
|
||||
if is_finded("naive") then
|
||||
o:value("naiveproxy", translate("NaiveProxy"))
|
||||
end
|
||||
if is_finded("ipt2socks-alt") or is_finded("ipt2socks") then
|
||||
if is_finded("ipt2socks") then
|
||||
o:value("socks5", translate("Socks5"))
|
||||
end
|
||||
if is_finded("redsocks2") then
|
||||
@ -200,7 +196,6 @@ o:depends("type", "v2ray")
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "naiveproxy")
|
||||
o:depends("type", "socks5")
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
o = s:option(Value, "server_port", translate("Server Port"))
|
||||
o.datatype = "port"
|
||||
@ -211,7 +206,6 @@ o:depends("type", "v2ray")
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "naiveproxy")
|
||||
o:depends("type", "socks5")
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
o = s:option(Flag, "auth_enable", translate("Enable Authentication"))
|
||||
o.rmempty = false
|
||||
@ -239,7 +233,6 @@ o:depends({type = "v2ray", v2ray_protocol = "http", auth_enable = true})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "socks", auth_enable = true})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "trojan"})
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
o = s:option(ListValue, "encrypt_method", translate("Encrypt Method"))
|
||||
for _, v in ipairs(encrypt_methods) do
|
||||
@ -271,6 +264,9 @@ end
|
||||
if is_finded("v2ray-plugin") then
|
||||
o:value("v2ray-plugin", translate("v2ray-plugin"))
|
||||
end
|
||||
if is_finded("xray-plugin") then
|
||||
o:value("xray-plugin", translate("xray-plugin"))
|
||||
end
|
||||
o.rmempty = true
|
||||
o:depends("type", "ss")
|
||||
|
||||
@ -278,6 +274,7 @@ o = s:option(Value, "plugin_opts", translate("Plugin Opts"))
|
||||
o.rmempty = true
|
||||
o:depends({type = "ss", plugin = "obfs-local"})
|
||||
o:depends({type = "ss", plugin = "v2ray-plugin"})
|
||||
o:depends({type = "ss", plugin = "xray-plugin"})
|
||||
|
||||
o = s:option(ListValue, "protocol", translate("Protocol"))
|
||||
for _, v in ipairs(protocol) do
|
||||
@ -337,14 +334,6 @@ o:value("quic", "QUIC")
|
||||
o.rmempty = true
|
||||
o:depends("type", "v2ray")
|
||||
|
||||
trojan_transport = s:option(ListValue, "trojan_transport", translate("Transport"))
|
||||
trojan_transport:value("original", "Original")
|
||||
trojan_transport:value("ws", "WebSocket")
|
||||
trojan_transport:value("h2", "HTTP/2")
|
||||
trojan_transport:value("h2+ws", "HTTP/2 & WebSocket")
|
||||
trojan_transport.default = "original"
|
||||
trojan_transport:depends("type", "trojan-go")
|
||||
|
||||
-- [[ TCP部分 ]]--
|
||||
-- TCP伪装
|
||||
o = s:option(ListValue, "tcp_guise", translate("Camouflage Type"))
|
||||
@ -490,22 +479,6 @@ o.placeholder = "eg: [\"-config\", \"test.json\"]"
|
||||
o:depends({plugin_type = "shadowsocks"})
|
||||
o:depends({plugin_type = "other"})
|
||||
|
||||
-- [[ Trojan-Go Shadowsocks2 ]] --
|
||||
o = s:option(Flag, "ss_aead", translate("Shadowsocks2"))
|
||||
o:depends("type", "trojan-go")
|
||||
o.default = "0"
|
||||
|
||||
o = s:option(ListValue, "ss_aead_method", translate("Encrypt Method"))
|
||||
o:value("aes-128-gcm")
|
||||
o:value("aes-256-gcm")
|
||||
o:value("chacha20-ietf-poly1305")
|
||||
o.default = "aes-128-gcm"
|
||||
o:depends("ss_aead", "1")
|
||||
|
||||
o = s:option(Value, "ss_aead_pwd", translate("Password"))
|
||||
o.password = true
|
||||
o:depends("ss_aead", "1")
|
||||
|
||||
-- [[ TLS ]]--
|
||||
o = s:option(Flag, "tls", translate("TLS"))
|
||||
o.rmempty = true
|
||||
@ -513,7 +486,6 @@ o.default = "0"
|
||||
o:depends({type = "v2ray", xtls = false})
|
||||
-- o:depends({type = "v2ray", v2ray_protocol = "vless", xtls = false})
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
-- XTLS
|
||||
if is_finded("xray") then
|
||||
@ -538,7 +510,6 @@ o:depends("xtls", true)
|
||||
-- [[ TLS部分 ]] --
|
||||
o = s:option(Flag, "tls_sessionTicket", translate("Session Ticket"))
|
||||
o:depends({type = "trojan", tls = true})
|
||||
o:depends({type = "trojan-go", tls = true})
|
||||
o.default = "0"
|
||||
|
||||
-- [[ Trojan TLS ]]--
|
||||
@ -546,14 +517,10 @@ o = s:option(ListValue, "fingerprint", translate("Finger Print"))
|
||||
o:value("disable", translate("disable"))
|
||||
o:value("firefox", translate("firefox"))
|
||||
o:value("chrome", translate("chrome"))
|
||||
if is_finded("Trojan-go") then
|
||||
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 = "v2ray", tls = true})
|
||||
o.default = "firefox"
|
||||
|
||||
@ -586,7 +553,6 @@ o = s:option(Flag, "certificate", translate("Self-signed Certificate"))
|
||||
o.rmempty = true
|
||||
o.default = "0"
|
||||
o:depends({type = "trojan", tls = true, insecure = false})
|
||||
o:depends({type = "trojan-go", tls = true, insecure = false})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vmess", tls = true, insecure = false})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vless", tls = true, insecure = false})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vmess", xtls = true, insecure = false})
|
||||
@ -629,9 +595,9 @@ end
|
||||
|
||||
o = s:option(Value, "certpath", translate("Current Certificate Path"))
|
||||
o:depends("certificate", 1)
|
||||
o:value("/etc/ssl/private/")
|
||||
o:value("/etc/ssl/private/ca.pem")
|
||||
o.description = translate("Please confirm the current certificate path")
|
||||
o.default = "/etc/ssl/private/"
|
||||
o.default = "/etc/ssl/private/ca.pem"
|
||||
|
||||
o = s:option(Flag, "fast_open", translate("TCP Fast Open"))
|
||||
o.rmempty = true
|
||||
@ -639,7 +605,6 @@ o.default = "0"
|
||||
o:depends("type", "ssr")
|
||||
o:depends("type", "ss")
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
o = s:option(Flag, "switch_enable", translate("Enable Auto Switch"))
|
||||
o.rmempty = false
|
||||
|
||||
@ -227,58 +227,6 @@ function import_ssr_url(btn, urlname, sid) {
|
||||
}
|
||||
s.innerHTML = "<font color='green'><%:Import configuration information successfully.%></font>";
|
||||
return false;
|
||||
case "trojan-go":
|
||||
var url0, param = "";
|
||||
var ploc = ssu[1].indexOf("#");
|
||||
if (ploc > 0) {
|
||||
url0 = ssu[1].substr(0, ploc);
|
||||
param = ssu[1].substr(ploc + 1);
|
||||
} else {
|
||||
url0 = ssu[1]
|
||||
}
|
||||
var sstr = url0;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].value = ssu[0];
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].dispatchEvent(event);
|
||||
var team = sstr.split('@');
|
||||
var password = team[0]
|
||||
var serverPart = team[1].split(':');
|
||||
var others = serverPart[1].split('?');
|
||||
var port = parseInt(others[0]);
|
||||
var queryParam = {}
|
||||
if (others.length > 1) {
|
||||
var queryParams = others[1]
|
||||
var queryArray = queryParams.split('&');
|
||||
for (i = 0; i < queryArray.length; i++) {
|
||||
var params = queryArray[i].split('=');
|
||||
queryParam[decodeURIComponent(params[0])] = decodeURIComponent(params[1] || '');
|
||||
}
|
||||
}
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = serverPart[0];
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = port || '443';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.password')[0].value = password;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.trojan_transport')[0].value = queryParam.type || 'original';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.trojan_transport')[0].dispatchEvent(event);
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ws_host')[0].value = queryParam.host;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ws_path')[0].value = queryParam.path;
|
||||
if (queryParam.encryption)
|
||||
{
|
||||
var ss_aead = queryParam.encryption.split(';');
|
||||
var ss_aead_method = ss_aead[1].split(':');
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ss_aead')[0].checked = ss_aead[0] == 'ss';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ss_aead')[0].dispatchEvent(event);
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ss_aead_method')[0].value = ss_aead_method[0];
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ss_aead_pwd')[0].value = ss_aead_method[1];
|
||||
}
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].checked = true;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].dispatchEvent(event);
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = queryParam.sni || '';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].checked = queryParam.allowInsecure == '1';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].dispatchEvent(event);
|
||||
if (param != undefined) {
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = decodeURI(param);
|
||||
}
|
||||
s.innerHTML = "<font color='green'><%:Import configuration information successfully.%></font>";
|
||||
return false;
|
||||
case "vmess":
|
||||
var sstr = b64DecodeUnicode(ssu[1]);
|
||||
var ploc = sstr.indexOf("/?");
|
||||
|
||||
@ -733,8 +733,5 @@ msgstr "输入的内容不正确!"
|
||||
msgid "Reset complete"
|
||||
msgstr "重置完成"
|
||||
|
||||
msgid "Shadowsocks2"
|
||||
msgstr "二次加密"
|
||||
|
||||
msgid "Finger Print"
|
||||
msgstr "指纹伪造"
|
||||
|
||||
@ -27,6 +27,7 @@ shunt_dns_config_file=
|
||||
tmp_local_port=
|
||||
ARG_UDP=
|
||||
ARG_OTA=
|
||||
dns_port="5335" #dns port
|
||||
tmp_dns_port="300" #dns2socks temporary port
|
||||
tmp_udp_port="301" #udp temporary port
|
||||
tmp_udp_local_port="302" #udp socks temporary port
|
||||
@ -182,7 +183,7 @@ start_dns() {
|
||||
pid_file="/var/run/pdnsd.pid";
|
||||
run_as="nobody";
|
||||
server_ip=127.0.0.1;
|
||||
server_port=5335;
|
||||
server_port=$dns_port;
|
||||
status_ctl=on;
|
||||
query_method=tcp_only;
|
||||
min_ttl=1h;
|
||||
@ -201,6 +202,7 @@ start_dns() {
|
||||
uptest=none;
|
||||
interval=10m;
|
||||
purge_cache=off;
|
||||
reject=::/0;
|
||||
}
|
||||
EOF
|
||||
ln_start_bin $(first_type pdnsd) pdnsd -c $TMP_PATH/pdnsd.conf
|
||||
@ -218,7 +220,7 @@ start_dns() {
|
||||
;;
|
||||
2)
|
||||
ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_dns_port ssrplus-dns
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:5335 -q
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:$dns_port -q
|
||||
pdnsd_enable_flag=2
|
||||
;;
|
||||
esac
|
||||
@ -302,20 +304,6 @@ gen_config_file() { #server1 type2 code3 local_port4 socks_port5 threads5
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
trojan-go)
|
||||
case "$3" in
|
||||
1 | 2)
|
||||
lua /usr/share/shadowsocksr/gen_config.lua $1 nat $4 >$config_file
|
||||
;;
|
||||
3)
|
||||
lua /usr/share/shadowsocksr/gen_config.lua $1 nat $4 >$config_file
|
||||
lua /usr/share/shadowsocksr/gen_config.lua $1 client $tmp_port >$shunt_dns_config_file
|
||||
;;
|
||||
4)
|
||||
lua /usr/share/shadowsocksr/gen_config.lua $1 client $4 >$config_file
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
naiveproxy)
|
||||
case "$3" in
|
||||
1)
|
||||
@ -361,14 +349,9 @@ start_udp() {
|
||||
;;
|
||||
trojan) #client
|
||||
gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_local_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $udp_config_file
|
||||
ln_start_bin $(first_type ipt2socks-alt ipt2socks) ipt2socks -U -b 0.0.0.0 -4 -s 127.0.0.1 -p $tmp_udp_local_port -l $tmp_udp_port
|
||||
echolog "UDP TPROXY Relay:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!"
|
||||
;;
|
||||
trojan-go)
|
||||
gen_config_file $UDP_RELAY_SERVER $type 2 $udp_config_file
|
||||
ln_start_bin $(first_type trojan-go) $type --config $udp_config_file
|
||||
echolog "UDP TPROXY Relay:$($(first_type trojan-go) --version 2>&1 | head -1) Started!"
|
||||
ln_start_bin $(first_type trojan) $type --config $udp_config_file
|
||||
ln_start_bin $(first_type ipt2socks) ipt2socks -U -b 0.0.0.0 -4 -s 127.0.0.1 -p $tmp_udp_local_port -l $tmp_udp_port
|
||||
echolog "UDP TPROXY Relay:$($(first_type trojan) --version 2>&1 | head -1) Started!"
|
||||
;;
|
||||
naiveproxy)
|
||||
echolog "NaïveProxy UDP TPROXY Relay not supported!"
|
||||
@ -376,12 +359,12 @@ start_udp() {
|
||||
ARG_UDP=""
|
||||
;;
|
||||
socks5)
|
||||
if [ "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable 0)" == "1" ]; then
|
||||
local auth="-a $(uci_get_by_name $UDP_RELAY_SERVER username) -k $(uci_get_by_name $UDP_RELAY_SERVER password)"
|
||||
fi
|
||||
ln_start_bin $(first_type ipt2socks-alt ipt2socks) ipt2socks $udp_config_file -U -4 -s $(uci_get_by_name $UDP_RELAY_SERVER server) -p $(uci_get_by_name $UDP_RELAY_SERVER server_port) -l $tmp_udp_port $auth
|
||||
#gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
|
||||
#ln_start_bin $(first_type redsocks2) redsocks2 -c $udp_config_file
|
||||
# if [ "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable 0)" == "1" ]; then
|
||||
# local auth="-a $(uci_get_by_name $UDP_RELAY_SERVER username) -k $(uci_get_by_name $UDP_RELAY_SERVER password)"
|
||||
# fi
|
||||
# ln_start_bin $(first_type ipt2socks) ipt2socks $udp_config_file -U -4 -s $(uci_get_by_name $UDP_RELAY_SERVER server) -p $(uci_get_by_name $UDP_RELAY_SERVER server_port) -l $tmp_udp_port $auth
|
||||
gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
|
||||
ln_start_bin $(first_type redsocks2) redsocks2 -c $udp_config_file
|
||||
echolog "UDP TPROXY Relay:Socks5 REDIRECT/TPROXY Started!"
|
||||
;;
|
||||
tun)
|
||||
@ -418,17 +401,17 @@ start_shunt() {
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
|
||||
echolog "shunt:$($(first_type xray v2ray) -version | head -1) Started!"
|
||||
;;
|
||||
trojan | trojan-go)
|
||||
trojan)
|
||||
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $shunt_config_file
|
||||
ln_start_bin $(first_type trojan) $type --config $shunt_config_file
|
||||
if [ -n "$tmp_local_port" ]; then
|
||||
local tmp_port=$tmp_local_port
|
||||
else
|
||||
local tmp_port=$tmp_shunt_local_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $shunt_dns_config_file
|
||||
ln_start_bin $(first_type trojan) $type --config $shunt_dns_config_file
|
||||
fi
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
|
||||
echolog "shunt:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!"
|
||||
echolog "shunt:$($(first_type trojan) --version 2>&1 | head -1) Started!"
|
||||
;;
|
||||
naiveproxy)
|
||||
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
@ -443,22 +426,22 @@ start_shunt() {
|
||||
echolog "shunt:$($(first_type "naive") --version 2>&1 | head -1) Started!"
|
||||
redir_udp=0
|
||||
;;
|
||||
socks5)
|
||||
if [ "$(uci_get_by_name $SHUNT_SERVER auth_enable 0)" == "1" ]; then
|
||||
local auth="-a $(uci_get_by_name $SHUNT_SERVER username) -k $(uci_get_by_name $SHUNT_SERVER password)"
|
||||
fi
|
||||
ln_start_bin $(first_type ipt2socks-alt ipt2socks) ipt2socks $shunt_config_file -R -4 -s $(uci_get_by_name $SHUNT_SERVER server) -p $(uci_get_by_name $SHUNT_SERVER server_port) -l $tmp_shunt_port $auth
|
||||
#gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
#ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
||||
if [ -n "$tmp_local_port" ]; then
|
||||
local tmp_port=$tmp_local_port
|
||||
else
|
||||
local tmp_port=$tmp_shunt_local_port
|
||||
ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_port shunt-dns-ssr-plus
|
||||
fi
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
|
||||
echolog "shunt:$type REDIRECT/TPROXY Started!"
|
||||
;;
|
||||
# socks5)
|
||||
# if [ "$(uci_get_by_name $SHUNT_SERVER auth_enable 0)" == "1" ]; then
|
||||
# local auth="-a $(uci_get_by_name $SHUNT_SERVER username) -k $(uci_get_by_name $SHUNT_SERVER password)"
|
||||
# fi
|
||||
# ln_start_bin $(first_type ipt2socks) ipt2socks $shunt_config_file -R -4 -s $(uci_get_by_name $SHUNT_SERVER server) -p $(uci_get_by_name $SHUNT_SERVER server_port) -l $tmp_shunt_port $auth
|
||||
# #gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
# #ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
||||
# if [ -n "$tmp_local_port" ]; then
|
||||
# local tmp_port=$tmp_local_port
|
||||
# else
|
||||
# local tmp_port=$tmp_shunt_local_port
|
||||
# ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_port shunt-dns-ssr-plus
|
||||
# fi
|
||||
# ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
|
||||
# echolog "shunt:$type REDIRECT/TPROXY Started!"
|
||||
# ;;
|
||||
*)
|
||||
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
||||
@ -492,10 +475,10 @@ start_local() {
|
||||
echolog "Global_Socks5:$($(first_type "xray" "v2ray") -version | head -1) Started!"
|
||||
fi
|
||||
;;
|
||||
trojan | trojan-go) #client
|
||||
trojan) #client
|
||||
gen_config_file $LOCAL_SERVER $type 4 $local_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $local_config_file
|
||||
echolog "Global_Socks5:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!"
|
||||
ln_start_bin $(first_type trojan) $type --config $local_config_file
|
||||
echolog "Global_Socks5:$($(first_type trojan) --version 2>&1 | head -1) Started!"
|
||||
;;
|
||||
naiveproxy)
|
||||
gen_config_file $LOCAL_SERVER $type 4 $local_port
|
||||
@ -552,10 +535,12 @@ Start_Run() {
|
||||
ln_start_bin $(first_type xray v2ray) v2ray -config $tcp_config_file
|
||||
echolog "Main node:$($(first_type xray v2ray) -version | head -1) Started!"
|
||||
;;
|
||||
trojan | trojan-go)
|
||||
trojan)
|
||||
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $tcp_config_file
|
||||
echolog "Main node:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!"
|
||||
for i in $(seq 1 $threads); do
|
||||
ln_start_bin $(first_type $type) $type --config $tcp_config_file
|
||||
done
|
||||
echolog "Main node:$($(first_type $type) --version 2>&1 | head -1) , $threads Threads Started!"
|
||||
;;
|
||||
naiveproxy)
|
||||
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|
||||
@ -566,7 +551,7 @@ Start_Run() {
|
||||
if [ "$(uci_get_by_name $GLOBAL_SERVER auth_enable 0)" == "1" ]; then
|
||||
local auth="-a $(uci_get_by_name $GLOBAL_SERVER username) -k $(uci_get_by_name $GLOBAL_SERVER password)"
|
||||
fi
|
||||
ln_start_bin $(first_type ipt2socks-alt ipt2socks) ipt2socks $tcp_config_file -R -4 -j $threads -s $(uci_get_by_name $GLOBAL_SERVER server) -p $(uci_get_by_name $GLOBAL_SERVER server_port) -l $tcp_port $auth
|
||||
ln_start_bin $(first_type ipt2socks) ipt2socks $tcp_config_file -R -4 -j $threads -s $(uci_get_by_name $GLOBAL_SERVER server) -p $(uci_get_by_name $GLOBAL_SERVER server_port) -l $tcp_port $auth
|
||||
#gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|
||||
#for i in $(seq 1 $threads); do
|
||||
# ln_start_bin $(first_type redsocks2) redsocks2 -c $tcp_config_file
|
||||
|
||||
@ -3951,7 +3951,6 @@
|
||||
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
|
||||
@ -3986,7 +3985,6 @@
|
||||
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
|
||||
@ -4129,6 +4127,11 @@
|
||||
103.162.32.0/23
|
||||
103.162.38.0/23
|
||||
103.162.116.0/23
|
||||
103.163.28.0/23
|
||||
103.163.32.0/23
|
||||
103.163.46.0/23
|
||||
103.163.74.0/23
|
||||
103.163.180.0/23
|
||||
103.192.0.0/22
|
||||
103.192.4.0/22
|
||||
103.192.8.0/22
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,5 @@ if [ ! -s "/etc/config/shadowsocksr" ]; then
|
||||
fi
|
||||
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 '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
|
||||
exit 0
|
||||
|
||||
@ -108,7 +108,7 @@ while [ "1" == "1" ]; do #死循环
|
||||
kill -9 $(busybox ps -w | grep ssrplus-dns | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
kill -9 $(busybox ps -w | grep "dns2socks 127.0.0.1 $tmp_dns_port" | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_dns_port ssrplus-dns
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:5335 -q
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:$dns_port -q
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
@ -118,13 +118,13 @@ local Xray = {
|
||||
streamSettings = {
|
||||
network = server.transport or "tcp",
|
||||
security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil,
|
||||
tlsSettings = (server.tls == '1') and {
|
||||
tlsSettings = (server.tls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
||||
-- tls
|
||||
fingerprint = server.fingerprint,
|
||||
allowInsecure = (server.insecure == "1") and true or nil,
|
||||
serverName = server.tls_host
|
||||
} or nil,
|
||||
xtlsSettings = (server.xtls == '1') and {
|
||||
xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
||||
-- xtls
|
||||
allowInsecure = (server.insecure == "1") and true or nil,
|
||||
serverName = server.tls_host
|
||||
@ -194,7 +194,7 @@ local trojan = {
|
||||
ssl = {
|
||||
verify = (server.insecure == "0") and true or false,
|
||||
verify_hostname = (server.tls == "1") and true or false,
|
||||
cert = "",
|
||||
cert = (server.certificate) and server.certpath or nil,
|
||||
cipher = cipher,
|
||||
cipher_tls13 = cipher13,
|
||||
sni = server.tls_host,
|
||||
@ -204,12 +204,6 @@ local trojan = {
|
||||
session_ticket = (server.tls_sessionTicket == "1") and true or false
|
||||
},
|
||||
udp_timeout = 60,
|
||||
mux = (server.mux == "1") and {
|
||||
-- mux
|
||||
enabled = true,
|
||||
concurrency = tonumber(server.concurrency),
|
||||
idle_timeout = 60
|
||||
} or nil,
|
||||
tcp = {
|
||||
-- tcp
|
||||
no_delay = true,
|
||||
@ -265,37 +259,6 @@ function config:handleIndex(index)
|
||||
trojan = function()
|
||||
print(json.stringify(trojan, 1))
|
||||
end,
|
||||
trojan_go = function()
|
||||
trojan.ssl.cipher = server.fingerprint == nil and cipher or (server.fingerprint == "disable" and cipher13 .. ":" .. cipher or "")
|
||||
trojan.ssl.cipher_tls13 = server.fingerprint == nil and cipher13 or nil
|
||||
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"}
|
||||
if server.tls ~= "1" and server.trojan_transport == "original" then
|
||||
-- tls
|
||||
trojan.ssl = nil
|
||||
trojan.transport_plugin = server.trojan_transport == "original" and {
|
||||
enabled = server.plugin_type ~= nil,
|
||||
type = server.plugin_type or "plaintext",
|
||||
command = server.plugin_type ~= "plaintext" and server.plugin_cmd or nil,
|
||||
option = server.plugin_type ~= "plaintext" and server.plugin_option or nil,
|
||||
arg = server.plugin_type ~= "plaintext" and {server.plugin_arg} or nil,
|
||||
env = {}
|
||||
} or nil
|
||||
end
|
||||
trojan.websocket = server.trojan_transport and server.trojan_transport:find('ws') and {
|
||||
-- ws
|
||||
enabled = true,
|
||||
path = server.ws_path or "/",
|
||||
host = server.ws_host or (server.tls_host or server.server)
|
||||
} or nil
|
||||
trojan.shadowsocks = (server.ss_aead == "1") and {
|
||||
-- ss
|
||||
enabled = true,
|
||||
method = server.ss_aead_method or "aead_aes_128_gcm",
|
||||
password = server.ss_aead_pwd or ""
|
||||
} or nil
|
||||
print(json.stringify(trojan, 1))
|
||||
end,
|
||||
naiveproxy = function()
|
||||
print(json.stringify(naiveproxy, 1))
|
||||
end
|
||||
|
||||
@ -19,7 +19,7 @@ nil)
|
||||
rm -f $TMP_DNSMASQ_PATH/netflix_forward.conf
|
||||
;;
|
||||
$(uci_get_by_type global global_server nil) | same)
|
||||
netflix 5335
|
||||
netflix $dns_port
|
||||
;;
|
||||
*)
|
||||
netflix $tmp_shunt_dns_port
|
||||
@ -31,7 +31,7 @@ for line in $(cat /etc/ssrplus/white.list); do sed -i "/$line/d" $TMP_DNSMASQ_PA
|
||||
for line in $(cat /etc/ssrplus/white.list); do sed -i "/$line/d" $TMP_DNSMASQ_PATH/gfw_base.conf; done
|
||||
for line in $(cat /etc/ssrplus/deny.list); do sed -i "/$line/d" $TMP_DNSMASQ_PATH/gfw_list.conf; done
|
||||
for line in $(cat /etc/ssrplus/deny.list); do sed -i "/$line/d" $TMP_DNSMASQ_PATH/gfw_base.conf; done
|
||||
cat /etc/ssrplus/black.list | sed '/^$/d' | sed '/#/d' | sed "/.*/s/.*/server=\/&\/127.0.0.1#5335\nipset=\/&\/blacklist/" >$TMP_DNSMASQ_PATH/blacklist_forward.conf
|
||||
cat /etc/ssrplus/black.list | sed '/^$/d' | sed '/#/d' | sed "/.*/s/.*/server=\/&\/127.0.0.1#$dns_port\nipset=\/&\/blacklist/" >$TMP_DNSMASQ_PATH/blacklist_forward.conf
|
||||
cat /etc/ssrplus/white.list | sed '/^$/d' | sed '/#/d' | sed "/.*/s/.*/server=\/&\/127.0.0.1\nipset=\/&\/whitelist/" >$TMP_DNSMASQ_PATH/whitelist_forward.conf
|
||||
cat /etc/ssrplus/deny.list | sed '/^$/d' | sed '/#/d' | sed "/.*/s/.*/address=\/&\//" >$TMP_DNSMASQ_PATH/denylist.conf
|
||||
if [ "$(uci_get_by_type global adblock 0)" == "1" ]; then
|
||||
|
||||
@ -24,6 +24,7 @@ local proxy = ucic:get_first(name, 'server_subscribe', 'proxy', '0')
|
||||
local switch = ucic:get_first(name, 'server_subscribe', 'switch', '1')
|
||||
local subscribe_url = ucic:get_first(name, 'server_subscribe', 'subscribe_url', {})
|
||||
local filter_words = ucic:get_first(name, 'server_subscribe', 'filter_words', '过期时间/剩余流量')
|
||||
local v2_tj = luci.sys.exec('type -t -p trojan') ~= "" and "trojan" or "v2ray"
|
||||
local log = function(...)
|
||||
print(os.date("%Y-%m-%d %H:%M:%S ") .. table.concat({...}, " "))
|
||||
end
|
||||
@ -232,7 +233,7 @@ local function processData(szType, content)
|
||||
local userinfo = hostInfo[1]
|
||||
local password = userinfo
|
||||
result.alias = UrlDecode(alias)
|
||||
result.type = luci.sys.exec('type -t -p trojan') ~= "" and "trojan" or "v2ray"
|
||||
result.type = v2_tj
|
||||
result.v2ray_protocol = "trojan"
|
||||
result.server = host[1]
|
||||
-- 按照官方的建议 默认验证ssl证书
|
||||
|
||||
Loading…
Reference in New Issue
Block a user