parent
af0082f674
commit
321573fa35
@ -11,7 +11,7 @@ end
|
|||||||
|
|
||||||
local fs = api.fs
|
local fs = api.fs
|
||||||
local sys = api.sys
|
local sys = api.sys
|
||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("sing-box")
|
||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
local has_geoview = api.is_finded("geoview")
|
local has_geoview = api.is_finded("geoview")
|
||||||
local has_gfwlist = fs.access("/usr/share/passwall/rules/gfwlist")
|
local has_gfwlist = fs.access("/usr/share/passwall/rules/gfwlist")
|
||||||
|
@ -2,7 +2,7 @@ local api = require "luci.passwall.api"
|
|||||||
local appname = "passwall"
|
local appname = "passwall"
|
||||||
local datatypes = api.datatypes
|
local datatypes = api.datatypes
|
||||||
local fs = api.fs
|
local fs = api.fs
|
||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("sing-box")
|
||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
local has_geoview = api.is_finded("geoview")
|
local has_geoview = api.is_finded("geoview")
|
||||||
local has_gfwlist = fs.access("/usr/share/passwall/rules/gfwlist")
|
local has_gfwlist = fs.access("/usr/share/passwall/rules/gfwlist")
|
||||||
|
@ -4,7 +4,7 @@ local appname = "passwall"
|
|||||||
local has_ss = api.is_finded("ss-redir")
|
local has_ss = api.is_finded("ss-redir")
|
||||||
local has_ss_rust = api.is_finded("sslocal")
|
local has_ss_rust = api.is_finded("sslocal")
|
||||||
local has_trojan_plus = api.is_finded("trojan-plus")
|
local has_trojan_plus = api.is_finded("trojan-plus")
|
||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("sing-box")
|
||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
local has_hysteria2 = api.finded_com("hysteria")
|
local has_hysteria2 = api.finded_com("hysteria")
|
||||||
local ss_type = {}
|
local ss_type = {}
|
||||||
|
@ -25,7 +25,7 @@ end
|
|||||||
local has_ss = api.is_finded("ss-redir")
|
local has_ss = api.is_finded("ss-redir")
|
||||||
local has_ss_rust = api.is_finded("sslocal")
|
local has_ss_rust = api.is_finded("sslocal")
|
||||||
local has_trojan_plus = api.is_finded("trojan-plus")
|
local has_trojan_plus = api.is_finded("trojan-plus")
|
||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("sing-box")
|
||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
local has_hysteria2 = api.finded_com("hysteria")
|
local has_hysteria2 = api.finded_com("hysteria")
|
||||||
local ss_type = {}
|
local ss_type = {}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local api = require "luci.passwall.api"
|
local api = require "luci.passwall.api"
|
||||||
local appname = "passwall"
|
local appname = "passwall"
|
||||||
local fs = api.fs
|
local fs = api.fs
|
||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("sing-box")
|
||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
local has_fw3 = api.is_finded("fw3")
|
local has_fw3 = api.is_finded("fw3")
|
||||||
local has_fw4 = api.is_finded("fw4")
|
local has_fw4 = api.is_finded("fw4")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local api = require "luci.passwall.api"
|
local api = require "luci.passwall.api"
|
||||||
local appname = "passwall"
|
local appname = "passwall"
|
||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("sing-box")
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
api.set_apply_on_parse(m)
|
||||||
|
@ -9,7 +9,7 @@ if not arg[1] or not m:get(arg[1]) then
|
|||||||
luci.http.redirect(m.redirect)
|
luci.http.redirect(m.redirect)
|
||||||
end
|
end
|
||||||
|
|
||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("sing-box")
|
||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
|
|
||||||
local nodes_table = {}
|
local nodes_table = {}
|
||||||
|
@ -2,7 +2,7 @@ local m, s = ...
|
|||||||
|
|
||||||
local api = require "luci.passwall.api"
|
local api = require "luci.passwall.api"
|
||||||
|
|
||||||
local singbox_bin = api.finded_com("singbox")
|
local singbox_bin = api.finded_com("sing-box")
|
||||||
local geoview_bin = api.is_finded("geoview")
|
local geoview_bin = api.is_finded("geoview")
|
||||||
|
|
||||||
if not singbox_bin then
|
if not singbox_bin then
|
||||||
|
@ -2,7 +2,7 @@ local m, s = ...
|
|||||||
|
|
||||||
local api = require "luci.passwall.api"
|
local api = require "luci.passwall.api"
|
||||||
|
|
||||||
local singbox_bin = api.finded_com("singbox")
|
local singbox_bin = api.finded_com("sing-box")
|
||||||
|
|
||||||
if not singbox_bin then
|
if not singbox_bin then
|
||||||
return
|
return
|
||||||
|
@ -24,7 +24,7 @@ _M.hysteria = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_M.singbox = {
|
_M["sing-box"] = {
|
||||||
name = "Sing-Box",
|
name = "Sing-Box",
|
||||||
repo = "SagerNet/sing-box",
|
repo = "SagerNet/sing-box",
|
||||||
get_url = gh_release_url,
|
get_url = gh_release_url,
|
||||||
|
@ -142,7 +142,7 @@ local function start()
|
|||||||
bin = ln_run("/usr/bin/ssserver", "ssserver", "-c " .. config_file, log_path)
|
bin = ln_run("/usr/bin/ssserver", "ssserver", "-c " .. config_file, log_path)
|
||||||
elseif type == "sing-box" then
|
elseif type == "sing-box" then
|
||||||
config = require(require_dir .. "util_sing-box").gen_config_server(user)
|
config = require(require_dir .. "util_sing-box").gen_config_server(user)
|
||||||
bin = ln_run(api.get_app_path("singbox"), "sing-box", "run -c " .. config_file, log_path)
|
bin = ln_run(api.get_app_path("sing-box"), "sing-box", "run -c " .. config_file, log_path)
|
||||||
elseif type == "Xray" then
|
elseif type == "Xray" then
|
||||||
config = require(require_dir .. "util_xray").gen_config_server(user)
|
config = require(require_dir .. "util_xray").gen_config_server(user)
|
||||||
bin = ln_run(api.get_app_path("xray"), "xray", "run -c " .. config_file, log_path)
|
bin = ln_run(api.get_app_path("xray"), "xray", "run -c " .. config_file, log_path)
|
||||||
|
@ -7,7 +7,7 @@ local appname = "passwall"
|
|||||||
local fs = api.fs
|
local fs = api.fs
|
||||||
local split = api.split
|
local split = api.split
|
||||||
|
|
||||||
local local_version = api.get_app_version("singbox")
|
local local_version = api.get_app_version("sing-box")
|
||||||
local version_ge_1_11_0 = api.compare_versions(local_version:match("[^v]+"), ">=", "1.11.0")
|
local version_ge_1_11_0 = api.compare_versions(local_version:match("[^v]+"), ">=", "1.11.0")
|
||||||
|
|
||||||
local geosite_all_tag = {}
|
local geosite_all_tag = {}
|
||||||
|
@ -24,7 +24,7 @@ uci:revert(appname)
|
|||||||
local has_ss = api.is_finded("ss-redir")
|
local has_ss = api.is_finded("ss-redir")
|
||||||
local has_ss_rust = api.is_finded("sslocal")
|
local has_ss_rust = api.is_finded("sslocal")
|
||||||
local has_trojan_plus = api.is_finded("trojan-plus")
|
local has_trojan_plus = api.is_finded("trojan-plus")
|
||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("sing-box")
|
||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
local has_hysteria2 = api.finded_com("hysteria")
|
local has_hysteria2 = api.finded_com("hysteria")
|
||||||
local allowInsecure_default = nil
|
local allowInsecure_default = nil
|
||||||
|
@ -20,7 +20,7 @@ index ae464ba..54b5f1a 100644
|
|||||||
|
|
||||||
define Package/$(PKG_NAME)/postrm
|
define Package/$(PKG_NAME)/postrm
|
||||||
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
||||||
index 12adebe..fa97b4a 100644
|
index 7bdfb3e..4cf5159 100644
|
||||||
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
||||||
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
||||||
@@ -509,6 +509,12 @@ o:value("9.9.9.9", "9.9.9.9 (Quad9)")
|
@@ -509,6 +509,12 @@ o:value("9.9.9.9", "9.9.9.9 (Quad9)")
|
||||||
|
Loading…
Reference in New Issue
Block a user