mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-16 21:43:33 +08:00
🌈 Sync 2026-05-19 02:35:14
This commit is contained in:
1 parent
595807ea37
commit
ca5e918f4b
81 files changed
+12003
-3193
No files matched your search
@@ -4,13 +4,12 @@ local api = require "luci.passwall.api"
|
||||
local appname = api.appname
|
||||
local map = self.map
|
||||
|
||||
local has_ss = api.is_finded("ss-redir")
|
||||
local has_ss_rust = api.is_finded("sslocal")
|
||||
local has_singbox = api.finded_com("sing-box")
|
||||
local has_xray = api.finded_com("xray")
|
||||
local has_hysteria2 = api.finded_com("hysteria")
|
||||
|
||||
local ss_type = api.get_core("ss_type", {{has_ss,"shadowsocks-libev"},{has_ss_rust,"shadowsocks-rust"},{has_singbox,"sing-box"},{has_xray,"xray"}})
|
||||
local ss_type = api.get_core("ss_type", {{has_ss_rust,"shadowsocks-rust"},{has_singbox,"sing-box"},{has_xray,"xray"}})
|
||||
local trojan_type = api.get_core("trojan_type", {{has_singbox,"sing-box"},{has_xray,"xray"}})
|
||||
local vmess_type = api.get_core("vmess_type", {{has_xray,"xray"},{has_singbox,"sing-box"}})
|
||||
local vless_type = api.get_core("vless_type", {{has_xray,"xray"},{has_singbox,"sing-box"}})
|
||||
@@ -165,10 +164,7 @@ local current_node = map:get(section)
|
||||
|
||||
var dom_prefix = null
|
||||
var protocol = ""
|
||||
if (v_type === "SS") {
|
||||
dom_prefix = "ss_"
|
||||
protocol = "ss"
|
||||
} else if (v_type === "SS-Rust") {
|
||||
if (v_type === "SS-Rust") {
|
||||
dom_prefix = "ssrust_"
|
||||
protocol = "ss"
|
||||
} else if (v_type === "SSR") {
|
||||
@@ -196,7 +192,7 @@ local current_node = map:get(section)
|
||||
}
|
||||
}
|
||||
var url = null;
|
||||
if (v_type === "SS" || v_type === "SS-Rust" || ((v_type === "sing-box" || v_type === "Xray") && opt.get(dom_prefix + "protocol").value === "shadowsocks")) {
|
||||
if (v_type === "SS-Rust" || ((v_type === "sing-box" || v_type === "Xray") && opt.get(dom_prefix + "protocol").value === "shadowsocks")) {
|
||||
protocol = "ss"
|
||||
var v_port = opt.get(dom_prefix + "port");
|
||||
var v_method = opt.get(dom_prefix + "method") || opt.get(dom_prefix + "ss_method");
|
||||
@@ -1000,17 +996,9 @@ local current_node = map:get(section)
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (ss_type == "shadowsocks-rust") {
|
||||
} else {
|
||||
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_"
|
||||
opt.set('type', "SS-Rust");
|
||||
} else {
|
||||
dom_prefix = "ss_"
|
||||
opt.set('type', "SS");
|
||||
}
|
||||
}
|
||||
|
||||
const _method = (method || "none").toLowerCase();
|
||||
|
||||
@@ -910,7 +910,11 @@ table td, .table .td {
|
||||
} else {
|
||||
port_s = o["hysteria_hop"] || o["hysteria2_hop"];
|
||||
}
|
||||
str += type + ":" + remarks;
|
||||
if ((o.type === "Hysteria2" || o.protocol === 'hysteria2') && o.hysteria2_realms) {
|
||||
str += type + " Realm:" + remarks;
|
||||
} else {
|
||||
str += type + ":" + remarks;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
@@ -952,7 +956,7 @@ table td, .table .td {
|
||||
var newDom = node_template.cloneNode(true);
|
||||
newDom.classList.add("cbi-rowstyle-" + (i % 2 + 1));
|
||||
var innerHTML = newDom.innerHTML;
|
||||
if (auto_detection_time != "icmp" && o["address"] && o["port"]) {
|
||||
if (auto_detection_time != "icmp" && o["address"]) {
|
||||
innerHTML = innerHTML.split("{{ping}}").join('<span class="ping"><a href="javascript:void(0)" onclick="javascript:ping_node(\'{{id}}\', this, \'icmp\')"><%:Test%></a></span>');
|
||||
} else {
|
||||
innerHTML = innerHTML.split("{{ping}}").join('<span class="ping_value" cbiid="{{id}}"><a href="javascript:void(0)" style="color:inherit">---</a></span>');
|
||||
@@ -962,7 +966,8 @@ table td, .table .td {
|
||||
} else {
|
||||
innerHTML = innerHTML.split("{{tcping}}").join('<span class="tcping_value" cbiid="{{id}}"><a href="javascript:void(0)" style="color:inherit">---</a></span>');
|
||||
}
|
||||
if (o["protocol"] && o["protocol"] === '_shunt') {
|
||||
let is_realm = (o.type === "Hysteria2" || o.protocol === 'hysteria2') && o.hysteria2_realms || false;
|
||||
if (o["protocol"] === '_shunt' || is_realm) {
|
||||
innerHTML = innerHTML.split("{{url_test}}").join('<span class="ping" cbiid="{{id}}">---</span>');
|
||||
} else {
|
||||
innerHTML = innerHTML.split("{{url_test}}").join('<span class="ping"><a href="javascript:void(0)" onclick="javascript:urltest_node(\'{{id}}\', this)" title="<%:TLS handshake test, latency for reference only%>"><%:Test%></a></span>');
|
||||
@@ -971,11 +976,13 @@ table td, .table .td {
|
||||
innerHTML = innerHTML.split("{{group}}").join(o["group"] || "");
|
||||
let node_remarks = get_remarks_name(o);
|
||||
if (show_node_info == "1") {
|
||||
if (o["address"] && o["port"]) {
|
||||
let _port = o["port"] || o["hysteria_hop"] || o["hysteria2_hop"];
|
||||
if (_port) _port = _port.replace(/:/g, '-');
|
||||
if (o["address"] && _port) {
|
||||
let _address = o["address"]
|
||||
if (o["full_address"])
|
||||
_address = o["full_address"]
|
||||
node_remarks += "<br>" + _address + ":" + o["port"]
|
||||
node_remarks += "<br>" + _address + ":" + _port
|
||||
}
|
||||
}
|
||||
innerHTML = innerHTML.split("{{remarks}}").join(node_remarks);
|
||||
|
||||
Reference in new issue
Block a user