update 2022-06-09 20:21:51

This commit is contained in:
github-actions[bot] 2022-06-09 20:21:51 +08:00
parent 021bfd6ff2
commit f9bc5f18e4
28 changed files with 170 additions and 66 deletions

View File

@ -1 +1 @@
{"en":{"author":"Author","Icon is gone":"Icon is gone","install":"install","loading data":"loading data","open":"open","order":"order","please enter the search keyword":"please enter the search keyword","uninstall":"uninstall","upgrade":"upgrade","website":"website"}}
{"en":{"%{name} downloads":"%{name} downloads","%{name} links":"%{name} links","all app":"all app","app backup":"app backup","are you sure you want to uninstall %{name}?":"are you sure you want to uninstall %{name}?","author":"author","backup fail":"backup fail","backup now":"backup now","backup now backs up installed software (unlimited installation sources) to external storage":"backup now backs up installed software (unlimited installation sources) to external storage","backup now will download a list of iStore installed software":"backup now will download a list of iStore installed software","backup success":"backup success","backuping":"backuping","By download":"By download","By rating":"By rating","checking for latest version":"checking for latest version","choose":"choose","choose backup file":"choose backup file","click to download":"click to download","click to update":"click to update","closed":"closed","customize":"customize","default":"default","do not refresh this page during plugin installation/uninstallation":"do not refresh this page during plugin installation/uninstallation","download":"Download","explain":"explain","external storage directory":"external storage directory","from this page, you can upload plugin packages to install plugins":"from this page, you can upload plugin packages to install plugins","Icon is gone":"Icon is gone","install":"install","installation failed, error code":"installation failed, error code","installation is complete, please close the current window":"installation is complete, please close the current window","installed":"installed","installing plugin":"installing plugin","last version":"last version","light backup":"light backup","like":"like","liked":"liked","loading data":"loading data","local backup":"local backup","maintain":"maintain","manual install":"Manual install","monitor":"Monitor","multimedia":"Multimedia","nas":"NAS","net":"Net","networking":"Networking","no files selected":"no files selected","no internet required for recovery":"no internet required for recovery","offline install":"offline install","offline installation failed with error code":"offline installation failed with error code","offline installation is successful, please close the current window":"offline installation is successful, please close the current window","open":"open","order":"order","please enter an absolute path starting with %{name}":"please enter an absolute path starting with %{name}","please enter the path, give up the input, please clear the input box":"please enter the path, give up the input, please clear the input box","please enter the search keyword":"please enter the search keyword","please fill in the external storage directory":"please fill in the external storage directory","please select a backup file to restore":"please select a backup file to restore","restore backup":"restore backup","restore now":"restore now","restoring backup":"restoring backup","select or drag and drop files":"select or drag and drop files","service":"Service","support .ipk plug-in, .run self-extracting format":"support .ipk plug-in, .run self-extracting format","system":"System","tag":"Tag","the backup was restored fail":"the backup was restored fail","the backup was restored success":"the backup was restored success","the is last version":"the is last version","the update is success, please close the current window":"the update is success, please close the current window","there are no backup files in this path":"there are no backup files in this path","tool":"Tool","uninstall":"uninstall","uninstall failed, error code":"uninstall failed, error code","uninstallation succeeded, please close the current window":"uninstallation succeeded, please close the current window","uninstalling plugin":"uninstalling plugin","update date":"update date","update error":"update error","update failed with error code":"update failed with error code","update success":"update success","updateing":"updateing","updating plugin":"updating plugin","upgrade":"upgrade","upload software list and install from iStore when restoring backup":"upload software list and install from iStore when restoring backup","uploading plugin":"uploading plugin","website":"website","you have already liked":"you have already liked"}}

View File

