Merge Lean's source

This commit is contained in:
CN_SZTL 2020-03-01 15:59:36 +08:00
parent 454c3e5e9b
commit d652ed3dc1
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
9 changed files with 57 additions and 233 deletions

View File

@ -38,7 +38,7 @@ o.rmempty = false
o = s:taboption("basic", Button, "restart")
o.title = translate("Adbyby and Rule state")
o.inputtitle = translate("Restart Adbyby")
o.description = string.format("<strong>Last Update Checked</strong> %s<br /><strong>Lazy Rule</strong>%s <br /><strong>Video Rule</strong>%s", UD, DL, DV)
o.description = string.format("<strong>"..translate("Last Update Checked").."</strong> %s<br /><strong>"..translate("Lazy Rule").."</strong>%s <br /><strong>"..translate("Video Rule").."</strong>%s", UD, DL, DV)
o.inputstyle = "reload"
o.write = function()
SYS.call("rm -rf /tmp/adbyby.updated && /usr/share/adbyby/admem.sh > /tmp/adupdate.log 2>&1 &")

View File

@ -123,3 +123,15 @@ msgstr "全局过滤"
msgid "Update adbyby rules form official website first"
msgstr "优先从官方网站更新规则"
msgid "Last Update Checked"
msgstr "上一次检查规则更新"
msgid "Lazy Rule"
msgstr "普通规则版本"
msgid "Video Rule"
msgstr "视频规则版本"
msgid "Adblock Plus Host List"
msgstr "广告屏蔽大师 Plus 规则列表"

View File

