mirror of
https://github.com/bolucat/Archive.git
synced 2025-09-26 20:21:35 +08:00
Update On Tue Sep 23 20:37:39 CEST 2025
This commit is contained in:
@@ -218,6 +218,7 @@ chain {{ inchain }} {
|
||||
{%- function render_acl_dport(inchain, outchain, l4proto): %}
|
||||
chain {{ inchain }} {
|
||||
{#- DNS hijack #}
|
||||
{# Always redirect port 53 #}
|
||||
meta l4proto { tcp, udp } th dport 53 counter goto {{ outchain }} comment "!{{ cfgname }}: DNS hijack (router)"
|
||||
|
||||
{% if ((l4proto === 'tcp' || !l4proto) && routing_tcpport): %}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=25.9.19
|
||||
PKG_VERSION:=25.9.23
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
@@ -130,6 +130,11 @@ if #hysteria2_type > 0 then
|
||||
end
|
||||
end
|
||||
|
||||
if #ss_type > 0 or #trojan_type > 0 or #vmess_type > 0 or #vless_type > 0 or #hysteria2_type > 0 then
|
||||
o.description = string.format("<font color='red'>%s</font>",
|
||||
translate("The configured type also applies to the core specified when manually importing nodes."))
|
||||
end
|
||||
|
||||
o = s:option(ListValue, "domain_strategy", "Sing-box " .. translate("Domain Strategy"), translate("Set the default domain resolution strategy for the sing-box node."))
|
||||
o.default = ""
|
||||
o:value("", translate("Auto"))
|
||||
|
@@ -119,7 +119,7 @@ function o.custom_write(self, section, value)
|
||||
else
|
||||
result = { value }
|
||||
end
|
||||
api.uci:set_list(appname, section, "balancing_node", result)
|
||||
m.uci:set_list(appname, section, "balancing_node", result)
|
||||
end
|
||||
|
||||
o = s:option(ListValue, _n("balancingStrategy"), translate("Balancing Strategy"))
|
||||
|
@@ -126,7 +126,7 @@ function o.custom_write(self, section, value)
|
||||
else
|
||||
result = { value }
|
||||
end
|
||||
api.uci:set_list(appname, section, "urltest_node", result)
|
||||
m.uci:set_list(appname, section, "urltest_node", result)
|
||||
end
|
||||
|
||||
o = s:option(Value, _n("urltest_url"), translate("Probe URL"))
|
||||
|
@@ -797,6 +797,7 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
if (ssrurl === null || ssrurl === "") {
|
||||
return false;
|
||||
}
|
||||
ssrurl = ssrurl.replace(/&/gi, '&').replace(/\s*#\s*/, '#').trim(); //一些奇葩的链接用"&"当做"&","#"前后带空格
|
||||
s.innerHTML = "";
|
||||
var ssu = ssrurl.split('://');
|
||||
var event = document.createEvent("HTMLEvents");
|
||||
@@ -874,6 +875,8 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
if (userInfoSplitIndex !== -1) {
|
||||
method = userInfo.substr(0, userInfoSplitIndex);
|
||||
password = userInfo.substr(userInfoSplitIndex + 1);
|
||||
} else {
|
||||
password = url0.substr(0, sipIndex); //一些链接用明文uuid做密码
|
||||
}
|
||||
} else {
|
||||
// base64(method:pass@host:port)
|
||||
@@ -912,14 +915,14 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
pluginOpts = pluginParams.join(";");
|
||||
}
|
||||
|
||||
if (ss_type == "sing-box" && has_singbox) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (ss_type == "xray" && has_xray) {
|
||||
if (has_xray && ((ss_type !== "xray" && ss_type !== "sing-box" && queryParam.type) || ss_type == "xray")) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (has_singbox && ((ss_type !== "xray" && ss_type !== "sing-box" && queryParam.type) || ss_type == "sing-box")) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (ss_type == "shadowsocks-rust") {
|
||||
dom_prefix = "ssrust_"
|
||||
opt.set('type', "SS-Rust");
|
||||
@@ -932,10 +935,14 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
opt.set('type', "SS");
|
||||
}
|
||||
}
|
||||
if (ss_type !== "xray") {
|
||||
method = method.toLowerCase() === "chacha20-poly1305" ? "chacha20-ietf-poly1305" : method;
|
||||
method = method.toLowerCase() === "xchacha20-poly1305" ? "xchacha20-ietf-poly1305" : method;
|
||||
}
|
||||
|
||||
const _method = (method || "none").toLowerCase();
|
||||
const mapping = {
|
||||
"chacha20-poly1305": "chacha20-ietf-poly1305",
|
||||
"xchacha20-poly1305": "xchacha20-ietf-poly1305",
|
||||
};
|
||||
method = mapping[_method] || _method;
|
||||
|
||||
opt.set(dom_prefix + 'address', unbracketIP(server));
|
||||
opt.set(dom_prefix + 'port', port);
|
||||
opt.set(dom_prefix + 'password', password || "");
|
||||
@@ -1329,16 +1336,13 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
}
|
||||
opt.set(dom_prefix + 'protocol', "vless");
|
||||
|
||||
var m = parseNodeUrl(ssrurl);
|
||||
var password = m.passwd;
|
||||
if (password === "") {
|
||||
s.innerHTML = "<font color='red'><%:Invalid Share URL Format%></font>";
|
||||
return false;
|
||||
}
|
||||
opt.set(dom_prefix + 'uuid', password);
|
||||
opt.set(dom_prefix + 'address', unbracketIP(m.hostname));
|
||||
opt.set(dom_prefix + 'port', m.port || "443");
|
||||
var queryParam = {};
|
||||
if (m.search.length > 1) {
|
||||
var query = m.search.replace('/?', '?').split('?')
|
||||
@@ -1351,6 +1355,16 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
}
|
||||
}
|
||||
|
||||
queryParam.type = queryParam.type.toLowerCase();
|
||||
if (["xhttp", "kcp", "mkcp"].includes(queryParam.type) && vless_type !== "xray" && has_xray) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
}
|
||||
opt.set(dom_prefix + 'protocol', "vless");
|
||||
opt.set(dom_prefix + 'uuid', password);
|
||||
opt.set(dom_prefix + 'address', unbracketIP(m.hostname));
|
||||
opt.set(dom_prefix + 'port', m.port || "443");
|
||||
|
||||
opt.set(dom_prefix + 'encryption', queryParam.encryption || "none");
|
||||
if (queryParam.security) {
|
||||
if (queryParam.security == "tls") {
|
||||
@@ -1390,7 +1404,6 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
|
||||
}
|
||||
|
||||
queryParam.type = queryParam.type.toLowerCase();
|
||||
if (queryParam.type === "kcp") {
|
||||
queryParam.type = "mkcp";
|
||||
}
|
||||
|
@@ -1986,3 +1986,6 @@ msgstr "客户端版本"
|
||||
|
||||
msgid "Random version will be used if empty."
|
||||
msgstr "如留空,则使用随机版本。"
|
||||
|
||||
msgid "The configured type also applies to the core specified when manually importing nodes."
|
||||
msgstr "配置的类型同样适用于手动导入节点时所指定的核心程序。"
|
||||
|
@@ -2280,8 +2280,8 @@ get_config() {
|
||||
RESOLVFILE=/tmp/resolv.conf.d/resolv.conf.auto
|
||||
[ -f "${RESOLVFILE}" ] && [ -s "${RESOLVFILE}" ] || RESOLVFILE=/tmp/resolv.conf.auto
|
||||
|
||||
ISP_DNS=$(cat $RESOLVFILE 2>/dev/null | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | sort -u | grep -v 0.0.0.0 | grep -v 127.0.0.1)
|
||||
ISP_DNS6=$(cat $RESOLVFILE 2>/dev/null | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | awk -F % '{print $1}' | awk -F " " '{print $2}'| sort -u | grep -v -Fx ::1 | grep -v -Fx ::)
|
||||
ISP_DNS=$(cat $RESOLVFILE 2>/dev/null | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | grep -v -E '^(0\.0\.0\.0|127\.0\.0\.1)$' | awk '!seen[$0]++')
|
||||
ISP_DNS6=$(cat $RESOLVFILE 2>/dev/null | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | awk -F % '{print $1}' | awk -F " " '{print $2}' | grep -v -Fx ::1 | grep -v -Fx :: | awk '!seen[$0]++')
|
||||
|
||||
DEFAULT_DNS=$(uci show dhcp.@dnsmasq[0] | grep "\.server=" | awk -F '=' '{print $2}' | sed "s/'//g" | tr ' ' '\n' | grep -v "\/" | head -2 | sed ':label;N;s/\n/,/;b label')
|
||||
[ -z "${DEFAULT_DNS}" ] && [ "$(echo $ISP_DNS | tr ' ' '\n' | wc -l)" -le 2 ] && DEFAULT_DNS=$(echo -n $ISP_DNS | tr ' ' '\n' | head -2 | tr '\n' ',' | sed 's/,$//')
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,7 @@
|
||||
101.198.0.0/22
|
||||
101.198.160.0/19
|
||||
101.198.192.0/19
|
||||
101.198.4.0/24
|
||||
101.199.112.0/24
|
||||
101.199.128.0/23
|
||||
101.199.196.0/22
|
||||
@@ -89,6 +90,8 @@
|
||||
101.248.0.0/15
|
||||
101.251.0.0/22
|
||||
101.251.128.0/19
|
||||
101.251.160.0/20
|
||||
101.251.176.0/22
|
||||
101.251.192.0/18
|
||||
101.251.80.0/20
|
||||
101.254.0.0/20
|
||||
@@ -207,7 +210,7 @@
|
||||
103.126.101.0/24
|
||||
103.126.102.0/23
|
||||
103.126.124.0/22
|
||||
103.126.18.0/23
|
||||
103.126.19.0/24
|
||||
103.13.12.0/24
|
||||
103.13.244.0/22
|
||||
103.130.160.0/23
|
||||
@@ -253,6 +256,7 @@
|
||||
103.145.92.0/24
|
||||
103.146.126.0/23
|
||||
103.147.124.0/24
|
||||
103.149.111.0/24
|
||||
103.149.181.0/24
|
||||
103.149.242.0/24
|
||||
103.149.244.0/22
|
||||
@@ -264,6 +268,7 @@
|
||||
103.150.212.0/24
|
||||
103.150.24.0/23
|
||||
103.151.148.0/23
|
||||
103.151.179.0/24
|
||||
103.151.216.0/23
|
||||
103.151.228.0/23
|
||||
103.151.5.0/24
|
||||
@@ -281,6 +286,7 @@
|
||||
103.154.30.0/23
|
||||
103.154.41.0/24
|
||||
103.155.110.0/23
|
||||
103.155.120.0/23
|
||||
103.155.76.0/23
|
||||
103.156.174.0/23
|
||||
103.156.186.0/23
|
||||
@@ -311,8 +317,8 @@
|
||||
103.175.197.0/24
|
||||
103.177.28.0/23
|
||||
103.179.78.0/23
|
||||
103.18.186.0/24
|
||||
103.180.108.0/23
|
||||
103.181.164.0/23
|
||||
103.181.234.0/24
|
||||
103.183.122.0/23
|
||||
103.183.124.0/23
|
||||
@@ -387,7 +393,7 @@
|
||||
103.21.140.0/22
|
||||
103.21.176.0/22
|
||||
103.210.160.0/22
|
||||
103.210.170.0/23
|
||||
103.210.171.0/24
|
||||
103.211.220.0/22
|
||||
103.211.44.0/22
|
||||
103.212.1.0/24
|
||||
@@ -655,6 +661,7 @@
|
||||
103.42.8.0/22
|
||||
103.43.132.0/24
|
||||
103.43.134.0/23
|
||||
103.43.175.0/24
|
||||
103.43.184.0/22
|
||||
103.43.240.0/23
|
||||
103.44.144.0/22
|
||||
@@ -685,7 +692,7 @@
|
||||
103.49.196.0/24
|
||||
103.49.198.0/23
|
||||
103.5.192.0/22
|
||||
103.50.36.0/22
|
||||
103.50.38.0/24
|
||||
103.51.62.0/23
|
||||
103.52.100.0/22
|
||||
103.52.104.0/23
|
||||
@@ -744,6 +751,7 @@
|
||||
103.71.232.0/22
|
||||
103.71.68.0/22
|
||||
103.72.113.0/24
|
||||
103.72.120.0/22
|
||||
103.72.172.0/24
|
||||
103.73.116.0/22
|
||||
103.73.136.0/21
|
||||
@@ -768,7 +776,7 @@
|
||||
103.78.60.0/22
|
||||
103.79.120.0/22
|
||||
103.79.200.0/22
|
||||
103.79.228.0/23
|
||||
103.79.228.0/24
|
||||
103.79.24.0/22
|
||||
103.8.220.0/22
|
||||
103.8.32.0/22
|
||||
@@ -957,6 +965,7 @@
|
||||
110.218.192.0/20
|
||||
110.218.224.0/20
|
||||
110.218.32.0/20
|
||||
110.219.128.0/17
|
||||
110.219.64.0/22
|
||||
110.219.68.0/24
|
||||
110.228.0.0/14
|
||||
@@ -1028,7 +1037,6 @@
|
||||
111.235.178.0/23
|
||||
111.235.180.0/23
|
||||
111.235.182.0/24
|
||||
111.67.192.0/20
|
||||
111.72.0.0/13
|
||||
111.85.0.0/16
|
||||
112.0.0.0/10
|
||||
@@ -1220,7 +1228,8 @@
|
||||
115.175.64.0/19
|
||||
115.182.0.0/15
|
||||
115.190.0.0/17
|
||||
115.190.128.0/19
|
||||
115.190.128.0/18
|
||||
115.190.192.0/20
|
||||
115.192.0.0/11
|
||||
115.224.0.0/12
|
||||
115.24.0.0/14
|
||||
@@ -1229,6 +1238,7 @@
|
||||
115.32.0.0/19
|
||||
115.32.32.0/21
|
||||
115.32.56.0/21
|
||||
115.32.64.0/20
|
||||
115.44.0.0/14
|
||||
115.48.0.0/12
|
||||
115.84.0.0/18
|
||||
@@ -1419,7 +1429,8 @@
|
||||
118.178.0.0/16
|
||||
118.180.0.0/14
|
||||
118.184.0.0/22
|
||||
118.184.104.0/22
|
||||
118.184.105.0/24
|
||||
118.184.106.0/23
|
||||
118.184.128.0/17
|
||||
118.184.30.0/24
|
||||
118.184.40.0/21
|
||||
@@ -1427,7 +1438,6 @@
|
||||
118.184.52.0/24
|
||||
118.184.64.0/24
|
||||
118.184.66.0/23
|
||||
118.184.69.0/24
|
||||
118.184.76.0/22
|
||||
118.184.81.0/24
|
||||
118.184.82.0/23
|
||||
@@ -1474,8 +1484,7 @@
|
||||
118.192.70.0/24
|
||||
118.192.96.0/19
|
||||
118.193.128.0/23
|
||||
118.193.138.0/24
|
||||
118.193.144.0/23
|
||||
118.193.144.0/24
|
||||
118.193.152.0/22
|
||||
118.193.160.0/23
|
||||
118.193.162.0/24
|
||||
@@ -1488,8 +1497,8 @@
|
||||
118.194.240.0/21
|
||||
118.194.32.0/19
|
||||
118.195.0.0/16
|
||||
118.196.0.0/19
|
||||
118.196.32.0/20
|
||||
118.196.0.0/18
|
||||
118.196.64.0/19
|
||||
118.199.0.0/16
|
||||
118.202.0.0/15
|
||||
118.212.0.0/15
|
||||
@@ -1588,7 +1597,6 @@
|
||||
119.255.128.0/17
|
||||
119.255.63.0/24
|
||||
119.27.160.0/19
|
||||
119.27.64.0/18
|
||||
119.28.28.0/24
|
||||
119.29.0.0/16
|
||||
119.3.0.0/16
|
||||
@@ -1985,11 +1993,7 @@
|
||||
124.172.0.0/15
|
||||
124.192.0.0/15
|
||||
124.196.0.0/24
|
||||
124.196.10.0/23
|
||||
124.196.12.0/23
|
||||
124.196.17.0/24
|
||||
124.196.18.0/23
|
||||
124.196.20.0/24
|
||||
124.196.25.0/24
|
||||
124.196.26.0/23
|
||||
124.196.28.0/24
|
||||
@@ -2002,12 +2006,9 @@
|
||||
124.196.56.0/23
|
||||
124.196.58.0/24
|
||||
124.196.66.0/24
|
||||
124.196.72.0/24
|
||||
124.196.76.0/23
|
||||
124.196.78.0/24
|
||||
124.196.77.0/24
|
||||
124.196.80.0/22
|
||||
124.196.84.0/24
|
||||
124.196.9.0/24
|
||||
124.200.0.0/16
|
||||
124.202.0.0/16
|
||||
124.203.176.0/20
|
||||
@@ -2030,7 +2031,6 @@
|
||||
124.40.128.0/18
|
||||
124.42.0.0/16
|
||||
124.47.0.0/18
|
||||
124.6.64.0/18
|
||||
124.64.0.0/15
|
||||
124.66.0.0/17
|
||||
124.67.0.0/16
|
||||
@@ -2190,8 +2190,7 @@
|
||||
150.138.0.0/15
|
||||
150.158.0.0/16
|
||||
150.223.0.0/16
|
||||
150.242.120.0/24
|
||||
150.242.122.0/23
|
||||
150.242.120.0/22
|
||||
150.242.156.0/22
|
||||
150.242.168.0/22
|
||||
150.242.184.0/22
|
||||
@@ -2205,7 +2204,6 @@
|
||||
150.242.96.0/22
|
||||
150.255.0.0/16
|
||||
151.241.174.0/24
|
||||
151.242.65.0/24
|
||||
152.104.128.0/17
|
||||
152.136.0.0/16
|
||||
153.0.0.0/16
|
||||
@@ -2221,6 +2219,7 @@
|
||||
154.208.160.0/21
|
||||
154.208.172.0/23
|
||||
154.213.4.0/23
|
||||
154.218.6.0/23
|
||||
154.223.168.0/24
|
||||
154.223.179.0/24
|
||||
154.223.180.0/24
|
||||
@@ -2232,11 +2231,14 @@
|
||||
154.8.128.0/17
|
||||
154.91.158.0/23
|
||||
155.117.164.0/24
|
||||
155.117.188.0/24
|
||||
155.126.176.0/23
|
||||
156.107.160.0/24
|
||||
156.107.170.0/24
|
||||
156.107.179.0/24
|
||||
156.107.181.0/24
|
||||
156.227.1.0/24
|
||||
156.227.24.0/22
|
||||
156.230.11.0/24
|
||||
156.231.163.0/24
|
||||
156.236.116.0/24
|
||||
@@ -2315,10 +2317,6 @@
|
||||
167.148.46.0/24
|
||||
167.189.0.0/16
|
||||
167.220.244.0/22
|
||||
168.159.144.0/21
|
||||
168.159.152.0/22
|
||||
168.159.156.0/23
|
||||
168.159.158.0/24
|
||||
168.160.0.0/17
|
||||
168.160.152.0/24
|
||||
168.160.158.0/23
|
||||
@@ -2366,6 +2364,7 @@
|
||||
175.42.0.0/15
|
||||
175.44.0.0/16
|
||||
175.46.0.0/15
|
||||
178.219.5.0/24
|
||||
178.253.239.0/24
|
||||
180.129.128.0/17
|
||||
180.130.0.0/16
|
||||
@@ -2449,7 +2448,7 @@
|
||||
182.61.128.0/19
|
||||
182.61.192.0/22
|
||||
182.61.200.0/21
|
||||
182.61.216.0/21
|
||||
182.61.208.0/20
|
||||
182.61.224.0/19
|
||||
182.80.0.0/13
|
||||
182.88.0.0/14
|
||||
@@ -2479,14 +2478,12 @@
|
||||
185.75.173.0/24
|
||||
185.75.174.0/24
|
||||
188.131.128.0/17
|
||||
192.102.204.0/22
|
||||
192.140.160.0/19
|
||||
192.140.208.0/21
|
||||
192.144.128.0/17
|
||||
192.163.11.0/24
|
||||
192.232.97.0/24
|
||||
192.55.46.0/24
|
||||
192.55.68.0/22
|
||||
193.112.0.0/16
|
||||
193.119.10.0/23
|
||||
193.119.12.0/23
|
||||
@@ -2494,6 +2491,7 @@
|
||||
193.119.17.0/24
|
||||
193.119.19.0/24
|
||||
193.119.20.0/23
|
||||
193.119.22.0/24
|
||||
193.119.25.0/24
|
||||
193.119.28.0/24
|
||||
193.119.30.0/24
|
||||
@@ -2507,7 +2505,6 @@
|
||||
194.138.245.0/24
|
||||
194.15.39.0/24
|
||||
195.114.203.0/24
|
||||
198.175.100.0/22
|
||||
198.208.112.0/23
|
||||
198.208.17.0/24
|
||||
198.208.19.0/24
|
||||
@@ -2573,7 +2570,6 @@
|
||||
202.153.48.0/20
|
||||
202.158.160.0/19
|
||||
202.160.140.0/22
|
||||
202.164.0.0/20
|
||||
202.164.25.0/24
|
||||
202.168.160.0/19
|
||||
202.170.128.0/19
|
||||
@@ -2688,7 +2684,7 @@
|
||||
203.119.26.0/23
|
||||
203.119.28.0/22
|
||||
203.119.33.0/24
|
||||
203.119.80.0/23
|
||||
203.119.80.0/24
|
||||
203.119.83.0/24
|
||||
203.12.204.0/23
|
||||
203.12.91.0/24
|
||||
@@ -2932,7 +2928,6 @@
|
||||
203.83.56.0/21
|
||||
203.86.0.0/19
|
||||
203.86.112.0/24
|
||||
203.86.116.0/24
|
||||
203.86.254.0/23
|
||||
203.86.43.0/24
|
||||
203.86.44.0/23
|
||||
@@ -3223,7 +3218,7 @@
|
||||
211.97.0.0/17
|
||||
211.97.128.0/19
|
||||
211.97.160.0/21
|
||||
211.97.190.0/24
|
||||
211.97.176.0/20
|
||||
211.97.192.0/18
|
||||
211.98.0.0/16
|
||||
211.99.128.0/18
|
||||
@@ -3233,6 +3228,7 @@
|
||||
211.99.32.0/19
|
||||
211.99.64.0/18
|
||||
211.99.8.0/21
|
||||
212.100.186.0/24
|
||||
212.129.128.0/17
|
||||
212.64.0.0/17
|
||||
218.0.0.0/11
|
||||
@@ -3537,7 +3533,6 @@
|
||||
223.240.0.0/13
|
||||
223.248.0.0/14
|
||||
223.252.194.0/24
|
||||
223.252.196.0/24
|
||||
223.252.199.0/24
|
||||
223.252.200.0/23
|
||||
223.252.202.0/24
|
||||
@@ -3601,6 +3596,7 @@
|
||||
36.213.192.0/20
|
||||
36.213.208.0/23
|
||||
36.213.210.0/24
|
||||
36.221.0.0/17
|
||||
36.248.0.0/14
|
||||
36.255.116.0/22
|
||||
36.255.128.0/22
|
||||
@@ -3620,6 +3616,7 @@
|
||||
36.56.0.0/13
|
||||
36.96.0.0/12
|
||||
38.111.220.0/23
|
||||
38.211.199.0/24
|
||||
39.104.0.0/14
|
||||
39.108.0.0/16
|
||||
39.128.0.0/10
|
||||
@@ -3661,7 +3658,8 @@
|
||||
42.240.12.0/24
|
||||
42.240.128.0/17
|
||||
42.240.16.0/24
|
||||
42.240.20.0/24
|
||||
42.240.20.0/23
|
||||
42.240.22.0/24
|
||||
42.240.8.0/22
|
||||
42.242.0.0/15
|
||||
42.244.0.0/14
|
||||
@@ -3681,7 +3679,6 @@
|
||||
42.83.189.0/24
|
||||
42.83.190.0/24
|
||||
42.83.200.0/23
|
||||
42.83.255.0/24
|
||||
42.84.0.0/14
|
||||
42.88.0.0/13
|
||||
42.96.128.0/17
|
||||
@@ -3741,7 +3738,8 @@
|
||||
43.229.216.0/22
|
||||
43.229.48.0/22
|
||||
43.230.136.0/22
|
||||
43.230.220.0/22
|
||||
43.230.221.0/24
|
||||
43.230.222.0/23
|
||||
43.230.72.0/22
|
||||
43.231.144.0/20
|
||||
43.231.160.0/21
|
||||
@@ -3887,8 +3885,7 @@
|
||||
45.116.208.0/22
|
||||
45.116.32.0/22
|
||||
45.116.52.0/22
|
||||
45.117.68.0/24
|
||||
45.117.70.0/23
|
||||
45.117.68.0/22
|
||||
45.117.8.0/22
|
||||
45.119.105.0/24
|
||||
45.119.116.0/22
|
||||
@@ -3934,7 +3931,7 @@
|
||||
45.248.8.0/22
|
||||
45.249.208.0/23
|
||||
45.249.212.0/22
|
||||
45.250.152.0/24
|
||||
45.250.152.0/23
|
||||
45.250.180.0/23
|
||||
45.250.184.0/22
|
||||
45.250.188.0/24
|
||||
@@ -4194,6 +4191,7 @@
|
||||
66.102.248.0/22
|
||||
66.102.252.0/24
|
||||
66.102.254.0/23
|
||||
66.92.248.0/24
|
||||
68.79.0.0/18
|
||||
69.163.104.0/24
|
||||
69.163.106.0/24
|
||||
@@ -4207,6 +4205,7 @@
|
||||
71.132.0.0/18
|
||||
71.136.64.0/18
|
||||
71.137.0.0/18
|
||||
74.122.24.0/24
|
||||
77.107.118.0/24
|
||||
8.128.32.0/19
|
||||
8.128.64.0/19
|
||||
@@ -4228,7 +4227,7 @@
|
||||
8.150.64.0/23
|
||||
8.152.0.0/13
|
||||
8.160.0.0/15
|
||||
8.162.0.0/19
|
||||
8.162.0.0/18
|
||||
8.163.0.0/16
|
||||
8.164.0.0/16
|
||||
81.173.18.0/23
|
||||
@@ -4236,9 +4235,7 @@
|
||||
81.173.28.0/24
|
||||
81.68.0.0/14
|
||||
82.156.0.0/15
|
||||
82.206.108.0/24
|
||||
84.247.114.0/24
|
||||
84.54.2.0/23
|
||||
85.237.205.0/24
|
||||
89.149.17.0/24
|
||||
94.191.0.0/17
|
||||
|
@@ -30,6 +30,7 @@
|
||||
2400:5f60::/32
|
||||
2400:6000::/32
|
||||
2400:6460:300::/40
|
||||
2400:6460:500::/40
|
||||
2400:6460::/39
|
||||
2400:6600::/32
|
||||
2400:6e60:1301::/48
|
||||
@@ -162,7 +163,6 @@
|
||||
2401:7e00::/32
|
||||
2401:800::/32
|
||||
2401:8be0::/48
|
||||
2401:8d00:10::/48
|
||||
2401:8d00:12::/48
|
||||
2401:8d00:14::/48
|
||||
2401:8d00:4::/48
|
||||
@@ -204,10 +204,11 @@
|
||||
2401:f860:86::/47
|
||||
2401:f860:88::/47
|
||||
2401:f860:90::/46
|
||||
2401:f860:94::/48
|
||||
2401:f860:c::/48
|
||||
2401:f860:e::/48
|
||||
2401:f860:94::/47
|
||||
2401:f860:a::/47
|
||||
2401:f860:c::/46
|
||||
2401:f860:f100::/40
|
||||
2401:f860:f6::/48
|
||||
2401:fa00:40::/43
|
||||
2402:1440::/32
|
||||
2402:2000::/32
|
||||
@@ -349,7 +350,7 @@
|
||||
2404:e280::/47
|
||||
2404:e5c0::/32
|
||||
2404:e8c0::/32
|
||||
2404:f4c0:f000::/44
|
||||
2404:f4c0::/32
|
||||
2405:1480:1000::/48
|
||||
2405:1480:2000::/48
|
||||
2405:1480:3000::/47
|
||||
@@ -452,7 +453,8 @@
|
||||
2406:840:fda0::/43
|
||||
2406:840:fdc0::/44
|
||||
2406:840:fdd1::/48
|
||||
2406:840:fde1::/48
|
||||
2406:840:fde5::/48
|
||||
2406:840:fde6::/47
|
||||
2406:840:fe27::/48
|
||||
2406:840:fe90::/46
|
||||
2406:840:fe94::/48
|
||||
@@ -473,7 +475,7 @@
|
||||
2406:840:fed1::/48
|
||||
2406:840:fed8::/48
|
||||
2406:840:fedb::/48
|
||||
2406:840:fedc::/48
|
||||
2406:840:fedc::/47
|
||||
2406:840:fedf::/48
|
||||
2406:840:fef0::/48
|
||||
2406:840:fef3::/48
|
||||
@@ -575,6 +577,7 @@
|
||||
2408:8181:a000::/40
|
||||
2408:8181:a220::/44
|
||||
2408:8181:e000::/40
|
||||
2408:8182:6000::/40
|
||||
2408:8182:c000::/40
|
||||
2408:8183:4000::/40
|
||||
2408:8183:8000::/40
|
||||
@@ -1100,7 +1103,6 @@
|
||||
240a:4020:883a::/48
|
||||
240a:4021:83a::/48
|
||||
240a:4021:883a::/48
|
||||
240a:4083::/35
|
||||
240a:4084:2000::/35
|
||||
240a:4088:a000::/35
|
||||
240a:408c:2000::/35
|
||||
@@ -1118,7 +1120,6 @@
|
||||
240a:4090:5200::/40
|
||||
240a:4090:7000::/39
|
||||
240a:4090:7200::/40
|
||||
240a:4090:a000::/35
|
||||
240a:4093::/35
|
||||
240a:4094:2000::/35
|
||||
240a:409c:2000::/35
|
||||
@@ -1171,6 +1172,7 @@
|
||||
240a:41f2::/31
|
||||
240a:420a::/31
|
||||
240a:4224:9000::/44
|
||||
240a:4224:a000::/44
|
||||
240a:4224:d000::/44
|
||||
240a:4224:e000::/44
|
||||
240a:4230::/31
|
||||
@@ -1197,8 +1199,10 @@
|
||||
240e::/20
|
||||
2602:2e0:ff::/48
|
||||
2602:f7ee:ee::/48
|
||||
2602:f92a:a478::/48
|
||||
2602:f92a:d1ff::/48
|
||||
2602:f92a:dead::/48
|
||||
2602:f92a:e100::/44
|
||||
2602:f92a:f000::/48
|
||||
2602:f93b:400::/38
|
||||
2602:f9ba:10c::/48
|
||||
2602:f9ba:a8::/48
|
||||
@@ -1224,6 +1228,7 @@
|
||||
2620:57:4004::/48
|
||||
2804:1e48:9001::/48
|
||||
2804:1e48:9002::/48
|
||||
2a01:f100:100::/48
|
||||
2a01:f100:1f8::/48
|
||||
2a01:ffc7:100::/40
|
||||
2a03:5840:126::/48
|
||||
@@ -1316,6 +1321,7 @@
|
||||
2a0e:aa07:e162::/48
|
||||
2a0e:aa07:e16a::/48
|
||||
2a0e:aa07:e1a0::/44
|
||||
2a0e:aa07:e1e1::/48
|
||||
2a0e:aa07:e1e2::/47
|
||||
2a0e:aa07:e1e4::/47
|
||||
2a0e:aa07:e1e6::/48
|
||||
@@ -1356,15 +1362,18 @@
|
||||
2a0f:7803:fe82::/48
|
||||
2a0f:7804:f650::/44
|
||||
2a0f:7804:f9f0::/44
|
||||
2a0f:7807::/32
|
||||
2a0f:7d07::/32
|
||||
2a0f:85c1:ba5::/48
|
||||
2a0f:85c1:ca0::/44
|
||||
2a0f:85c1:ce1::/48
|
||||
2a0f:85c1:cf1::/48
|
||||
2a0f:9400:6110::/48
|
||||
2a0f:9400:7700::/48
|
||||
2a0f:ac00::/29
|
||||
2a0f:ea47:fc1d::/48
|
||||
2a10:2f00:15a::/48
|
||||
2a10:67c2:2::/48
|
||||
2a10:ccc0:d00::/46
|
||||
2a10:ccc0:d0a::/47
|
||||
2a10:ccc0:d0c::/47
|
||||
@@ -1387,12 +1396,16 @@
|
||||
2a13:a5c7:2102::/48
|
||||
2a13:a5c7:2121::/48
|
||||
2a13:a5c7:2301::/48
|
||||
2a13:a5c7:2302::/48
|
||||
2a13:a5c7:23c0::/42
|
||||
2a13:a5c7:2600::/40
|
||||
2a13:a5c7:2801::/48
|
||||
2a13:a5c7:2803::/48
|
||||
2a13:a5c7:3108::/48
|
||||
2a13:a5c7:31a0::/43
|
||||
2a13:a5c7:3307::/48
|
||||
2a13:a5c7:3301::/48
|
||||
2a13:a5c7:3304::/48
|
||||
2a13:a5c7:3306::/47
|
||||
2a13:aac4:f000::/44
|
||||
2a14:4c41::/32
|
||||
2a14:67c1:20::/44
|
||||
@@ -1410,14 +1423,12 @@
|
||||
2a14:67c1:a040::/47
|
||||
2a14:67c1:a061::/48
|
||||
2a14:67c1:a064::/48
|
||||
2a14:67c1:a090::/46
|
||||
2a14:67c1:a094::/47
|
||||
2a14:67c1:a096::/48
|
||||
2a14:67c1:a090::/45
|
||||
2a14:67c1:a099::/48
|
||||
2a14:67c1:a100::/43
|
||||
2a14:67c1:a125::/48
|
||||
2a14:67c1:a127::/48
|
||||
2a14:67c1:a144::/48
|
||||
2a14:67c1:a150::/44
|
||||
2a14:67c1:b000::/48
|
||||
2a14:67c1:b065::/48
|
||||
2a14:67c1:b066::/48
|
||||
@@ -1441,10 +1452,10 @@
|
||||
2a14:67c1:b581::/48
|
||||
2a14:67c1:b582::/48
|
||||
2a14:67c1:b588::/47
|
||||
2a14:67c1:b590::/48
|
||||
2a14:67c1:b590::/47
|
||||
2a14:67c1:b599::/48
|
||||
2a14:67c5:1900::/40
|
||||
2a14:7580:72f::/48
|
||||
2a14:7580:740::/44
|
||||
2a14:7580:750::/47
|
||||
2a14:7580:9200::/40
|
||||
2a14:7580:9400::/39
|
||||
@@ -1458,6 +1469,7 @@
|
||||
2a14:7580:fe00::/40
|
||||
2a14:7580:fff4::/48
|
||||
2a14:7580:fff7::/48
|
||||
2a14:7580:fffa::/48
|
||||
2a14:7581:3100::/40
|
||||
2a14:7581:3400::/47
|
||||
2a14:7581:9010::/44
|
||||
@@ -1484,9 +1496,20 @@
|
||||
2a14:7581:bcd::/48
|
||||
2a14:7581:bff::/48
|
||||
2a14:7581:ffb::/48
|
||||
2a14:7581:ffd::/48
|
||||
2a14:7583:f201::/48
|
||||
2a14:7583:f203::/48
|
||||
2a14:7583:f300::/40
|
||||
2a14:7583:f300::/46
|
||||
2a14:7583:f304::/48
|
||||
2a14:7583:f4fe::/48
|
||||
2a14:7583:f500::/48
|
||||
2a14:7583:f701::/48
|
||||
2a14:7583:f702::/47
|
||||
2a14:7583:f704::/47
|
||||
2a14:7583:f707::/48
|
||||
2a14:7583:f708::/48
|
||||
2a14:7583:f743::/48
|
||||
2a14:7583:f764::/48
|
||||
2a14:7584::/36
|
||||
2a14:7c0:4a01::/48
|
||||
2c0f:f7a8:8011::/48
|
||||
|
@@ -138,6 +138,7 @@ abematv.akamaized.net
|
||||
abitno.linpie.com
|
||||
ablwang.com
|
||||
aboluowang.com
|
||||
about.gitlab.com
|
||||
about.me
|
||||
abplive.com
|
||||
abs.edu
|
||||
@@ -734,6 +735,8 @@ brutaltgp.com
|
||||
bsky.app
|
||||
bsky.network
|
||||
bsky.social
|
||||
bt4g.org
|
||||
bt4gprx.com
|
||||
bt95.com
|
||||
btaia.com
|
||||
btbit.net
|
||||
@@ -1898,6 +1901,7 @@ gaopi.net
|
||||
gardennetworks.com
|
||||
gardennetworks.org
|
||||
gartlive.com
|
||||
garudalinux.org
|
||||
gate.io
|
||||
gatecoin.com
|
||||
gather.com
|
||||
@@ -2700,6 +2704,7 @@ iphone4hongkong.com
|
||||
iphonetaiwan.org
|
||||
iphonix.fr
|
||||
ipicture.ru
|
||||
ipify.org
|
||||
ipjetable.net
|
||||
ipobar.com
|
||||
ipoock.com
|
||||
@@ -3176,6 +3181,7 @@ mcadforums.com
|
||||
mcaf.ee
|
||||
mcfog.com
|
||||
mcreasite.com
|
||||
mcusercontent.com
|
||||
md-t.org
|
||||
me.me
|
||||
me.ns.ci
|
||||
@@ -3550,6 +3556,7 @@ ninecommentaries.com
|
||||
ninjacloak.com
|
||||
ninjaproxy.ninja
|
||||
nintendium.com
|
||||
nirsoft.net
|
||||
nitter.cc
|
||||
nitter.net
|
||||
niu.moe
|
||||
@@ -4368,6 +4375,7 @@ simplecd.org
|
||||
simpleproductivityblog.com
|
||||
simpleswap.io
|
||||
simplex.chat
|
||||
sina.com.hk
|
||||
sinchew.com.my
|
||||
singaporepools.com.sg
|
||||
singfortibet.com
|
||||
@@ -4667,11 +4675,13 @@ taiwantt.org.tw
|
||||
taiwanus.net
|
||||
taiwanyes.ning.com
|
||||
talk853.com
|
||||
talkatone.com
|
||||
talkboxapp.com
|
||||
talkcc.com
|
||||
talkonly.net
|
||||
tanc.org
|
||||
tangren.us
|
||||
tanks.gg
|
||||
taoism.net
|
||||
tapanwap.com
|
||||
tapatalk.com
|
||||
@@ -5141,7 +5151,6 @@ ubddns.org
|
||||
uberproxy.net
|
||||
uc-japan.org
|
||||
uchicago.edu
|
||||
uderzo.it
|
||||
udn.com
|
||||
udn.com.tw
|
||||
udnbkk.com
|
||||
@@ -5378,6 +5387,7 @@ vpnvip.com
|
||||
vpnworldwide.com
|
||||
vporn.com
|
||||
vpser.net
|
||||
vpsxb.net
|
||||
vraiesagesse.net
|
||||
vrchat.com
|
||||
vrmtr.com
|
||||
|
@@ -685,8 +685,13 @@ local function processData(szType, content, add_mode, add_from)
|
||||
else
|
||||
userinfo = base64Decode(hostInfo[1])
|
||||
end
|
||||
local method = userinfo:sub(1, userinfo:find(":") - 1)
|
||||
local password = userinfo:sub(userinfo:find(":") + 1, #userinfo)
|
||||
local method, password
|
||||
if userinfo:find(":") then
|
||||
method = userinfo:sub(1, userinfo:find(":") - 1)
|
||||
password = userinfo:sub(userinfo:find(":") + 1, #userinfo)
|
||||
else
|
||||
password = hostInfo[1] --一些链接用明文uuid做密码
|
||||
end
|
||||
|
||||
-- 判断密码是否经过url编码
|
||||
local function isURLEncodedPassword(pwd)
|
||||
@@ -701,12 +706,20 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if isURLEncodedPassword(password) and decoded then
|
||||
password = decoded
|
||||
end
|
||||
|
||||
local _method = (method or "none"):lower()
|
||||
method = (_method == "chacha20-poly1305" and "chacha20-ietf-poly1305") or
|
||||
(_method == "xchacha20-poly1305" and "xchacha20-ietf-poly1305") or _method
|
||||
|
||||
result.method = method
|
||||
result.password = password
|
||||
|
||||
if result.type ~= "Xray" then
|
||||
result.method = (method:lower() == "chacha20-poly1305" and "chacha20-ietf-poly1305") or
|
||||
(method:lower() == "xchacha20-poly1305" and "xchacha20-ietf-poly1305") or method
|
||||
if has_xray and (result.type ~= 'Xray' and result.type ~= 'sing-box' and params.type) then
|
||||
result.type = 'Xray'
|
||||
result.protocol = 'shadowsocks'
|
||||
elseif has_singbox and (result.type ~= 'Xray' and result.type ~= 'sing-box' and params.type) then
|
||||
result.type = 'sing-box'
|
||||
result.protocol = 'shadowsocks'
|
||||
end
|
||||
|
||||
if result.plugin then
|
||||
@@ -1109,6 +1122,9 @@ local function processData(szType, content, add_mode, add_from)
|
||||
|
||||
if not params.type then params.type = "tcp" end
|
||||
params.type = string.lower(params.type)
|
||||
if ({ xhttp=true, kcp=true, mkcp=true })[params.type] and result.type ~= "Xray" and has_xray then
|
||||
result.type = "Xray"
|
||||
end
|
||||
if result.type == "sing-box" and params.type == "raw" then
|
||||
params.type = "tcp"
|
||||
elseif result.type == "Xray" and params.type == "tcp" then
|
||||
@@ -1805,9 +1821,9 @@ local function parse_link(raw, add_mode, add_from, cfgid)
|
||||
else
|
||||
-- ssd 外的格式
|
||||
if add_mode == "1" then
|
||||
nodes = split(raw:gsub(" ", "\n"), "\n")
|
||||
nodes = split(raw, "\n")
|
||||
else
|
||||
nodes = split(base64Decode(raw):gsub(" ", "\n"), "\n")
|
||||
nodes = split(base64Decode(raw):gsub("\r\n", "\n"), "\n")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1825,7 +1841,8 @@ local function parse_link(raw, add_mode, add_from, cfgid)
|
||||
local link = api.trim(dat[2]:gsub("#.*$", ""))
|
||||
result = processData(dat[1], base64Decode(link), add_mode, add_from)
|
||||
else
|
||||
result = processData(dat[1], dat[2], add_mode, add_from)
|
||||
local link = dat[2]:gsub("&", "&"):gsub("%s*#%s*", "#") -- 一些奇葩的链接用"&"当做"&","#"前后带空格
|
||||
result = processData(dat[1], link, add_mode, add_from)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=25.9.20
|
||||
PKG_VERSION:=25.9.24
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
@@ -124,6 +124,11 @@ if #hysteria2_type > 0 then
|
||||
end
|
||||
end
|
||||
|
||||
if #ss_type > 0 or #trojan_type > 0 or #vmess_type > 0 or #vless_type > 0 or #hysteria2_type > 0 then
|
||||
o.description = string.format("<font color='red'>%s</font>",
|
||||
translate("The configured type also applies to the core specified when manually importing nodes."))
|
||||
end
|
||||
|
||||
o = s:option(ListValue, "domain_strategy", "Sing-box " .. translate("Domain Strategy"), translate("Set the default domain resolution strategy for the sing-box node."))
|
||||
o.default = ""
|
||||
o:value("", translate("Auto"))
|
||||
|
@@ -122,7 +122,7 @@ function o.custom_write(self, section, value)
|
||||
else
|
||||
result = { value }
|
||||
end
|
||||
api.uci:set_list(appname, section, "balancing_node", result)
|
||||
m.uci:set_list(appname, section, "balancing_node", result)
|
||||
end
|
||||
|
||||
o = s:option(ListValue, _n("balancingStrategy"), translate("Balancing Strategy"))
|
||||
|
@@ -132,7 +132,7 @@ function o.custom_write(self, section, value)
|
||||
else
|
||||
result = { value }
|
||||
end
|
||||
api.uci:set_list(appname, section, "urltest_node", result)
|
||||
m.uci:set_list(appname, section, "urltest_node", result)
|
||||
end
|
||||
|
||||
o = s:option(Value, _n("urltest_url"), translate("Probe URL"))
|
||||
|
@@ -793,6 +793,7 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
if (ssrurl === null || ssrurl === "") {
|
||||
return false;
|
||||
}
|
||||
ssrurl = ssrurl.replace(/&/gi, '&').replace(/\s*#\s*/, '#').trim(); //一些奇葩的链接用"&"当做"&","#"前后带空格
|
||||
s.innerHTML = "";
|
||||
var ssu = ssrurl.split('://');
|
||||
var event = document.createEvent("HTMLEvents");
|
||||
@@ -870,6 +871,8 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
if (userInfoSplitIndex !== -1) {
|
||||
method = userInfo.substr(0, userInfoSplitIndex);
|
||||
password = userInfo.substr(userInfoSplitIndex + 1);
|
||||
} else {
|
||||
password = url0.substr(0, sipIndex); //一些链接用明文uuid做密码
|
||||
}
|
||||
} else {
|
||||
// base64(method:pass@host:port)
|
||||
@@ -908,14 +911,14 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
pluginOpts = pluginParams.join(";");
|
||||
}
|
||||
|
||||
if (ss_type == "sing-box" && has_singbox) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (ss_type == "xray" && has_xray) {
|
||||
if (has_xray && ((ss_type !== "xray" && ss_type !== "sing-box" && queryParam.type) || ss_type == "xray")) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (has_singbox && ((ss_type !== "xray" && ss_type !== "sing-box" && queryParam.type) || ss_type == "sing-box")) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (ss_type == "shadowsocks-rust") {
|
||||
dom_prefix = "ssrust_"
|
||||
opt.set('type', "SS-Rust");
|
||||
@@ -928,10 +931,14 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
opt.set('type', "SS");
|
||||
}
|
||||
}
|
||||
if (ss_type !== "xray") {
|
||||
method = method.toLowerCase() === "chacha20-poly1305" ? "chacha20-ietf-poly1305" : method;
|
||||
method = method.toLowerCase() === "xchacha20-poly1305" ? "xchacha20-ietf-poly1305" : method;
|
||||
}
|
||||
|
||||
const _method = (method || "none").toLowerCase();
|
||||
const mapping = {
|
||||
"chacha20-poly1305": "chacha20-ietf-poly1305",
|
||||
"xchacha20-poly1305": "xchacha20-ietf-poly1305",
|
||||
};
|
||||
method = mapping[_method] || _method;
|
||||
|
||||
opt.set(dom_prefix + 'address', unbracketIP(server));
|
||||
opt.set(dom_prefix + 'port', port);
|
||||
opt.set(dom_prefix + 'password', password || "");
|
||||
@@ -1324,16 +1331,13 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
}
|
||||
opt.set(dom_prefix + 'protocol', "vless");
|
||||
|
||||
var m = parseNodeUrl(ssrurl);
|
||||
var password = m.passwd;
|
||||
if (password === "") {
|
||||
s.innerHTML = "<font color='red'><%:Invalid Share URL Format%></font>";
|
||||
return false;
|
||||
}
|
||||
opt.set(dom_prefix + 'uuid', password);
|
||||
opt.set(dom_prefix + 'address', unbracketIP(m.hostname));
|
||||
opt.set(dom_prefix + 'port', m.port || "443");
|
||||
var queryParam = {};
|
||||
if (m.search.length > 1) {
|
||||
var query = m.search.replace('/?', '?').split('?')
|
||||
@@ -1346,6 +1350,16 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
}
|
||||
}
|
||||
|
||||
queryParam.type = queryParam.type.toLowerCase();
|
||||
if (["xhttp", "kcp", "mkcp"].includes(queryParam.type) && vless_type !== "xray" && has_xray) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
}
|
||||
opt.set(dom_prefix + 'protocol', "vless");
|
||||
opt.set(dom_prefix + 'uuid', password);
|
||||
opt.set(dom_prefix + 'address', unbracketIP(m.hostname));
|
||||
opt.set(dom_prefix + 'port', m.port || "443");
|
||||
|
||||
opt.set(dom_prefix + 'encryption', queryParam.encryption || "none");
|
||||
if (queryParam.security) {
|
||||
if (queryParam.security == "tls") {
|
||||
@@ -1385,7 +1399,6 @@ local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{
|
||||
|
||||
}
|
||||
|
||||
queryParam.type = queryParam.type.toLowerCase();
|
||||
if (queryParam.type === "kcp" || queryParam.type === "mkcp") {
|
||||
queryParam.type = "mkcp";
|
||||
}
|
||||
|
@@ -1833,3 +1833,6 @@ msgstr "客户端版本"
|
||||
|
||||
msgid "Random version will be used if empty."
|
||||
msgstr "如留空,则使用随机版本。"
|
||||
|
||||
msgid "The configured type also applies to the core specified when manually importing nodes."
|
||||
msgstr "配置的类型同样适用于手动导入节点时所指定的核心程序。"
|
||||
|
@@ -688,8 +688,13 @@ local function processData(szType, content, add_mode, add_from)
|
||||
else
|
||||
userinfo = base64Decode(hostInfo[1])
|
||||
end
|
||||
local method = userinfo:sub(1, userinfo:find(":") - 1)
|
||||
local password = userinfo:sub(userinfo:find(":") + 1, #userinfo)
|
||||
local method, password
|
||||
if userinfo:find(":") then
|
||||
method = userinfo:sub(1, userinfo:find(":") - 1)
|
||||
password = userinfo:sub(userinfo:find(":") + 1, #userinfo)
|
||||
else
|
||||
password = hostInfo[1] --一些链接用明文uuid做密码
|
||||
end
|
||||
|
||||
-- 判断密码是否经过url编码
|
||||
local function isURLEncodedPassword(pwd)
|
||||
@@ -704,12 +709,20 @@ local function processData(szType, content, add_mode, add_from)
|
||||
if isURLEncodedPassword(password) and decoded then
|
||||
password = decoded
|
||||
end
|
||||
|
||||
local _method = (method or "none"):lower()
|
||||
method = (_method == "chacha20-poly1305" and "chacha20-ietf-poly1305") or
|
||||
(_method == "xchacha20-poly1305" and "xchacha20-ietf-poly1305") or _method
|
||||
|
||||
result.method = method
|
||||
result.password = password
|
||||
|
||||
if result.type ~= "Xray" then
|
||||
result.method = (method:lower() == "chacha20-poly1305" and "chacha20-ietf-poly1305") or
|
||||
(method:lower() == "xchacha20-poly1305" and "xchacha20-ietf-poly1305") or method
|
||||
if has_xray and (result.type ~= 'Xray' and result.type ~= 'sing-box' and params.type) then
|
||||
result.type = 'Xray'
|
||||
result.protocol = 'shadowsocks'
|
||||
elseif has_singbox and (result.type ~= 'Xray' and result.type ~= 'sing-box' and params.type) then
|
||||
result.type = 'sing-box'
|
||||
result.protocol = 'shadowsocks'
|
||||
end
|
||||
|
||||
if result.plugin then
|
||||
@@ -1115,6 +1128,9 @@ local function processData(szType, content, add_mode, add_from)
|
||||
|
||||
if not params.type then params.type = "tcp" end
|
||||
params.type = string.lower(params.type)
|
||||
if ({ xhttp=true, kcp=true, mkcp=true })[params.type] and result.type ~= "Xray" and has_xray then
|
||||
result.type = "Xray"
|
||||
end
|
||||
if result.type == "sing-box" and params.type == "raw" then
|
||||
params.type = "tcp"
|
||||
elseif result.type == "Xray" and params.type == "tcp" then
|
||||
@@ -1810,9 +1826,9 @@ local function parse_link(raw, add_mode, add_from, cfgid)
|
||||
else
|
||||
-- ssd 外的格式
|
||||
if add_mode == "1" then
|
||||
nodes = split(raw:gsub(" ", "\n"), "\n")
|
||||
nodes = split(raw, "\n")
|
||||
else
|
||||
nodes = split(base64Decode(raw):gsub(" ", "\n"), "\n")
|
||||
nodes = split(base64Decode(raw):gsub("\r\n", "\n"), "\n")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1830,7 +1846,8 @@ local function parse_link(raw, add_mode, add_from, cfgid)
|
||||
local link = api.trim(dat[2]:gsub("#.*$", ""))
|
||||
result = processData(dat[1], base64Decode(link), add_mode, add_from)
|
||||
else
|
||||
result = processData(dat[1], dat[2], add_mode, add_from)
|
||||
local link = dat[2]:gsub("&", "&"):gsub("%s*#%s*", "#") -- 一些奇葩的链接用"&"当做"&","#"前后带空格
|
||||
result = processData(dat[1], link, add_mode, add_from)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
Reference in New Issue
Block a user