Skip to content

Commit d1af796

Browse files
SakuraFallingMad1715173329
authored andcommitted
luci-app-passwall: bump to 25.9.23
1 parent 171f2f0 commit d1af796

File tree

12 files changed

+371
-1071
lines changed

12 files changed

+371
-1071
lines changed

applications/luci-app-passwall/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
include $(TOPDIR)/rules.mk
77

88
PKG_NAME:=luci-app-passwall
9-
PKG_VERSION:=25.9.19
9+
PKG_VERSION:=25.9.23
1010
PKG_RELEASE:=1
1111

1212
PKG_CONFIG_DEPENDS:= \

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ if #hysteria2_type > 0 then
130130
end
131131
end
132132

133+
if #ss_type > 0 or #trojan_type > 0 or #vmess_type > 0 or #vless_type > 0 or #hysteria2_type > 0 then
134+
o.description = string.format("<font color='red'>%s</font>",
135+
translate("The configured type also applies to the core specified when manually importing nodes."))
136+
end
137+
133138
o = s:option(ListValue, "domain_strategy", "Sing-box " .. translate("Domain Strategy"), translate("Set the default domain resolution strategy for the sing-box node."))
134139
o.default = ""
135140
o:value("", translate("Auto"))

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function o.custom_write(self, section, value)
119119
else
120120
result = { value }
121121
end
122-
api.uci:set_list(appname, section, "balancing_node", result)
122+
m.uci:set_list(appname, section, "balancing_node", result)
123123
end
124124

125125
o = s:option(ListValue, _n("balancingStrategy"), translate("Balancing Strategy"))

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function o.custom_write(self, section, value)
126126
else
127127
result = { value }
128128
end
129-
api.uci:set_list(appname, section, "urltest_node", result)
129+
m.uci:set_list(appname, section, "urltest_node", result)
130130
end
131131

132132
o = s:option(Value, _n("urltest_url"), translate("Probe URL"))

applications/luci-app-passwall/luasrc/view/passwall/node_list/link_share_man.htm

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@
797797
if (ssrurl === null || ssrurl === "") {
798798
return false;
799799
}
800+
ssrurl = ssrurl.replace(/&amp;/gi, '&').replace(/\s*#\s*/, '#').trim(); //一些奇葩的链接用"&amp;"当做"&","#"前后带空格
800801
s.innerHTML = "";
801802
var ssu = ssrurl.split('://');
802803
var event = document.createEvent("HTMLEvents");
@@ -874,6 +875,8 @@
874875
if (userInfoSplitIndex !== -1) {
875876
method = userInfo.substr(0, userInfoSplitIndex);
876877
password = userInfo.substr(userInfoSplitIndex + 1);
878+
} else {
879+
password = url0.substr(0, sipIndex); //一些链接用明文uuid做密码
877880
}
878881
} else {
879882
// base64(method:pass@host:port)
@@ -912,14 +915,14 @@
912915
pluginOpts = pluginParams.join(";");
913916
}
914917