@ -1,208 +0,0 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: zh-Hans\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
#: luasrc/model/cbi/adbyby.lua:150
msgid "<strong>Client Filter Mode Settings</strong>"
msgstr "<strong>客户端过滤模式设置</strong>"
#: luasrc/controller/adbyby.lua:9
msgid "ADBYBY Plus +"
msgstr "广告屏蔽大师 Plus+"
#: luasrc/model/cbi/adbyby.lua:15
msgid "Adbyby Plus +"
msgstr "广告屏蔽大师 Plus+"
#: luasrc/model/cbi/adbyby.lua:16
msgid ""
"Adbyby Plus + can filter all kinds of banners, popups, video ads, and "
"prevent tracking, privacy theft and a variety of malicious websites<br /"
"><font color=\"red\">Plus + version combination mode can operation with "
"Adblock Plus Hostfiltering ads without losing bandwidth</font>"
msgstr ""
"广告屏蔽大师 Plus + 可以全面过滤各种横幅、弹窗、视频广告,同时阻止跟踪、隐私"
"窃取及各种恶意网站<br /><font color=\"red\">Plus + 版本可以和 Adblock Plus "
"Host 结合方式运行,过滤广告不损失带宽</font>"
#: luasrc/model/cbi/adbyby.lua:46
msgid "Adbyby and Rule state"
msgstr "规则状态"
#: luasrc/model/cbi/adbyby.lua:56
msgid "Advance Setting"
msgstr "高级设置"
#: luasrc/model/cbi/adbyby.lua:23
msgid "Base Setting"
msgstr "基本设置"
#: luasrc/model/cbi/adbyby.lua:106
msgid "Black Domain List"
msgstr "域名黑名单"
#: luasrc/model/cbi/adbyby.lua:121
msgid "Black IP List"
msgstr "IP黑名单"
#: luasrc/model/cbi/adbyby.lua:72
msgid "Block Apple iOS OTA update"
msgstr "拦截 Apple iOS 的OTA更新"
#: luasrc/model/cbi/adbyby.lua:91
msgid "Bypass Domain List"
msgstr "域名白名单"
#: luasrc/view/adbyby/adbyby_status.htm:20
msgid "Collecting data..."
msgstr ""
#: luasrc/model/cbi/adbyby.lua:140
msgid ""
"Each line of the beginning exclamation mark is considered an annotation."
msgstr "每行一条规则,感叹号开头的被认为是注释"
#: luasrc/model/cbi/adbyby.lua:26
msgid "Enable"
msgstr ""
#: luasrc/model/cbi/adbyby.lua:167
msgid "Filter Mode"
msgstr "过滤模式"
#: luasrc/model/cbi/adbyby.lua:151
msgid ""
"Filter mode settings can be set to specific LAN clients ( <font color=blue> "
"No filter , Global filter </font> ) . Does not need to be set by default."
msgstr ""
"可以为局域网客户端分别设置不同的过滤模式 ( <font color=blue> 不过滤 , 全局过"
"滤 </font> ) 。默认无需设置"
#: luasrc/model/cbi/adbyby.lua:32
msgid "Global ModeThe slowest, the best effects"
msgstr "全局模式(最慢, 效果最好)"
#: luasrc/model/cbi/adbyby.lua:172
msgid "Global filter"
msgstr "全局过滤"
#: luasrc/model/cbi/adbyby.lua:157
msgid "IP Address"
msgstr "IP地址"
#: luasrc/model/cbi/adbyby.lua:65
msgid "Manually force update"
msgstr "手动强制更新"
#: luasrc/model/cbi/adbyby.lua:64
msgid "Manually force update<br />Adblock Plus Host List"
msgstr "手动强制更新<br />Adblock Plus Host List"
#: luasrc/view/adbyby/adbyby_status.htm:10
msgid "NOT RUNNING"
msgstr ""
#: luasrc/model/cbi/adbyby.lua:171
msgid "No filter"
msgstr "不过滤"
#: luasrc/model/cbi/adbyby.lua:34
msgid "No filter Mode (Must set in Client Filter Mode Settings manually)"
msgstr "手动代理模式(必须手动设置浏览器代理,或者客户端过滤模式设置)"
#: luasrc/model/cbi/adbyby.lua:64
msgid ""
"Note: It needs to download and convert the rules. The background process may "
"takes 60-120 seconds to run. <br / > After completed it would automatically "
"refresh, please do not duplicate click!"
msgstr ""
"注意需要下载并转换规则。后台进程可能需要60-120秒运行。完成后会自动刷新请"
"不要重复点击!"
#: luasrc/model/cbi/adbyby.lua:33
msgid ""
"Plus + ModeFilter domain name list and blacklist website.Recommended"
msgstr "Plus + 模式只过滤列表内域名结合ABP名单。推荐"
#: luasrc/model/cbi/adbyby.lua:76
msgid "Plus+ Domain List"
msgstr "Plus+ 模式过滤的域名"
#: luasrc/model/cbi/adbyby.lua:39
msgid "RAM Running Mode"
msgstr "内存运行模式"
#: luasrc/view/adbyby/adbyby_status.htm:7
msgid "RUNNING"
msgstr ""
#: luasrc/model/cbi/adbyby.lua:47
msgid "Restart Adbyby"
msgstr "重启Adbyby"
#: luasrc/model/cbi/adbyby.lua:42
msgid "Running Adbyby in RAM.More speed,less disk consumption"
msgstr "在内存中运行Adbyby。更快的速度更少的存储空间损耗"
#: luasrc/model/cbi/adbyby.lua:31
msgid "Running Mode"
msgstr "运行模式"
#: luasrc/model/cbi/adbyby.lua:59
msgid "Update the rule at 6 a.m. every morning and restart adbyby"
msgstr "每天凌晨6点更新规则并重启"
#: luasrc/model/cbi/adbyby.lua:136
msgid "User-defined Rule"
msgstr "用户自定义规则"
#: luasrc/model/cbi/adbyby.lua:80
msgid ""
"!Note that you should fill to the domain name ONLY. For example, http://"
"www.baidu.com only needs to write to baidu.com. One line for each"
msgstr ""
"这些域名在 Plus 模式中会被过滤。你需要要填写域名即可,例如 http://www.baidu."
"com你写 baidu.com 即可。每行一个域名"
#: luasrc/model/cbi/adbyby.lua:110
msgid "!Will Always block these Domain"
msgstr "拦截黑名单内的域名(所有模式中生效)"
#: luasrc/model/cbi/adbyby.lua:125
msgid "!Will Always block these IP"
msgstr "拦截黑名单内的IP地址所有模式中生效"
#: luasrc/model/cbi/adbyby.lua:95
msgid "!Will Never filter these Domain"
msgstr "永不过滤白名单内的域名(所有模式中生效)"
#~ msgid ""
#~ "<strong><font color=\"green\">Adbyby Plus + is Running</font></strong>"
#~ msgstr ""
#~ "<strong><font color=\"green\">广告屏蔽大师 Plus + 正在运行</font></strong>"
#~ msgid ""
#~ "<strong><font color=\"red\">Adbyby Plus + is Not Running</font></strong>"
#~ msgstr ""
#~ "<strong><font color=\"red\">广告屏蔽大师 Plus + 没有运行</font></strong>"
#~ msgid "Transparent proxy"
#~ msgstr "透明代理"
#~ msgid "Click to disable"
#~ msgstr "点击关闭"
#~ msgid "Click to enable"
#~ msgstr "点击开启"
#~ msgid "<strong><font color=blue>Adblock Plus Host List</font></strong>"
#~ msgstr "<strong><font color=blue>Adblock Plus Host 列表:</font></strong>"
#~ msgid "Update adbyby rules form official website first"
#~ msgstr "优先从官方网站更新规则"

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=154
PKG_RELEASE:=1
PKG_RELEASE:=3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -212,15 +212,32 @@
url0 = ssu[1]
}
var sstr = url0;
document.getElementById('cbid.shadowsocksr.' + sid + '.type').value = "trojan";
document.getElementById('cbid.shadowsocksr.' + sid + '.type').dispatchEvent(event);
var team = sstr.split('@');
var password = team[0]
var serverPart = team[1].split(':');
var port = serverPart[1].split('?')[0];
var others = serverPart[1].split('?');
var port = others[0]
var queryParam = {}
if(others.length > 0) {
var queryParams = others[1]
var queryArray = queryParams.split('&')
for (i = 0; i < queryArray.length; i++) {
var params = queryArray[i].split('=');
queryParam[decodeURIComponent(params[0])] = decodeURIComponent(params[1] || '');
}
}
document.getElementById('cbid.shadowsocksr.' + sid + '.server').value = serverPart[0];
document.getElementById('cbid.shadowsocksr.' + sid + '.server_port').value = port;
document.getElementById('cbid.shadowsocksr.' + sid + '.password').value = password;
document.getElementById('cbid.shadowsocksr.' + sid + '.tls').checked = true;
document.getElementById('cbid.shadowsocksr.' + sid + '.tls').dispatchEvent(event);
document.getElementById('cbid.shadowsocksr.' + sid + '.tls_host').value = queryParam.peer || '';
document.getElementById('cbid.shadowsocksr.' + sid + '.insecure').checked = queryParam.allowInsecure === '1';
if (param != undefined) {
document.getElementById('cbid.shadowsocksr.' + sid + '.alias').value = decodeURI(param);
}

