Revert "luci-app-passwall: SS-Rust Server support"
This reverts commit 52175abb02
.
This commit is contained in:
parent
8e3bf8506a
commit
f12546588b
@ -46,7 +46,6 @@ LUCI_DEPENDS:=+coreutils +coreutils-base64 +coreutils-nohup +curl \
|
|||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-redir \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-redir \
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server:shadowsocks-libev-ss-server \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server:shadowsocks-libev-ss-server \
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client:shadowsocks-rust-sslocal \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client:shadowsocks-rust-sslocal \
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server:shadowsocks-rust-ssserver \
|
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-local \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-local \
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-redir \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-redir \
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server \
|
||||||
@ -114,11 +113,6 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client
|
|||||||
depends on aarch64||arm||i386||mips||mipsel||x86_64
|
depends on aarch64||arm||i386||mips||mipsel||x86_64
|
||||||
default y if aarch64
|
default y if aarch64
|
||||||
|
|
||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server
|
|
||||||
bool "Include Shadowsocks Rust Server"
|
|
||||||
depends on aarch64||arm||i386||mips||mipsel||x86_64
|
|
||||||
default y if aarch64
|
|
||||||
|
|
||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client
|
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client
|
||||||
bool "Include ShadowsocksR Libev Client"
|
bool "Include ShadowsocksR Libev Client"
|
||||||
default y
|
default y
|
||||||
|
@ -112,7 +112,7 @@ local function start()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
bin = ln_run("/usr/bin/microsocks", "microsocks_" .. id, string.format("-i :: -p %s %s", port, auth), log_path)
|
bin = ln_run("/usr/bin/microsocks", "microsocks_" .. id, string.format("-i :: -p %s %s", port, auth), log_path)
|
||||||
elseif type == "SS" or type == "SS-Rust" or type == "SSR" then
|
elseif type == "SS" or type == "SSR" then
|
||||||
config = require(require_dir .. "shadowsocks").gen_config(user)
|
config = require(require_dir .. "shadowsocks").gen_config(user)
|
||||||
local udp_param = ""
|
local udp_param = ""
|
||||||
udp_forward = tonumber(user.udp_forward) or 1
|
udp_forward = tonumber(user.udp_forward) or 1
|
||||||
@ -120,12 +120,7 @@ local function start()
|
|||||||
udp_param = "-u"
|
udp_param = "-u"
|
||||||
end
|
end
|
||||||
type = type:lower()
|
type = type:lower()
|
||||||
--bin = ln_run("/usr/bin/" .. type .. "-server", type .. "-server", "-c " .. config_file .. " " .. udp_param, log_path)
|
bin = ln_run("/usr/bin/" .. type .. "-server", type .. "-server", "-c " .. config_file .. " " .. udp_param, log_path)
|
||||||
if type == "ss-rust" then
|
|
||||||
bin = ln_run("/usr/bin/" .. "ssserver", "ssserver", "-c " .. config_file)
|
|
||||||
else
|
|
||||||
bin = ln_run("/usr/bin/" .. type .. "-server", type .. "-server", "-c " .. config_file .. " " .. udp_param, log_path)
|
|
||||||
end
|
|
||||||
elseif type == "V2ray" then
|
elseif type == "V2ray" then
|
||||||
config = require(require_dir .. "v2ray").gen_config(user)
|
config = require(require_dir .. "v2ray").gen_config(user)
|
||||||
bin = ln_run(api.get_v2ray_path(), "v2ray", "run -c " .. config_file, log_path)
|
bin = ln_run(api.get_v2ray_path(), "v2ray", "run -c " .. config_file, log_path)
|
||||||
|
@ -1,30 +1,19 @@
|
|||||||
module("luci.model.cbi.passwall.server.api.shadowsocks", package.seeall)
|
module("luci.model.cbi.passwall.server.api.shadowsocks", package.seeall)
|
||||||
function gen_config(user)
|
function gen_config(user)
|
||||||
if user.type == "SS-Rust" then
|
local config = {}
|
||||||
local config = {}
|
config.server = {"[::0]", "0.0.0.0"}
|
||||||
config.server = "::"
|
config.server_port = tonumber(user.port)
|
||||||
config.mode = "tcp_and_udp"
|
config.password = user.password
|
||||||
config.server_port = tonumber(user.port)
|
config.timeout = tonumber(user.timeout)
|
||||||
config.password = user.password
|
config.fast_open = (user.tcp_fast_open and user.tcp_fast_open == "1") and true or false
|
||||||
config.timeout = tonumber(user.timeout)
|
config.method = user.method
|
||||||
config.fast_open = (user.tcp_fast_open and user.tcp_fast_open == "1") and true or false
|
|
||||||
config.method = user.method
|
|
||||||
return config
|
|
||||||
else
|
|
||||||
local config = {}
|
|
||||||
config.server = {"[::0]", "0.0.0.0"}
|
|
||||||
config.server_port = tonumber(user.port)
|
|
||||||
config.password = user.password
|
|
||||||
config.timeout = tonumber(user.timeout)
|
|
||||||
config.fast_open = (user.tcp_fast_open and user.tcp_fast_open == "1") and true or false
|
|
||||||
config.method = user.method
|
|
||||||
|
|
||||||
if user.type == "SSR" then
|
if user.type == "SSR" then
|
||||||
config.protocol = user.protocol
|
config.protocol = user.protocol
|
||||||
config.protocol_param = user.protocol_param
|
config.protocol_param = user.protocol_param
|
||||||
config.obfs = user.obfs
|
config.obfs = user.obfs
|
||||||
config.obfs_param = user.obfs_param
|
config.obfs_param = user.obfs_param
|
||||||
end
|
|
||||||
return config
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return config
|
||||||
end
|
end
|
||||||
|
@ -9,12 +9,6 @@ local ss_encrypt_method_list = {
|
|||||||
"xchacha20-ietf-poly1305"
|
"xchacha20-ietf-poly1305"
|
||||||
}
|
}
|
||||||
|
|
||||||
local ss_rust_encrypt_method_list = {
|
|
||||||
"plain", "none",
|
|
||||||
"aes-128-gcm", "aes-256-gcm", "chacha20-ietf-poly1305",
|
|
||||||
"2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305"
|
|
||||||
}
|
|
||||||
|
|
||||||
local ssr_encrypt_method_list = {
|
local ssr_encrypt_method_list = {
|
||||||
"none", "table", "rc2-cfb", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb",
|
"none", "table", "rc2-cfb", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb",
|
||||||
"aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr",
|
"aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr",
|
||||||
@ -74,9 +68,6 @@ end
|
|||||||
if api.is_finded("ss-server") then
|
if api.is_finded("ss-server") then
|
||||||
type:value("SS", translate("Shadowsocks"))
|
type:value("SS", translate("Shadowsocks"))
|
||||||
end
|
end
|
||||||
if api.is_finded("ssserver") then
|
|
||||||
type:value("SS-Rust", translate("Shadowsocks Rust"))
|
|
||||||
end
|
|
||||||
if api.is_finded("ssr-server") then
|
if api.is_finded("ssr-server") then
|
||||||
type:value("SSR", translate("ShadowsocksR"))
|
type:value("SSR", translate("ShadowsocksR"))
|
||||||
end
|
end
|
||||||
@ -159,7 +150,6 @@ password = s:option(Value, "password", translate("Password"))
|
|||||||
password.password = true
|
password.password = true
|
||||||
password:depends("auth", true)
|
password:depends("auth", true)
|
||||||
password:depends("type", "SS")
|
password:depends("type", "SS")
|
||||||
password:depends("type", "SS-Rust")
|
|
||||||
password:depends("type", "SSR")
|
password:depends("type", "SSR")
|
||||||
password:depends("type", "Brook")
|
password:depends("type", "Brook")
|
||||||
password:depends({ type = "V2ray", protocol = "shadowsocks" })
|
password:depends({ type = "V2ray", protocol = "shadowsocks" })
|
||||||
@ -255,16 +245,6 @@ function ss_encrypt_method.write(self, section, value)
|
|||||||
m:set(section, "method", value)
|
m:set(section, "method", value)
|
||||||
end
|
end
|
||||||
|
|
||||||
ss_rust_encrypt_method = s:option(ListValue, "ss_rust_encrypt_method", translate("Encrypt Method"))
|
|
||||||
for a, t in ipairs(ss_rust_encrypt_method_list) do ss_rust_encrypt_method:value(t) end
|
|
||||||
ss_rust_encrypt_method:depends("type", "SS-Rust")
|
|
||||||
function ss_rust_encrypt_method.cfgvalue(self, section)
|
|
||||||
return m:get(section, "method")
|
|
||||||
end
|
|
||||||
function ss_rust_encrypt_method.write(self, section, value)
|
|
||||||
m:set(section, "method", value)
|
|
||||||
end
|
|
||||||
|
|
||||||
ssr_encrypt_method = s:option(ListValue, "ssr_encrypt_method", translate("Encrypt Method"))
|
ssr_encrypt_method = s:option(ListValue, "ssr_encrypt_method", translate("Encrypt Method"))
|
||||||
for a, t in ipairs(ssr_encrypt_method_list) do ssr_encrypt_method:value(t) end
|
for a, t in ipairs(ssr_encrypt_method_list) do ssr_encrypt_method:value(t) end
|
||||||
ssr_encrypt_method:depends("type", "SSR")
|
ssr_encrypt_method:depends("type", "SSR")
|
||||||
@ -331,7 +311,6 @@ timeout = s:option(Value, "timeout", translate("Connection Timeout"))
|
|||||||
timeout.datatype = "uinteger"
|
timeout.datatype = "uinteger"
|
||||||
timeout.default = 300
|
timeout.default = 300
|
||||||
timeout:depends("type", "SS")
|
timeout:depends("type", "SS")
|
||||||
timeout:depends("type", "SS-Rust")
|
|
||||||
timeout:depends("type", "SSR")
|
timeout:depends("type", "SSR")
|
||||||
|
|
||||||
udp_forward = s:option(Flag, "udp_forward", translate("UDP Forward"))
|
udp_forward = s:option(Flag, "udp_forward", translate("UDP Forward"))
|
||||||
@ -638,7 +617,6 @@ ss_aead_pwd:depends("ss_aead", true)
|
|||||||
tcp_fast_open = s:option(Flag, "tcp_fast_open", translate("TCP Fast Open"))
|
tcp_fast_open = s:option(Flag, "tcp_fast_open", translate("TCP Fast Open"))
|
||||||
tcp_fast_open.default = "0"
|
tcp_fast_open.default = "0"
|
||||||
tcp_fast_open:depends("type", "SS")
|
tcp_fast_open:depends("type", "SS")
|
||||||
tcp_fast_open:depends("type", "SS-Rust")
|
|
||||||
tcp_fast_open:depends("type", "SSR")
|
tcp_fast_open:depends("type", "SSR")
|
||||||
tcp_fast_open:depends("type", "Trojan")
|
tcp_fast_open:depends("type", "Trojan")
|
||||||
tcp_fast_open:depends("type", "Trojan-Plus")
|
tcp_fast_open:depends("type", "Trojan-Plus")
|
||||||
|
Loading…
Reference in New Issue
Block a user