update 2025-04-30 16:29:08
This commit is contained in:
parent
ffe0dba9f9
commit
bd55821c13
|
@ -682,10 +682,28 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
|||
}
|
||||
try {
|
||||
obj.dispatchEvent(event);
|
||||
} catch (err) {
|
||||
}
|
||||
} catch (err) {}
|
||||
} else {
|
||||
//alert('<%:Faltal on set option, please help in debug: %>' + opt + ' = ' + val);
|
||||
// 处理 DynamicList
|
||||
var fullName = this.base + '.' + opt;
|
||||
var lists = document.querySelectorAll('.cbi-dynlist');
|
||||
for (var i = 0; i < lists.length; i++) {
|
||||
var parent = lists[i].closest('.cbi-value');
|
||||
if (!parent) continue;
|
||||
// 尝试从 label 的 for 属性中提取 fullName
|
||||
var label = parent.querySelector('label.cbi-value-title');
|
||||
var labelFor = label?.getAttribute('for');
|
||||
if (labelFor === fullName) {
|
||||
var input = lists[i].querySelector('input[type="text"]');
|
||||
var addBtn = lists[i].querySelector('.cbi-button-add');
|
||||
if (input && addBtn) {
|
||||
input.value = val;
|
||||
addBtn.click();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
setlist: function (opt, vlist) {
|
||||
|
@ -806,6 +824,9 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
|||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (ss_type == "shadowsocks-rust") {
|
||||
dom_prefix = "ssrust_"
|
||||
opt.set('type', "SS-Rust");
|
||||
} else {
|
||||
if (["2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305"].includes(method)) {
|
||||
dom_prefix = "ssrust_"
|
||||
|
@ -824,10 +845,27 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
|||
opt.set(dom_prefix + 'password', password || "");
|
||||
opt.set(dom_prefix + 'method', method || "");
|
||||
opt.set(dom_prefix + 'ss_method', method || "");
|
||||
opt.set(dom_prefix + 'plugin', plugin || "none");
|
||||
if (plugin && plugin != "none") {
|
||||
opt.set(dom_prefix + 'plugin_opts', pluginOpts || "");
|
||||
plugin = (plugin === "simple-obfs") ? "obfs-local" : plugin;
|
||||
opt.set(dom_prefix + 'plugin_enabled', true);
|
||||
opt.set(dom_prefix + 'plugin', plugin || "none");
|
||||
opt.set(dom_prefix + 'plugin_opts', pluginOpts || "");
|
||||
//obfs-local插件转换成xray支持的格式
|
||||
if (plugin == "obfs-local" && dom_prefix == "xray_") {
|
||||
var obfs = pluginOpts.match(/obfs=([^;]+)/);
|
||||
var obfs_host = pluginOpts.match(/obfs-host=([^;]+)/);
|
||||
obfs = obfs ? obfs[1] : "";
|
||||
obfs_host = obfs_host ? obfs_host[1] : "";
|
||||
if (obfs === "http") {
|
||||
opt.set(dom_prefix + 'transport', "raw");
|
||||
opt.set(dom_prefix + 'tcp_guise', "http");
|
||||
opt.set(dom_prefix + 'tcp_guise_http_host', obfs_host || '');
|
||||
} else if (obfs === "tls") {
|
||||
opt.set(dom_prefix + 'tls', true);
|
||||
opt.set(dom_prefix + 'tls_serverName', obfs_host || '');
|
||||
opt.set(dom_prefix + 'tls_allowInsecure', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (param !== undefined) {
|
||||
opt.set('remarks', decodeURIComponent(param));
|
||||
|
|
|
@ -695,8 +695,27 @@ local function processData(szType, content, add_mode, add_from)
|
|||
|
||||
if result.plugin then
|
||||
if result.type == 'Xray' then
|
||||
--不支持插件
|
||||
result.error_msg = "Xray不支持插件."
|
||||
-- obfs-local插件转换成xray支持的格式
|
||||
if result.plugin ~= "obfs-local" then
|
||||
result.error_msg = "Xray不支持 " .. result.plugin .. " 插件."
|
||||
else
|
||||
local obfs = result.plugin_opts:match("obfs=([^;]+)") or ""
|
||||
local obfs_host = result.plugin_opts:match("obfs%-host=([^;]+)") or ""
|
||||
if obfs == "" or obfs_host == "" then
|
||||
result.error_msg = "SS " .. result.plugin .. " 插件选项不完整."
|
||||
end
|
||||
if obfs == "http" then
|
||||
result.transport = "raw"
|
||||
result.tcp_guise = "http"
|
||||
result.tcp_guise_http_host = obfs_host
|
||||
elseif obfs == "tls" then
|
||||
result.tls = "1"
|
||||
result.tls_serverName = obfs_host
|
||||
result.tls_allowInsecure = "1"
|
||||
end
|
||||
result.plugin = nil
|
||||
result.plugin_opts = nil
|
||||
end
|
||||
end
|
||||
if result.type == "sing-box" then
|
||||
result.plugin_enabled = "1"
|
||||
|
|
|
@ -21,13 +21,13 @@ define Download/geoip
|
|||
HASH:=735786c00694313090c5d525516463836167422b132ce293873443613b496e92
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20250430024636
|
||||
GEOSITE_VER:=20250430053132
|
||||
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
|
||||
define Download/geosite
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=cf36a605a2f6b645b15e5fde8c60ab1bf1a3175004de6e81082e4090940034b9
|
||||
HASH:=c773807ff768ceea3bc99c77133024f59f5d0df1818fa51688e43c00a6941c95
|
||||
endef
|
||||
|
||||
GEOSITE_IRAN_VER:=202504280040
|
||||
|
|
Loading…
Reference in New Issue