diff --git a/package/lienol/luci-app-passwall/Makefile b/package/lienol/luci-app-passwall/Makefile
index 55c2a333e0..8c22904f91 100644
--- a/package/lienol/luci-app-passwall/Makefile
+++ b/package/lienol/luci-app-passwall/Makefile
@@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall
PKG_VERSION:=4
-PKG_RELEASE:=9
-PKG_DATE:=20210119
+PKG_RELEASE:=10
+PKG_DATE:=20210122
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -92,7 +92,6 @@ define Package/$(PKG_NAME)
DEPENDS:=+libmbedtls +iptables-mod-tproxy +ip +ipset +coreutils +coreutils-base64 +coreutils-nohup +luci-lib-jsonc \
+curl +ca-certificates +resolveip +unzip +dnsmasq-full +tcping +libuci-lua \
+ipt2socks \
- +ssocks \
+microsocks \
+pdnsd-alt \
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks:shadowsocks-libev-ss-redir \
@@ -102,7 +101,6 @@ define Package/$(PKG_NAME)
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR:shadowsocksr-libev-ssr-local \
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-server \
+PACKAGE_$(PKG_NAME)_INCLUDE_Xray:xray \
- +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray \
+PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_Plus:trojan-plus \
+PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_GO:trojan-go \
+PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy:naiveproxy \
diff --git a/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua b/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
index d6c19ee988..8731d7d906 100644
--- a/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
+++ b/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
@@ -9,7 +9,6 @@ local api = require "luci.model.cbi.passwall.api.api"
local kcptun = require "luci.model.cbi.passwall.api.kcptun"
local brook = require "luci.model.cbi.passwall.api.brook"
local xray = require "luci.model.cbi.passwall.api.xray"
-local v2ray = require "luci.model.cbi.passwall.api.v2ray"
local trojan_go = require "luci.model.cbi.passwall.api.trojan_go"
function index()
@@ -72,8 +71,6 @@ function index()
entry({"admin", "services", appname, "brook_update"}, call("brook_update")).leaf = true
entry({"admin", "services", appname, "xray_check"}, call("xray_check")).leaf = true
entry({"admin", "services", appname, "xray_update"}, call("xray_update")).leaf = true
- entry({"admin", "services", appname, "v2ray_check"}, call("v2ray_check")).leaf = true
- entry({"admin", "services", appname, "v2ray_update"}, call("v2ray_update")).leaf = true
entry({"admin", "services", appname, "trojan_go_check"}, call("trojan_go_check")).leaf = true
entry({"admin", "services", appname, "trojan_go_update"}, call("trojan_go_update")).leaf = true
end
@@ -413,25 +410,6 @@ function xray_update()
http_write_json(json)
end
-function v2ray_check()
- local json = v2ray.to_check("")
- http_write_json(json)
-end
-
-function v2ray_update()
- local json = nil
- local task = http.formvalue("task")
- if task == "extract" then
- json = v2ray.to_extract(http.formvalue("file"), http.formvalue("subfix"))
- elseif task == "move" then
- json = v2ray.to_move(http.formvalue("file"))
- else
- json = v2ray.to_download(http.formvalue("url"))
- end
-
- http_write_json(json)
-end
-
function trojan_go_check()
local json = trojan_go.to_check("")
http_write_json(json)
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/api.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/api.lua
index c2bb2a8a88..7df868e616 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/api.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/api.lua
@@ -149,31 +149,6 @@ function get_xray_version(file)
return ""
end
-function get_v2ray_path()
- local path = uci_get_type("global_app", "v2ray_file")
- return path
-end
-
-function get_v2ray_version(file)
- if file == nil then file = get_v2ray_path() end
- chmod_755(file)
- if fs.access(file) then
- if file == get_v2ray_path() then
- local md5 = sys.exec("echo -n $(md5sum " .. file .. " | awk '{print $1}')")
- if fs.access("/tmp/psw_" .. md5) then
- return sys.exec("cat /tmp/psw_" .. md5)
- else
- local version = sys.exec("echo -n $(%s -version | awk '{print $2}' | sed -n 1P)" % file)
- sys.call("echo '" .. version .. "' > " .. "/tmp/psw_" .. md5)
- return version
- end
- else
- return sys.exec("echo -n $(%s -version | awk '{print $2}' | sed -n 1P)" % file)
- end
- end
- return ""
-end
-
function get_trojan_go_path()
local path = uci_get_type("global_app", "trojan_go_file")
return path
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/gen_xray.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/gen_xray.lua
index 086dbdc46c..9bb67237c2 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/gen_xray.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/gen_xray.lua
@@ -57,13 +57,13 @@ function gen_outbound(node, tag, relay_port)
node.port = new_port
sys.call(string.format('/usr/share/%s/app.sh run_socks "%s" "%s" "%s" "%s" "%s" "%s" "%s" "%s"> /dev/null',
appname,
+ new_port,
node_id,
"127.0.0.1",
new_port,
string.format("/var/etc/%s/v2_%s_%s.json", appname, node_type, node_id),
"0",
"nil",
- "4",
relay_port and tostring(relay_port) or ""
)
)
@@ -286,6 +286,38 @@ if node_section then
local default_node_id = node.default_node or nil
if default_node_id and default_node_id ~= "nil" then
local default_node = ucursor:get_all(appname, default_node_id)
+ if "1" == node.default_proxy then
+ local node_id = node.main_node or nil
+ if node_id and node_id ~= "nil" then
+ if node_id == default_node_id then
+ else
+ new_port = get_new_port()
+ table.insert(inbounds, {
+ tag = "proxy_default",
+ listen = "127.0.0.1",
+ port = new_port,
+ protocol = "dokodemo-door",
+ settings = {network = "tcp,udp", address = default_node.address, port = tonumber(default_node.port)}
+ })
+ if default_node.tls_serverName == nil then
+ default_node.tls_serverName = default_node.address
+ end
+ default_node.address = "127.0.0.1"
+ default_node.port = new_port
+ local node = ucursor:get_all(appname, node_id)
+ local outbound = gen_outbound(node, "main")
+ if outbound then
+ table.insert(outbounds, outbound)
+ local rule = {
+ type = "field",
+ inboundTag = {"proxy_default"},
+ outboundTag = "main"
+ }
+ table.insert(rules, rule)
+ end
+ end
+ end
+ end
local default_outbound = gen_outbound(default_node, "default")
if default_outbound then
table.insert(outbounds, default_outbound)
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/v2ray.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/v2ray.lua
deleted file mode 100644
index 60841d6bcb..0000000000
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/v2ray.lua
+++ /dev/null
@@ -1,173 +0,0 @@
-module("luci.model.cbi.passwall.api.v2ray", package.seeall)
-local fs = require "nixio.fs"
-local sys = require "luci.sys"
-local util = require "luci.util"
-local i18n = require "luci.i18n"
-local api = require "luci.model.cbi.passwall.api.api"
-
-local v2ray_api = "https://api.github.com/repos/v2fly/v2ray-core/releases/latest"
-local is_armv7 = false
-
-function to_check(arch)
- local app_path = api.get_v2ray_path() or ""
- if app_path == "" then
- return {
- code = 1,
- error = i18n.translatef("You did not fill in the %s path. Please save and apply then update manually.", "V2ray")
- }
- end
- if not arch or arch == "" then arch = api.auto_get_arch() end
-
- local file_tree, sub_version = api.get_file_info(arch)
- if sub_version == "7" then is_armv7 = true end
-
- if file_tree == "" then
- return {
- code = 1,
- error = i18n.translate("Can't determine ARCH, or ARCH not supported.")
- }
- end
-
- if file_tree == "amd64" then file_tree = "64" end
- if file_tree == "386" then file_tree = "32" end
-
- local json = api.get_api_json(v2ray_api)
-
- if json.tag_name == nil then
- return {
- code = 1,
- error = i18n.translate("Get remote version info failed.")
- }
- end
-
- local now_version = api.get_v2ray_version()
- local remote_version = json.tag_name:match("[^v]+")
- local needs_update = api.compare_versions(now_version, "<", remote_version)
- local html_url, download_url
-
- if needs_update then
- html_url = json.html_url
- for _, v in ipairs(json.assets) do
- if v.name and v.name:match("linux%-" .. file_tree) then
- download_url = v.browser_download_url
- break
- end
- end
- end
-
- if needs_update and not download_url then
- return {
- code = 1,
- now_version = now_version,
- version = remote_version,
- html_url = html_url,
- error = i18n.translate("New version found, but failed to get new version download url.")
- }
- end
-
- return {
- code = 0,
- update = needs_update,
- now_version = now_version,
- version = remote_version,
- url = {html = html_url, download = download_url}
- }
-end
-
-function to_download(url)
- local app_path = api.get_v2ray_path() or ""
- if app_path == "" then
- return {
- code = 1,
- error = i18n.translatef("You did not fill in the %s path. Please save and apply then update manually.", "V2ray")
- }
- end
- if not url or url == "" then
- return {code = 1, error = i18n.translate("Download url is required.")}
- end
-
- sys.call("/bin/rm -f /tmp/v2ray_download.*")
-
- local tmp_file = util.trim(util.exec("mktemp -u -t v2ray_download.XXXXXX"))
-
- local result = api.exec(api.curl, {api._unpack(api.curl_args), "-o", tmp_file, url}, nil, api.command_timeout) == 0
-
- if not result then
- api.exec("/bin/rm", {"-f", tmp_file})
- return {
- code = 1,
- error = i18n.translatef("File download failed or timed out: %s", url)
- }
- end
-
- return {code = 0, file = tmp_file}
-end
-
-function to_extract(file, subfix)
- local app_path = api.get_v2ray_path() or ""
- if app_path == "" then
- return {
- code = 1,
- error = i18n.translatef("You did not fill in the %s path. Please save and apply then update manually.", "V2ray")
- }
- end
-
- if not file or file == "" or not fs.access(file) then
- return {code = 1, error = i18n.translate("File path required.")}
- end
-
- if sys.exec("echo -n $(opkg list-installed | grep -c unzip)") ~= "1" then
- api.exec("/bin/rm", {"-f", file})
- return {
- code = 1,
- error = i18n.translate("Not installed unzip, Can't unzip!")
- }
- end
-
- sys.call("/bin/rm -rf /tmp/v2ray_extract.*")
- local tmp_dir = util.trim(util.exec("mktemp -d -t v2ray_extract.XXXXXX"))
-
- local output = {}
- api.exec("/usr/bin/unzip", {"-o", file, "-d", tmp_dir},
- function(chunk) output[#output + 1] = chunk end)
-
- local files = util.split(table.concat(output))
-
- api.exec("/bin/rm", {"-f", file})
-
- return {code = 0, file = tmp_dir}
-end
-
-function to_move(file)
- local app_path = api.get_v2ray_path() or ""
- if app_path == "" then
- return {
- code = 1,
- error = i18n.translatef("You did not fill in the %s path. Please save and apply then update manually.", "V2ray")
- }
- end
- if not file or file == "" then
- sys.call("/bin/rm -rf /tmp/v2ray_extract.*")
- return {code = 1, error = i18n.translate("Client file is required.")}
- end
-
- if not arch or arch == "" then arch = api.auto_get_arch() end
- local file_tree, sub_version = api.get_file_info(arch)
- local t = ""
- sys.call("/etc/init.d/passwall stop")
- local result = nil
- if sub_version and sub_version == "7" then t = "_armv7" end
- result = api.exec("/bin/mv", { "-f", file .. "/v2ray" .. t, app_path }, nil, api.command_timeout) == 0
- sys.call("/bin/rm -rf /tmp/v2ray_extract.*")
- if not result or not fs.access(app_path) then
- return {
- code = 1,
- error = i18n.translatef("Can't move new file to path: %s", app_path)
- }
- end
-
- api.chmod_755(app_path)
- sys.call("/etc/init.d/passwall restart >/dev/null 2>&1 &")
-
- return {code = 0}
-end
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/app_update.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/app_update.lua
index dbbad8e5b0..d7f7e7e2db 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/app_update.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/app_update.lua
@@ -10,7 +10,6 @@ s = m:section(TypedSection, "global_app", translate("App Update"),
"")
s.anonymous = true
s:append(Template(appname .. "/app_update/xray_version"))
-s:append(Template(appname .. "/app_update/v2ray_version"))
s:append(Template(appname .. "/app_update/trojan_go_version"))
s:append(Template(appname .. "/app_update/kcptun_version"))
s:append(Template(appname .. "/app_update/brook_version"))
@@ -19,10 +18,6 @@ o = s:option(Value, "xray_file", translatef("%s App Path", "Xray"))
o.default = "/usr/bin/xray"
o.rmempty = false
-o = s:option(Value, "v2ray_file", translatef("%s App Path", "V2ray"))
-o.default = "/usr/bin/v2ray"
-o.rmempty = false
-
o = s:option(Value, "trojan_go_file", translatef("%s App Path", "Trojan-Go"))
o.default = "/usr/bin/trojan-go"
o.rmempty = false
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
index 6d8f598c2e..19e65ce419 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
@@ -2,16 +2,27 @@ local d = require "luci.dispatcher"
local uci = require"luci.model.uci".cursor()
local api = require "luci.model.cbi.passwall.api.api"
local appname = "passwall"
+local has_xray = api.is_finded("xray")
+
+m = Map(appname)
local nodes_table = {}
for k, e in ipairs(api.get_valid_nodes()) do
nodes_table[#nodes_table + 1] = {
id = e[".name"],
- remarks = e.remarks_name
+ remarks = e.remarks_name,
+ type = e["type"]
}
end
local socks_table = {}
+if tonumber(m:get("@global[0]", "tcp_node_socks") or 0) == 1 then
+ local id = "127.0.0.1" .. ":" .. m:get("@global[0]", "tcp_node_socks_port")
+ socks_table[#socks_table + 1] = {
+ id = id,
+ remarks = id .. " - " .. translate("TCP Node")
+ }
+end
uci:foreach(appname, "socks", function(s)
if s.enabled == "1" and s.node then
local id, remarks
@@ -25,7 +36,7 @@ uci:foreach(appname, "socks", function(s)
end
end
end
- id = "0.0.0.0" .. ":" .. s.port
+ id = "127.0.0.1" .. ":" .. s.port
socks_table[#socks_table + 1] = {
id = id,
remarks = id .. " - " .. (remarks or translate("Misconfigured"))
@@ -55,7 +66,6 @@ local doh_validate = function(self, value, t)
return nil, translate("DoH request address") .. " " .. translate("Format must be:") .. " URL,IP"
end
-m = Map(appname)
local status = m:get("@global_other[0]", "status") or ""
if status:find("big_icon") then
m:append(Template(appname .. "/global/status"))
@@ -74,11 +84,11 @@ o = s:taboption("Main", Flag, "enabled", translate("Main switch"))
o.rmempty = false
---- TCP Node
-o = s:taboption("Main", ListValue, "tcp_node", translate("TCP Node"))
-o.title = translate("TCP Node")
-o.description = ""
---o.description = translate("For proxy specific list.")
---o.description = o.description .. "
"
+tcp_node = s:taboption("Main", ListValue, "tcp_node", translate("TCP Node"))
+tcp_node.title = translate("TCP Node")
+tcp_node.description = ""
+--tcp_node.description = translate("For proxy specific list.")
+--tcp_node.description = o.description .. "
"
local current_node = luci.sys.exec(string.format("[ -f '/var/etc/%s/id/TCP' ] && echo -n $(cat /var/etc/%s/id/TCP)", appname, appname))
if current_node and current_node ~= "" and current_node ~= "nil" then
local n = uci:get_all(appname, current_node)
@@ -86,7 +96,7 @@ if current_node and current_node ~= "" and current_node ~= "nil" then
if tonumber(m:get("@auto_switch[0]", "enable") or 0) == 1 then
local remarks = api.get_full_node_remarks(n)
local url = d.build_url("admin", "services", appname, "node_config", current_node)
- o.description = o.description .. translatef("Current node: %s", string.format('%s', url, remarks)) .. "
"
+ tcp_node.description = tcp_node.description .. translatef("Current node: %s", string.format('%s', url, remarks)) .. "
"
end
if n.protocol and n.protocol == "_shunt" then
uci:foreach(appname, "shunt_rules", function(e)
@@ -95,7 +105,7 @@ if current_node and current_node ~= "" and current_node ~= "nil" then
if n[id] and n[id] ~= "nil" then
local url = d.build_url("admin", "services", appname, "node_config", n[id])
local r = api.get_full_node_remarks(uci:get_all(appname, n[id]))
- o.description = o.description .. remarks .. ":" .. string.format('%s', url, r) .. "
"
+ tcp_node.description = tcp_node.description .. remarks .. ":" .. string.format('%s', url, r) .. "
"
end
end)
local id = "default_node"
@@ -103,22 +113,32 @@ if current_node and current_node ~= "" and current_node ~= "nil" then
if n[id] and n[id] ~= "nil" then
local url = d.build_url("admin", "services", appname, "node_config", n[id])
local r = api.get_full_node_remarks(uci:get_all(appname, n[id]))
- o.description = o.description .. remarks .. ":" .. string.format('%s', url, r) .. "
"
+ tcp_node.description = tcp_node.description .. remarks .. ":" .. string.format('%s', url, r) .. "
"
end
end
end
end
-o:value("nil", translate("Close"))
-for k, v in pairs(nodes_table) do o:value(v.id, v.remarks) end
+tcp_node:value("nil", translate("Close"))
-o = s:taboption("Main", ListValue, "udp_node", translate("UDP Node"))
-o:value("nil", translate("Close"))
-o.title = translate("UDP Node")
---o.description = translate("For proxy game network, DNS hijack etc.") .. "
" .. translate("The selected server will not use Kcptun.")
-o:value("tcp_", translate("Same as the tcp node"))
---o:value("tcp", translate("Same as the tcp node"))
---o:value("tcp_", translate("Same as the tcp node") .. "(" .. translate("New process") .. ")")
-for k, v in pairs(nodes_table) do o:value(v.id, v.remarks) end
+udp_node = s:taboption("Main", ListValue, "udp_node", translate("UDP Node"))
+udp_node:value("nil", translate("Close"))
+udp_node.title = translate("UDP Node")
+--udp_node.description = translate("For proxy game network, DNS hijack etc.") .. "
" .. translate("The selected server will not use Kcptun.")
+udp_node:value("tcp_", translate("Same as the tcp node"))
+--udp_node:value("tcp", translate("Same as the tcp node"))
+--udp_node:value("tcp_", translate("Same as the tcp node") .. "(" .. translate("New process") .. ")")
+
+tcp_node_socks = s:taboption("Main", Flag, "tcp_node_socks", translate("Enable") .. translate("TCP Node") .. "Socks")
+o = s:taboption("Main", Value, "tcp_node_socks_port", "Socks" .. translate("Listen Port"))
+o.default = 1080
+o.datatype = "port"
+o:depends("tcp_node_socks", true)
+
+tcp_node_http = s:taboption("Main", Flag, "tcp_node_http", translate("Enable") .. translate("TCP Node") .. "Http")
+o = s:taboption("Main", Value, "tcp_node_http_port", "HTTP" .. translate("Listen Port"))
+o.default = 1180
+o.datatype = "port"
+o:depends("tcp_node_http", true)
s:tab("DNS", translate("DNS"))
@@ -135,7 +155,7 @@ o = s:taboption("DNS", Value, "up_china_dns", translate("Local DNS") .. "(UDP)")
o.description = translate("IP:Port mode acceptable, multi value split with english comma.") .. "
" .. translate("When the selection is not the default, this DNS is forced to be set to dnsmasq upstream DNS.")
o.default = "default"
o:value("default", translate("Default"))
-if api.is_finded("xray") then
+if has_xray then
o:value("xray_doh", "Xray DNS(DoH)")
end
o:value("223.5.5.5", "223.5.5.5 (" .. translate("Ali") .. "DNS)")
@@ -166,7 +186,7 @@ end
if api.is_finded("dns2socks") then
o:value("dns2socks", "dns2socks")
end
-if api.is_finded("xray") then
+if has_xray then
o:value("xray_doh", "Xray DNS(DoH)")
end
o:value("udp", translatef("Requery DNS By %s", translate("UDP Node")))
@@ -335,21 +355,35 @@ o = s:option(Flag, "enabled", translate("Enable"))
o.default = 1
o.rmempty = false
-o = s:option(ListValue, "node", translate("Socks Node"))
-o:value("tcp", translate("Same as the tcp node"))
-for k, v in pairs(nodes_table) do o:value(v.id, v.remarks) end
+socks_node = s:option(ListValue, "node", translate("Socks Node"))
o = s:option(Value, "port", "Socks" .. translate("Listen Port"))
o.default = 9050
o.datatype = "port"
o.rmempty = false
-if api.is_finded("xray") or api.is_finded("v2ray") then
+if has_xray then
o = s:option(Value, "http_port", "HTTP" .. translate("Listen Port") .. " " .. translate("0 is not use"))
o.default = 0
o.datatype = "port"
end
+for k, v in pairs(nodes_table) do
+ tcp_node:value(v.id, v.remarks)
+ tcp_node_socks:depends("tcp_node", v.id)
+ if has_xray then
+ tcp_node_http:depends("tcp_node", v.id)
+ end
+ udp_node:value(v.id, v.remarks)
+ if v.type == "Socks" then
+ if has_xray then
+ socks_node:value(v.id, v.remarks)
+ end
+ else
+ socks_node:value(v.id, v.remarks)
+ end
+end
+
m:append(Template(appname .. "/global/footer"))
--[[
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua
index 6ae46e94c7..61186e3ce3 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua
@@ -83,9 +83,6 @@ if api.is_finded("xray") then
type:value("Xray", translate("Xray"))
type.description = translate("Xray is currently directly compatible with V2ray and used.")
end
-if api.is_finded("v2ray") then
- type:value("V2ray", translate("V2ray"))
-end
if api.is_finded("brook") then
type:value("Brook", translate("Brook"))
end
@@ -113,7 +110,6 @@ protocol:value("shadowsocks", translate("Shadowsocks"))
protocol:value("trojan", translate("Trojan"))
protocol:value("_balancing", translate("Balancing"))
protocol:value("_shunt", translate("Shunt"))
-protocol:depends("type", "V2ray")
protocol:depends("type", "Xray")
local nodes_table = {}
@@ -155,6 +151,14 @@ default_node:value("nil", translate("Close"))
for k, v in pairs(nodes_table) do default_node:value(v.id, v.remarks) end
default_node:depends("protocol", "_shunt")
+default_proxy = s:option(Flag, "default_proxy", translate("Default") .. translate("Node") .. translate("Preproxy"), translate("Use the under node for the transit."))
+default_proxy.default = 0
+default_proxy:depends("protocol", "_shunt")
+
+o = s:option(ListValue, "main_node", " ")
+for k, v in pairs(nodes_table) do o:value(v.id, v.remarks) end
+o:depends("default_proxy", "1")
+
domainStrategy = s:option(ListValue, "domainStrategy", translate("Domain Strategy"))
domainStrategy:value("AsIs")
domainStrategy:value("IPIfNonMatch")
@@ -209,12 +213,6 @@ address:depends({ type = "Xray", protocol = "http" })
address:depends({ type = "Xray", protocol = "socks" })
address:depends({ type = "Xray", protocol = "shadowsocks" })
address:depends({ type = "Xray", protocol = "trojan" })
-address:depends({ type = "V2ray", protocol = "vmess" })
-address:depends({ type = "V2ray", protocol = "vless" })
-address:depends({ type = "V2ray", protocol = "http" })
-address:depends({ type = "V2ray", protocol = "socks" })
-address:depends({ type = "V2ray", protocol = "shadowsocks" })
-address:depends({ type = "V2ray", protocol = "trojan" })
--[[
use_ipv6 = s:option(Flag, "use_ipv6", translate("Use IPv6"))
@@ -232,12 +230,6 @@ use_ipv6:depends({ type = "Xray", protocol = "http" })
use_ipv6:depends({ type = "Xray", protocol = "socks" })
use_ipv6:depends({ type = "Xray", protocol = "shadowsocks" })
use_ipv6:depends({ type = "Xray", protocol = "trojan" })
-use_ipv6:depends({ type = "V2ray", protocol = "vmess" })
-use_ipv6:depends({ type = "V2ray", protocol = "vless" })
-use_ipv6:depends({ type = "V2ray", protocol = "http" })
-use_ipv6:depends({ type = "V2ray", protocol = "socks" })
-use_ipv6:depends({ type = "V2ray", protocol = "shadowsocks" })
-use_ipv6:depends({ type = "V2ray", protocol = "trojan" })
--]]
port = s:option(Value, "port", translate("Port"))
@@ -257,20 +249,12 @@ port:depends({ type = "Xray", protocol = "http" })
port:depends({ type = "Xray", protocol = "socks" })
port:depends({ type = "Xray", protocol = "shadowsocks" })
port:depends({ type = "Xray", protocol = "trojan" })
-port:depends({ type = "V2ray", protocol = "vmess" })
-port:depends({ type = "V2ray", protocol = "vless" })
-port:depends({ type = "V2ray", protocol = "http" })
-port:depends({ type = "V2ray", protocol = "socks" })
-port:depends({ type = "V2ray", protocol = "shadowsocks" })
-port:depends({ type = "V2ray", protocol = "trojan" })
username = s:option(Value, "username", translate("Username"))
username:depends("type", "Socks")
username:depends("type", "Naiveproxy")
username:depends({ type = "Xray", protocol = "http" })
username:depends({ type = "Xray", protocol = "socks" })
-username:depends({ type = "V2ray", protocol = "http" })
-username:depends({ type = "V2ray", protocol = "socks" })
password = s:option(Value, "password", translate("Password"))
password.password = true
@@ -286,10 +270,6 @@ password:depends({ type = "Xray", protocol = "http" })
password:depends({ type = "Xray", protocol = "socks" })
password:depends({ type = "Xray", protocol = "shadowsocks" })
password:depends({ type = "Xray", protocol = "trojan" })
-password:depends({ type = "V2ray", protocol = "http" })
-password:depends({ type = "V2ray", protocol = "socks" })
-password:depends({ type = "V2ray", protocol = "shadowsocks" })
-password:depends({ type = "V2ray", protocol = "trojan" })
ss_encrypt_method = s:option(ListValue, "ss_encrypt_method", translate("Encrypt Method"))
for a, t in ipairs(ss_encrypt_method_list) do ss_encrypt_method:value(t) end
@@ -314,12 +294,10 @@ end
security = s:option(ListValue, "security", translate("Encrypt Method"))
for a, t in ipairs(security_list) do security:value(t) end
security:depends({ type = "Xray", protocol = "vmess" })
-security:depends({ type = "V2ray", protocol = "vmess" })
encryption = s:option(Value, "encryption", translate("Encrypt Method"))
encryption.default = "none"
encryption:depends({ type = "Xray", protocol = "vless" })
-encryption:depends({ type = "V2ray", protocol = "vless" })
v_ss_encrypt_method = s:option(ListValue, "v_ss_encrypt_method", translate("Encrypt Method"))
for a, t in ipairs(v_ss_encrypt_method_list) do v_ss_encrypt_method:value(t) end
@@ -411,8 +389,6 @@ uuid = s:option(Value, "uuid", translate("ID"))
uuid.password = true
uuid:depends({ type = "Xray", protocol = "vmess" })
uuid:depends({ type = "Xray", protocol = "vless" })
-uuid:depends({ type = "V2ray", protocol = "vmess" })
-uuid:depends({ type = "V2ray", protocol = "vless" })
alter_id = s:option(Value, "alter_id", translate("Alter ID"))
alter_id:depends("protocol", "vmess")
@@ -433,11 +409,6 @@ tls:depends({ type = "Xray", protocol = "vless" })
tls:depends({ type = "Xray", protocol = "socks" })
tls:depends({ type = "Xray", protocol = "trojan" })
tls:depends({ type = "Xray", protocol = "shadowsocks" })
-tls:depends({ type = "V2ray", protocol = "vmess" })
-tls:depends({ type = "V2ray", protocol = "vless" })
-tls:depends({ type = "V2ray", protocol = "socks" })
-tls:depends({ type = "V2ray", protocol = "shadowsocks" })
-tls:depends({ type = "Xray", protocol = "trojan" })
tls:depends("type", "Trojan")
tls:depends("type", "Trojan-Plus")
tls:depends("type", "Trojan-Go")
@@ -526,11 +497,6 @@ transport:depends({ type = "Xray", protocol = "vless" })
transport:depends({ type = "Xray", protocol = "socks" })
transport:depends({ type = "Xray", protocol = "shadowsocks" })
transport:depends({ type = "Xray", protocol = "trojan" })
-transport:depends({ type = "V2ray", protocol = "vmess" })
-transport:depends({ type = "V2ray", protocol = "vless" })
-transport:depends({ type = "V2ray", protocol = "socks" })
-transport:depends({ type = "V2ray", protocol = "shadowsocks" })
-transport:depends({ type = "V2ray", protocol = "trojan" })
--[[
ss_transport = s:option(ListValue, "ss_transport", translate("Transport"))
@@ -538,7 +504,6 @@ ss_transport:value("ws", "WebSocket")
ss_transport:value("h2", "HTTP/2")
ss_transport:value("h2+ws", "HTTP/2 & WebSocket")
ss_transport:depends({ type = "Xray", protocol = "shadowsocks" })
-ss_transport:depends({ type = "V2ray", protocol = "shadowsocks" })
]]--
-- [[ TCP部分 ]]--
@@ -658,11 +623,6 @@ mux:depends({ type = "Xray", protocol = "vless", xtls = false })
mux:depends({ type = "Xray", protocol = "http" })
mux:depends({ type = "Xray", protocol = "socks" })
mux:depends({ type = "Xray", protocol = "shadowsocks" })
-mux:depends({ type = "V2ray", protocol = "vmess" })
-mux:depends({ type = "V2ray", protocol = "vless" })
-mux:depends({ type = "V2ray", protocol = "http" })
-mux:depends({ type = "V2ray", protocol = "socks" })
-mux:depends({ type = "V2ray", protocol = "shadowsocks" })
mux:depends("type", "Trojan-Go")
mux_concurrency = s:option(Value, "mux_concurrency", translate("Mux Concurrency"))
@@ -674,7 +634,6 @@ mux_concurrency:depends("mux", "1")
tcp_socks = s:option(Flag, "tcp_socks", translate("TCP Open Socks"), translate("When using this TCP node, whether to open the socks proxy at the same time"))
tcp_socks.default = 0
tcp_socks:depends("type", "Xray")
-tcp_socks:depends("type", "V2ray")
tcp_socks_port = s:option(Value, "tcp_socks_port", "Socks " .. translate("Port"), translate("Do not conflict with other ports"))
tcp_socks_port.datatype = "port"
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua
index 4c194ce938..f34553fac4 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua
@@ -63,7 +63,7 @@ if nodes_display:find("compact_display_nodes") then
local remarks = m:get(n, "remarks") or ""
local type = m:get(n, "type") or ""
str = str .. string.format("", appname, n, type)
- if type == "Xray" or type == "V2ray" then
+ if type == "Xray" then
local protocol = m:get(n, "protocol")
if protocol == "_balancing" then
type = type .. " 负载均衡"
@@ -106,7 +106,7 @@ else
local v = Value.cfgvalue(t, n)
if v then
result = translate(v)
- if v == "Xray" or v == "V2ray" then
+ if v == "Xray" then
local protocol = m:get(n, "protocol")
if protocol == "_balancing" then
result = result .. " 负载均衡"
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua
index 51fb136942..7ae5807c99 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua
@@ -49,7 +49,7 @@ for e = 0, 23 do o:value(e, e .. translate("oclock")) end
o.default = 0
o:depends("auto_update", 1)
-s = m:section(TypedSection, "shunt_rules", "Xray/V2ray" .. translate("Shunt") .. translate("Rule"))
+s = m:section(TypedSection, "shunt_rules", "Xray" .. translate("Shunt") .. translate("Rule"))
s.template = "cbi/tblsection"
s.anonymous = false
s.addremove = true
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/shunt_rules.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/shunt_rules.lua
index ce6b3cc34f..94af7757c6 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/shunt_rules.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/shunt_rules.lua
@@ -1,7 +1,7 @@
local d = require "luci.dispatcher"
local appname = "passwall"
-m = Map(appname, "Xray/V2ray" .. translate("Shunt") .. translate("Rule"))
+m = Map(appname, "Xray" .. translate("Shunt") .. translate("Rule"))
m.redirect = d.build_url("admin", "services", appname)
s = m:section(NamedSection, arg[1], "shunt_rules", "")
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua
index dd9e62994c..e7372f7e26 100755
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua
@@ -112,9 +112,6 @@ local function start()
elseif type == "Xray" then
config = require("luci.model.cbi.passwall.server.api.xray").gen_config(user)
bin = ln_start(_api.get_xray_path(), "xray", "-config=" .. config_file, log_path)
- elseif type == "V2ray" then
- config = require("luci.model.cbi.passwall.server.api.v2ray").gen_config(user)
- bin = ln_start(_api.get_v2ray_path(), "v2ray", "-config=" .. config_file, log_path)
elseif type == "Trojan" then
config = require("luci.model.cbi.passwall.server.api.trojan").gen_config(user)
bin = ln_start("/usr/sbin/trojan", "trojan", "-c " .. config_file, log_path)
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/v2ray.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/v2ray.lua
deleted file mode 100644
index d4da4ab8fa..0000000000
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/v2ray.lua
+++ /dev/null
@@ -1,177 +0,0 @@
-module("luci.model.cbi.passwall.server.api.v2ray", package.seeall)
-local ucic = require"luci.model.uci".cursor()
-
-function gen_config(user)
- local settings = nil
- local routing = nil
- local outbounds = {
- {protocol = "freedom", tag = "direct"}, {protocol = "blackhole", tag = "blocked"}
- }
-
- if user.protocol == "vmess" or user.protocol == "vless" then
- if user.uuid then
- local clients = {}
- for i = 1, #user.uuid do
- clients[i] = {
- id = user.uuid[i],
- flow = user.flow or nil,
- level = tonumber(user.level),
- alterId = tonumber(user.alter_id)
- }
- end
- settings = {
- clients = clients,
- decryption = user.decryption or "none"
- }
- end
- elseif user.protocol == "socks" then
- settings = {
- auth = (user.auth and user.auth == "1") and "password" or "noauth",
- accounts = (user.auth and user.auth == "1") and {
- {
- user = user.username,
- pass = user.password
- }
- }
- }
- elseif user.protocol == "http" then
- settings = {
- allowTransparent = false,
- accounts = (user.auth and user.auth == "1") and {
- {
- user = user.username,
- pass = user.password
- }
- }
- }
- user.transport = "tcp"
- user.tcp_guise = "none"
- elseif user.protocol == "shadowsocks" then
- settings = {
- method = user.method,
- password = user.password,
- level = tonumber(user.level) or 1,
- network = user.ss_network or "TCP,UDP"
- }
- elseif user.protocol == "trojan" then
- if user.uuid then
- local clients = {}
- for i = 1, #user.uuid do
- clients[i] = {
- password = user.uuid[i],
- level = tonumber(user.level)
- }
- end
- settings = {
- clients = clients
- }
- end
- elseif user.protocol == "mtproto" then
- settings = {
- users = {
- {
- level = tonumber(user.level) or 1,
- secret = (user.password == nil) and "" or user.password
- }
- }
- }
- end
-
- routing = {
- domainStrategy = "IPOnDemand",
- rules = {
- {
- type = "field",
- ip = {"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"},
- outboundTag = (user.accept_lan == nil or user.accept_lan == "0") and "blocked" or "direct"
- }
- }
- }
-
- if user.transit_node and user.transit_node ~= "nil" then
- local gen_v2ray = require("luci.model.cbi.passwall.api.gen_v2ray")
- local client = gen_v2ray.gen_outbound(ucic:get_all("passwall", user.transit_node), "transit")
- table.insert(outbounds, 1, client)
- end
-
- local config = {
- log = {
- -- error = "/var/etc/passwall_server/log/" .. user[".name"] .. ".log",
- loglevel = (user.log and user.log == "1") and user.loglevel or "none"
- },
- -- 传入连接
- inbounds = {
- {
- listen = (user.bind_local == "1") and "127.0.0.1" or nil,
- port = tonumber(user.port),
- protocol = user.protocol,
- settings = settings,
- streamSettings = {
- network = user.transport,
- security = "none",
- tlsSettings = (user.tls and user.tls == "1") and {
- disableSystemRoot = false,
- certificates = {
- {
- certificateFile = user.tls_certificateFile,
- keyFile = user.tls_keyFile
- }
- }
- } or nil,
- tcpSettings = (user.transport == "tcp") and {
- header = {
- type = user.tcp_guise,
- request = (user.tcp_guise == "http") and {
- path = user.tcp_guise_http_path or {"/"},
- headers = {
- Host = user.tcp_guise_http_host or {}
- }
- } or nil
- }
- } or nil,
- kcpSettings = (user.transport == "mkcp") and {
- mtu = tonumber(user.mkcp_mtu),
- tti = tonumber(user.mkcp_tti),
- uplinkCapacity = tonumber(user.mkcp_uplinkCapacity),
- downlinkCapacity = tonumber(user.mkcp_downlinkCapacity),
- congestion = (user.mkcp_congestion == "1") and true or false,
- readBufferSize = tonumber(user.mkcp_readBufferSize),
- writeBufferSize = tonumber(user.mkcp_writeBufferSize),
- seed = (user.mkcp_seed and user.mkcp_seed ~= "") and user.mkcp_seed or nil,
- header = {type = user.mkcp_guise}
- } or nil,
- wsSettings = (user.transport == "ws") and {
- acceptProxyProtocol = false,
- headers = (user.ws_host) and {Host = user.ws_host} or nil,
- path = user.ws_path
- } or nil,
- httpSettings = (user.transport == "h2") and {
- path = user.h2_path, host = user.h2_host
- } or nil,
- dsSettings = (user.transport == "ds") and {
- path = user.ds_path
- } or nil,
- quicSettings = (user.transport == "quic") and {
- security = user.quic_security,
- key = user.quic_key,
- header = {type = user.quic_guise}
- } or nil
- }
- }
- },
- -- 传出连接
- outbounds = outbounds,
- routing = routing
- }
-
- if user.tls and user.tls == "1" then
- config.inbounds[1].streamSettings.security = "tls"
- end
-
- if user.transport == "mkcp" or user.transport == "quic" then
- config.inbounds[1].streamSettings.security = "none"
- config.inbounds[1].streamSettings.tlsSettings = nil
- end
-
- return config
-end
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/index.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/index.lua
index 21020bced7..b452a89512 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/index.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/index.lua
@@ -47,7 +47,7 @@ e = t:option(DummyValue, "type", translate("Type"))
e.cfgvalue = function(t, n)
local v = Value.cfgvalue(t, n)
if v then
- if v == "Xray" or v == "V2ray" then
+ if v == "Xray" then
local protocol = m:get(n, "protocol")
return v .. " -> " .. protocol
end
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/user.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/user.lua
index 863cc07131..bd2df888d8 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/user.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/user.lua
@@ -80,9 +80,6 @@ end
if api.is_finded("xray") then
type:value("Xray", translate("Xray"))
end
-if api.is_finded("v2ray") then
- type:value("V2ray", translate("V2ray"))
-end
if api.is_finded("brook") then
type:value("Brook", translate("Brook"))
end
@@ -107,7 +104,6 @@ protocol:value("shadowsocks", "Shadowsocks")
protocol:value("trojan", "Trojan")
protocol:value("mtproto", "MTProto")
protocol:depends("type", "Xray")
-protocol:depends("type", "V2ray")
-- Brook协议
brook_protocol = s:option(ListValue, "brook_protocol", translate("Protocol"))
@@ -142,8 +138,6 @@ end
auth:depends("type", "Socks")
auth:depends({ type = "Xray", protocol = "socks" })
auth:depends({ type = "Xray", protocol = "http" })
-auth:depends({ type = "V2ray", protocol = "socks" })
-auth:depends({ type = "V2ray", protocol = "http" })
username = s:option(Value, "username", translate("Username"))
username:depends("auth", "1")
@@ -155,11 +149,9 @@ password:depends("type", "SS")
password:depends("type", "SSR")
password:depends("type", "Brook")
password:depends({ type = "Xray", protocol = "shadowsocks" })
-password:depends({ type = "V2ray", protocol = "shadowsocks" })
mtproto_password = s:option(Value, "mtproto_password", translate("Password"), translate("The MTProto protocol must be 32 characters and can only contain characters from 0 to 9 and a to f."))
mtproto_password:depends({ type = "Xray", protocol = "mtproto" })
-mtproto_password:depends({ type = "V2ray", protocol = "mtproto" })
mtproto_password.default = arg[1]
function mtproto_password.cfgvalue(self, section)
return m:get(section, "password")
@@ -171,7 +163,6 @@ end
decryption = s:option(Value, "decryption", translate("Encrypt Method"))
decryption.default = "none"
decryption:depends({ type = "Xray", protocol = "vless" })
-decryption:depends({ type = "V2ray", protocol = "vless" })
ss_encrypt_method = s:option(ListValue, "ss_encrypt_method", translate("Encrypt Method"))
for a, t in ipairs(ss_encrypt_method_list) do ss_encrypt_method:value(t) end
@@ -196,7 +187,6 @@ end
v_ss_encrypt_method = s:option(ListValue, "v_ss_encrypt_method", translate("Encrypt Method"))
for a, t in ipairs(v_ss_encrypt_method_list) do v_ss_encrypt_method:value(t) end
v_ss_encrypt_method:depends({ type = "Xray", protocol = "shadowsocks" })
-v_ss_encrypt_method:depends({ type = "V2ray", protocol = "shadowsocks" })
function v_ss_encrypt_method.cfgvalue(self, section)
return m:get(section, "method")
end
@@ -210,7 +200,6 @@ ss_network:value("tcp", "TCP")
ss_network:value("udp", "UDP")
ss_network:value("tcp,udp", "TCP,UDP")
ss_network:depends({ type = "Xray", protocol = "shadowsocks" })
-ss_network:depends({ type = "V2ray", protocol = "shadowsocks" })
ssr_protocol = s:option(ListValue, "ssr_protocol", translate("Protocol"))
for a, t in ipairs(ssr_protocol_list) do ssr_protocol:value(t) end
@@ -250,16 +239,12 @@ end
uuid:depends({ type = "Xray", protocol = "vmess" })
uuid:depends({ type = "Xray", protocol = "vless" })
uuid:depends({ type = "Xray", protocol = "trojan" })
-uuid:depends({ type = "V2ray", protocol = "vmess" })
-uuid:depends({ type = "V2ray", protocol = "vless" })
-uuid:depends({ type = "V2ray", protocol = "trojan" })
uuid:depends("type", "Trojan")
uuid:depends("type", "Trojan-Go")
uuid:depends("type", "Trojan-Plus")
alter_id = s:option(Value, "alter_id", translate("Alter ID"))
alter_id:depends({ type = "Xray", protocol = "vmess" })
-alter_id:depends({ type = "V2ray", protocol = "vmess" })
level = s:option(Value, "level", translate("User Level"))
level:depends({ type = "Xray", protocol = "vmess" })
@@ -267,11 +252,6 @@ level:depends({ type = "Xray", protocol = "vless" })
level:depends({ type = "Xray", protocol = "shadowsocks" })
level:depends({ type = "Xray", protocol = "trojan" })
level:depends({ type = "Xray", protocol = "mtproto" })
-level:depends({ type = "V2ray", protocol = "vmess" })
-level:depends({ type = "V2ray", protocol = "vless" })
-level:depends({ type = "V2ray", protocol = "shadowsocks" })
-level:depends({ type = "V2ray", protocol = "trojan" })
-level:depends({ type = "V2ray", protocol = "mtproto" })
tls = s:option(Flag, "tls", translate("TLS"))
tls.default = 0
@@ -296,10 +276,6 @@ tls:depends({ type = "Xray", protocol = "vless" })
tls:depends({ type = "Xray", protocol = "socks" })
tls:depends({ type = "Xray", protocol = "shadowsocks" })
tls:depends({ type = "Xray", protocol = "trojan" })
-tls:depends({ type = "V2ray", protocol = "vmess" })
-tls:depends({ type = "V2ray", protocol = "vless" })
-tls:depends({ type = "V2ray", protocol = "socks" })
-tls:depends({ type = "V2ray", protocol = "shadowsocks" })
tls:depends("type", "Trojan")
tls:depends("type", "Trojan-Plus")
tls:depends("type", "Trojan-Go")
@@ -374,11 +350,6 @@ transport:depends({ type = "Xray", protocol = "vless" })
transport:depends({ type = "Xray", protocol = "socks" })
transport:depends({ type = "Xray", protocol = "shadowsocks" })
transport:depends({ type = "Xray", protocol = "trojan" })
-transport:depends({ type = "V2ray", protocol = "vmess" })
-transport:depends({ type = "V2ray", protocol = "vless" })
-transport:depends({ type = "V2ray", protocol = "socks" })
-transport:depends({ type = "V2ray", protocol = "shadowsocks" })
-transport:depends({ type = "V2ray", protocol = "trojan" })
trojan_transport = s:option(ListValue, "trojan_transport", translate("Transport"))
trojan_transport:value("original", "Original")
@@ -512,15 +483,11 @@ quic_guise:depends("transport", "quic")
acceptProxyProtocol = s:option(Flag, "acceptProxyProtocol", translate("acceptProxyProtocol"), translate("Whether to receive PROXY protocol, when this node want to be fallback or forwarded by proxy, it must be enable, otherwise it cannot be used."))
acceptProxyProtocol:depends({ type = "Xray", transport = "tcp" })
acceptProxyProtocol:depends({ type = "Xray", transport = "ws" })
-acceptProxyProtocol:depends({ type = "V2ray", transport = "tcp" })
-acceptProxyProtocol:depends({ type = "V2ray", transport = "ws" })
-- [[ Fallback部分 ]]--
fallback = s:option(Flag, "fallback", translate("Fallback"))
fallback:depends({ type = "Xray", protocol = "vless", transport = "tcp" })
fallback:depends({ type = "Xray", protocol = "trojan", transport = "tcp" })
-fallback:depends({ type = "V2ray", protocol = "vless", transport = "tcp" })
-fallback:depends({ type = "V2ray", protocol = "trojan", transport = "tcp" })
--[[
fallback_alpn = s:option(Value, "fallback_alpn", "Fallback alpn")
@@ -580,17 +547,15 @@ remote_port:depends("remote_enable", 1)
bind_local = s:option(Flag, "bind_local", translate("Bind Local"), translate("When selected, it can only be accessed locally, It is recommended to turn on when using reverse proxies or be fallback."))
bind_local.default = "0"
bind_local:depends("type", "Xray")
-bind_local:depends("type", "V2ray")
accept_lan = s:option(Flag, "accept_lan", translate("Accept LAN Access"), translate("When selected, it can accessed lan , this will not be safe!"))
accept_lan.default = "0"
accept_lan.rmempty = false
accept_lan:depends("type", "Xray")
-accept_lan:depends("type", "V2ray")
local nodes_table = {}
for k, e in ipairs(api.get_valid_nodes()) do
- if e.node_type == "normal" and e.type == "Xray" or e.type == "V2ray" then
+ if e.node_type == "normal" and e.type == "Xray" then
nodes_table[#nodes_table + 1] = {
id = e[".name"],
remarks = e.remarks_name
@@ -603,7 +568,6 @@ transit_node:value("nil", translate("Close"))
for k, v in pairs(nodes_table) do transit_node:value(v.id, v.remarks) end
transit_node.default = "nil"
transit_node:depends("type", "Xray")
-transit_node:depends("type", "V2ray")
log = s:option(Flag, "log", translate("Enable") .. translate("Log"))
log.default = "1"
@@ -616,7 +580,6 @@ loglevel:value("info")
loglevel:value("warning")
loglevel:value("error")
loglevel:depends({ type = "Xray", log = true })
-loglevel:depends({ type = "V2ray", log = true })
trojan_loglevel = s:option(ListValue, "trojan_loglevel", translate("Log Level"))
trojan_loglevel.default = "2"
diff --git a/package/lienol/luci-app-passwall/luasrc/view/passwall/app_update/v2ray_version.htm b/package/lienol/luci-app-passwall/luasrc/view/passwall/app_update/v2ray_version.htm
deleted file mode 100644
index 467a5ad229..0000000000
--- a/package/lienol/luci-app-passwall/luasrc/view/passwall/app_update/v2ray_version.htm
+++ /dev/null
@@ -1,172 +0,0 @@
-<%
-local v2ray_version = require "luci.model.cbi.passwall.api.api".get_v2ray_version()
--%>
-
-
-
-