View File

@ -45,7 +45,7 @@ add_cron() {
sed -i '/shadowsocksr/d' $CRON_FILE
sed -i '/ssrplus.log/d' $CRON_FILE && echo '0 1 * * * echo "" > /tmp/ssrplus.log' >>$CRON_FILE
[ $(uci_get_by_type server_subscribe auto_update 0) -eq 1 ] && echo "0 $(uci_get_by_type server_subscribe auto_update_time) * * * /usr/bin/lua /usr/share/shadowsocksr/subscribe.lua" >>$CRON_FILE
[ $(uci_get_by_type server_subscribe auto_update 0) -eq 1 ] && echo "0 $(uci_get_by_type server_subscribe auto_update_time) * * * /usr/bin/lua /usr/share/shadowsocksr/update.lua" >>$CRON_FILE
[ $(uci_get_by_type server_subscribe auto_update 0) -eq 1 ] && echo "0 5 * * * /usr/bin/lua /usr/share/shadowsocksr/update.lua" >>$CRON_FILE
crontab $CRON_FILE
}

View File

@ -18,8 +18,8 @@ local trojan = {
password = {server.password},
-- 传出连接
ssl = {
verify = false,
verify_hostname = (server.tls == "1") and false or true,
verify = (server.insecure == "0") and true or false,
verify_hostname = (server.tls == "1") and true or false,
cert = "",
cipher = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-SHA:AES256-SHA:DES-CBC3-SHA",
cipher_tls13 = "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384",

View File

@ -96,14 +96,8 @@ end
-- 处理数据
local function processData(szType, content)
local result = {
-- auth_enable = '0',
-- switch_enable = '1',
type = szType,
local_port = 1234,
-- timeout = 60, -- 不太确定 好像是死的
-- fast_open = 0,
-- kcp_enable = 0,
-- kcp_port = 0,
kcp_param = '--nocomp'
}
if szType == 'ssr' then
@ -238,6 +232,9 @@ local function processData(szType, content)
result.alias = UrlDecode(alias)
result.type = "trojan"
result.server = host[1]
-- 按照官方的建议 默认验证ssl证书
result.insecure = "0"
result.tls = "1"
if host[2]:find("?") then
local query = split(host[2], "?")
result.server_port = query[1]
@ -246,10 +243,17 @@ local function processData(szType, content)
local t = split(v, '=')
params[t[1]] = t[2]
end
if params.peer then
result.tls = "1"
-- 未指定peersni默认使用remote addr
result.tls_host = params.peer
end
if params.allowInsecure == "1" then
result.insecure = "1"
else
result.insecure = "0"
end
else
result.server_port = host[2]
end
@ -296,10 +300,10 @@ local execute = function()
nodes = base64Decode(raw:sub(nEnd + 1, #raw))
nodes = jsonParse(nodes)
local extra = {
airport = nodes.airport,
port = nodes.port,
encryption = nodes.encryption,
password = nodes.password
airport = nodes.airport,
port = nodes.port,
encryption = nodes.encryption,
password = nodes.password
}
local servers = {}
-- SS里面包着 干脆直接这样
@ -336,8 +340,9 @@ local execute = function()
result.alias:find("QQ群") or
result.alias:find("官网") or
result.alias:find("防失联地址") or
not result.server
then
not result.server or
result.server:match("[^0-9a-zA-Z%-%.%s]") -- 中文做地址的 也没有人拿中文域名搞就算中文域也有Puny Code SB 机场
then
log('丢弃无效节点: ' .. result.type ..' 节点, ' .. result.alias)
else
log('成功解析: ' .. result.type ..' 节点, ' .. result.alias)
@ -374,11 +379,11 @@ local execute = function()
end
else
if not old.alias then
old.alias = old.server .. ':' .. old.server_port
end
old.alias = old.server .. ':' .. old.server_port
end
log('忽略手动添加的节点: ' .. old.alias)
end
end)
for k, v in ipairs(nodeResult) do
for kk, vv in ipairs(v) do

View File

@ -17,10 +17,8 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)-src
include $(INCLUDE_DIR)/host-build.mk
UPX_UCLDIR := $(BUILD_DIR_HOST)/ucl-1.03
define Host/Compile
UPX_UCLDIR=$(UPX_UCLDIR) \
UPX_UCLDIR=$(STAGING_DIR_HOST) \
$(MAKE) -C $(HOST_BUILD_DIR)/src \
CXXFLAGS_WERROR="" LDFLAGS="$(HOST_LDFLAGS)" \
CXX="$(HOSTCXX)"