915-
if (ss_type == "sing-box" && has_singbox) {
916-
dom_prefix = "singbox_"
917-
opt.set('type', "sing-box");
918-
opt.set(dom_prefix + 'protocol', "shadowsocks");
919-
} else if (ss_type == "xray" && has_xray) {
918+
if (has_xray && ((ss_type !== "xray" && ss_type !== "sing-box" && queryParam.type) || ss_type == "xray")) {
920919
dom_prefix = "xray_"
921920
opt.set('type', "Xray");
922921
opt.set(dom_prefix + 'protocol', "shadowsocks");
922+
} else if (has_singbox && ((ss_type !== "xray" && ss_type !== "sing-box" && queryParam.type) || ss_type == "sing-box")) {
923+
dom_prefix = "singbox_"
924+
opt.set('type', "sing-box");
925+
opt.set(dom_prefix + 'protocol', "shadowsocks");
923926
} else if (ss_type == "shadowsocks-rust") {
924927
dom_prefix = "ssrust_"
925928
opt.set('type', "SS-Rust");
@@ -932,10 +935,14 @@
932935
opt.set('type', "SS");
933936
}
934937
}
935-
if (ss_type !== "xray") {
936-
method = method.toLowerCase() === "chacha20-poly1305" ? "chacha20-ietf-poly1305" : method;
937-
method = method.toLowerCase() === "xchacha20-poly1305" ? "xchacha20-ietf-poly1305" : method;
938-
}
938+
939+
const _method = (method || "none").toLowerCase();
940+
const mapping = {
941+
"chacha20-poly1305": "chacha20-ietf-poly1305",
942+
"xchacha20-poly1305": "xchacha20-ietf-poly1305",
943+
};
944+
method = mapping[_method] || _method;
945+
939946
opt.set(dom_prefix + 'address', unbracketIP(server));
940947
opt.set(dom_prefix + 'port', port);
941948
opt.set(dom_prefix + 'password', password || "");
@@ -1329,16 +1336,13 @@
13291336
dom_prefix = "xray_"
13301337
opt.set('type', "Xray");
13311338
}
1332-
opt.set(dom_prefix + 'protocol', "vless");
1339+
13331340
var m = parseNodeUrl(ssrurl);
13341341
var password = m.passwd;
13351342
if (password === "") {
13361343
s.innerHTML = "<font color='red'><%:Invalid Share URL Format%></font>";
13371344
return false;
13381345
}
1339-
opt.set(dom_prefix + 'uuid', password);
1340-
opt.set(dom_prefix + 'address', unbracketIP(m.hostname));
1341-
opt.set(dom_prefix + 'port', m.port || "443");
13421346
var queryParam = {};
13431347
if (m.search.length > 1) {
13441348
var query = m.search.replace('/?', '?').split('?')
@@ -1351,6 +1355,16 @@
13511355
}
13521356
}
13531357

1358+
queryParam.type = queryParam.type.toLowerCase();
1359+
if (["xhttp", "kcp", "mkcp"].includes(queryParam.type) && vless_type !== "xray" && has_xray) {
1360+
dom_prefix = "xray_"
1361+
opt.set('type', "Xray");
1362+
}
1363+
opt.set(dom_prefix + 'protocol', "vless");
1364+
opt.set(dom_prefix + 'uuid', password);
1365+
opt.set(dom_prefix + 'address', unbracketIP(m.hostname));
1366+
opt.set(dom_prefix + 'port', m.port || "443");
1367+
13541368
opt.set(dom_prefix + 'encryption', queryParam.encryption || "none");
13551369
if (queryParam.security) {
13561370
if (queryParam.security == "tls") {
@@ -1390,7 +1404,6 @@
13901404

13911405
}
13921406

1393-
queryParam.type = queryParam.type.toLowerCase();
13941407
if (queryParam.type === "kcp") {
13951408
queryParam.type = "mkcp";
13961409
}

applications/luci-app-passwall/po/zh_Hans/passwall.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,3 +1986,6 @@ msgstr "客户端版本"
19861986

19871987
msgid "Random version will be used if empty."
19881988
msgstr "如留空,则使用随机版本。"
1989+
1990+
msgid "The configured type also applies to the core specified when manually importing nodes."
1991+
msgstr "配置的类型同样适用于手动导入节点时所指定的核心程序。"

applications/luci-app-passwall/root/usr/share/passwall/app.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,8 +2280,8 @@ get_config() {
22802280
RESOLVFILE=/tmp/resolv.conf.d/resolv.conf.auto
22812281
[ -f "${RESOLVFILE}" ] && [ -s "${RESOLVFILE}" ] || RESOLVFILE=/tmp/resolv.conf.auto
22822282

2283-
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)
2284-
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 ::)
2283+
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]++')
2284+
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]++')
22852285

22862286
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')
22872287
[ -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/,$//')

0 commit comments

Comments
 (0)