mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-07 23:27:13 +08:00
update-10.30
This commit is contained in:
@@ -287,10 +287,12 @@ o:depends("obfs_vmess", "websocket")
|
|||||||
|
|
||||||
o = s:option(Value, "max_early_data", translate("max-early-data"))
|
o = s:option(Value, "max_early_data", translate("max-early-data"))
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
|
o.placeholder = translate("2048")
|
||||||
o:depends("obfs_vmess", "websocket")
|
o:depends("obfs_vmess", "websocket")
|
||||||
|
|
||||||
o = s:option(Value, "early_data_header_name", translate("early-data-header-name"))
|
o = s:option(Value, "early_data_header_name", translate("early-data-header-name"))
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
|
o.placeholder = translate("Sec-WebSocket-Protocol")
|
||||||
o:depends("obfs_vmess", "websocket")
|
o:depends("obfs_vmess", "websocket")
|
||||||
|
|
||||||
-- [[ skip-cert-verify ]]--
|
-- [[ skip-cert-verify ]]--
|
||||||
|
|||||||
@@ -266,6 +266,9 @@ function import_ssr_url(btn, urlname, sid) {
|
|||||||
document.getElementsByName('cbid.openclash.' + sid + '.uuid')[0].value = ssm.id;
|
document.getElementsByName('cbid.openclash.' + sid + '.uuid')[0].value = ssm.id;
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.obfs_vmess')[0].value = ssm.net;
|
document.getElementsByName('cbid.openclash.' + sid + '.obfs_vmess')[0].value = ssm.net;
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.obfs_vmess')[0].dispatchEvent(event);
|
document.getElementsByName('cbid.openclash.' + sid + '.obfs_vmess')[0].dispatchEvent(event);
|
||||||
|
if (ssm.method) {
|
||||||
|
document.getElementsByName('cbid.openclash.' + sid + '.securitys')[0].value = ssm.method;
|
||||||
|
}
|
||||||
if (ssm.net == "tcp") {
|
if (ssm.net == "tcp") {
|
||||||
if (ssm.type && ssm.type != "http") {
|
if (ssm.type && ssm.type != "http") {
|
||||||
ssm.type = "none"
|
ssm.type = "none"
|
||||||
@@ -280,8 +283,8 @@ function import_ssr_url(btn, urlname, sid) {
|
|||||||
if (ssm.net == "ws") {
|
if (ssm.net == "ws") {
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.obfs_vmess')[0].value = "websocket";
|
document.getElementsByName('cbid.openclash.' + sid + '.obfs_vmess')[0].value = "websocket";
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.obfs_vmess')[0].dispatchEvent(event);
|
document.getElementsByName('cbid.openclash.' + sid + '.obfs_vmess')[0].dispatchEvent(event);
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.custom')[0].value = ssm.host;
|
document.getElementsByName('cbid.openclash.' + sid + '.ws_opts_path')[0].value = ssm.path;
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.path')[0].value = ssm.path;
|
document.getElementsByName('cbid.openclash.' + sid + '.ws_opts_headers')[0].value = "Host: " + ssm.host;
|
||||||
if (ssm.maxearlydata) {
|
if (ssm.maxearlydata) {
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.max_early_data')[0].value = ssm.maxearlydata;
|
document.getElementsByName('cbid.openclash.' + sid + '.max_early_data')[0].value = ssm.maxearlydata;
|
||||||
}
|
}
|
||||||
@@ -294,8 +297,10 @@ function import_ssr_url(btn, urlname, sid) {
|
|||||||
document.getElementsByName('cbid.openclash.' + sid + '.h2_path')[0].value = ssm.path;
|
document.getElementsByName('cbid.openclash.' + sid + '.h2_path')[0].value = ssm.path;
|
||||||
}
|
}
|
||||||
if (ssm.tls == "tls") {
|
if (ssm.tls == "tls") {
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.tls')[0].value = true;
|
document.getElementsByName('cbid.openclash.' + sid + '.tls')[0].value = "true";
|
||||||
document.getElementsByName('cbid.openclash.' + sid + '.servername')[0].value = ssm.host;
|
}
|
||||||
|
if (ssm.sni) {
|
||||||
|
document.getElementsByName('cbid.openclash.' + sid + '.servername')[0].value = ssm.sni;
|
||||||
}
|
}
|
||||||
s.innerHTML = "<font color='green'><%:Import configuration information successfully.%></font>";
|
s.innerHTML = "<font color='green'><%:Import configuration information successfully.%></font>";
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user