@ -1 +1 @@
{"zh-cn":{"%{name} downloads":"%{name} 次下载","%{name} links":"%{name} 次点赞","all app":"全部软件","app backup":"软件备份","are you sure you want to uninstall %{name}?":"确定要卸载 %{name} 吗?","author":"作者","backup fail":"备份失败","backup now":"立即备份","backup now backs up installed software (unlimited installation sources) to external storage":"立即备份将备份已安装软件(不限安装来源)到外部存储","backup now will download a list of iStore installed software":"立即备份将下载iStore已安装的软件列表","backup success":"备份成功","backuping":"正在备份","By download":"按下载","By rating":"按评分","checking for latest version":"正在检查最新版本","choose":"请选择","choose backup file":"选择备份文件","click to download":"点此下载","click to update":"点我更新","closed":"关闭","customize":"自定义","default":"默认","do not refresh this page during plugin installation/uninstallation":"插件安装/卸载过程中请勿刷新此页面","explain":"说明","external storage directory":"外部存储目录","from this page, you can upload plugin packages to install plugins":"通过本页,你可以上传插件包来安装插件","Icon is gone":"图标出走啦","install":"安装","installation failed, error code":"安装失败,错误码","installation is complete, please close the current window":"安装完成,请关闭当前窗口","installed":"已安装","installing plugin":"正在安装插件","last version":"最新版本","light backup":"轻量备份","like":"点赞","liked":"已点赞","loading data":"正在努力的获取数据","local backup":"本地备份","maintain":"维护","manual install":"手动安装","no files selected":"未选择任何文件","no internet required for recovery":"恢复时不需要网络","offline install":"离线安装","offline installation failed with error code":"离线安装失败,错误码","offline installation is successful, please close the current window":"离线安装成功,请关闭当前窗口","open":"打开","order":"排序","please enter an absolute path starting with %{name}":"请输入 %{name} 开头的绝对路径","please enter the path, give up the input, please clear the input box":"请输入路径,放弃输入请清空输入框","please enter the search keyword":"请输入搜索关键词","please fill in the external storage directory":"请填写外部存储目录","please select a backup file to restore":"请选择要恢复的备份文件","restore backup":"恢复备份","restore now":"立即恢复","restoring backup":"正在恢复备份","select or drag and drop files":"选择或拖放文件","support .ipk plug-in, .run self-extracting format":"支持 .ipk 插件,.run 自解压格式","tag":"标签","the backup was restored fail":"恢复备份失败","the backup was restored success":"恢复备份成功","the is last version":"当前已经是最新版本","the update is success, please close the current window":"更新成功,请关闭当前窗口","there are no backup files in this path":"此路径下没有备份文件","uninstall":"卸载","uninstall failed, error code":"卸载失败,错误码","uninstallation succeeded, please close the current window":"卸载完成,请关闭当前窗口","uninstalling plugin":"正在卸载插件","update date":"更新日期","update error":"更新失败","update failed with error code":"更新失败,错误代码","update success":"更新成功","updateing":"正在更新中","updating plugin":"正在更新插件","upgrade":"更新","upload software list and install from iStore when restoring backup":"复备份时上传软件列表并从iStore安装","uploading plugin":"正在上传插件","website":"官网","you have already liked":"您已经点赞过啦"}}
{"zh-cn":{"%{name} downloads":"%{name} 次下载","%{name} links":"%{name} 次点赞","all app":"全部软件","app backup":"软件备份","are you sure you want to uninstall %{name}?":"确定要卸载 %{name} 吗?","author":"作者","backup fail":"备份失败","backup now":"立即备份","backup now backs up installed software (unlimited installation sources) to external storage":"立即备份将备份已安装软件(不限安装来源)到外部存储","backup now will download a list of iStore installed software":"立即备份将下载iStore已安装的软件列表","backup success":"备份成功","backuping":"正在备份","By download":"按下载","By rating":"按评分","checking for latest version":"正在检查最新版本","choose":"请选择","choose backup file":"选择备份文件","click to download":"点此下载","click to update":"点我更新","closed":"关闭","customize":"自定义","default":"默认","do not refresh this page during plugin installation/uninstallation":"插件安装/卸载过程中请勿刷新此页面","download":"下载","explain":"说明","external storage directory":"外部存储目录","from this page, you can upload plugin packages to install plugins":"通过本页,你可以上传插件包来安装插件","Icon is gone":"图标出走啦","install":"安装","installation failed, error code":"安装失败,错误码","installation is complete, please close the current window":"安装完成,请关闭当前窗口","installed":"已安装","installing plugin":"正在安装插件","last version":"最新版本","light backup":"轻量备份","like":"点赞","liked":"已点赞","loading data":"正在努力的获取数据","local backup":"本地备份","maintain":"维护","manual install":"手动安装","monitor":"监控","multimedia":"多媒体","nas":"NAS","net":"网络","networking":"组网","no files selected":"未选择任何文件","no internet required for recovery":"恢复时不需要网络","offline install":"离线安装","offline installation failed with error code":"离线安装失败,错误码","offline installation is successful, please close the current window":"离线安装成功,请关闭当前窗口","open":"打开","order":"排序","please enter an absolute path starting with %{name}":"请输入 %{name} 开头的绝对路径","please enter the path, give up the input, please clear the input box":"请输入路径,放弃输入请清空输入框","please enter the search keyword":"请输入搜索关键词","please fill in the external storage directory":"请填写外部存储目录","please select a backup file to restore":"请选择要恢复的备份文件","restore backup":"恢复备份","restore now":"立即恢复","restoring backup":"正在恢复备份","select or drag and drop files":"选择或拖放文件","service":"服务","support .ipk plug-in, .run self-extracting format":"支持 .ipk 插件,.run 自解压格式","system":"系统","tag":"标签","the backup was restored fail":"恢复备份失败","the backup was restored success":"恢复备份成功","the is last version":"当前已经是最新版本","the update is success, please close the current window":"更新成功,请关闭当前窗口","there are no backup files in this path":"此路径下没有备份文件","tool":"工具","uninstall":"卸载","uninstall failed, error code":"卸载失败,错误码","uninstallation succeeded, please close the current window":"卸载完成,请关闭当前窗口","uninstalling plugin":"正在卸载插件","update date":"更新日期","update error":"更新失败","update failed with error code":"更新失败,错误代码","update success":"更新成功","updateing":"正在更新中","updating plugin":"正在更新插件","upgrade":"更新","upload software list and install from iStore when restoring backup":"复备份时上传软件列表并从iStore安装","uploading plugin":"正在上传插件","website":"官网","you have already liked":"您已经点赞过啦"}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -46,6 +46,10 @@ function to_check()
model = "rockchip_armv8/nanopi-r4s"
check_update()
download_url = "https://op.supes.top/firmware/" ..model.. "/" ..remote_version.. "-openwrt-rockchip-armv8-nanopi-r4s-squashfs-sysupgrade.img.gz"
elseif model:match(".*R5S.*") then
model = "rockchip_armv8/nanopi-r5s"
check_update()
download_url = "https://op.supes.top/firmware/" ..model.. "/" ..remote_version.. "-openwrt-rockchip-armv8-nanopi-r5s_sd.img.gz"
elseif model:match(".*R2C.*") then
model = "rockchip_armv8/nanopi-r2c"
check_update()
@ -122,6 +126,14 @@ function to_check()
model = "ramips_mt7621/mi-ac2100"
check_update()
download_url = "https://op.supes.top/firmware/" ..model.. "/" ..remote_version.. "-openwrt-ramips-mt7621-xiaomi_mi-ac2100-squashfs-sysupgrade.bin"
elseif model:match(".*RT-AC42U.*") then
model = "ipq40xx_generic/asus-rt-acrh17"
check_update()
download_url = "https://op.supes.top/firmware/" ..model.. "/" ..remote_version.. "-openwrt-asus_rt-ac42u-squashfs-sysupgrade.bin"
elseif model:match(".*RT-AC58U.*") then
model = "ipq40xx_generic/asus-rt-ac58u"
check_update()
download_url = "https://op.supes.top/firmware/" ..model.. "/" ..remote_version.. "-openwrt-asus_rt-ac58u-squashfs-sysupgrade.bin"
else
local needs_update = false
return {

View File

@ -46,6 +46,7 @@ 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_Server:shadowsocks-libev-ss-server \
+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-redir \
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server \
@ -113,6 +114,11 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client
depends on aarch64||arm||i386||mips||mipsel||x86_64
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 n
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client
bool "Include ShadowsocksR Libev Client"
default y

View File

@ -224,6 +224,7 @@ function gen_outbound(node, tag, proxy_table)
method = node.method or nil,
flow = node.flow or nil,
ivCheck = (node.protocol == "shadowsocks") and node.iv_check == "1" or nil,
uot = (node.protocol == "shadowsocks") and node.uot == "1" or nil,
password = node.password or "",
users = (node.username and node.password) and {
{

View File

@ -405,6 +405,9 @@ iv_check = s:option(Flag, "iv_check", translate("IV Check"))
iv_check:depends({ type = "V2ray", protocol = "shadowsocks" })
iv_check:depends({ type = "Xray", protocol = "shadowsocks" })
uot = s:option(Flag, "uot", translate("UDP over TCP"), translate("Need Xray server side with Shadowsocks-2022 protocol"))
uot:depends({ type = "Xray", protocol = "shadowsocks" })
ssr_protocol = s:option(Value, "ssr_protocol", translate("Protocol"))
for a, t in ipairs(ssr_protocol_list) do ssr_protocol:value(t) end
ssr_protocol:depends("type", "SSR")

View File

@ -45,7 +45,7 @@ o.rows = 5
o.rmempty = false
o = s:option(Flag, "allowInsecure", translate("allowInsecure"), translate("Whether unsafe connections are allowed. When checked, Certificate validation will be skipped."))
o.default = "1"
o.default = "0"
o.rmempty = false
o = s:option(ListValue, "filter_keyword_mode", translate("Filter keyword Mode"))

View File

@ -19,7 +19,7 @@ o:value("https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@relea
o:value("https://fastly.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt", translate("Loyalsoldier/v2ray-rules-dat"))
o:value("https://fastly.jsdelivr.net/gh/Loukky/gfwlist-by-loukky/gfwlist.txt", translate("Loukky/gfwlist-by-loukky"))
o:value("https://fastly.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt", translate("gfwlist/gfwlist"))
o.default = "https://fastly.jsdelivr.net/gh/Loukky/gfwlist-by-loukky/gfwlist.txt"
o.default = "https://fastly.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt"
----chnroute URL
o = s:option(DynamicList, "chnroute_url", translate("China IPs(chnroute) Update URL"))

View File

@ -121,6 +121,9 @@ local function start()
end
type = type:lower()
bin = ln_run("/usr/bin/" .. type .. "-server", type .. "-server", "-c " .. config_file .. " " .. udp_param, log_path)
elseif type == "SS-Rust" then
config = require(require_dir .. "shadowsocks").gen_config(user)
bin = ln_run("/usr/bin/ssserver", "ssserver", "-c " .. config_file, log_path)
elseif type == "V2ray" then
config = require(require_dir .. "v2ray").gen_config(user)
bin = ln_run(api.get_v2ray_path(), "v2ray", "run -c " .. config_file, log_path)

View File

@ -1,13 +1,19 @@
module("luci.model.cbi.passwall.server.api.shadowsocks", package.seeall)
function gen_config(user)
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 == "SS-Rust" then
config.server = "::"
config.mode = "tcp_and_udp"
else
config.server = {"[::0]", "0.0.0.0"}
end
if user.type == "SSR" then
config.protocol = user.protocol
config.protocol_param = user.protocol_param

View File

@ -9,6 +9,12 @@ local ss_encrypt_method_list = {
"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-chacha8-poly1305","2022-blake3-chacha20-poly1305"
}
local ssr_encrypt_method_list = {
"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",
@ -68,6 +74,9 @@ end
if api.is_finded("ss-server") then
type:value("SS", translate("Shadowsocks"))
end
if api.is_finded("ssserver") then
type:value("SS-Rust", translate("Shadowsocks Rust"))
end
if api.is_finded("ssr-server") then
type:value("SSR", translate("ShadowsocksR"))
end
@ -150,6 +159,7 @@ password = s:option(Value, "password", translate("Password"))
password.password = true
password:depends("auth", true)
password:depends("type", "SS")
password:depends("type", "SS-Rust")
password:depends("type", "SSR")
password:depends("type", "Brook")
password:depends({ type = "V2ray", protocol = "shadowsocks" })
@ -245,6 +255,16 @@ function ss_encrypt_method.write(self, section, value)
m:set(section, "method", value)
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"))
for a, t in ipairs(ssr_encrypt_method_list) do ssr_encrypt_method:value(t) end
ssr_encrypt_method:depends("type", "SSR")
@ -311,6 +331,7 @@ timeout = s:option(Value, "timeout", translate("Connection Timeout"))
timeout.datatype = "uinteger"
timeout.default = 300
timeout:depends("type", "SS")
timeout:depends("type", "SS-Rust")
timeout:depends("type", "SSR")
udp_forward = s:option(Flag, "udp_forward", translate("UDP Forward"))
@ -617,6 +638,7 @@ ss_aead_pwd:depends("ss_aead", true)
tcp_fast_open = s:option(Flag, "tcp_fast_open", translate("TCP Fast Open"))
tcp_fast_open.default = "0"
tcp_fast_open:depends("type", "SS")
tcp_fast_open:depends("type", "SS-Rust")
tcp_fast_open:depends("type", "SSR")
tcp_fast_open:depends("type", "Trojan")
tcp_fast_open:depends("type", "Trojan-Plus")

View File

@ -994,6 +994,12 @@ msgstr "密码"
msgid "IV Check"
msgstr "IV 检查"
msgid "UDP over TCP"
msgstr "TCP封装UDP"
msgid "Need Xray server side with Shadowsocks-2022 protocol"
msgstr "需要Xray作服务器端的Shadowsocks-2022协议"
msgid "Connection Timeout"
msgstr "连接超时时间"

View File

@ -48,7 +48,7 @@ config global_rules
option gfwlist_update '1'
option geosite_update '0'
option geoip_update '0'
list gfwlist_url 'https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt'
list gfwlist_url 'https://fastly.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt'
list chnroute_url 'https://ispip.clang.cn/all_cn.txt'
list chnroute6_url 'https://ispip.clang.cn/all_cn_ipv6.txt'
list chnlist_url 'https://fastly.jsdelivr.net/gh/felixonmars/dnsmasq-china-list/accelerated-domains.china.conf'

View File

@ -1,3 +1,4 @@
require "luci.sys"
local api = require "luci.model.cbi.passwall.api.api"
local var = api.get_args(arg)
@ -164,7 +165,8 @@ end
local dnsmasq_default_dns
local cache_text = ""
local new_text = TMP_DNSMASQ_PATH .. DNSMASQ_CONF_FILE .. DEFAULT_DNS .. LOCAL_DNS .. TUN_DNS .. REMOTE_FAKEDNS .. CHINADNS_DNS .. PROXY_MODE .. NO_PROXY_IPV6
local new_rules = luci.sys.exec("echo -n $(find /usr/share/passwall/rules -type f | xargs md5sum)")
local new_text = TMP_DNSMASQ_PATH .. DNSMASQ_CONF_FILE .. DEFAULT_DNS .. LOCAL_DNS .. TUN_DNS .. REMOTE_FAKEDNS .. CHINADNS_DNS .. PROXY_MODE .. NO_PROXY_IPV6 .. new_rules
if fs.access(CACHE_TEXT_FILE) then
for line in io.lines(CACHE_TEXT_FILE) do
cache_text = line

View File

@ -1,3 +1,4 @@
require "luci.sys"
local api = require "luci.model.cbi.passwall.api.api"
local var = api.get_args(arg)
@ -145,7 +146,8 @@ local function check_excluded_domain(domain)
end
local cache_text = ""
local new_text = SMARTDNS_CONF .. LOCAL_GROUP .. REMOTE_GROUP .. REMOTE_FAKEDNS .. TUN_DNS .. PROXY_MODE .. NO_PROXY_IPV6
local new_rules = luci.sys.exec("echo -n $(find /usr/share/passwall/rules -type f | xargs md5sum)")
local new_text = SMARTDNS_CONF .. LOCAL_GROUP .. REMOTE_GROUP .. REMOTE_FAKEDNS .. TUN_DNS .. PROXY_MODE .. NO_PROXY_IPV6 ..new_rules
if fs.access(CACHE_TEXT_FILE) then
for line in io.lines(CACHE_TEXT_FILE) do
cache_text = line

View File

@ -87,6 +87,14 @@ local function line_count(file_path)
return num;
end
local function non_file_check(file_path)
if nixio.fs.readfile(file_path, 1000) then
return nil;
else
return true;
end
end
--fetch rule
local function fetch_rule(rule_name,rule_type,url,exclude_domain)
local sret = 200
@ -99,7 +107,10 @@ local function fetch_rule(rule_name,rule_type,url,exclude_domain)
log(rule_name.. " 开始更新...")
for k,v in ipairs(url) do
sret_tmp = curl(v, download_file_tmp..k)
if sret_tmp == 200 then
if sret_tmp == 200 and non_file_check(download_file_tmp..k) then
sret = 0
log(rule_name.. "" ..k.. "条规则:" ..v.. "下载文件读取出错,请检查网络或下载链接后重试!")
elseif sret_tmp == 200 then
if rule_name == "gfwlist" then
local domains = {}
local gfwlist = io.open(download_file_tmp..k, "r")
@ -152,11 +163,11 @@ local function fetch_rule(rule_name,rule_type,url,exclude_domain)
out:close()
end
os.remove(download_file_tmp..k)
else
sret = 0
log(rule_name.. "" ..k.. "条规则:" ..v.. "下载失败")
log(rule_name.. "" ..k.. "条规则:" ..v.. "下载失败,请检查网络或下载链接后重试")
end
os.remove(download_file_tmp..k)
end
if sret == 200 then
@ -169,9 +180,7 @@ local function fetch_rule(rule_name,rule_type,url,exclude_domain)
end
luci.sys.call("cat " ..unsort_file_tmp.. " | sort -u > "..file_tmp)
os.remove(unsort_file_tmp)
end
if sret == 200 then
local old_md5 = luci.sys.exec("echo -n $(md5sum " .. rule_path .. "/" ..rule_name.. " | awk '{print $1}')")
local new_md5 = luci.sys.exec("echo -n $([ -f '" ..file_tmp.. "' ] && md5sum " ..file_tmp.." | awk '{print $1}')")
if old_md5 ~= new_md5 then

View File

@ -27,7 +27,7 @@ local has_trojan_plus = api.is_finded("trojan-plus")
local has_v2ray = api.is_finded("v2ray")
local has_xray = api.is_finded("xray")
local has_trojan_go = api.is_finded("trojan-go")
local allowInsecure_default = true
local allowInsecure_default = nil
local ss_aead_type_default = uci:get(appname, "@global_subscribe[0]", "ss_aead_type") or "shadowsocks-libev"
local trojan_type_default = uci:get(appname, "@global_subscribe[0]", "trojan_type") or "trojan-plus"
-- 判断是否过滤节点关键字
@ -555,16 +555,12 @@ local function processData(szType, content, add_mode, add_from)
result.address = hostInfo and hostInfo[1] or Info[2]
end
local peer, sni = nil, ""
local allowInsecure = allowInsecure_default
local query = split(Info[2], "?")
local params = {}
for _, v in pairs(split(query[2], '&')) do
local t = split(v, '=')
params[string.lower(t[1])] = UrlDecode(t[2])
end
if params.allowinsecure then
allowInsecure = params.allowinsecure
end
if params.peer then peer = params.peer end
sni = params.sni and params.sni or ""
if params.ws and params.ws == "1" then
@ -586,7 +582,16 @@ local function processData(szType, content, add_mode, add_from)
end
result.tls = '1'
result.tls_serverName = peer and peer or sni
result.tls_allowInsecure = allowInsecure and "1" or "0"
if params.allowinsecure then
if params.allowinsecure == "1" or params.allowinsecure == "0" then
result.tls_allowInsecure = params.allowinsecure
else
result.tls_allowInsecure = string.lower(params.allowinsecure) == "true" and "1" or "0"
end
log(result.remarks .. ' 使用节点AllowInsecure设定: '.. result.tls_allowInsecure)
else
result.tls_allowInsecure = allowInsecure_default and "1" or "0"
end
end
if trojan_type_default == "trojan-plus" and has_trojan_plus then
result.type = "Trojan-Plus"
@ -787,8 +792,11 @@ local function processData(szType, content, add_mode, add_from)
result.hysteria_auth_type = "string"
result.hysteria_auth_password = params.auth
result.tls_serverName = params.peer
if params.insecure and params.insecure == "1" then
result.tls_allowInsecure = "1"
if params.insecure and (params.insecure == "1" or params.insecure == "0") then
result.tls_allowInsecure = params.insecure
log(result.remarks ..' 使用节点AllowInsecure设定: '.. result.tls_allowInsecure)
else
result.tls_allowInsecure = allowInsecure_default and "1" or "0"
end
result.hysteria_alpn = params.alpn
result.hysteria_up_mbps = params.upmbps
@ -1138,8 +1146,8 @@ local execute = function()
local cfgid = value[".name"]
local remark = value.remark
local url = value.url
if value.allowInsecure and value.allowInsecure ~= "1" then
allowInsecure_default = nil
if value.allowInsecure and value.allowInsecure == "1" then
allowInsecure_default = true
end
local filter_keyword_mode = value.filter_keyword_mode or "5"
if filter_keyword_mode == "0" then
@ -1180,7 +1188,7 @@ local execute = function()
else
retry[#retry + 1] = value
end
allowInsecure_default = true
allowInsecure_default = nil
filter_keyword_mode_default = uci:get(appname, "@global_subscribe[0]", "filter_keyword_mode") or "0"
filter_keyword_discard_list_default = uci:get(appname, "@global_subscribe[0]", "filter_discard_list") or {}
filter_keyword_keep_list_default = uci:get(appname, "@global_subscribe[0]", "filter_keep_list") or {}

View File

@ -38,6 +38,7 @@ 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_Server:shadowsocks-libev-ss-server \
+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-redir \
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server \
@ -92,6 +93,11 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client
depends on aarch64||arm||i386||mips||mipsel||x86_64
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 n
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client
bool "Include ShadowsocksR Libev Client"
default y

View File

@ -121,6 +121,9 @@ local function start()
end
type = type:lower()
bin = ln_run("/usr/bin/" .. type .. "-server", type .. "-server", "-c " .. config_file .. " " .. udp_param, log_path)
elseif type == "SS-Rust" then
config = require(require_dir .. "shadowsocks").gen_config(user)
bin = ln_run("/usr/bin/ssserver", "ssserver", "-c " .. config_file, log_path)
elseif type == "V2ray" then
config = require(require_dir .. "v2ray").gen_config(user)
bin = ln_run(api.get_v2ray_path(), "v2ray", "run -c " .. config_file, log_path)

View File

@ -1,13 +1,19 @@
module("luci.model.cbi.passwall2.server.api.shadowsocks", package.seeall)
function gen_config(user)
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 == "SS-Rust" then
config.server = "::"
config.mode = "tcp_and_udp"
else
config.server = {"[::0]", "0.0.0.0"}
end
if user.type == "SSR" then
config.protocol = user.protocol
config.protocol_param = user.protocol_param

View File

@ -9,6 +9,12 @@ local ss_encrypt_method_list = {
"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-chacha8-poly1305","2022-blake3-chacha20-poly1305"
}
local ssr_encrypt_method_list = {
"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",
@ -65,6 +71,9 @@ type = s:option(ListValue, "type", translate("Type"))
if api.is_finded("ss-server") then
type:value("SS", translate("Shadowsocks"))
end
if api.is_finded("ssserver") then
type:value("SS-Rust", translate("Shadowsocks Rust"))
end
if api.is_finded("ssr-server") then
type:value("SSR", translate("ShadowsocksR"))
end
@ -135,6 +144,7 @@ password = s:option(Value, "password", translate("Password"))
password.password = true
password:depends("auth", true)
password:depends("type", "SS")
password:depends("type", "SS-Rust")
password:depends("type", "SSR")
password:depends("type", "Brook")
password:depends({ type = "V2ray", protocol = "shadowsocks" })
@ -230,6 +240,16 @@ function ss_encrypt_method.write(self, section, value)
m:set(section, "method", value)
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"))
for a, t in ipairs(ssr_encrypt_method_list) do ssr_encrypt_method:value(t) end
ssr_encrypt_method:depends("type", "SSR")
@ -296,6 +316,7 @@ timeout = s:option(Value, "timeout", translate("Connection Timeout"))
timeout.datatype = "uinteger"
timeout.default = 300
timeout:depends("type", "SS")
timeout:depends("type", "SS-Rust")
timeout:depends("type", "SSR")
udp_forward = s:option(Flag, "udp_forward", translate("UDP Forward"))
@ -542,6 +563,7 @@ fallback_list:depends("fallback", true)
tcp_fast_open = s:option(Flag, "tcp_fast_open", translate("TCP Fast Open"))
tcp_fast_open.default = "0"
tcp_fast_open:depends("type", "SS")
tcp_fast_open:depends("type", "SS-Rust")
tcp_fast_open:depends("type", "SSR")
remote_address = s:option(Value, "remote_address", translate("Remote Address"))

View File

@ -10,13 +10,13 @@ LUCI_DESCRIPTION:=luci-app-store is a ipk store developed by LinkEase team
LUCI_DEPENDS:=+curl +opkg +luci-base +tar +coreutils +coreutils-stat +libuci-lua +mount-utils
LUCI_PKGARCH:=all
PKG_VERSION:=0.1.10-1
PKG_VERSION:=0.1.10-3
# PKG_RELEASE MUST be empty for luci.mk
PKG_RELEASE:=
ISTORE_UI_VERSION:=0.1.9
ISTORE_UI_RELEASE:=6
PKG_HASH:=fd10902e790b1bc357cc6d78c3ece170ff55928a042d3242f947bc1adca351be
ISTORE_UI_RELEASE:=9
PKG_HASH:=2069b4f4b78dcb10764e3f6245727ae6af672361d5558c3ce5eac082b5ff0a67
PKG_SOURCE_URL_FILE:=v$(ISTORE_UI_VERSION)-$(ISTORE_UI_RELEASE).tar.gz
PKG_SOURCE:=istore-ui-$(PKG_SOURCE_URL_FILE)

View File

@ -5,4 +5,4 @@ msgid "istore_vue_lang"
msgstr "zh-cn"
msgid "iStore"
msgstr "应用商店"
msgstr "iStore"

View File

@ -5,4 +5,4 @@ msgid "istore_vue_lang"
msgstr "zh-cn"
msgid "iStore"
msgstr "应用商店"
msgstr "iStore"

View File

@ -1,9 +0,0 @@
version=`uci -q get base_config.@status[0].version`
test $version -lt 3 && {
uci -q del turboacc.config.sw_flow
uci commit turboacc
}
uci -q set base_config.@status[0].version=3
uci commit base_config

View File

@ -2,15 +2,11 @@
ETHTOOL=/usr/sbin/ethtool
case "$(board_name)" in
friendlyelec,nanopi-r2s)
[ "$(uci get network.$INTERFACE.device)" = "eth1" ] && \
[ "$ACTION" = "ifup" ] && \
$ETHTOOL -K eth1 rx off tx off
;;
friendlyelec,nanopi-r2c)
[ "$(uci get network.$INTERFACE.device)" = "br-lan" ] && \
[ "$ACTION" = "ifup" ] && \
$ETHTOOL -K eth1 rx off tx off
;;
esac
$ETHTOOL -i eth0 | grep r8152 && \
[ "$ACTION" = "ifup" ] && \
$ETHTOOL -K eth0 rx off tx off
$ETHTOOL -i eth1 | grep r8152 && \
[ "$ACTION" = "ifup" ] && \
$ETHTOOL -K eth1 rx off tx off