mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-04 18:23:56 +08:00
update 2026-05-17 21:09:00
This commit is contained in:
1 parent
9d2cd3c1c7
commit
39a3fb3cf9
10 files changed
+11
-249
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();
|
||||
|
||||
Reference in new issue
Block a user