Merge Upstream

This commit is contained in:
CN_SZTL 2020-07-16 23:07:03 +08:00
commit ac1153ba1b
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
130 changed files with 10482 additions and 3270 deletions

View File

@ -51,7 +51,10 @@ scutclient source: [scutclient/scutclient](https://github.com/scutclient/scutcli
MT-Wifi 5.0.4.0: [MeIsReallyBa/mt7615-dbdc-linux5.4](https://github.com/MeIsReallyBa/mt7615-dbdc-linux5.4).<br/>
luci-app-scutclient source: [scutclient/luci-app-scutclient](https://github.com/scutclient/luci-app-scutclient).<br/>
luci-theme-Butterfly-dark source: [Leo-Jo-My/luci-theme-Butterfly-dark](https://github.com/Leo-Jo-My/luci-theme-Butterfly-dark).<br/>
luci-theme-argon-mod source: [Leo-Jo-My/luci-theme-argon-mod](https://github.com/Leo-Jo-My/luci-theme-argon-mod).
luci-theme-argon-mod source: [Leo-Jo-My/luci-theme-argon-mod](https://github.com/Leo-Jo-My/luci-theme-argon-mod).<br/>
node-request source: [jerrykuku/node-request](https://github.com/jerrykuku/node-request).<br/>
luci-app-jd-dailybonus source: [jerrykuku/luci-app-jd-dailybonus](https://github.com/jerrykuku/luci-app-jd-dailybonus).<br/>
luci-theme-btmod source: [siropboy/luci-theme-btmod](https://github.com/siropboy/luci-theme-btmod).
## License
### Depending on their own License.

View File

@ -0,0 +1,67 @@
#
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-jd-dailybonus
LUCI_PKGARCH:=all
PKG_VERSION:=0.8
PKG_RELEASE:=20200715
include $(INCLUDE_DIR)/package.mk
define Package/luci-app-jd-dailybonus
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=Luci for JD dailybonus Script
PKGARCH:=all
DEPENDS:=+node +node-request +coreutils +coreutils-nohup +wget
endef
define Build/Prepare
endef
define Build/Compile
endef
define Package/luci-app-define Package/jd-dailybonus/conffiles
endef
define Package/luci-app-jd-dailybonus/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci
$(INSTALL_DIR) $(1)/
cp -pR ./root/* $(1)/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
po2lmo ./po/zh-cn/jd-dailybonus.po $(1)/usr/lib/lua/luci/i18n/jd-dailybonus.zh-cn.lmo
endef
define Package/luci-app-jd-dailybonus/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
( . /etc/uci-defaults/luci-jd-dailybonus ) && rm -f /etc/uci-defaults/luci-jd-dailybonus
rm -rf /tmp/luci-indexcache
rm -rf /tmp/luci-modulecache/*
chmod +x /etc/init.d/jd-dailybonus >/dev/null 2>&1
chmod +x /usr/share/jd-dailybonus/newapp.sh >/dev/null 2>&1
/etc/init.d/jd-dailybonus enable >/dev/null 2>&1
fi
exit 0
endef
define Package/luci-app-jd-dailybonus/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/jd-dailybonus disable
/etc/init.d/jd-dailybonus stop
fi
exit 0
endef
$(eval $(call BuildPackage,luci-app-jd-dailybonus))
# call BuildPackage - OpenWrt buildroot signature

View File

@ -0,0 +1,82 @@
-- Copyright (C) 2020 jerrykuku <jerrykuku@gmail.com>
-- Licensed to the public under the GNU General Public License v3.
module("luci.controller.jd-dailybonus", package.seeall)
function index()
if not nixio.fs.access("/etc/config/jd-dailybonus") then
return
end
entry({"admin", "services", "jd-dailybonus"}, alias("admin", "services", "jd-dailybonus", "client"), _("JD-DailyBonus"), 10).dependent = true -- 首页
entry({"admin", "services", "jd-dailybonus", "client"}, cbi("jd-dailybonus/client"),_("Client"), 10).leaf = true -- 基本设置
entry({"admin", "services", "jd-dailybonus", "log"},form("jd-dailybonus/log"),_("Log"), 30).leaf = true -- 日志页面
entry({"admin", "services", "jd-dailybonus", "script"},form("jd-dailybonus/script"),_("Script"), 20).leaf = true -- 直接配置脚本
entry({"admin", "services", "jd-dailybonus", "run"}, call("run")) -- 执行程序
entry({"admin", "services", "jd-dailybonus", "update"}, call("update")) -- 执行更新
entry({"admin", "services", "jd-dailybonus", "check_update"}, call("check_update")) -- 检查更新
end
-- 执行程序
function run()
local e = {}
local uci = luci.model.uci.cursor()
local cookie = luci.http.formvalue("cookies")
local cookie2 = luci.http.formvalue("cookies2")
local auto_update = luci.http.formvalue("auto_update")
local auto_update_time = luci.http.formvalue("auto_update_time")
local auto_run = luci.http.formvalue("auto_run")
local auto_run_time = luci.http.formvalue("auto_run_time")
local stop = luci.http.formvalue("stop")
local serverchan = luci.http.formvalue("serverchan")
local failed = luci.http.formvalue("failed")
local name = ""
uci:foreach("vssr", "global", function(s) name = s[".name"] end)
if cookie ~= " " then
uci:set("jd-dailybonus", '@global[0]', 'auto_update', auto_update)
uci:set("jd-dailybonus", '@global[0]', 'auto_update_time', auto_update_time)
uci:set("jd-dailybonus", '@global[0]', 'auto_run', auto_run)
uci:set("jd-dailybonus", '@global[0]', 'auto_run_time', auto_run_time)
uci:set("jd-dailybonus", '@global[0]', 'stop', stop)
uci:set("jd-dailybonus", '@global[0]', 'cookie', cookie)
uci:set("jd-dailybonus", '@global[0]', 'cookie2', cookie2)
uci:set("jd-dailybonus", '@global[0]', 'serverchan', serverchan)
uci:set("jd-dailybonus", '@global[0]', 'failed', failed)
uci:save("jd-dailybonus")
uci:commit("jd-dailybonus")
luci.sys.call("/usr/share/jd-dailybonus/newapp.sh -r")
luci.sys.call("/usr/share/jd-dailybonus/newapp.sh -a")
e.error = 0
else
e.error = 1
end
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
--检查更新
function check_update()
local jd = "jd-dailybonus"
local e = {}
local new_version = luci.sys.exec("/usr/share/jd-dailybonus/newapp.sh -n")
e.new_version = new_version
e.error = 0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
--执行更新
function update()
local jd = "jd-dailybonus"
local e = {}
local uci = luci.model.uci.cursor()
local version = luci.http.formvalue("version")
--下载脚本
local code = luci.sys.exec("/usr/share/jd-dailybonus/newapp.sh -u")
e.error = code
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -0,0 +1,61 @@
local jd = "jd-dailybonus"
local uci = luci.model.uci.cursor()
local sys = require "luci.sys"
m = Map(jd)
-- [[ 基本设置 ]]--
s = m:section(TypedSection, "global",
translate("Base Config"))
s.anonymous = true
o = s:option(DummyValue, "", "")
o.rawhtml = true
o.template = "jd-dailybonus/cookie_tools"
o = s:option(Value, "cookie", translate("First Cookie"))
o.rmempty = false
o = s:option(Value, "cookie2", translate("Second Cookie"))
o.rmempty = true
o.description = translate('双账号用户抓取"账号1"Cookie后, 请勿点击退出账号(可能会导致Cookie失效), 需清除浏览器资料或更换浏览器登录"账号2"抓取.')
o = s:option(Value, "stop", translate("Execute Delay"))
o.rmempty = false
o.default = 0
o.datatype = integer
o.description = translate("自定义延迟签到,单位毫秒. 默认分批并发无延迟. (延迟作用于每个签到接口, 如填入延迟则切换顺序签到. ) ")
o = s:option(Value, "serverchan", translate("ServerChan SCKEY"))
o.rmempty = true
o.description = translate("微信推送基于Server酱服务请自行登录 http://sc.ftqq.com/ 绑定并获取 SCKEY (仅在自动签到时推送)")
o = s:option(Flag, "failed", translate("Failed Push"))
o.rmempty = false
o.description = translate("仅当cookie失效时推送")
o = s:option(Flag, "auto_update", translate("Auto Update"))
o.rmempty = false
o.description = translate("Auto Update Script Service")
o =s:option(ListValue, "auto_update_time", translate("Update time (every day)"))
for t = 0, 23 do o:value(t, t .. ":01") end
o.default = 1
o.rmempty = true
o:depends("auto_update", "1")
o = s:option(Flag, "auto_run", translate("Auto Run"))
o.rmempty = false
o.description = translate("Auto Run Script Service")
o =s:option(ListValue, "auto_run_time", translate("Run time (every day)"))
for t = 0, 23 do o:value(t, t .. ":05") end
o.default = 1
o.rmempty = true
o:depends("auto_run", "1")
o = s:option(DummyValue, "", "")
o.rawhtml = true
o.version = sys.exec('uci get jd-dailybonus.@global[0].version')
o.template = "jd-dailybonus/update_service"
return m

View File

@ -0,0 +1,20 @@
local fs = require "nixio.fs"
local jd = "jd-dailybonus"
local conffile = "/www/JD_DailyBonus.htm"
f = SimpleForm("logview")
m = Map(jd)
-- [[ 基本设置 ]]--
s = m:section(TypedSection, "global")
s.anonymous = true
t = s:option(TextValue, "1", nil)
t.rmempty = true
t.rows = 30
function t.cfgvalue()
return fs.readfile(conffile) or ""
end
t.readonly="readonly"
return m

View File

@ -0,0 +1,25 @@
local fs = require "nixio.fs"
local jd = "jd-dailybonus"
local uci = luci.model.uci.cursor()
function sync_value_to_file(value, file)
value = value:gsub("\r\n?", "\n")
local old_value = nixio.fs.readfile(file)
if value ~= old_value then nixio.fs.writefile(file, value) end
end
s = SimpleForm("scriptview")
view_cfg = s:field(TextValue, "conf")
view_cfg.rmempty = false
view_cfg.rows = 43
function view_cfg.cfgvalue()
return nixio.fs.readfile("/usr/share/jd-dailybonus/JD_DailyBonus.js") or ""
end
function view_cfg.write(self, section, value)
sync_value_to_file(value, "/usr/share/jd-dailybonus/JD_DailyBonus.js")
end
return s

View File

@ -0,0 +1,21 @@
<%+cbi/valueheader%>
<label class="cbi-value-title"><%= translate("Cookie Tools") %></label>
<div class="cbi-value-field">
<a class="cbi-button cbi-button-reload" href='/jd-dailybonus/JDCookie.crx'><%= translate("JDCookie.crx") %></a> <a class="cbi-button cbi-button-reload" href='/jd-dailybonus/JDCookie.zip'><%= translate("JDCookie.zip") %></a>
<div class="cbi-value-description">
<span class="cbi-value-helpicon"><img src="/luci-static/resources/cbi/help.gif" alt="帮助"></span>
<%= translate("Click to Install copy cookie tools,And click the jd link below. if you can't install the crx extensions,please download the JDCookie.zip,unzip it,and use load Unpacked extensions to install.link:[chrome://extensions/]")%>
</div>
</div>
<label class="cbi-value-title"><%= translate("JD Url") %></label>
<div class="cbi-value-field">
<a class="cbi-button cbi-button-reload" href='https://bean.m.jd.com' target="_blank">bean.m.jd.com</a>
<div class="cbi-value-description">
<span class="cbi-value-helpicon"><img src="/luci-static/resources/cbi/help.gif" alt="帮助"></span>
<%= translate("Sign in ,then click JDCookie button.you will copy JD cookies, paste the cookie below.")%>
</div>
</div>
<%+cbi/valuefooter%>

View File

@ -0,0 +1,304 @@
<%+cbi/valueheader%>
<script src="/jd-dailybonus/jquery.min.js"></script>
<style>
.modals-bg {
position: fixed;
z-index: 999;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(255, 255, 255, 0.8);
display: none;
}
.modals {
position: fixed;
z-index: 100;
width: 60%;
height: 500px;
background: #172b4d;
left: 20%;
top: 15%;
color: #fff;
border-radius: 10px;
padding: 20px;
box-sizing: border-box;
-moz-box-sizing: border-box;
/* Firefox */
-webkit-box-sizing: border-box;
/* Safari */
}
.modals h2 {
color: #fff;
background: transparent;
padding: 0 !important;
}
.modals h3 {
font-size: 14px;
color: #f5365c !important;
background: transparent;
margin: 0 0 1em 0;
padding: 0 0 0.5em 0;
}
#log_content3 {
border: 0;
width: 99%;
height: calc(100% - 4rem);
font-family: 'Lucida Console';
font-size: 11px;
background: transparent;
color: #FFFFFF;
outline: none;
padding-left: 3px;
padding-right: 22px;
overflow: hidden
}
.cbi-value-version {
word-wrap: break-word;
font-size: 0.875rem;
line-height: 1.6;
color: #5e72e4;
font-weight: bold;
padding: .7rem;
padding-left: 0;
width: 23rem;
float: left;
text-align: left;
display: table-cell;
}
@media screen and (max-width: 1024px) {
.modals {
position: fixed;
z-index: 100;
width: 80%;
height: 500px;
background: #172b4d;
left: 10%;
top: 15%;
color: #fff;
border-radius: 10px;
padding: 20px;
}
}
@media screen and (max-width: 700px) {
.modals-bg {
position: fixed;
z-index: 100000;
}
.modals {
width: 100%;
height: 100%;
left: 0;
top: 0;
}
}
</style>
<label class="cbi-value-title"><%= translate("Run") %></label>
<div class="cbi-value-field">
<input class="cbi-button cbi-button-reload" id="update_service" type="button" size="0"
value="<%= translate("Save Cookies And Run Service") %>">
</div>
<%+cbi/valuefooter%>
<%+cbi/valueheader%>
<label class="cbi-value-title"><%= translate("Current Script Version") %></label>
<div class="cbi-value-field">
<div class="cbi-value-version">
v<%=self.version%>
</div>
</div>
<%+cbi/valuefooter%>
<%+cbi/valueheader%>
<label class="cbi-value-title"><%= translate("Update Script") %></label>
<div class="cbi-value-field">
<input class="cbi-button cbi-button-reload" id="update_script" type="button" size="0"
value="<%= translate("Check Script Version") %>">
</div>
<%+cbi/valuefooter%>
<script type="text/javascript">
const SAVE_URL = '<%=luci.dispatcher.build_url("admin", "services", "jd-dailybonus","run")%>';
const CHECK_URL = '<%=luci.dispatcher.build_url("admin", "services", "jd-dailybonus","check_update")%>';
const UPDATE_URL = '<%=luci.dispatcher.build_url("admin", "services", "jd-dailybonus","update")%>';
const CHECKING_TEXT = '<%= translate("Checking the New Version ...") %>';
const UPDATING_TEXT = '<%= translate("Updating script,please wait ...") %>';
const NEW_VERSION = '<%= translate("Is currently the latest version") %>';
const UPDATE_TEXT = '<%= translate("There is a new version, click to update") %>';
var needUpdate = false;
var newVersion;
var _responseLen;
var noChange = 0;
var modal = '<div class="modals-bg">' +
'<div class="modals">' +
'<h2><%:Sign in info%></h2>' +
'<h3 style="margin-left:0;"><%:Service is running,Please do not refresh!%></h3>' +
'<textarea cols="63" rows="28" wrap="on" readonly="readonly" id="log_content3" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>' +
'</div>' +
'</div>';
//显示并开始刷新订阅
function update_service() {
$("body").append(modal);
$(".modals-bg").show();
setTimeout("get_realtime_log();", 500);
}
//保存订阅按钮
$("#update_service").click(function () {
prefix_array = $("#cbi-jd-dailybonus-global .cbi-section-node").attr("id").split("-");
prefix = prefix_array[prefix_array.length - 1];
//console.log(prefix);
if ($("[name='cbid.jd-dailybonus." + prefix + ".auto_update']").is(":checked")) {
var auto_update = "1";
var auto_update_time = $("[name='cbid.jd-dailybonus." + prefix + ".auto_update_time']").val();
} else {
var auto_update = "0";
var auto_update_time = "0";
}
if ($("[name='cbid.jd-dailybonus." + prefix + ".auto_run']").is(":checked")) {
var auto_run = "1";
var auto_run_time = $("[name='cbid.jd-dailybonus." + prefix + ".auto_run_time']").val();
} else {
var auto_run = "0";
var auto_run_time = "0";
}
var stop = $("[name='cbid.jd-dailybonus." + prefix + ".stop']").val();
var cookies = $("[name='cbid.jd-dailybonus." + prefix + ".cookie']").val();
var cookies2 = $("[name='cbid.jd-dailybonus." + prefix + ".cookie2']").val();
var failed=($("[name='cbid.jd-dailybonus." + prefix + ".failed']").is(":checked"))?"1":"0";
var serverchan = $("[name='cbid.jd-dailybonus." + prefix + ".serverchan']").val();
var data = {
auto_update: auto_update,
auto_update_time: auto_update_time,
auto_run: auto_run,
auto_run_time: auto_run_time,
cookies: cookies,
cookies2: cookies2,
stop: stop,
serverchan: serverchan,
failed: failed
}
//console.log(data);
$.ajax({
type: "post",
url: SAVE_URL,
dataType: "json",
data: data,
success: function (d) {
if (d.error == 0) {
update_service();
} else {
alert("请填写cookies");
}
}
});
return false;
});
//更新脚本
$("#update_script").click(function () {
if (!needUpdate) {
//获取远端脚本版本
check_version()
} else {
$("#update_script").attr("disabled", true);
$("#update_script").val(UPDATING_TEXT);
//console.log(data);
var data = {
version: $("#update_script").attr("data-version")
}
$.ajax({
type: "post",
url: UPDATE_URL,
dataType: "json",
data: data,
success: function (d) {
if (d.error == 0) {
$("#update_script").val(NEW_VERSION);
$(".cbi-value-version").text("v" + newVersion);
} else {
$("#update_script").attr("disabled", false);
alert("更新错误请重试");
}
}
});
}
return false;
});
function get_realtime_log() {
$.ajax({
url: '/JD_DailyBonus.htm?v=' + parseInt(Math.random() * 100000000),
dataType: 'html',
error: function (xhr) {
setTimeout("get_realtime_log();", 1000);
},
success: function (response) {
var retArea = document.getElementById("log_content3");
if (response.search(" 秒") != -1) {
noChange++;
}
console.log(noChange);
if (noChange > 10) {
window.location.href = '<%=luci.dispatcher.build_url("admin", "services", "jd-dailybonus")%>';
return false;
} else {
setTimeout("get_realtime_log();", 250);
}
retArea.value = response;
retArea.scrollTop = retArea.scrollHeight;
_responseLen = response.length;
},
error: function () {
setTimeout("get_realtime_log();", 500);
}
});
}
function check_version() {
$("#update_script").attr("disabled", true);
$("#update_script").val(CHECKING_TEXT);
$.ajax({
url: CHECK_URL,
dataType: 'json',
error: function (xhr) {
},
success: function (data) {
if(data.new_version == 501){
$("#update_script").attr("disabled", false);
$("#update_script").val("无法获取新版本,请重试!");
}else if (data.new_version > <%= self.version %>) {
$("#update_script").attr("disabled", false);
$("#update_script").val(UPDATE_TEXT + " v" + data.new_version);
$("#update_script").attr("data-version", data.new_version);
newVersion = data.new_version;
needUpdate = true;
} else {
$("#update_script").val(NEW_VERSION + " v" + data.new_version);
}
}
});
}
</script>

View File

@ -0,0 +1,97 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"
msgid "JD-DailyBonus"
msgstr "京东签到服务"
msgid "Enable"
msgstr "启用"
msgid "Disable"
msgstr "停用"
msgid "Log"
msgstr "日志"
msgid "Script"
msgstr "脚本"
msgid "Base Config"
msgstr "基本设置"
msgid "Cookie Tools"
msgstr "Cookie 工具"
msgid "First Cookie"
msgstr "主账号Cookie"
msgid "Second Cookie"
msgstr "第二账号Cookie"
msgid "Click to Install copy cookie tools,And click the jd link below. if you can't install the crx extensions,please download the JDCookie.zip,unzip it,and use load Unpacked extensions to install.link:[chrome://extensions/]"
msgstr "点击上面的按钮安装Cookie工具然后点击下面的京东链接。如果浏览器禁止安装crx扩展请下载第二个 JDCookie.zip解压后在[chrome://extensions/]中使用加载已解压的扩展程序进行安装。 "
msgid "JD Url"
msgstr "京东链接"
msgid "Sign in ,then click JDCookie button.you will copy JD cookies, paste the cookie below."
msgstr "登录后点击JDCookie 扩展工具复制cookie然后粘贴到下面输入框中。"
msgid "Auto Update Script Service"
msgstr "自动更新脚本服务"
msgid "Update time (every day)"
msgstr "更新时间 (每天)"
msgid "Update Script"
msgstr "更新脚本"
msgid "Execute Delay"
msgstr "延迟签到"
msgid "ServerChan SCKEY"
msgstr "Server酱 SCKEY"
msgid "Failed Push"
msgstr "失效时推送"
msgid "Auto Run"
msgstr "自动签到"
msgid "Run"
msgstr "执行"
msgid "Auto Run Script Service"
msgstr "自动签到服务"
msgid "Run time (every day)"
msgstr "签到时间 (每天)"
msgid "Save Cookies And Run Service"
msgstr "保存Cookie并签到"
msgid "Sign in info"
msgstr "签到信息"
msgid "Service is running,Please do not refresh!"
msgstr "服务正在执行中,请勿刷新!"
msgid "Updating script,please wait ..."
msgstr "正在更新脚本,请稍候 ..."
msgid "Is currently the latest version"
msgstr "当前已是最新版本。"
msgid "There is a new version, click to update"
msgstr "有新的版本,请点击更新"
msgid "Checking the New Version ..."
msgstr "正在检查是否存在新的版本 ..."
msgid "Check Script Version"
msgstr "手动检查脚本更新"
msgid "Current Script Version"
msgstr "当前脚本版本"

View File

@ -0,0 +1,120 @@
########################################################
#
# RELEASE NOTES
#
########################################################
########################################################
//
// 0.8 2020-07-15
//
//
########################################################
Updates
- NEW: 增加了使用Server酱推送签到结果到微信的功能。
- NEW: 增加了仅当cookie失效时进行微信推送的功能。
- NEW: 增加了一个自定义延迟签到的选项,能够避免并发签到带来的负面影响。
- UPDATE: 修正了在不勾选自动签到或者自动更新选项时点击保存Cookie并签到无法执行的问题。
- UPDATE: 代码精简与优化。
########################################################
//
// 0.7.8 2020-07-13
//
//
########################################################
Updates
- UPDATE: 修改了签到时间策略将原来的固定时间修改为设定时间后的180秒间随机执行感谢kid424 提供方案)。
########################################################
//
// 0.7.7 2020-07-10
// 大幅修改,建议卸载后重新安装
//
########################################################
Updates
- UPDATE: 对整个插件进行了重构cookie更新机制做了修改。
- UPDATE: 增加新的栏目可以自行编辑脚本的cookie。
- UPDATE: 增加每天定时开关,可从脚本作者源更新脚本。
- UPDATE: 将当前的打开插件自动检测版本,修改为手动检查,检查到新版本可点击更新。
########################################################
//
// 0.7.5 2020-06-25
// 小幅修正
//
########################################################
Updates
- BUGFIX: 使用wget取代curl 现在不需要curl依赖了
- UPDATE: 增加 当前版本显示
########################################################
//
// 0.7.4 2020-06-07
// 小幅修正
//
########################################################
Updates
- BUGFIX: 修正编译依赖
- BUGFIX: 修正弹窗log无法自动关闭的bug
########################################################
//
// 0.7 2020-05-27
// 小幅修正
//
########################################################
Updates
- BUGFIX: 修正部分文字翻译错误
- UPD: 改善log输出方式
- UPD: 不再对脚本检测进行锁定,可以强制更新。
########################################################
//
// 0.6 2020-05-09
// 增加脚本在线版本检测和更新功能
//
########################################################
Updates
- UPD: 增加脚本在线版本检测和更新功能
########################################################
//
// 0.5 2020-05-06
// bug修复
//
########################################################
Updates
- UPD: 增加了一个cookie工具zip包如果crx安装不上可以解压zip包内容加载已解压的扩展包。
- UPD: 增加了第二个账号的cookie可以实现双签到
- UPD: 修复部分文字解释
########################################################==
//
// END RELEASE NOTES
//
########################################################==

View File

@ -0,0 +1,8 @@
config global
option version '1.27'
option auto_run_time '1'
option auto_run '1'
option auto_update_time '1'
option auto_update '1'
option stop '0'
option failed '0'

View File

@ -0,0 +1,33 @@
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2020 Jerryk
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
USE_PROCD=1
START=25
NAME=jd-dailybonus
CRON_FILE=/etc/crontabs/root
JD_SCRIPT=/usr/share/jd-dailybonus/JD_DailyBonus.js
del_cron() {
sed -i '/jd-dailybonus/d' $CRON_FILE
/etc/init.d/cron restart
}
start_service(){
/usr/share/jd-dailybonus/newapp.sh -s
}
stop_service() {
del_cron
}
service_triggers() {
procd_add_reload_trigger "jd-dailybonus"
}

View File

@ -0,0 +1,11 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@jd-dailybonus[-1]
add ucitrack jd-dailybonus
set ucitrack.@jd-dailybonus[-1].init=jd-dailybonus
commit ucitrack
EOF
rm -f /tmp/luci-indexcache
exit 0

View File

@ -0,0 +1,178 @@
#!/bin/sh
#
# Copyright (C) 2020 luci-app-jd-dailybonus <jerrykuku@qq.com>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
# 501 下载脚本出错
# 101 没有新版本无需更新
# 0 更新成功
NAME=jd-dailybonus
REMOTE_SCRIPT=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js
TEMP_SCRIPT=/tmp/JD_DailyBonus.js
JD_SCRIPT=/usr/share/jd-dailybonus/JD_DailyBonus.js
LOG_HTM=/www/JD_DailyBonus.htm
CRON_FILE=/etc/crontabs/root
usage() {
cat <<-EOF
Usage: app.sh [options]
Valid options are:
-a Add Cron
-n Check
-r Run Script
-u Update Script From Server
-s Save Cookie And Add Cron
-w Background Run With Wechat Message
-h Help
EOF
exit $1
}
# Common functions
uci_get_by_name() {
local ret=$(uci get $NAME.$1.$2 2>/dev/null)
echo ${ret:=$3}
}
uci_get_by_type() {
local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)
echo ${ret:=$3}
}
cancel() {
if [ $# -gt 0 ]; then
echo "$1"
fi
exit 1
}
fill_cookie() {
cookie1=$(uci_get_by_type global cookie)
if [ ! "$cookie1" = "" ]; then
varb="var Key = '$cookie1';"
sed -i "s/^var Key =.*/$varb/g" $JD_SCRIPT
fi
cookie2=$(uci_get_by_type global cookie2)
if [ ! "$cookie2" = "" ]; then
varb2="var DualKey = '$cookie2';"
sed -i "s/^var DualKey =.*/$varb2/g" $JD_SCRIPT
fi
stop=$(uci_get_by_type global stop)
if [ ! "$stop" = "" ]; then
varb3="var stop = $stop;"
sed -i "s/^var stop =.*/$varb3/g" $JD_SCRIPT
fi
}
remote_ver=$(cat $TEMP_SCRIPT | sed -n '/更新时间/p' | awk '{print $NF}' | sed 's/v//')
local_ver=$(uci_get_by_type global version)
add_cron() {
sed -i '/jd-dailybonus/d' $CRON_FILE
[ $(uci_get_by_type global auto_run 0) -eq 1 ] && echo '5 '$(uci_get_by_type global auto_run_time)' * * * /bin/bash -c "sleep $[RANDOM % 180]s"; /usr/share/jd-dailybonus/newapp.sh -w' >>$CRON_FILE
[ $(uci_get_by_type global auto_update 0) -eq 1 ] && echo '1 '$(uci_get_by_type global auto_update_time)' * * * /usr/share/jd-dailybonus/newapp.sh -u' >>$CRON_FILE
crontab $CRON_FILE
}
# Run Script
serverchan() {
sckey=$(uci_get_by_type global serverchan)
failed=$(uci_get_by_type global failed)
desc=$(cat /www/JD_DailyBonus.htm | sed 's/$/&\n/g' | sed -e '/左滑/d')
if [ $failed -eq 1 ]; then
grep "Cookie失效" /www/JD_DailyBonus.htm > /dev/null
if [ $? -eq 0 ]; then
title="$(date '+%Y年%m月%d日') 京东签到 Cookie 失效"
wget-ssl -q --post-data="text=$title~&desp=$desc" https://sc.ftqq.com/$sckey.send
fi
else
title="$(date '+%Y年%m月%d日') 京东签到"
wget-ssl -q --post-data="text=$title~&desp=$desc" https://sc.ftqq.com/$sckey.send
fi
}
run() {
fill_cookie
echo -e $(date '+%Y-%m-%d %H:%M:%S %A') >$LOG_HTM 2>/dev/null
nohup node $JD_SCRIPT >>$LOG_HTM 2>/dev/null &
}
back_run() {
fill_cookie
echo -e $(date '+%Y-%m-%d %H:%M:%S %A') >$LOG_HTM 2>/dev/null
node $JD_SCRIPT >>$LOG_HTM 2>/dev/null
serverchan
}
save() {
fill_cookie
add_cron
}
# Update Script From Server
check_ver() {
wget-ssl --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36" --no-check-certificate -t 3 -T 10 -q $REMOTE_SCRIPT -O $TEMP_SCRIPT
if [ $? -ne 0 ]; then
cancel "501"
else
echo $remote_ver
fi
}
update() {
wget-ssl --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36" --no-check-certificate -t 3 -T 10 -q $REMOTE_SCRIPT -O $TEMP_SCRIPT
if [ $? -ne 0 ]; then
cancel "501"
fi
if [ $(echo "$local_ver < $remote_ver" | bc) -eq 1 ]; then
cp -r $TEMP_SCRIPT $JD_SCRIPT
fill_cookie
uci set jd-dailybonus.@global[0].version=$remote_ver
uci commit jd-dailybonus
cancel "0"
else
cancel "101"
fi
}
while getopts ":anruswh" arg; do
case "$arg" in
a)
add_cron
exit 0
;;
n)
check_ver
exit 0
;;
r)
run
exit 0
;;
u)
update
exit 0
;;
s)
save
exit 0
;;
w)
back_run
exit 0
;;
h)
usage 0
;;
esac
done

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-openclash
PKG_VERSION:=0.39.2
PKG_VERSION:=0.39.3
PKG_RELEASE:=beta
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
@ -99,8 +99,8 @@ if [ -f "/tmp/openclash.bak" ]; then
mv "/tmp/openclash_custom_hosts.list.bak" "/etc/openclash/custom/openclash_custom_hosts.list" >/dev/null 2>&1
mv "/tmp/openclash_custom_fake_filter.list.bak" "/etc/openclash/custom/openclash_custom_fake_filter.list" >/dev/null 2>&1
if [ -d "/tmp/openclash_history/" ]; then
rm -rf "/etc/openclash/history" >/dev/null 2>&1
mv "/tmp/openclash_history" "/etc/openclash/history" >/dev/null 2>&1
cp -a "/tmp/openclash_history/." "/etc/openclash/history" >/dev/null 2>&1
rm -rf "/tmp/openclash_history" >/dev/null 2>&1
fi
fi
if [ -f "/tmp/config.yaml" ]; then

View File

@ -50,39 +50,46 @@ del_cron()
}
change_dns() {
if [ "$1" -ne "0" ]; then
if [ "$1" -eq "1" ]; then
uci del dhcp.@dnsmasq[-1].server >/dev/null 2>&1
uci add_list dhcp.@dnsmasq[0].server=127.0.0.1#"$dns_port"
uci delete dhcp.@dnsmasq[0].resolvfile
uci set dhcp.@dnsmasq[0].noresolv=1
uci delete dhcp.@dnsmasq[0].resolvfile 2>/dev/null
uci set dhcp.@dnsmasq[0].noresolv=1 2>/dev/null
uci set openclash.config.redirect_dns=1
else
uci delete openclash.config.redirect_dns
uci delete openclash.config.redirect_dns 2>/dev/null
fi
if [ "$2" -eq "1" ]; then
uci set dhcp.@dnsmasq[0].cachesize=0
uci set openclash.config.masq_cache=1
else
uci delete openclash.config.masq_cache
uci set dhcp.@dnsmasq[0].cachesize=0 2>/dev/null
fi
uci commit dhcp
uci commit openclash
}
revert_dns() {
uci del_list dhcp.@dnsmasq[0].server=127.0.0.1#"$3" >/dev/null 2>&1
[ "$1" = "1" ] && {
if [ -s "/tmp/resolv.conf.d/resolv.conf.auto" ]; then
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto >/dev/null 2>&1
elif [ -s "/tmp/resolv.conf.auto" ]; then
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto >/dev/null 2>&1
[ "$1" -eq "0" ] && {
if [ "$(uci get openclash.config.dns_revert 2>/dev/null)" != "1" ]; then
uci del_list dhcp.@dnsmasq[0].server=127.0.0.1#"$3" >/dev/null 2>&1
if [ -s "/tmp/resolv.conf.d/resolv.conf.auto" ]; then
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto >/dev/null 2>&1
elif [ -s "/tmp/resolv.conf.auto" ]; then
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto >/dev/null 2>&1
fi
uci set dhcp.@dnsmasq[0].noresolv=0 >/dev/null 2>&1
uci set openclash.config.dns_revert=1 2>/dev/null
fi
uci set dhcp.@dnsmasq[0].noresolv=0 >/dev/null 2>&1
}
[ "$2" = "1" ] && {
[ "$1" -eq "1" ] && {
uci del_list dhcp.@dnsmasq[0].server=127.0.0.1#"$3" >/dev/null 2>&1
uci set openclash.config.dns_revert=0 2>/dev/null
}
[ "$(uci get dhcp.@dnsmasq[0].cachesize 2>/dev/null)" -eq "0" ] && {
uci delete dhcp.@dnsmasq[0].cachesize >/dev/null 2>&1
}
} 2>/dev/null
uci commit dhcp
uci commit openclash
rm -rf /tmp/dnsmasq.d/dnsmasq_openclash.conf >/dev/null 2>&1
}
@ -915,6 +922,24 @@ lan_ac()
}
firewall_redirect_exclude()
{
local section="$1"
local src_dport
config_get "src_dport" "$section" "src_dport" ""
if [ -z "$src_dport" ]; then
return
fi
if [ -z "$en_mode_tun" ]; then
iptables -t mangle -A openclash -p udp --dport "$src_dport" -j RETURN >/dev/null 2>&1
else
iptables -t mangle -A openclash -p tcp --dport "$src_dport" -j RETURN >/dev/null 2>&1
iptables -t mangle -A openclash -p udp --dport "$src_dport" -j RETURN >/dev/null 2>&1
fi
}
#配置文件选择
config_choose()
{
@ -998,7 +1023,7 @@ do_run_core()
core_type="Game"
fi
if [ "$proxy_mode" = "Script" ] || [ "$rule_source" = "ConnersHua_provider" ]; then
if [ "$proxy_mode" = "Script" ] || [ "$rule_source" = "ConnersHua" ]; then
ln -s /etc/openclash/core/clash_tun /etc/openclash/clash 2>/dev/null
core_type="Tun"
fi
@ -1103,6 +1128,10 @@ if [ -z "$en_mode_tun" ]; then
iptables -t mangle -A openclash -m set --match-set localnetwork dst -j RETURN
iptables -t mangle -A openclash -m set --match-set lan_ac_black_ips src -j RETURN >/dev/null 2>&1
iptables -t mangle -A openclash -m set ! --match-set lan_ac_white_ips src -j RETURN >/dev/null 2>&1
iptables -t mangle -A openclash -p udp --dport 53 -j RETURN >/dev/null 2>&1
#端口转发
config_load "firewall"
config_foreach firewall_redirect_exclude "redirect"
iptables -t mangle -A openclash -p udp -j TPROXY --on-port "$proxy_port" --on-ip 0.0.0.0 --tproxy-mark "$PROXY_FWMARK"
iptables -t mangle -A PREROUTING -p udp -j openclash
fi
@ -1158,17 +1187,25 @@ else
fi
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
#设置防火墙
iptables -t mangle -N openclash_output
iptables -t mangle -F openclash_output
iptables -t mangle -A openclash_output -m set --match-set localnetwork dst -j RETURN
if [ "$en_mode" = "fake-ip" ]; then
iptables -t mangle -A openclash_output -d 198.18.0.0/16 -j MARK --set-mark "$PROXY_FWMARK"
fi
iptables -t mangle -I OUTPUT -j openclash_output
iptables -t mangle -N openclash
iptables -t mangle -F openclash
iptables -t mangle -A openclash -m set --match-set localnetwork dst -j RETURN
if [ "$en_mode" = "fake-ip" ]; then
iptables -t mangle -A openclash -d 198.18.0.0/16 -j MARK --set-mark "$PROXY_FWMARK"
fi
iptables -t mangle -I OUTPUT -j openclash
iptables -t mangle -I PREROUTING -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK"
iptables -t mangle -I PREROUTING -m set --match-set lan_ac_black_ips src -j RETURN >/dev/null 2>&1
iptables -t mangle -I PREROUTING -m set ! --match-set lan_ac_white_ips src -j RETURN >/dev/null 2>&1
#端口转发
config_load "firewall"
config_foreach firewall_redirect_exclude "redirect"
#其他流量
iptables -t mangle -A openclash -m set --match-set lan_ac_black_ips src -j RETURN >/dev/null 2>&1
iptables -t mangle -A openclash -m set ! --match-set lan_ac_white_ips src -j RETURN >/dev/null 2>&1
iptables -t mangle -A openclash -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK"
iptables -t mangle -I PREROUTING -j openclash
iptables -t nat -I PREROUTING -p tcp --dport 53 -j ACCEPT
#ipv6
# if [ "$ipv6_enable" -eq 1 ]; then
# ip6tables -t mangle -I PREROUTING -j MARK --set-mark "$PROXY_FWMARK"
@ -1232,12 +1269,12 @@ revert_firewall()
ip link set dev clash0 down >/dev/null 2>&1
ip tuntap del clash0 mode tun >/dev/null 2>&1
iptables -t mangle -D OUTPUT -j openclash >/dev/null 2>&1
iptables -t mangle -D PREROUTING -m set --match-set lan_ac_black_ips src -j RETURN >/dev/null 2>&1
iptables -t mangle -D PREROUTING -m set ! --match-set lan_ac_white_ips src -j RETURN >/dev/null 2>&1
iptables -t mangle -D PREROUTING -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK" >/dev/null 2>&1
iptables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t mangle -D PREROUTING -j openclash
iptables -t mangle -F openclash >/dev/null 2>&1
iptables -t mangle -X openclash >/dev/null 2>&1
iptables -t mangle -F openclash_output >/dev/null 2>&1
iptables -t mangle -X openclash_output >/dev/null 2>&1
#ip6tables -t mangle -D PREROUTING -j MARK --set-mark "$PROXY_FWMARK" >/dev/null 2>&1
@ -1311,8 +1348,8 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then
yml_auth_custom "$CONFIG_FILE"
yml_cut "$CHANGE_FILE" "$RULE_FILE" "$DNS_FILE" "$CONFIG_FILE" "$PROXY_FILE" "$PROXY_PROVIDER_FILE" "$GROUP_FILE"
yml_dns_custom "$enable_custom_dns" "$DNS_FILE"
sh /usr/share/openclash/yml_change.sh >/dev/null 2>&1 "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CHANGE_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" "$log_level" "$proxy_mode" "$intranet_allowed" "$en_mode_tun" "$stack_type" &
sh /usr/share/openclash/yml_rules_change.sh >/dev/null 2>&1 "$LOGTIME" "$rule_source" "$enable_custom_clash_rules" "$RULE_FILE" "$set_rule_file" "$en_mode" "$enable_rule_proxy" "$BACKUP_FILE" "$RULE_PROVIDER_FILE" &
/usr/share/openclash/yml_change.sh >/dev/null 2>&1 "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CHANGE_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" "$log_level" "$proxy_mode" "$intranet_allowed" "$en_mode_tun" "$stack_type" &
/usr/share/openclash/yml_rules_change.sh >/dev/null 2>&1 "$LOGTIME" "$rule_source" "$enable_custom_clash_rules" "$RULE_FILE" "$set_rule_file" "$en_mode" "$enable_rule_proxy" "$BACKUP_FILE" "$RULE_PROVIDER_FILE" &
wait
yml_provider_path "$PROXY_PROVIDER_FILE" "proxy_provider"
yml_provider_path "$RULE_PROVIDER_FILE" "rule_provider"

View File

@ -1,97 +0,0 @@
rule-providers:
# name: # Provider 名称
# type: http # http 或 file
# behavior: classical # 或 ipcidr、domain
# path: # 文件路径
# url: # 只有当类型为 HTTP 时才可用,您不需要在本地空间中创建新文件。
# interval: # 自动更新间隔,仅在类型为 HTTP 时可用
Unbreak:
type: http
behavior: classical
path: ./RuleSet/Unbreak.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Unbreak.yaml
interval: 86400
Streaming:
type: http
behavior: classical
path: ./RuleSet/StreamingMedia/Streaming.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Streaming.yaml
interval: 86400
StreamingSE:
type: http
behavior: classical
path: ./RuleSet/StreamingMedia/StreamingSE.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/StreamingSE.yaml
interval: 86400
Global:
type: http
behavior: classical
path: ./RuleSet/Global.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Global.yaml
interval: 86400
China:
type: http
behavior: classical
path: ./RuleSet/China.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/China.yaml
interval: 86400
IP-Blackhole:
type: http
behavior: ipcidr
path: ./RuleSet/Extra/IP-Blackhole.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Extra/IP-Blackhole.yaml
interval: 86400
ChinaIP:
type: http
behavior: ipcidr
path: ./RuleSet/Extra/ChinaIP.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Extra/ChinaIP.yaml
interval: 86400
# 规则
rules:
##source:ConnersHua_provider
# Unbreak
- RULE-SET,Unbreak,DIRECT
# Global Area Network
# (Streaming Media)
- RULE-SET,Streaming,Streaming
# (StreamingSE)
- RULE-SET,StreamingSE,StreamingSE
# (DNS Cache Pollution) / (IP Blackhole) / (Region-Restricted Access Denied) / (Network Jitter)
- RULE-SET,Global,PROXY
# China Area Network
- RULE-SET,China,DIRECT
# Local Area Network
- IP-CIDR,192.168.0.0/16,DIRECT
- IP-CIDR,10.0.0.0/8,DIRECT
- IP-CIDR,172.16.0.0/12,DIRECT
- IP-CIDR,127.0.0.0/8,DIRECT
- IP-CIDR,100.64.0.0/10,DIRECT
- IP-CIDR,224.0.0.0/4,DIRECT
# IP Blackhole
- RULE-SET,IP-Blackhole,PROXY
# Tencent
- IP-CIDR,119.28.28.28/32,DIRECT
- IP-CIDR,182.254.116.0/24,DIRECT
# 使用来自 ipipdotnet 的 ChinaIP 以解决数据不准确的问题,使用 ChinaIP.yaml 时禁用「GEOIP,CN」规则
# - RULE-SET,ChinaIP,DIRECT
# GeoIP China
- GEOIP,CN,DIRECT
- MATCH,MATCH

View File

@ -18,8 +18,8 @@ allow-lan: true # 此项将被接管为true
# "[aaaa::a8aa:ff:fe09:57d8]": bind a single IPv6 address
bind-address: "*" # HTTP(S)\SOCKS5 监听地址此项将被接管为all
# Rule / Global/ Direct (default is Rule)
mode: Rule # 此项将被接管
# rule / global / direct (default is rule)
mode: rule # 此项将被接管
# set log level to stdout (default is info)
# info / warning / error / debug / silent
@ -35,10 +35,6 @@ external-ui: "/usr/share/openclash/dashboard" # 此项将被接管
# Secret for RESTful API (Optional)
secret: '123456' # 此项将被接管
# experimental feature
experimental:
ignore-resolve-fail: true # ignore dns resolve fail, default value is true
# authentication of local SOCKS5/HTTP(S) server
authentication: # 此项将被接管
- "user1:pass1"
@ -283,7 +279,7 @@ proxy-groups: # 此参数必须保留,不能删除
#rule-providers:
# name: # name of the provider
# type: http # type of the provider, it can be a HTTP or a File
# behavior: ipcidr # or domain
# behavior: classical # or ipcidr、domain
# path: # where is the file, ./ relative to clash home
# url: # only available when type is HTTP, where to download a file. You don't need to create a new file in local space.
# interval: # auto-update interval, only available when type is HTTP
@ -316,6 +312,4 @@ rules: # 此参数必须保留,不能删除
- SRC-PORT,7777,DIRECT
# or use rule with provider
- RULE-SET,name,Proxy
# FINAL would remove after prerelease
# you also can use `FINAL,Proxy` or `FINAL,,Proxy` now
- MATCH,auto

File diff suppressed because one or more lines are too long

View File

@ -1,46 +0,0 @@
payload:
# IP Blackhole
# > Facebook
- '31.13.24.0/21'
- '31.13.64.0/18'
- '45.64.40.0/22'
- '66.220.144.0/20'
- '69.63.176.0/20'
- '69.171.224.0/19'
- '74.119.76.0/22'
- '103.4.96.0/22'
- '129.134.0.0/17'
- '157.240.0.0/17'
- '173.252.64.0/19'
- '173.252.96.0/19'
- '179.60.192.0/22'
- '185.60.216.0/22'
- '204.15.20.0/22'
# > Google
- '35.190.247.0/24'
- '64.233.160.0/19'
- '66.102.0.0/20'
- '66.249.80.0/20'
- '72.14.192.0/18'
- '74.125.0.0/16'
- '108.177.8.0/21'
- '172.217.0.0/16'
- '173.194.0.0/16'
- '209.85.128.0/17'
- '216.58.192.0/19'
- '216.239.32.0/19'
# > Twitter
- '69.195.160.0/19'
- '104.244.42.0/21'
- '192.133.76.0/22'
- '199.16.156.0/22'
- '199.59.148.0/22'
- '199.96.56.0/21'
- '202.160.128.0/22'
- '209.237.192.0/19'
# > Wikimedia
- '91.198.174.0/24'
- '103.102.166.0/24'
- '185.15.56.0/22'
- '198.35.26.0/23'
- '208.80.152.0/22'

View File

@ -25,8 +25,7 @@ o = s:option(ListValue, "rule_sources", translate("Choose Template For Create Co
o.description = translate("Use Other Rules To Create Config")
o:depends("create_config", 1)
o:value("lhie1", translate("lhie1 Rules"))
o:value("ConnersHua", translate("ConnersHua Rules"))
o:value("ConnersHua_provider", translate("ConnersHua(Provider-type) Rules"))
o:value("ConnersHua", translate("ConnersHua(Provider-type) Rules"))
o:value("ConnersHua_return", translate("ConnersHua Return Rules"))
o = s:option(ListValue, "servers_update", translate("Keep Settings"))

View File

@ -75,11 +75,11 @@ o.default = "system"
o = s:taboption("op_mode", ListValue, "proxy_mode", font_red..bold_on..translate("Proxy Mode")..bold_off..font_off)
o.description = translate("Select Proxy Mode")
o:value("Rule", translate("Rule Proxy Mode"))
o:value("Global", translate("Global Proxy Mode"))
o:value("Direct", translate("Direct Proxy Mode"))
o:value("Script", translate("Script Proxy Mode (Tun Core Only)"))
o.default = "Rule"
o:value("rule", translate("Rule Proxy Mode"))
o:value("global", translate("Global Proxy Mode"))
o:value("direct", translate("Direct Proxy Mode"))
o:value("script", translate("Script Proxy Mode (Tun Core Only)"))
o.default = "rule"
o = s:taboption("op_mode", Button, translate("Switch Operation Mode"))
o.title = translate("Switch Operation Mode")
@ -256,8 +256,7 @@ o = s:taboption("rules", ListValue, "rule_source", translate("Enable Other Rules
o.description = translate("Use Other Rules")
o:value("0", translate("Disable Other Rules"))
o:value("lhie1", translate("lhie1 Rules"))
o:value("ConnersHua", translate("ConnersHua Rules"))
o:value("ConnersHua_provider", translate("ConnersHua(Provider-type) Rules"))
o:value("ConnersHua", translate("ConnersHua(Provider-type) Rules"))
o:value("ConnersHua_return", translate("ConnersHua Return Rules"))
if not fs.isfile("/tmp/Proxy_Group") then
@ -268,7 +267,6 @@ file = io.open("/tmp/Proxy_Group", "r");
o = s:taboption("rules", ListValue, "GlobalTV", translate("GlobalTV"))
o:depends("rule_source", "lhie1")
o:depends("rule_source", "ConnersHua")
o:depends("rule_source", "ConnersHua_provider")
for l in file:lines() do
o:value(l)
end
@ -276,7 +274,6 @@ o:depends("rule_source", "ConnersHua_provider")
o = s:taboption("rules", ListValue, "AsianTV", translate("AsianTV"))
o:depends("rule_source", "lhie1")
o:depends("rule_source", "ConnersHua")
o:depends("rule_source", "ConnersHua_provider")
for l in file:lines() do
o:value(l)
end
@ -284,7 +281,6 @@ o:depends("rule_source", "ConnersHua_provider")
o = s:taboption("rules", ListValue, "Proxy", translate("Proxy"))
o:depends("rule_source", "lhie1")
o:depends("rule_source", "ConnersHua")
o:depends("rule_source", "ConnersHua_provider")
o:depends("rule_source", "ConnersHua_return")
for l in file:lines() do
o:value(l)
@ -346,7 +342,6 @@ o:depends("rule_source", "lhie1")
file:seek("set")
o = s:taboption("rules", ListValue, "AdBlock", translate("AdBlock"))
o:depends("rule_source", "lhie1")
--o:depends("rule_source", "ConnersHua_provider")
for l in file:lines() do
o:value(l)
end
@ -354,7 +349,6 @@ o:depends("rule_source", "lhie1")
o = s:taboption("rules", ListValue, "Domestic", translate("Domestic"))
o:depends("rule_source", "lhie1")
o:depends("rule_source", "ConnersHua")
o:depends("rule_source", "ConnersHua_provider")
for l in file:lines() do
o:value(l)
end
@ -362,7 +356,6 @@ o:depends("rule_source", "ConnersHua_provider")
o = s:taboption("rules", ListValue, "Others", translate("Others"))
o:depends("rule_source", "lhie1")
o:depends("rule_source", "ConnersHua")
o:depends("rule_source", "ConnersHua_provider")
o:depends("rule_source", "ConnersHua_return")
o.description = translate("Choose Proxy Group, Base On Your Servers Group in config.yaml")
for l in file:lines() do

View File

@ -1 +1 @@
<!doctype html><html lang="en" dir="ltr"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel="icon" type="image/x-icon" href="https://cdn.jsdelivr.net/gh/Dreamacro/clash/docs/logo.png"/><title>Clash</title><link href="main.0f871e89a0b8ff683256.css" rel="stylesheet"></head><body><div id="root"></div><script src="js/1.bundle.0f871e89a0b8ff683256.min.js"></script><script src="js/bundle.0f871e89a0b8ff683256.min.js"></script></body></html>
<!doctype html><html lang="en" dir="ltr"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel="icon" type="image/x-icon" href="https://cdn.jsdelivr.net/gh/Dreamacro/clash/docs/logo.png"/><title>Clash</title><link href="main.10742ccbbcb6e6c7018f.css" rel="stylesheet"></head><body><div id="root"></div><script src="js/1.bundle.10742ccbbcb6e6c7018f.min.js"></script><script src="js/bundle.10742ccbbcb6e6c7018f.min.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -23,6 +23,6 @@
.rule-provider{position:relative;display:flex;flex-direction:column;font-size:16px;padding:20px;color:#546b87}.rule-provider-header{display:flex;align-items:center;justify-content:space-between}.rule-provider-header-part{display:flex;align-items:center}.rule-provider-name{width:120px;margin-right:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rule-provider-behavior{width:80px;margin:0 20px 0 12px;background-color:#2c8af8;color:#fff}.rule-provider-spinner{transform:scale(0.4)}.rule-provider-proxies{list-style:none}.rule-provider-item{box-shadow:0 0 24px 0 rgba(44,138,248,.2)}.rule-provider-item:hover{box-shadow:0 0 24px 0 rgba(84,117,154,.4)}.rule-provider-update{line-height:14px;font-size:14px}.rule-provider-icon{display:block;margin-left:20px;cursor:pointer}.rule-provider-icon.rule-provider-loading::before{color:#909399;cursor:not-allowed;-webkit-animation:spinner 2s infinite linear;animation:spinner 2s infinite linear}@media(max-width: 768px){.rule-provider-header{flex-direction:column;align-items:flex-start}.rule-provider-header-part{margin:6px 0}}
.rules-card{display:flex;flex-direction:column;flex:1;min-height:700px;margin-top:10px;padding:0}.rules-card:focus{outline:none}.rules-card .rules{flex:1 0 auto}.rule-item{line-height:30px;padding:5px 0;height:50px;overflow:hidden;list-style:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid rgba(228,234,239,.5)}.rule-item .rule-item-row{padding:5px 0}.rule-item .drag-handler{cursor:row-resize;margin:0 10px;display:flex;justify-content:center}.rule-item .drag-handler>i{font-weight:bold;color:#b7c5d6}.rule-item .rule-type{font-size:14px;color:#54759a}.rule-item .rule-type>i{margin-left:5px;color:#54759a}.rule-item .payload{font-size:14px;color:#54759a;cursor:pointer}.rule-item .rule-proxy{font-size:14px;color:#54759a}.rule-item .delete-btn{opacity:0;transition:all 300ms ease}.rule-item .delete-btn span{font-size:14px;color:#f56c6c;cursor:pointer}.rule-item:last-child{border-bottom:none}.rule-item:hover .delete-btn{opacity:1}.rule-proxy-option{display:flex;align-items:center;overflow:hidden}.rule-proxy-option .label{margin-right:5px;height:20px;line-height:20px;padding:0 8px;font-size:10px;border-radius:10px;color:#fff;background:#b7c5d6}.rule-proxy-option .value{line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-card{margin-top:10px;padding:20px 0}.settings-card .column{font-weight:bold;align-items:center}.settings-card .value-column{justify-content:flex-end}.settings-card .label{font-size:14px;color:#54759a}.settings-card .external-controller{font-size:14px;color:#54759a;display:flex;justify-content:flex-end;font-weight:normal;line-height:17px}.settings-card .external-controller .modify-btn{color:#2c8af8;cursor:pointer}.clash-version{position:relative;margin-top:10px;padding:20px 45px;display:flex}.clash-version .check-icon{width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg, #57befc, #2c8af8);display:flex;justify-content:center;align-items:center}.clash-version .check-icon>i{transform:scale(0.5);color:#fff;font-weight:bold}.clash-version .version-info{margin-left:10px;font-size:14px;line-height:24px;color:#54759a}.clash-version .check-update-btn{position:absolute;right:45px;font-size:14px;line-height:24px;color:#b7c5d6;cursor:pointer;transition:all 150ms ease}.clash-version .check-update-btn:hover{color:#54759a}@media(max-width: 768px){.settings-card .row{flex-direction:column;padding-top:0;padding-bottom:0}.settings-card .row>.column{width:100%;margin:10px 0}}
.sidebar{position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:160px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sidebar-logo{margin-top:50px;width:60px;height:60px}.sidebar-menu{display:flex;flex-direction:column;flex:1;margin-top:12px}.sidebar-menu .item{display:block;margin-top:18px}.sidebar-menu .item>a{display:block;width:120px;height:36px;line-height:36px;font-size:14px;border-radius:18px;text-align:center}.sidebar-menu .item>a,.sidebar-menu .item a:active,.sidebar-menu .item a:visited{color:#909399;text-decoration:none}.sidebar-menu .item>a.active{background:linear-gradient(135deg, #57befc, #2c8af8);color:#fff;box-shadow:0 2px 8px rgba(44,138,248,.5)}.sidebar-version{display:flex;flex-direction:column;align-items:center;padding-bottom:20px}.sidebar-version-label{font-size:14px;color:#2c8af8;text-shadow:0 2px 6px rgba(44,138,248,.4)}.sidebar-version-text{text-align:center;font-size:14px;margin:8px 0;color:#54759a}@media(max-width: 768px){.sidebar{width:100%;height:60px;flex-direction:row;background:#f4f5f6;z-index:10}.sidebar-logo{margin:0 15px;width:36px;height:36px}.sidebar-menu{flex:1;flex-direction:row;justify-content:center;margin-top:0;overflow-x:scroll;padding:10px}.sidebar-menu::-webkit-scrollbar{display:none}.sidebar-menu .item{margin:0 3px}.sidebar-menu .item>a{width:80px;height:32px;line-height:32px}.sidebar-menu .item.no-mobile{display:none}.sidebar-version{display:none}}
.sidebar{position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:160px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sidebar-logo{margin-top:50px;width:60px;height:60px}.sidebar-menu{display:flex;flex-direction:column;flex:1;margin-top:12px}.sidebar-menu .item{display:block;margin-top:18px}.sidebar-menu .item>a{display:block;width:120px;height:36px;line-height:36px;font-size:14px;border-radius:18px;text-align:center}.sidebar-menu .item>a,.sidebar-menu .item a:active,.sidebar-menu .item a:visited{color:#909399;text-decoration:none}.sidebar-menu .item>a.active{background:linear-gradient(135deg, #57befc, #2c8af8);color:#fff;box-shadow:0 2px 8px rgba(44,138,248,.5)}.sidebar-version{display:flex;flex-direction:column;align-items:center;padding-bottom:20px}.sidebar-version-label{font-size:14px;color:#2c8af8;text-shadow:0 2px 6px rgba(44,138,248,.4)}.sidebar-version-text{text-align:center;font-size:14px;margin:8px 0;padding:0 10px;color:#54759a}@media(max-width: 768px){.sidebar{width:100%;height:60px;flex-direction:row;background:#f4f5f6;z-index:10}.sidebar-logo{margin:0 15px;width:36px;height:36px}.sidebar-menu{flex:1;flex-direction:row;justify-content:center;margin-top:0;overflow-x:scroll;padding:10px}.sidebar-menu::-webkit-scrollbar{display:none}.sidebar-menu .item{margin:0 3px}.sidebar-menu .item>a{width:80px;height:32px;line-height:32px}.sidebar-menu .item.no-mobile{display:none}.sidebar-version{display:none}}
.connections-card{display:flex;flex-direction:column;flex:1;margin-top:10px;padding:0;overflow:hidden}.connections-card .connections{display:flex;flex-direction:column;width:100%;flex-grow:1;flex-basis:0;overflow:auto}.connections-card .connections-body{flex:1 0 auto}.connections-card .connections-th{position:relative;text-align:center;color:#909399;background:#f3f6f9;height:30px;line-height:30px;font-weight:500;font-size:14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.connections-card .connections-resizer{position:absolute;opacity:0;right:-10px;top:8px;bottom:8px;width:20px;transition:opacity .3s ease;z-index:10;font-size:14px;font-weight:300}.connections-card .connections-resizer::before{content:"";display:block;position:absolute;left:10px;transform:translateX(-2px);width:2px;height:100%;background-color:rgba(144,147,153,.6)}.connections-card .connections-header{position:-webkit-sticky;position:sticky;top:0;white-space:nowrap}.connections-card .connections-header:hover .connections-resizer{opacity:1}.connections-card .connetions-item{height:36px}.connections-card .connections-block{display:flex;align-items:center;font-size:14px;line-height:36px;padding:0 10px;color:#54759a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.connections-card .connections-block.center{text-align:center}.connections-card .connections-block.completed{background-color:#e9eef4;color:rgba(84,117,154,.5)}.connections-filter{color:#2c8af8;font-size:14px;line-height:20px;margin-left:15px;text-shadow:0 0 6px rgba(44,138,248,.4);cursor:pointer}.connections-filter.dangerous{color:#f56c6c;text-shadow:0 0 6px rgba(87,190,252,.2)}.connections-filter.total{flex:1;cursor:unset}
.external-controller .row{padding:0}.external-controller .alert{margin:10px 0}.external-controller .title,.external-controller .form{margin:15px 0}.external-controller .title{margin-top:15px;font-size:14px;font-weight:bold}@media(max-width: 768px){.external-controller .row{flex-direction:column;align-items:flex-start}.external-controller .title{margin:5px 0}.external-controller .form{margin:5px 0}.external-controller .column{width:100%}.external-controller .alert{display:none}}

View File

@ -21,20 +21,13 @@
curl -sL --connect-timeout 10 --retry 2 https://raw.githubusercontent.com/lhie1/Rules/master/Clash/Rule.yaml -o /tmp/rules.yaml >/dev/null 2>&1
fi
sed -i '1i rules:' /tmp/rules.yaml
elif [ "$RUlE_SOURCE" = "ConnersHua_provider" ]; then
elif [ "$RUlE_SOURCE" = "ConnersHua" ]; then
if pidof clash >/dev/null; then
curl -sL --connect-timeout 10 --retry 2 -x http://$PROXY_ADDR:$HTTP_PORT -U "$PROXY_AUTH" https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Global.yaml -o /tmp/rules.yaml >/dev/null 2>&1
else
curl -sL --connect-timeout 10 --retry 2 https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/Global.yaml -o /tmp/rules.yaml >/dev/null 2>&1
fi
sed -i -n '/^rule-providers:/,$p' /tmp/rules.yaml 2>/dev/null
elif [ "$RUlE_SOURCE" = "ConnersHua" ]; then
if pidof clash >/dev/null; then
curl -sL --connect-timeout 10 --retry 2 -x http://$PROXY_ADDR:$HTTP_PORT -U "$PROXY_AUTH" https://raw.githubusercontent.com/ConnersHua/Profiles/master/Clash/Global.yaml -o /tmp/rules.yaml >/dev/null 2>&1
else
curl -sL --connect-timeout 10 --retry 2 https://raw.githubusercontent.com/ConnersHua/Profiles/master/Clash/Global.yaml -o /tmp/rules.yaml >/dev/null 2>&1
fi
sed -i -n '/^rules:/,$p' /tmp/rules.yaml 2>/dev/null
elif [ "$RUlE_SOURCE" = "ConnersHua_return" ]; then
if pidof clash >/dev/null; then
curl -sL --connect-timeout 10 --retry 2 -x http://$PROXY_ADDR:$HTTP_PORT -U "$PROXY_AUTH" https://raw.githubusercontent.com/ConnersHua/Profiles/master/Clash/China.yaml -o /tmp/rules.yaml >/dev/null 2>&1

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
/*! modern-normalize v0.6.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{padding:0}progress{vertical-align:initial}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}
@font-face{font-family:Roboto Mono;font-style:normal;font-display:swap;font-weight:400;src:local("Roboto Mono Regular "),local("Roboto Mono-Regular"),url(roboto-mono-latin-400.woff2) format("woff2")}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:400;src:local("Open Sans Regular "),local("Open Sans-Regular"),url(open-sans-latin-400.woff2) format("woff2")}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:700;src:local("Open Sans Bold "),local("Open Sans-Bold"),url(open-sans-latin-700.woff2) format("woff2")}.border-bottom,.border-left,.border-top,.relative{position:relative}.border-top:before{top:0}.border-bottom:after,.border-top:before{position:absolute;content:"";height:1px;width:100%;transform:scaleY(.5) translateZ(0);left:0;right:0;background:#555}.border-bottom:after{bottom:0}.border-left:before{position:absolute;content:"";height:100%;width:1px;transform:scaleX(.5) translateZ(0);top:0;bottom:0;background:#555;left:0}*,:after,:before{box-sizing:border-box}:root{--font-mono:"Roboto Mono",Menlo,monospace;--font-normal:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,"PingFang SC","Microsoft YaHei","微软雅黑",Arial,sans-serif;--color-focus-blue:#1a73e8}body{font-family:Open Sans,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,PingFang SC,Microsoft YaHei,;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;margin:0;padding:0}body,body.dark{--color-background:#202020;--color-text:#ddd;--color-text-secondary:#ccc;--color-text-highlight:#fff;--color-bg-sidebar:#2d2d30;--color-sb-active-row-bg:#494b4e;--color-input-bg:#2d2d30;--color-input-border:#3f3f3f;--color-toggle-bg:#353535;--color-toggle-selected:#181818;--color-icon:#c7c7c7;--color-separator:#333;--color-btn-bg:#232323;--color-btn-fg:#bebebe;--color-bg-proxy:#303030;--color-row-odd:#282828;--bg-modal:#1f1f20;--bg-near-transparent:hsla(0,0%,100%,0.1);--select-border-color:#040404;--select-bg-hover:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7l3 4H1l3-4zM4 17l-3-4h6l-3 4z' fill='%23fff'/%3E%3C/svg%3E")}body.light{--color-background:#fbfbfb;--color-text:#222;--color-text-secondary:#646464;--color-text-highlight:#040404;--color-bg-sidebar:#e7e7e7;--color-sb-active-row-bg:#d0d0d0;--color-input-bg:#fff;--color-input-border:silver;--color-toggle-bg:#fff;--color-toggle-selected:#d7d7d7;--color-icon:#5b5b5b;--color-separator:#ccc;--color-btn-bg:#f4f4f4;--color-btn-fg:#101010;--color-bg-proxy:#e7e7e7;--color-row-odd:#f5f5f5;--bg-modal:#fbfbfb;--bg-near-transparent:rgba(0,0,0,0.1);--select-border-color:#999;--select-bg-hover:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7l3 4H1l3-4zM4 17l-3-4h6l-3 4z' fill='%23222'/%3E%3C/svg%3E")}.flexCenter{display:flex;align-items:center;justify-content:center}.fabgrp{position:fixed;z-index:3;right:20px;bottom:20px}
._3hz7LVhvUv:focus{outline:none}._3HF-KB9mgO{display:flex;justify-content:center;align-items:center}._3HF-KB9mgO ._3HzgPICn91{color:#2d2d30;opacity:.4;transition:opacity .4s}._3HF-KB9mgO ._3HzgPICn91:hover{opacity:.7}._1wpZuvoD5I{padding:30px 0 10px}.L7jTy-EFJ2{display:flex}.L7jTy-EFJ2 div{flex:1 1 auto}.L7jTy-EFJ2 div:nth-child(2){flex-grow:0;flex-basis:120px;margin-left:10px}._2fehqRU9GV{padding:30px 0 10px;display:flex;justify-content:flex-end;align-items:center}
._2A0HoxnDqc{-webkit-appearance:none;outline:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;color:var(--color-btn-fg);background:var(--color-btn-bg);border:1px solid #555;border-radius:100px;font-size:.85em;padding:4px 7px}._2A0HoxnDqc:focus{border-color:var(--color-focus-blue)}._2A0HoxnDqc:hover{background:#387cec;border:1px solid #387cec;color:#fff}._2A0HoxnDqc:active{transform:scale(.97)}@media screen and (min-width:30em){._2A0HoxnDqc{font-size:1em;padding:6px 12px}}._2A0HoxnDqc.rBrOhcv1IU{border-color:transparent;background:none}._2A0HoxnDqc.rBrOhcv1IU:focus{border-color:var(--color-focus-blue)}._2A0HoxnDqc.rBrOhcv1IU:hover{color:#fff;background:#387cec;border:1px solid #387cec}.CtvjIaf7QB{margin-right:5px;display:inline-flex;align-items:center;justify-content:center}._2KAqQdptfT{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:inline-flex}
._2A0HoxnDqc{-webkit-appearance:none;outline:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;color:var(--color-btn-fg);background:var(--color-btn-bg);border:1px solid #555;border-radius:100px;font-size:.85em;padding:4px 7px}._2A0HoxnDqc:focus{border-color:var(--color-focus-blue)}._2A0HoxnDqc:hover{background:#387cec;border:1px solid #387cec;color:#fff}._2A0HoxnDqc:active{transform:scale(.97)}@media screen and (min-width:30em){._2A0HoxnDqc{font-size:1em;padding:6px 12px}}._2A0HoxnDqc.rBrOhcv1IU{border-color:transparent;background:none}._2A0HoxnDqc.rBrOhcv1IU:focus{border-color:var(--color-focus-blue)}._2A0HoxnDqc.rBrOhcv1IU:hover{color:#fff;background:#387cec;border:1px solid #387cec}._2A0HoxnDqc:disabled{opacity:.5}.CtvjIaf7QB{margin-right:5px;display:inline-flex;align-items:center;justify-content:center}._2KAqQdptfT{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:inline-flex}
h2._1p7G03ShKD{margin:0;font-size:1.3em}@media screen and (min-width:30em){h2._1p7G03ShKD{font-size:1.5em}}h2._1p7G03ShKD span:nth-child(2){font-size:12px;color:#777;font-weight:400;margin:0 .3em}body.light{--loading-dot-1-1:rgba(0,0,0,0.1);--loading-dot-1-2:rgba(0,0,0,0.5);--loading-dot-1-3:rgba(0,0,0,0.3);--loading-dot-2-1:rgba(0,0,0,0.3);--loading-dot-2-2:rgba(0,0,0,0.1);--loading-dot-2-3:rgba(0,0,0,0.5);--loading-dot-3-1:rgba(0,0,0,0.5);--loading-dot-3-2:rgba(0,0,0,0.3);--loading-dot-3-3:rgba(0,0,0,0.1)}body.dark{--loading-dot-1-1:hsla(0,0%,100%,0.5);--loading-dot-1-2:hsla(0,0%,100%,0.1);--loading-dot-1-3:hsla(0,0%,100%,0.3);--loading-dot-2-1:hsla(0,0%,100%,0.3);--loading-dot-2-2:hsla(0,0%,100%,0.5);--loading-dot-2-3:hsla(0,0%,100%,0.1);--loading-dot-3-1:hsla(0,0%,100%,0.1);--loading-dot-3-2:hsla(0,0%,100%,0.3);--loading-dot-3-3:hsla(0,0%,100%,0.5)}._1l_b31nvKC,._1l_b31nvKC:after,._1l_b31nvKC:before{display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;font-size:0}._1l_b31nvKC{position:relative;background-color:var(--loading-dot-2-1);animation:AmeWPxQSDb 1s step-start infinite}._1l_b31nvKC:before{content:"";position:absolute;left:-12px;background-color:var(--loading-dot-1-1);animation:_1C49ms67Ai 1s step-start infinite}._1l_b31nvKC:after{content:"";position:absolute;right:-12px;background-color:var(--loading-dot-3-1);animation:p_etI2Ova8 1s step-start infinite}@keyframes _1C49ms67Ai{0%,to{background-color:var(--loading-dot-1-1)}33%{background-color:var(--loading-dot-1-2)}66%{background-color:var(--loading-dot-1-3)}}@keyframes AmeWPxQSDb{0%,to{background-color:var(--loading-dot-2-1)}33%{background-color:var(--loading-dot-2-2)}66%{background-color:var(--loading-dot-2-3)}}@keyframes p_etI2Ova8{0%,to{background-color:var(--loading-dot-3-1)}33%{background-color:var(--loading-dot-3-2)}66%{background-color:var(--loading-dot-3-3)}}
._1r-KsYFNaj{position:relative;padding:10px 0}._1r-KsYFNaj input{-webkit-appearance:none;background-color:initial;background-image:none;border:none;border-radius:0;border-bottom:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 8px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._1r-KsYFNaj input:focus{border-color:var(--color-focus-blue)}._1r-KsYFNaj label{position:absolute;left:8px;bottom:22px;transition:transform .15s ease-in-out;transform-origin:0 0}._1r-KsYFNaj input:focus+label,._1r-KsYFNaj label.Hn6h5kxOg7{transform:scale(.75) translateY(-25px)}._1r-KsYFNaj input:focus+label{color:var(--color-focus-blue)}
._2MMSFnbhST{stroke-dasharray:890;stroke-dashoffset:890;animation:apL4DUAKgd 3s ease-in-out infinite normal forwards}@keyframes apL4DUAKgd{0%{stroke-dashoffset:890}to{stroke-dashoffset:0}}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="shortcut icon" href="yacd.ico"><link rel="icon" type="image/png" sizes="64x64" href="yacd-64.png"><link rel="icon" type="image/png" sizes="128x128" href="yacd-128.png"><link rel="preload" href="/open-sans-latin-400.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="/open-sans-latin-700.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="/roboto-mono-latin-400.woff2" as="font" type="font/woff2" crossorigin><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="application-name" content="yacd"><meta name="description" content="Yet Another Clash Dashboard"><meta name="theme-color" content="#202020"><title>yacd - Yet Another Clash Dashboard</title><meta property="og:image" content="https://user-images.githubusercontent.com/1166872/47304841-536f3d80-d65a-11e8-8908-1917127dafc5.png"><meta property="og:site_name" content="yacd"><meta property="og:type" content="object"><meta property="og:title" content="yacd"><meta property="og:url" content="http://yacd.haishan.me"><meta property="og:description" content="Yet Another Clash Dashboard"><script defer="defer" src="runtime.2f322c031bcb67b98af2.js"></script><script defer="defer" src="core-js~app.36c6f0077ac1e602b325.js"></script><script defer="defer" src="react~app.10618449a8e9b56a1845.js"></script><script defer="defer" src="app.09d100e5dacbf4f76606.js"></script><link href="app.b814d6460bc4d015f5f9.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="shortcut icon" href="yacd.ico"><link rel="icon" type="image/png" sizes="64x64" href="yacd-64.png"><link rel="icon" type="image/png" sizes="128x128" href="yacd-128.png"><link rel="preload" href="/open-sans-latin-400.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="/open-sans-latin-700.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="/roboto-mono-latin-400.woff2" as="font" type="font/woff2" crossorigin><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="application-name" content="yacd"><meta name="description" content="Yet Another Clash Dashboard"><meta name="theme-color" content="#202020"><title>yacd - Yet Another Clash Dashboard</title><meta property="og:image" content="https://user-images.githubusercontent.com/1166872/47304841-536f3d80-d65a-11e8-8908-1917127dafc5.png"><meta property="og:site_name" content="yacd"><meta property="og:type" content="object"><meta property="og:title" content="yacd"><meta property="og:url" content="http://yacd.haishan.me"><meta property="og:description" content="Yet Another Clash Dashboard"><script defer="defer" src="runtime.30479c2b09f71505cee3.js"></script><script defer="defer" src="core-js~app.4e0935a458133ffa9ca3.js"></script><script defer="defer" src="react~app.10618449a8e9b56a1845.js"></script><script defer="defer" src="app.2710ac87312332833aa4.js"></script><link href="app.bb773b8bdd4263de9ffd.css" rel="stylesheet"></head><body><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
._2FCzysAb-M{display:grid;grid-template-columns:40px 1fr 46px;height:100%}._1hjXIQMZOU{display:inline-flex;color:var(--color-text-secondary);opacity:.4}._1hjXIQMZOU,._3ulCcX3zrK{align-items:center}._3ulCcX3zrK{display:grid;grid-template-rows:1fr auto auto}._2rDvq4osPH{color:#777}._2RFtzkPbgh{display:grid;place-items:center}._2cUdzkKfZU{display:inline-flex}._2KpM-FkfFa{animation:_36QJoL-63v 3s linear infinite}@keyframes _36QJoL-63v{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
._1LsRPWba72{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;outline:none;padding:8px 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._1LsRPWba72:focus{border:1px solid var(--color-focus-blue)}
._3eSLieOhVX{display:flex;align-items:center;padding:6px 15px}@media screen and (min-width:30em){._3eSLieOhVX{padding:10px 40px}}._2n1pW09UvV{width:40px;padding-right:15px;color:var(--color-text-secondary);opacity:.4}.t1XJIwvW7A{display:flex;align-items:center;font-size:12px;opacity:.8}._1fNf8kj0HA{padding:10px 0;font-family:Roboto Mono,Menlo,monospace;font-size:16px}@media screen and (min-width:30em){._1fNf8kj0HA{font-size:19px}}._3yJmN0tON0{width:110px}
.wlEX90q03S{display:grid;grid-template-columns:1fr minmax(auto,330px);align-items:center;padding-right:15px}@media screen and (min-width:30em){.wlEX90q03S{padding-right:40px}}.MokwzRoj-f{padding:6px 15px}@media screen and (min-width:30em){.MokwzRoj-f{padding:10px 40px}}

View File

@ -1 +0,0 @@
._3eSLieOhVX{display:flex;align-items:center;padding:6px 15px}@media screen and (min-width:30em){._3eSLieOhVX{padding:10px 40px}}._2n1pW09UvV{width:40px;padding-right:15px;color:var(--color-text-secondary);opacity:.4}.t1XJIwvW7A{display:flex;align-items:center;font-size:12px;opacity:.8}._1fNf8kj0HA{padding:10px 0;font-family:Roboto Mono,Menlo,monospace;font-size:16px}@media screen and (min-width:30em){._1fNf8kj0HA{font-size:19px}}._3yJmN0tON0{width:110px}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{BVyM:function(e,t,a){"use strict";a.r(t);var r=a("ODXe"),n=a("q1tI"),i=a.n(n),c=a("OAQO"),o=a("iR1w"),l=a("Kv4h"),u=a("OADI"),s=a("EwbC"),f=a("DKqX"),p=a("17x9"),d=a.n(p),m=a("xrux"),v=a.n(m),b={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function y(e){var t=e.type,a=e.payload,r=e.proxy,n=e.id,c=function(e){var t=e.proxy,a=b._default;return b[t]&&(a=b[t]),{color:a}}({proxy:r});return i.a.createElement("div",{className:v.a.rule},i.a.createElement("div",{className:v.a.left},n),i.a.createElement("div",null,i.a.createElement("div",{className:v.a.b},a),i.a.createElement("div",{className:v.a.a},i.a.createElement("div",{className:v.a.type},t),i.a.createElement("div",{style:c},r))))}y.propTypes={id:d.a.number,type:d.a.string,payload:d.a.string,proxy:d.a.string};var O=y,E=a("II4a"),h=a("WfPo"),w=Object(h.a)((function(e){return{searchText:Object(s.d)(e),updateSearchText:s.f}}))(E.a),g=a("9cvt"),x=i.a.memo,j=i.a.useEffect,k=i.a.useMemo,C=i.a.useCallback;function N(e,t){return t[e].id}var I=x((function(e){var t=e.index,a=e.style,r=e.data[t];return i.a.createElement("div",{style:a},i.a.createElement(O,r))}),o.b);t.default=Object(h.a)((function(e){return{apiConfig:Object(u.c)(e),rules:Object(s.c)(e)}}))((function(e){var t=e.dispatch,a=e.apiConfig,n=e.rules,u=C((function(){t(Object(s.a)(a))}),[a,t]);j((function(){t(Object(s.b)(a))}),[t,a]);var p=Object(l.a)(),d=Object(r.a)(p,2),m=d[0],v=d[1],b=k((function(){return i.a.createElement(c.a,{width:16})}),[]);return i.a.createElement("div",null,i.a.createElement(f.a,{title:"Rules"}),i.a.createElement(w,null),i.a.createElement("div",{ref:m,style:{paddingBottom:30}},i.a.createElement(o.a,{height:v-30,width:"100%",itemCount:n.length,itemSize:80,itemData:n,itemKey:N},I)),i.a.createElement(g.b,{icon:b,text:"Refresh",onClick:u,position:g.c}))}))},OAQO:function(e,t,a){"use strict";var r=a("q1tI"),n=a.n(r),i=a("17x9"),c=a.n(i);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function l(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var u=Object(r.forwardRef)((function(e,t){var a=e.color,r=void 0===a?"currentColor":a,i=e.size,c=void 0===i?24:i,u=l(e,["color","size"]);return n.a.createElement("svg",o({ref:t,xmlns:"http://www.w3.org/2000/svg",width:c,height:c,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),n.a.createElement("polyline",{points:"23 4 23 10 17 10"}),n.a.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))}));u.propTypes={color:c.a.string,size:c.a.oneOfType([c.a.string,c.a.number])},u.displayName="RotateCw",t.a=u},xrux:function(e,t,a){e.exports={rule:"_3eSLieOhVX",left:"_2n1pW09UvV",a:"t1XJIwvW7A",b:"_1fNf8kj0HA",type:"_3yJmN0tON0"}}}]);

View File

@ -1 +0,0 @@
!function(e){function t(t){for(var n,o,i=t[0],l=t[1],d=t[2],f=t[3]||[],s=0,h=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&h.push(a[o][0]),a[o]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(p&&p(t),c.push.apply(c,f);h.length;)h.shift()();return u.push.apply(u,d||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var d=r[o];0!==a[d]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return 0===u.length&&(c.forEach((function(e){if(void 0===a[e]){a[e]=null;var t=document.createElement("link");l.nc&&t.setAttribute("nonce",l.nc),t.rel="prefetch",t.as="script",t.href=i(e),document.head.appendChild(t)}})),c.length=0),e}var n={},o={5:0},a={5:0},u=[],c=[];function i(e){return l.p+""+({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies"}[e]||e)+"."+{2:"77fef0018a8d1766e6eb",4:"efd650d64b4afda8d49b",6:"e4543f10556636d64b75",7:"34b4cb2526b2e8ed766c",8:"872bd111e9c497e7acca"}[e]+".js"}function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{2:1,4:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n=({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies"}[e]||e)+"."+{2:"1e31d885e6fe278da534",4:"664f8b737878361937cb",6:"31d6cfe0d16ae931b73c",7:"31d6cfe0d16ae931b73c",8:"31d6cfe0d16ae931b73c"}[e]+".css",a=l.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var i=(f=u[c]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(i===n||i===a))return t()}var d=document.getElementsByTagName("style");for(c=0;c<d.length;c++){var f;if((i=(f=d[c]).getAttribute("data-href"))===n||i===a)return t()}var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onload=t,s.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],s.parentNode.removeChild(s),r(u)},s.href=a,document.getElementsByTagName("head")[0].appendChild(s)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,l.nc&&c.setAttribute("nonce",l.nc),c.src=i(e);var d=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(f);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",d.name="ChunkLoadError",d.type=n,d.request=o,r[1](d)}a[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l.oe=function(e){throw console.error(e),e};var d=window.webpackJsonp=window.webpackJsonp||[],f=d.push.bind(d);d.push=t,d=d.slice();for(var s=0;s<d.length;s++)t(d[s]);var p=f;r()}([]);

View File

@ -0,0 +1 @@
!function(e){function r(r){for(var n,o,i=r[0],d=r[1],l=r[2],s=r[3]||[],f=0,h=[];f<i.length;f++)o=i[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&h.push(a[o][0]),a[o]=0;for(n in d)Object.prototype.hasOwnProperty.call(d,n)&&(e[n]=d[n]);for(p&&p(r),u.push.apply(u,s);h.length;)h.shift()();return c.push.apply(c,l||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var l=t[o];0!==a[l]&&(n=!1)}n&&(c.splice(r--,1),e=d(d.s=t[0]))}return 0===c.length&&(u.forEach((function(e){if(void 0===a[e]){a[e]=null;var r=document.createElement("link");d.nc&&r.setAttribute("nonce",d.nc),r.rel="prefetch",r.as="script",r.href=i(e),document.head.appendChild(r)}})),u.length=0),e}var n={},o={5:0},a={5:0},c=[],u=[];function i(e){return d.p+""+({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies",8:"vendors~rules"}[e]||e)+"."+{2:"beaddeef3e0db08db953",4:"90faad053acc32c74a88",6:"e4543f10556636d64b75",7:"34b4cb2526b2e8ed766c",8:"b2e93c21da80f9dc4a80",9:"e5ebc45c57147750a8b7"}[e]+".js"}function d(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,d),t.l=!0,t.exports}d.e=function(e){var r=[];o[e]?r.push(o[e]):0!==o[e]&&{2:1,4:1}[e]&&r.push(o[e]=new Promise((function(r,t){for(var n=({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies",8:"vendors~rules"}[e]||e)+"."+{2:"1e31d885e6fe278da534",4:"3ba17dd53c9d8bd8b221",6:"31d6cfe0d16ae931b73c",7:"31d6cfe0d16ae931b73c",8:"31d6cfe0d16ae931b73c",9:"31d6cfe0d16ae931b73c"}[e]+".css",a=d.p+n,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var i=(s=c[u]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(i===n||i===a))return r()}var l=document.getElementsByTagName("style");for(u=0;u<l.length;u++){var s;if((i=(s=l[u]).getAttribute("data-href"))===n||i===a)return r()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=r,f.onerror=function(r){var n=r&&r.target&&r.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=n,delete o[e],f.parentNode.removeChild(f),t(c)},f.href=a,document.getElementsByTagName("head")[0].appendChild(f)})).then((function(){o[e]=0})));var t=a[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=a[e]=[r,n]}));r.push(t[2]=n);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,d.nc&&u.setAttribute("nonce",d.nc),u.src=i(e);var l=new Error;c=function(r){u.onerror=u.onload=null,clearTimeout(s);var t=a[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,t[1](l)}a[e]=void 0}};var s=setTimeout((function(){c({type:"timeout",target:u})}),12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(r)},d.m=e,d.c=n,d.d=function(e,r,t){d.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.t=function(e,r){if(1&r&&(e=d(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(d.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)d.d(t,n,function(r){return e[r]}.bind(null,n));return t},d.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(r,"a",r),r},d.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},d.p="",d.oe=function(e){throw console.error(e),e};var l=window.webpackJsonp=window.webpackJsonp||[],s=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var p=s;t()}([]);

File diff suppressed because one or more lines are too long

View File

@ -512,93 +512,6 @@ fi
#一键创建配置文件
if [ "$rule_sources" = "ConnersHua" ] && [ "$servers_if_update" != "1" ] && [ -z "$if_game_proxy" ]; then
echo "使用ConnersHua规则创建中..." >$START_LOG
echo "proxy-groups:" >>$SERVER_FILE
cat >> "$SERVER_FILE" <<-EOF
- name: Auto - UrlTest
type: url-test
EOF
if [ -f "/tmp/Proxy_Server" ]; then
cat >> "$SERVER_FILE" <<-EOF
proxies:
EOF
fi
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
if [ -f "/tmp/Proxy_Provider" ]; then
cat >> "$SERVER_FILE" <<-EOF
use:
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
url: http://www.gstatic.com/generate_204
interval: "600"
- name: Proxy
type: select
proxies:
- Auto - UrlTest
- DIRECT
EOF
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
if [ -f "/tmp/Proxy_Provider" ]; then
cat >> "$SERVER_FILE" <<-EOF
use:
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
- name: Domestic
type: select
proxies:
- DIRECT
- Proxy
- name: Others
type: select
proxies:
- Proxy
- DIRECT
- Domestic
- name: AsianTV
type: select
proxies:
- DIRECT
- Proxy
EOF
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
if [ -f "/tmp/Proxy_Provider" ]; then
cat >> "$SERVER_FILE" <<-EOF
use:
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
- name: GlobalTV
type: select
proxies:
- Proxy
- DIRECT
EOF
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
if [ -f "/tmp/Proxy_Provider" ]; then
cat >> "$SERVER_FILE" <<-EOF
use:
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
${UCI_SET}rule_source="ConnersHua"
${UCI_SET}GlobalTV="GlobalTV"
${UCI_SET}AsianTV="AsianTV"
${UCI_SET}Proxy="Proxy"
${UCI_SET}Domestic="Domestic"
${UCI_SET}Others="Others"
[ "$config_auto_update" -eq 1 ] && [ "$new_servers_group_set" -eq 1 ] && {
${UCI_SET}servers_update="1"
${UCI_DEL_LIST}="Auto - UrlTest" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Auto - UrlTest" >/dev/null 2>&1
${UCI_DEL_LIST}="Proxy" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Proxy" >/dev/null 2>&1
${UCI_DEL_LIST}="AsianTV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="AsianTV" >/dev/null 2>&1
${UCI_DEL_LIST}="GlobalTV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="GlobalTV" >/dev/null 2>&1
}
elif [ "$rule_sources" = "ConnersHua_provider" ] && [ "$servers_if_update" != "1" ] && [ -z "$if_game_proxy" ]; then
echo "使用ConnersHua(规则集)规则创建中..." >$START_LOG
echo "proxy-groups:" >>$SERVER_FILE
cat >> "$SERVER_FILE" <<-EOF
@ -672,7 +585,7 @@ cat >> "$SERVER_FILE" <<-EOF
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
${UCI_SET}rule_source="ConnersHua_provider"
${UCI_SET}rule_source="ConnersHua"
${UCI_SET}GlobalTV="GlobalTV"
${UCI_SET}AsianTV="AsianTV"
${UCI_SET}Proxy="Proxy"

View File

@ -35,9 +35,6 @@ yml_other_set()
if [ -z "$(grep '^- DOMAIN-KEYWORD,tracker,DIRECT' "$4")" ]; then
sed -i '1,/^ \{0,\}- MATCH/{/^ \{0,\}- MATCH/s/^ \{0,\}- MATCH/- DOMAIN-KEYWORD,tracker,DIRECT\n&/}' "$4" 2>/dev/null
fi
if [ -z "$(grep '^- DOMAIN-KEYWORD,tracker,DIRECT' "$4")" ]; then
sed -i '1,/^ \{0,\}- FINAL/{/^ \{0,\}- FINAL/s/^ \{0,\}- FINAL/- DOMAIN-KEYWORD,tracker,DIRECT\n&/}' "$4" 2>/dev/null
fi
if [ -z "$(grep '^- DOMAIN-KEYWORD,tracker,DIRECT' "$4")" ]; then
echo "- DOMAIN-KEYWORD,tracker,DIRECT" >> "$4" 2>/dev/null
fi
@ -45,14 +42,12 @@ yml_other_set()
sed -i "/- DOMAIN-KEYWORD,tracker,DIRECT/a\- DOMAIN-KEYWORD,torrent,DIRECT" "$4" 2>/dev/null
if [ -z "$(grep "###- MATCH," "$4")" ] && [ -z "$(grep "###- FINAL," "$4")" ]; then
sed -i 's/- MATCH,/###&/' "$4" 2>/dev/null
sed -i 's/- FINAL,/###&/' "$4" 2>/dev/null
echo "- MATCH,DIRECT" >> "$4" 2>/dev/null
fi
else
if [ ! -z "$(grep "###- MATCH," "$4")" ] || [ ! -z "$(grep "###- FINAL," "$4")" ]; then
sed -i '/^- MATCH,DIRECT/d' "$4" 2>/dev/null
sed -i "s/###- MATCH,/- MATCH,/" "$4" 2>/dev/null
sed -i "s/###- FINAL,/- FINAL,/" "$4" 2>/dev/null
fi
fi
@ -61,9 +56,6 @@ yml_other_set()
sed -i '/^rules:/a\##Custom Rules##' "$4" 2>/dev/null
sed -i '/^##Custom Rules##/r/etc/openclash/custom/openclash_custom_rules.list' "$4" 2>/dev/null
sed -i '/^ \{0,\}- MATCH,/i\##Custom Rules 2##' "$4" 2>/dev/null
if [ -z "$(grep '^##Custom Rules 2##' "$4")" ]; then
sed -i '/^ \{0,\}- FINAL,/i\##Custom Rules 2##' "$4" 2>/dev/null
fi
if [ -z "$(grep '^##Custom Rules 2##' "$4")" ]; then
echo "##Custom Rules 2##" >> "$4" 2>/dev/null
fi
@ -102,21 +94,11 @@ if [ "$2" != 0 ]; then
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7"
exit 0
fi
elif [ "$2" = "ConnersHua_provider" ]; then
if [ -z "$(grep "$GlobalTV" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep "$AsianTV" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep "$Proxy" /tmp/Proxy_Group)" ]\
# || [ -z "$(grep "$AdBlock" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep "$Others" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep "$Domestic" /tmp/Proxy_Group)" ]; then
echo "${1} Warning: Because of The Different Porxy-Group's Name, Stop Setting The Other Rules!" >>/tmp/openclash.log
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7"
exit 0
fi
elif [ "$2" = "ConnersHua" ]; then
if [ -z "$(grep "$GlobalTV" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep "$AsianTV" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep "$Proxy" /tmp/Proxy_Group)" ]\
# || [ -z "$(grep "$AdBlock" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep "$Others" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep "$Domestic" /tmp/Proxy_Group)" ]; then
echo "${1} Warning: Because of The Different Porxy-Group's Name, Stop Setting The Other Rules!" >>/tmp/openclash.log
@ -184,19 +166,11 @@ if [ "$2" != 0 ]; then
|| [ "$Others" != "$Others_YAML" ];then
check_def=1
fi
elif [ "$2" = "ConnersHua_provider" ]; then
if [ "$GlobalTV" != "$GlobalTV_YAML" ]\
|| [ "$AsianTV" != "$AsianTV_YAML" ]\
|| [ "$Proxy" != "$Proxy_YAML" ]\
# || [ "$AdBlock" != "$AdBlock_YAML" ]\
|| [ "$Others" != "$Others_YAML" ]\
|| [ "$Domestic" != "$Domestic_YAML" ]; then
check_def=1
fi
elif [ "$2" = "ConnersHua" ]; then
if [ "$GlobalTV" != "$GlobalTV_YAML" ]\
|| [ "$AsianTV" != "$AsianTV_YAML" ]\
|| [ "$Proxy" != "$Proxy_YAML" ]\
# || [ "$AdBlock" != "$AdBlock_YAML" ]\
|| [ "$Others" != "$Others_YAML" ]\
|| [ "$Domestic" != "$Domestic_YAML" ]; then
check_def=1
@ -273,8 +247,8 @@ if [ "$2" != 0 ]; then
sed -i "s/,Others$/,${Others},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "/rules:/a\##Others:${Others}" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/#d//g" "/tmp/other_rule.yaml" 2>/dev/null
elif [ "$2" = "ConnersHua_provider" ]; then
cp /etc/openclash/ConnersHua_provider.yaml /tmp/other_rule_provider.yaml
elif [ "$2" = "ConnersHua" ]; then
cp /etc/openclash/ConnersHua.yaml /tmp/other_rule_provider.yaml
sed -n '/^rules:/,$p' /tmp/other_rule_provider.yaml > /tmp/other_rule.yaml 2>/dev/null
sed -i '/^rules:/,$d' /tmp/other_rule_provider.yaml 2>/dev/null
sed -i "/^ \{0,\}rule-providers:/c\rule-providers:" /tmp/other_rule_provider.yaml 2>/dev/null
@ -324,24 +298,6 @@ if [ "$2" != 0 ]; then
sed -i '/^ \{0,\}rule-providers:/d' "/tmp/other_rule_provider.yaml" 2>/dev/null
sed -i '/rule-providers:/r/tmp/other_rule_provider.yaml' "$9" 2>/dev/null
fi
elif [ "$2" = "ConnersHua" ]; then
cp /etc/openclash/ConnersHua.yaml /tmp/other_rule.yaml
sed -i "s/,GlobalMedia$/,${GlobalTV}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,GlobalMedia,no-resolve$/,${GlobalTV},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "/rules:/a\##GlobalTV:${GlobalTV}" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,HKMTMedia$/,${AsianTV}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,HKMTMedia,no-resolve$/,${AsianTV},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "/rules:/a\##AsianTV:${AsianTV}" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,PROXY$/,${Proxy}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,PROXY,no-resolve$/,${Proxy},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "/rules:/a\##Proxy:${Proxy}" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,DIRECT$/,${Domestic}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,DIRECT,no-resolve$/,${Domestic},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "/rules:/a\##Domestic:${Domestic}" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,MATCH$/,${Others}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/,MATCH,no-resolve$/,${Others},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "/rules:/a\##Others:${Others}" "/tmp/other_rule.yaml" 2>/dev/null
sed -i "s/#d//g" "/tmp/other_rule.yaml" 2>/dev/null
else
cp /etc/openclash/ConnersHua_return.yaml /tmp/other_rule.yaml
sed -i "s/,PROXY$/,${Proxy}#d/g" "/tmp/other_rule.yaml" 2>/dev/null

View File

@ -0,0 +1,14 @@
#
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=btmod Theme
LUCI_DEPENDS:=
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -0,0 +1,177 @@
.main-nav {
background: #3092c0;
background-image: -webkit-gradient(linear, to bottom, to top, color-stop(0%, #3298c8), color-stop(100%, #2e8cb8));
background-image: -webkit-linear-gradient(to bottom, #3298c8, #2e8cb8);
background-image: -moz-linear-gradient(to bottom, #3298c8, #2e8cb8);
background-image: -o-linear-gradient(to bottom, #3298c8, #2e8cb8);
background-image: linear-gradient(to bottom, #3298c8, #2e8cb8);
/*-webkit-border-radius: 8px;
-moz-border-radius: 8px;
-ms-border-radius: 8px;
-o-border-radius: 8px;
border-radius: 8px;*/
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.main-nav:after {
clear: both;
content: "\00a0";
display: block;
height: 0;
font: 0px/0 serif;
overflow: hidden;
}
.nav-brand {
float: left;
margin: 0;
}
.nav-brand a {
display: block;
padding: 10px 10px 10px 20px;
color: #fff;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 22px;
font-weight: normal;
line-height: 29px;
text-decoration: none;
}
#main-menu {
clear: both;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
@media (min-width: 768px) {
#main-menu {
float: right;
clear: none;
}
}
/* Mobile menu top separator */
#main-menu:before {
content: '';
display: block;
height: 1px;
font: 1px/1px sans-serif;
overflow: hidden;
background: #2e8cb8;
}
@media (min-width: 768px) {
#main-menu:before {
display: none;
}
}
/* Mobile menu toggle button */
.main-menu-btn {
float: right;
margin: 10px;
position: relative;
display: inline-block;
width: 29px;
height: 29px;
text-indent: 29px;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* hamburger icon */
.main-menu-btn-icon,
.main-menu-btn-icon:before,
.main-menu-btn-icon:after {
position: absolute;
top: 50%;
left: 2px;
height: 2px;
width: 24px;
background: #fff;
-webkit-transition: all 0.25s;
transition: all 0.25s;
}
.main-menu-btn-icon:before {
content: '';
top: -7px;
left: 0;
}
.main-menu-btn-icon:after {
content: '';
top: 7px;
left: 0;
}
/* x icon */
#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon {
height: 0;
background: transparent;
}
#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before {
top: 0;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after {
top: 0;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
/* hide menu state checkbox (keep it visible to screen readers) */
#main-menu-state {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
}
/* hide the menu in mobile view */
#main-menu-state:not(:checked) ~ #main-menu {
display: none;
}
#main-menu-state:checked ~ #main-menu {
display: block;
}
@media (min-width: 768px) {
/* hide the button in desktop view */
.main-menu-btn {
position: absolute;
top: -99999px;
}
/* always show the menu in desktop view */
#main-menu-state:not(:checked) ~ #main-menu {
display: block;
}
}

View File

@ -0,0 +1,333 @@
@import url(https://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700);
.sm-blue {
background: transparent;
border-radius: 8px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.sm-blue a, .sm-blue a:hover, .sm-blue a:focus, .sm-blue a:active {
padding: 10px 20px;
/* make room for the toggle button (sub indicator) */
padding-right: 58px;
background: #5e72e4;
background-image: linear-gradient(to bottom, #4059e4, #1d35bf);
color: #fff;
font-family: "PT Sans Narrow", "Arial Narrow", Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
line-height: 23px;
text-decoration: none;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.sm-blue a.current {
background: #041b9e;
background-image: linear-gradient(to bottom, #0d25ab, #7e91fe);
color: #fff;
}
.sm-blue a.disabled {
color: #6579e5;
}
.sm-blue a .sub-arrow {
position: absolute;
top: 50%;
margin-top: -17px;
left: auto;
right: 4px;
width: 34px;
height: 34px;
overflow: hidden;
font: bold 16px/34px monospace !important;
text-align: center;
text-shadow: none;
background: rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
.sm-blue a .sub-arrow::before {
content: '+';
}
.sm-blue a.highlighted .sub-arrow::before {
content: '-';
}
.sm-blue > li:first-child > a, .sm-blue > li:first-child > :not(ul) a {
border-radius: 8px 8px 0 0;
}
.sm-blue > li:last-child > a, .sm-blue > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul, .sm-blue > li:last-child > ul > li:last-child > a, .sm-blue > li:last-child > ul > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul > li:last-child > ul, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul {
border-radius: 0 0 8px 8px;
}
.sm-blue > li:last-child > a.highlighted, .sm-blue > li:last-child > *:not(ul) a.highlighted, .sm-blue > li:last-child > ul > li:last-child > a.highlighted, .sm-blue > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-blue > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted {
border-radius: 0;
}
.sm-blue ul {
background: #fff;
}
.sm-blue ul ul {
background: rgba(102, 102, 102, 0.1);
}
.sm-blue ul a, .sm-blue ul a:hover, .sm-blue ul a:focus, .sm-blue ul a:active {
background: transparent;
color: #3149d0;
font-size: 16px;
text-shadow: none;
border-left: 8px solid transparent;
}
.sm-blue ul a.current {
background: #041b9e;
background-image: linear-gradient(to bottom, #0d25ab, #7e91fe);
color: #fff;
}
.sm-blue ul a.disabled {
color: #b3b3b3;
}
.sm-blue ul ul a,
.sm-blue ul ul a:hover,
.sm-blue ul ul a:focus,
.sm-blue ul ul a:active {
border-left: 16px solid transparent;
}
.sm-blue ul ul ul a,
.sm-blue ul ul ul a:hover,
.sm-blue ul ul ul a:focus,
.sm-blue ul ul ul a:active {
border-left: 24px solid transparent;
}
.sm-blue ul ul ul ul a,
.sm-blue ul ul ul ul a:hover,
.sm-blue ul ul ul ul a:focus,
.sm-blue ul ul ul ul a:active {
border-left: 32px solid transparent;
}
.sm-blue ul ul ul ul ul a,
.sm-blue ul ul ul ul ul a:hover,
.sm-blue ul ul ul ul ul a:focus,
.sm-blue ul ul ul ul ul a:active {
border-left: 40px solid transparent;
}
.sm-blue ul li {
border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.sm-blue ul li:first-child {
border-top: 0;
}
@media (min-width: 768px) {
/* Switch to desktop layout
-----------------------------------------------
These transform the menu tree from
collapsible to desktop (navbar + dropdowns)
-----------------------------------------------*/
/* start... (it's not recommended editing these rules) */
.sm-blue ul {
position: absolute;
width: 12em;
}
.sm-blue li {
float: left;
}
.sm-blue.sm-rtl li {
float: right;
}
.sm-blue ul li, .sm-blue.sm-rtl ul li, .sm-blue.sm-vertical li {
float: none;
}
.sm-blue a {
white-space: nowrap;
}
.sm-blue ul a, .sm-blue.sm-vertical a {
white-space: normal;
}
.sm-blue .sm-nowrap > li > a, .sm-blue .sm-nowrap > li > :not(ul) a {
white-space: nowrap;
}
/* ...end */
.sm-blue {
background: #5e72e4;
background-image: linear-gradient(to bottom, #4059e4, #1d35bf);
border-radius: 8px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
.sm-blue a, .sm-blue a:hover, .sm-blue a:focus, .sm-blue a:active, .sm-blue a.highlighted {
padding: 13px 24px;
background: #5e72e4;
background-image: linear-gradient(to bottom, #4059e4, #1d35bf);
color: #fff;
}
.sm-blue a:hover, .sm-blue a:focus, .sm-blue a:active, .sm-blue a.highlighted {
background: #3149d0;
background-image: linear-gradient(to bottom, #2d89b4, #297ca3);
}
.sm-blue a.current {
background: #041b9e;
background-image: linear-gradient(to bottom, #0d25ab, #7e91fe);
color: #fff;
}
.sm-blue a.disabled {
background: #5e72e4;
background-image: linear-gradient(to bottom, #4059e4, #1d35bf);
color: #6579e5;
}
.sm-blue a .sub-arrow {
top: auto;
margin-top: 0;
bottom: 2px;
left: 50%;
margin-left: -5px;
right: auto;
width: 0;
height: 0;
border-width: 5px;
border-style: solid dashed dashed dashed;
border-color: #6579e5 transparent transparent transparent;
background: transparent;
border-radius: 0;
}
.sm-blue a .sub-arrow::before {
display: none;
}
.sm-blue > li:first-child > a, .sm-blue > li:first-child > :not(ul) a {
border-radius: 8px 0 0 8px;
}
.sm-blue > li:last-child > a, .sm-blue > li:last-child > :not(ul) a {
border-radius: 0 8px 8px 0 !important;
}
.sm-blue > li {
border-left: 1px solid #3149d0;
}
.sm-blue > li:first-child {
border-left: 0;
}
.sm-blue ul {
border: 1px solid #a8a8a8;
padding: 7px 0;
background: #fff;
border-radius: 0 0 4px 4px !important;
box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}
.sm-blue ul ul {
border-radius: 4px !important;
background: #fff;
}
.sm-blue ul a, .sm-blue ul a:hover, .sm-blue ul a:focus, .sm-blue ul a:active, .sm-blue ul a.highlighted {
border: 0 !important;
padding: 9px 23px;
background: transparent;
color: #3149d0;
border-radius: 0 !important;
}
.sm-blue ul a:hover, .sm-blue ul a:focus, .sm-blue ul a:active, .sm-blue ul a.highlighted {
background: #5e72e4;
background-image: linear-gradient(to bottom, #4059e4, #1d35bf);
color: #fff;
}
.sm-blue ul a.current {
background: #041b9e;
background-image: linear-gradient(to bottom, #0d25ab, #7e91fe);
color: #fff;
}
.sm-blue ul a.disabled {
background: #fff;
color: #b3b3b3;
}
.sm-blue ul a .sub-arrow {
top: 50%;
margin-top: -5px;
bottom: auto;
left: auto;
margin-left: 0;
right: 10px;
border-style: dashed dashed dashed solid;
border-color: transparent transparent transparent #6579e5;
}
.sm-blue ul li {
border: 0;
}
.sm-blue .scroll-up,
.sm-blue .scroll-down {
position: absolute;
display: none;
visibility: hidden;
overflow: hidden;
background: #fff;
height: 20px;
}
.sm-blue .scroll-up-arrow,
.sm-blue .scroll-down-arrow {
position: absolute;
top: -2px;
left: 50%;
margin-left: -8px;
width: 0;
height: 0;
overflow: hidden;
border-width: 8px;
border-style: dashed dashed solid dashed;
border-color: transparent transparent #3149d0 transparent;
}
.sm-blue .scroll-down-arrow {
top: 6px;
border-style: solid dashed dashed dashed;
border-color: #3149d0 transparent transparent transparent;
}
.sm-blue.sm-rtl.sm-vertical a .sub-arrow {
right: auto;
left: 10px;
border-style: dashed solid dashed dashed;
border-color: transparent #6579e5 transparent transparent;
}
.sm-blue.sm-rtl > li:first-child > a, .sm-blue.sm-rtl > li:first-child > :not(ul) a {
border-radius: 0 8px 8px 0;
}
.sm-blue.sm-rtl > li:last-child > a, .sm-blue.sm-rtl > li:last-child > :not(ul) a {
border-radius: 8px 0 0 8px !important;
}
.sm-blue.sm-rtl > li:first-child {
border-left: 1px solid #3149d0;
}
.sm-blue.sm-rtl > li:last-child {
border-left: 0;
}
.sm-blue.sm-rtl ul a .sub-arrow {
right: auto;
left: 10px;
border-style: dashed solid dashed dashed;
border-color: transparent #6579e5 transparent transparent;
}
.sm-blue.sm-vertical {
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.sm-blue.sm-vertical a {
padding: 9px 23px;
}
.sm-blue.sm-vertical a .sub-arrow {
top: 50%;
margin-top: -5px;
bottom: auto;
left: auto;
margin-left: 0;
right: 10px;
border-style: dashed dashed dashed solid;
border-color: transparent transparent transparent #6579e5;
}
.sm-blue.sm-vertical > li:first-child > a, .sm-blue.sm-vertical > li:first-child > :not(ul) a {
border-radius: 8px 8px 0 0;
}
.sm-blue.sm-vertical > li:last-child > a, .sm-blue.sm-vertical > li:last-child > :not(ul) a {
border-radius: 0 0 8px 8px !important;
}
.sm-blue.sm-vertical > li {
border-left: 0 !important;
}
.sm-blue.sm-vertical ul {
border-radius: 4px !important;
}
.sm-blue.sm-vertical ul a {
padding: 9px 23px;
}
}
/*# sourceMappingURL=sm-blue.css.map */

View File

@ -0,0 +1,14 @@
/* Mobile first layout SmartMenus Core CSS (it's not recommended editing these rules)
You need this once per page no matter how many menu trees or different themes you use.
-------------------------------------------------------------------------------------------*/
.sm{box-sizing:border-box;position:relative;z-index:9999;-webkit-tap-highlight-color:rgba(0,0,0,0);}
.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;}
.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right;}
.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0;}
.sm ul{display:none;}
.sm li,.sm a{position:relative;}
.sm a{display:block;}
.sm a.disabled{cursor:default;}
.sm::after{content:"";display:block;height:0;font:0px/0 serif;clear:both;overflow:hidden;}
.sm *,.sm *::before,.sm *::after{box-sizing:inherit;}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,18 @@
/**
* StyleFix 1.0.3 & PrefixFree 1.0.7
* @author Lea Verou
* MIT license
*/
(function(){function k(a,b){return[].slice.call((b||document).querySelectorAll(a))}if(window.addEventListener){var e=window.StyleFix={link:function(a){try{if("stylesheet"!==a.rel||a.hasAttribute("data-noprefix"))return}catch(b){return}var c=a.href||a.getAttribute("data-href"),d=c.replace(/[^\/]+$/,""),h=(/^[a-z]{3,10}:/.exec(d)||[""])[0],l=(/^[a-z]{3,10}:\/\/[^\/]+/.exec(d)||[""])[0],g=/^([^?]*)\??/.exec(c)[1],m=a.parentNode,f=new XMLHttpRequest,n;f.onreadystatechange=function(){4===f.readyState&&
n()};n=function(){var b=f.responseText;if(b&&a.parentNode&&(!f.status||400>f.status||600<f.status)){b=e.fix(b,!0,a);if(d)var b=b.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(b,a,c){return/^([a-z]{3,10}:|#)/i.test(c)?b:/^\/\//.test(c)?'url("'+h+c+'")':/^\//.test(c)?'url("'+l+c+'")':/^\?/.test(c)?'url("'+g+c+'")':'url("'+d+c+'")'}),c=d.replace(/([\\\^\$*+[\]?{}.=!:(|)])/g,"\\$1"),b=b.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+c,"gi"),"$1");c=document.createElement("style");c.textContent=
b;c.media=a.media;c.disabled=a.disabled;c.setAttribute("data-href",a.getAttribute("href"));m.insertBefore(c,a);m.removeChild(a);c.media=a.media}};try{f.open("GET",c),f.send(null)}catch(p){"undefined"!=typeof XDomainRequest&&(f=new XDomainRequest,f.onerror=f.onprogress=function(){},f.onload=n,f.open("GET",c),f.send(null))}a.setAttribute("data-inprogress","")},styleElement:function(a){if(!a.hasAttribute("data-noprefix")){var b=a.disabled;a.textContent=e.fix(a.textContent,!0,a);a.disabled=b}},styleAttribute:function(a){var b=
a.getAttribute("style"),b=e.fix(b,!1,a);a.setAttribute("style",b)},process:function(){k('link[rel="stylesheet"]:not([data-inprogress])').forEach(StyleFix.link);k("style").forEach(StyleFix.styleElement);k("[style]").forEach(StyleFix.styleAttribute)},register:function(a,b){(e.fixers=e.fixers||[]).splice(void 0===b?e.fixers.length:b,0,a)},fix:function(a,b,c){for(var d=0;d<e.fixers.length;d++)a=e.fixers[d](a,b,c)||a;return a},camelCase:function(a){return a.replace(/-([a-z])/g,function(b,a){return a.toUpperCase()}).replace("-",
"")},deCamelCase:function(a){return a.replace(/[A-Z]/g,function(b){return"-"+b.toLowerCase()})}};(function(){setTimeout(function(){k('link[rel="stylesheet"]').forEach(StyleFix.link)},10);document.addEventListener("DOMContentLoaded",StyleFix.process,!1)})()}})();
(function(k){function e(b,c,d,h,l){b=a[b];b.length&&(b=RegExp(c+"("+b.join("|")+")"+d,"gi"),l=l.replace(b,h));return l}if(window.StyleFix&&window.getComputedStyle){var a=window.PrefixFree={prefixCSS:function(b,c,d){var h=a.prefix;-1<a.functions.indexOf("linear-gradient")&&(b=b.replace(/(\s|:|,)(repeating-)?linear-gradient\(\s*(-?\d*\.?\d*)deg/ig,function(b,a,c,d){return a+(c||"")+"linear-gradient("+(90-d)+"deg"}));b=e("functions","(\\s|:|,)","\\s*\\(","$1"+h+"$2(",b);b=e("keywords","(\\s|:)","(\\s|;|\\}|$)",
"$1"+h+"$2$3",b);b=e("properties","(^|\\{|\\s|;)","\\s*:","$1"+h+"$2:",b);if(a.properties.length){var l=RegExp("\\b("+a.properties.join("|")+")(?!:)","gi");b=e("valueProperties","\\b",":(.+?);",function(a){return a.replace(l,h+"$1")},b)}c&&(b=e("selectors","","\\b",a.prefixSelector,b),b=e("atrules","@","\\b","@"+h+"$1",b));b=b.replace(RegExp("-"+h,"g"),"-");return b=b.replace(/-\*-(?=[a-z]+)/gi,a.prefix)},property:function(b){return(0<=a.properties.indexOf(b)?a.prefix:"")+b},value:function(b,c){b=
e("functions","(^|\\s|,)","\\s*\\(","$1"+a.prefix+"$2(",b);b=e("keywords","(^|\\s)","(\\s|$)","$1"+a.prefix+"$2$3",b);0<=a.valueProperties.indexOf(c)&&(b=e("properties","(^|\\s|,)","($|\\s|,)","$1"+a.prefix+"$2$3",b));return b},prefixSelector:function(b){return b.replace(/^:{1,2}/,function(b){return b+a.prefix})},prefixProperty:function(b,c){var d=a.prefix+b;return c?StyleFix.camelCase(d):d}};(function(){var b={},c=[],d=getComputedStyle(document.documentElement,null),h=document.createElement("div").style,
l=function(a){if("-"===a.charAt(0)){c.push(a);a=a.split("-");var d=a[1];for(b[d]=++b[d]||1;3<a.length;)a.pop(),d=a.join("-"),StyleFix.camelCase(d)in h&&-1===c.indexOf(d)&&c.push(d)}};if(0<d.length)for(var g=0;g<d.length;g++)l(d[g]);else for(var e in d)l(StyleFix.deCamelCase(e));var g=0,f,k;for(k in b)d=b[k],g<d&&(f=k,g=d);a.prefix="-"+f+"-";a.Prefix=StyleFix.camelCase(a.prefix);a.properties=[];for(g=0;g<c.length;g++)e=c[g],0===e.indexOf(a.prefix)&&(f=e.slice(a.prefix.length),StyleFix.camelCase(f)in
h||a.properties.push(f));!("Ms"!=a.Prefix||"transform"in h||"MsTransform"in h)&&"msTransform"in h&&a.properties.push("transform","transform-origin");a.properties.sort()})();(function(){function b(a,b){h[b]="";h[b]=a;return!!h[b]}var c={"linear-gradient":{property:"backgroundImage",params:"red, teal"},calc:{property:"width",params:"1px + 5%"},element:{property:"backgroundImage",params:"#foo"},"cross-fade":{property:"backgroundImage",params:"url(a.png), url(b.png), 50%"}};c["repeating-linear-gradient"]=
c["repeating-radial-gradient"]=c["radial-gradient"]=c["linear-gradient"];var d={initial:"color","zoom-in":"cursor","zoom-out":"cursor",box:"display",flexbox:"display","inline-flexbox":"display",flex:"display","inline-flex":"display",grid:"display","inline-grid":"display","max-content":"width","min-content":"width","fit-content":"width","fill-available":"width"};a.functions=[];a.keywords=[];var h=document.createElement("div").style,e;for(e in c){var g=c[e],k=g.property,g=e+"("+g.params+")";!b(g,k)&&
b(a.prefix+g,k)&&a.functions.push(e)}for(var f in d)k=d[f],!b(f,k)&&b(a.prefix+f,k)&&a.keywords.push(f)})();(function(){function b(a){e.textContent=a+"{}";return!!e.sheet.cssRules.length}var c={":read-only":null,":read-write":null,":any-link":null,"::selection":null},d={keyframes:"name",viewport:null,document:'regexp(".")'};a.selectors=[];a.atrules=[];var e=k.appendChild(document.createElement("style")),l;for(l in c){var g=l+(c[l]?"("+c[l]+")":"");!b(g)&&b(a.prefixSelector(g))&&a.selectors.push(l)}for(var m in d)g=
m+" "+(d[m]||""),!b("@"+g)&&b("@"+a.prefix+g)&&a.atrules.push(m);k.removeChild(e)})();a.valueProperties=["transition","transition-property"];k.className+=" "+a.prefix;StyleFix.register(a.prefixCSS)}})(document.documentElement);

View File

@ -0,0 +1,236 @@
/**
* Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI
*
* luci-theme-material
* Copyright 2015 Lutty Yang <lutty@wcan.in>
*
* Have a bug? Please create an issue here on GitHub!
* https://github.com/LuttyYang/luci-theme-material/issues
*
* luci-theme-bootstrap:
* Copyright 2008 Steven Barth <steven@midlink.org>
* Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
* Copyright 2012 David Menting <david@nut-bolt.nl>
*
* MUI:
* https://github.com/muicss/mui
*
* Licensed to the public under the Apache License 2.0
*/
(function ($) {
$(".main > .loading").fadeOut();
/**
* trim text, Remove spaces, wrap
* @param text
* @returns {string}
*/
function trimText(text) {
return text.replace(/[ \t\n\r]+/g, " ");
}
var lastNode = undefined;
var mainNodeName = undefined;
var nodeUrl = "";
(function(node){
if (node[0] == "admin"){
luciLocation = [node[1], node[2]];
}else{
luciLocation = node;
}
for(var i in luciLocation){
nodeUrl += luciLocation[i];
if (i != luciLocation.length - 1){
nodeUrl += "/";
}
}
})(luciLocation);
/**
* get the current node by Burl (primary)
* @returns {boolean} success?
*/
function getCurrentNodeByUrl() {
var ret = false;
if (!$('body').hasClass('logged-in')) {
luciLocation = ["Main", "Login"];
return true;
}
$(".main > .main-left > .nav > .slide > .menu").each(function () {
var ulNode = $(this);
ulNode.next().find("a").each(function () {
var that = $(this);
var href = that.attr("href");
if (href.indexOf(nodeUrl) != -1) {
ulNode.click();
ulNode.next(".slide-menu").stop(true, true);
lastNode = that.parent();
lastNode.addClass("active");
ret = true;
return true;
}
});
});
return ret;
}
/**
* menu click
*/
$(".main > .main-left > .nav > .slide > .menu").click(function () {
var ul = $(this).next(".slide-menu");
var menu = $(this);
if (!ul.is(":visible")) {
menu.addClass("active");
ul.addClass("active");
ul.stop(true).slideDown("fast");
} else {
ul.stop(true).slideUp("fast", function () {
menu.removeClass("active");
ul.removeClass("active");
});
}
return false;
});
/**
* hook menu click and add the hash
*/
$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function () {
if (lastNode != undefined) lastNode.removeClass("active");
$(this).parent().addClass("active");
$(".main > .loading").fadeIn("fast");
return true;
});
/**
* fix menu click
*/
$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function () {
if (lastNode != undefined) lastNode.removeClass("active");
$(this).addClass("active");
$(".main > .loading").fadeIn("fast");
window.location = $($(this).find("a")[0]).attr("href");
return false;
});
/**
* get current node and open it
*/
if (getCurrentNodeByUrl()) {
mainNodeName = "node-" + luciLocation[0] + "-" + luciLocation[1];
mainNodeName = mainNodeName.replace(/[ \t\n\r\/]+/g, "_").toLowerCase();
$("body").addClass(mainNodeName);
}
$(".cbi-button-up").val("⇧");
$(".cbi-button-down").val("⇩");
/**
* hook other "A Label" and add hash to it.
*/
$("#maincontent > .container").find("a").each(function () {
var that = $(this);
var onclick = that.attr("onclick");
if (onclick == undefined || onclick == "") {
that.click(function () {
var href = that.attr("href");
if (href.indexOf("#") == -1) {
$(".main > .loading").fadeIn("fast");
return true;
}
});
}
});
/**
* Sidebar expand
*/
var showSide = false;
$(".showSide").click(function () {
if (showSide) {
$(".darkMask").stop(true).fadeOut("fast");
$(".main-left").stop(true).animate({
width: "0"
}, "fast");
$(".main-right").css("overflow-y", "auto");
showSide = false;
} else {
$(".darkMask").stop(true).fadeIn("fast");
$(".main-left").stop(true).animate({
width: "15rem"
}, "fast");
$(".main-right").css("overflow-y", "hidden");
showSide = true;
}
});
$(".darkMask").click(function () {
if (showSide) {
showSide = false;
$(".darkMask").stop(true).fadeOut("fast");
$(".main-left").stop(true).animate({
width: "0"
}, "fast");
$(".main-right").css("overflow-y", "auto");
}
});
$(window).resize(function () {
if ($(window).width() > 921) {
$(".main-left").css("width", "");
$(".darkMask").stop(true);
$(".darkMask").css("display", "none");
showSide = false;
}
});
/**
* fix legend position
*/
$("legend").each(function () {
var that = $(this);
that.after("<span class='panel-title'>" + that.text() + "</span>");
});
$(".cbi-section-table-titles, .cbi-section-table-descr, .cbi-section-descr").each(function () {
var that = $(this);
if (that.text().trim() == ""){
that.css("display", "none");
}
});
$(".main-right").focus();
$(".main-right").blur();
$("input").attr("size", "0");
if (mainNodeName != undefined) {
console.log(mainNodeName);
switch (mainNodeName) {
case "node-status-system_log":
case "node-status-kernel_log":
$("#syslog").focus(function () {
$("#syslog").blur();
$(".main-right").focus();
$(".main-right").blur();
});
break;
case "node-status-firewall":
var button = $(".node-status-firewall > .main fieldset li > a");
button.addClass("cbi-button cbi-button-reset a-to-btn");
break;
case "node-system-reboot":
var button = $(".node-system-reboot > .main > .main-right p > a");
button.addClass("cbi-button cbi-input-reset a-to-btn");
break;
}
}
})(jQuery);

View File

@ -0,0 +1,142 @@
<%#
luci-theme-butongwifi
Copyright 2017 Tracemouse <tracemouse@wcan.in>
Smart Menu:
https://www.smartmenus.org/
Font Awesome:
http://fontawesome.io/
luci-theme-material
Copyright 2015 Lutty Yang <lutty@wcan.in>
luci-theme-bootstrap:
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
MUI:
https://github.com/muicss/mui
Licensed to the public under the Apache License 2.0
-%>
<%
local ver = require "luci.version"
local disp = require "luci.dispatcher"
local request = disp.context.path
local category = request[1]
local tree = disp.node()
local categories = disp.node_childs(tree)
%>
</div>
<footer class="mobile-hide" style="text-align:center">
<a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
<a href="http://butong.me/"><%= ver.distversion %></a> /
<% if #categories > 1 then %>
<ul class="breadcrumb pull-right" id="modemenu">
<% for i, r in ipairs(categories) do %>
<li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
<% end %>
</ul>
<% end %>
</footer>
</div>
</div>
<script>
// thanks for Jo-Philipp Wich <jow@openwrt.org>
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
</script>
<script src="<%=media%>/js/jquery.min.js?v=git-17.016.25656-a85807d"></script>
<script src="<%=media%>/js/script.js?v=git-17.016.25656-a85807d"></script>
<script src="<%=media%>/js/jquery.smartmenus.min.js"></script>
<script>
// SmartMenus init
$(function() {
$('#main-menu').smartmenus({
subMenusSubOffsetX: 1,
subMenusSubOffsetY: -8
});
});
// SmartMenus mobile menu toggle button
$(function() {
var $mainMenuState = $('#main-menu-state');
if ($mainMenuState.length) {
// animate mobile menu
$mainMenuState.change(function(e) {
var $menu = $('#main-menu');
if (this.checked) {
$menu.hide().slideDown(250, function() { $menu.css('display', ''); });
} else {
$menu.show().slideUp(250, function() { $menu.css('display', ''); });
}
});
// hide mobile menu beforeunload
$(window).bind('beforeunload unload', function() {
if ($mainMenuState[0].checked) {
$mainMenuState[0].click();
}
});
}
});
//onload
$(document).ready(function(){
//add icon for login title
str=$(".node-main-login > .main form > div > h2").html();
str="<i class='fa fa-lock'></i> " + str;
$(".node-main-login > .main form > div > h2").html(str);
//add icons for navbar
status = ".main-nav > #main-menu > .slide > a[data-title='Status'] > i";
$(status).attr("class","fa fa-bar-chart");
status = ".main-nav > #main-menu > .slide > a[data-title='System'] > i";
$(status).attr("class","fa fa-cogs");
status = ".main-nav > #main-menu > .slide > a[data-title='Services'] > i";
$(status).attr("class","fa fa-server");
status = ".main-nav > #main-menu > .slide > a[data-title='Network'] > i";
$(status).attr("class","fa fa-globe");
status = ".main-nav > #main-menu > .slide > a[data-title='NAS'] > i";
$(status).attr("class","fa fa-wifi");
status = ".main-nav > #main-menu > .slide > a[data-title='VPN'] > i";
$(status).attr("class","fa fa-paper-plane");
status = ".main-nav > #main-menu > .slide > a[data-title='Bandwidth Monitor'] > i";
$(status).attr("class","fa fa-bar-chart");
//icons
/*
status = ".main-nav > #main-menu > .slide > a[data-title='Control'] > i";
$(status).attr("class","fa fa-cogs");
$('img').each(function(){
img = $(this).attr('src');
//alert(img);
if (img.indexOf("images/wifi.png"))
{
$(this).after("<i class='fa fa-wifi'></i>");
$(this).remove();
}
});
*/
});
</script>
</body>
</html>

View File

@ -0,0 +1,237 @@
<%#
luci-theme-butongwifi
Copyright 2017 Tracemouse <tracemouse@wcan.in>
Smart Menu:
https://www.smartmenus.org/
Font Awesome:
http://fontawesome.io/
luci-theme-material
Copyright 2015 Lutty Yang <lutty@wcan.in>
luci-theme-bootstrap:
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
MUI:
https://github.com/muicss/mui
Licensed to the public under the Apache License 2.0
-%>
<%
local ver = require "luci.version"
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local boardinfo = util.ubus("system", "board")
local request = disp.context.path
local request2 = disp.context.request
local category = request[1]
local cattree = category and disp.node(category)
local leaf = request2[#request2]
local tree = disp.node()
local node = disp.context.dispatched
local categories = disp.node_childs(tree)
local c = tree
local i, r
-- tag all nodes leading to this page
for i, r in ipairs(request) do
if c.nodes and c.nodes[r] then
c = c.nodes[r]
c._menu_selected = true
end
end
-- send as HTML5
http.prepare_content("text/html")
local function nodeurl(prefix, name, query)
local url = controller .. prefix .. name .. "/"
if query then
url = url .. http.build_querystring(query)
end
return pcdata(url)
end
local function subtree(prefix, node, level)
if not level then
level = 1
end
local childs = disp.node_childs(node)
if #childs > 0 then
if level > 2 then
%>
<ul class="tabs">
<%
end
local selected_node
local selected_name
local i, v
for i, v in ipairs(childs) do
local nnode = node.nodes[v]
if nnode._menu_selected then
selected_node = nnode
selected_name = v
end
if level > 2 then
%>
<li class="tabmenu-item-<%=v%><%- if nnode._menu_selected or (node.leaf and v == leaf) then %> active<% end %>">
<a href="<%=nodeurl(prefix, v, nnode.query)%>"><%=striptags(translate(nnode.title))%></a>
</li>
<% end
end
if level > 2 then
%>
</ul>
<% end
if selected_node then
subtree(prefix .. selected_name .. "/", selected_node, level + 1)
end
end
end
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
<head>
<meta charset="utf-8">
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
<meta name="format-detection" content="telephone=no, email=no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="x5-fullscreen" content="true">
<meta name="full-screen" content="yes">
<meta name="x5-page-mode" content="app">
<meta name="browsermode" content="application">
<meta name="theme-color" content="#0099CC">
<meta name="msapplication-tap-highlight" content="no">
<meta name="msapplication-TileColor" content="#0099CC">
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
<meta name="msapplication-TileImage" content="<%=media%>/images/favicon.png"/>
<link rel="icon" href="<%=media%>/images/favicon.png" sizes="144x144">
<link rel="apple-touch-icon-precomposed" href="<%=media%>/images/favicon.png" sizes="144x144">
<link href='<%=media%>/css/sm-core-css.css' rel='stylesheet' type='text/css' />
<link href='<%=media%>/css/sm-blue/sm-blue.css' rel='stylesheet' type='text/css' />
<link href='<%=media%>/css/mainmenu.css' rel='stylesheet' type='text/css' />
<link href='<%=media%>/font-awesome/css/font-awesome.min.css' rel='stylesheet' type='text/css' />
<link rel="stylesheet" href="<%=media%>/css/style.css?v=git-17.016.25656-a85807d">
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
<% if node and node.css then %>
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
<% end -%>
<% if css then %>
<style title="text/css">
<%-= css %>
</style>
<% end -%>
<script src="<%=resource%>/xhr.js?v=git-17.016.25656-a85807d"></script>
</head>
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
<nav class="main-nav" role="navigation">
<!-- Mobile menu toggle button (hamburger/x icon) -->
<input id="main-menu-state" type="checkbox" />
<label class="main-menu-btn" for="main-menu-state">
<span class="main-menu-btn-icon"></span> Toggle main menu visibility
</label>
<p class="nav-brand"><a href="/cgi-bin/luci/"><%=striptags( (boardinfo.hostname or "?") ) %></a></p>
<!-- <a class="nav-brand" href="/cgi-bin/luci/"><img width="120" alt="Openwrt" src="<%=media%>/images/logo.svg"></a> -->
<ul id="main-menu" class="sm sm-blue">
<%-
local function submenu(prefix, node)
local childs = disp.node_childs(node)
if #childs > 0 then
%>
<ul class="slide-menu">
<%-
for i, r in ipairs(childs) do
local nnode = node.nodes[r]
local href = controller .. prefix .. r ..
(nnode.query and http.build_querystring(nnode.query) or "")
%>
<li><a data-title="<%=pcdata(striptags(nnode.title))%>" href="<%=pcdata(href)%>"><%=pcdata(striptags(translate(nnode.title)))%></a></li>
<%-
end
%>
</ul>
<%-
end
end
childs = disp.node_childs(cattree)
if #childs > 0 then
for i, r in ipairs(childs) do
local nnode = cattree.nodes[r]
local href = controller .. "/" .. category .. "/" .. r ..
(nnode.query and http.build_querystring(k.query) or "")
local grandchildren = disp.node_childs(nnode)
if #grandchildren > 0 then
%>
<li class="slide">
<a class="menu" data-title="<%=pcdata(striptags(nnode.title))%>" href="#">
<i class="fa fa-gear"></i>
<%=pcdata(striptags(translate(nnode.title)))%>
</a>
<%- submenu("/" .. category .. "/" .. r .. "/", nnode) %>
</li>
<% else %>
<li class="slide">
<a class="menu" data-title="<%=pcdata(striptags(nnode.title))%>" href="<%=href%>">
<i class="fa fa-window-close-o"></i>
<%=pcdata(striptags(translate(nnode.title)))%></a>
</li>
<%
end
end
end
%>
</ul>
</nav>
<div class="main">
<div style="" class="loading"><span><div class="loading-img"></div>Loading...</span></div>
<div class="main-right">
<div class="darkMask"></div>
<div id="maincontent">
<div class="container">
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
<div class="alert-message warning">
<h4><%:No password set!%></h4>
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br>
<a href="<%=pcdata(luci.dispatcher.build_url("admin/system/admin"))%>"><%:Go to password configuration...%></a>
</div>
<%- end -%>
<% if category then subtree("/" .. category .. "/", cattree) end %>

View File

@ -0,0 +1,7 @@
#!/bin/sh
uci batch <<-EOF
set luci.themes.Btmod=/luci-static/btmod
set luci.main.mediaurlbase=/luci-static/btmod
commit luci
EOF
exit 0

View File

@ -0,0 +1,69 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NPM_NAME:=request
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=2.88.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
PKG_HASH:=skip
PKG_MAINTAINER:=Jerrykuku <jerrykuku@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=node/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
define Package/node-request
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
TITLE:=Request is designed to be the simplest way possible to make http calls
URL:=https://www.npmjs.org/package/request
DEPENDS:=+node
endef
define Package/node-request/description
Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.
endef
NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
TARGET_CFLAGS+=$(FPIC)
TARGET_CPPFLAGS+=$(FPIC)
define Build/Prepare
$(INSTALL_DIR) $(PKG_BUILD_DIR)
endef
define Build/Compile
$(MAKE_VARS) \
$(MAKE_FLAGS) \
npm_config_arch=$(NODEJS_CPU) \
npm_config_target_arch=$(NODEJS_CPU) \
npm_config_build_from_source=true \
npm_config_nodedir=$(STAGING_DIR)/usr/ \
npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
npm install -g $(DL_DIR)/$(PKG_SOURCE)
rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
endef
define Package/node-request/install
$(INSTALL_DIR) $(1)/usr/lib/node
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
endef
$(eval $(call BuildPackage,node-request))

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=177
PKG_VERSION:=180
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
@ -32,10 +32,10 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server
default y if i386||x86_64||arm||aarch64
endef
LUCI_TITLE:=SS/SSR/V2Ray/Trojan LuCI interface
LUCI_TITLE:=SS/SSR/V2Ray/Trojan/Socks5/Tun LuCI interface
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +pdnsd-alt +wget +lua +libuci-lua \
+microsocks +dns2socks +shadowsocks-libev-ss-local +shadowsocksr-libev-ssr-local +shadowsocks-libev-ss-redir +simple-obfs +tcpping \
+microsocks +dns2socks +shadowsocks-libev-ss-local +shadowsocksr-libev-ssr-local +shadowsocks-libev-ss-redir +simple-obfs +tcpping +resolveip\
+PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_plugin:v2ray-plugin \
+PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray \
+PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:trojan \

View File

@ -74,105 +74,50 @@ function refresh_data()
local set = luci.http.formvalue("set")
local uci = luci.model.uci.cursor()
local icount = 0
if set == "gfw_data" then
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'gfwlist_url', 'https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt') .. ' > /tmp/gfw.b64'
local retstring = 0
local function update(url, file, type, file2)
local Num = 1
refresh_cmd = "wget-ssl --no-check-certificate -t 3 -T 10 -O- " .. url .. " > /tmp/ssr-update." .. type
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
if sret == 0 then
luci.sys.call("/usr/bin/ssr-gfw")
icount = luci.sys.exec("cat /tmp/gfwnew.txt | wc -l")
if tonumber(icount) > 1000 then
if nixio.fs.access("/etc/dnsmasq.ssr/gfw_list.conf") then
oldcount = luci.sys.exec("cat /etc/dnsmasq.ssr/gfw_list.conf | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/gfwnew.txt /etc/dnsmasq.ssr/gfw_list.conf")
luci.sys.exec("cp -f /tmp/gfwnew.txt /tmp/dnsmasq.ssr/gfw_list.conf")
luci.sys.call("/etc/init.d/dnsmasq restart")
retstring = tostring(tonumber(icount)/2)
else
retstring = "0"
end
else
retstring = "-1"
if type == "gfw_data" then
luci.sys.call("/usr/bin/ssr-gfw " .. type)
Num = 2
end
if type == "ad_data" then
luci.sys.call("/usr/bin/ssr-ad " .. type)
end
local new_md5 = luci.sys.exec("echo -n $([ -f '/tmp/ssr-update." .. type .. "' ] && md5sum /tmp/ssr-update." .. type .. " | awk '{print $1}')")
local old_md5 = luci.sys.exec("echo -n $([ -f '" .. file .. "' ] && md5sum " .. file .. " | awk '{print $1}')")
if new_md5 == old_md5 then
retstring = "0"
else
icount = luci.sys.exec("cat /tmp/ssr-update." .. type .. " | wc -l")
luci.sys.exec("cp -f /tmp/ssr-update." .. type .. " " .. file)
if file2 then luci.sys.exec("cp -f /tmp/ssr-update." .. type .. " " .. file2) end
retstring = tostring(tonumber(icount)/Num)
if type == "gfw_data" or type == "ad_data" then
luci.sys.exec("/usr/share/shadowsocksr/gfw2ipset.sh gfw_data")
else
luci.sys.exec("/etc/init.d/shadowsocksr restart &")
end
end
luci.sys.exec("rm -f /tmp/gfwnew.txt")
else
retstring = "-1"
end
luci.sys.exec("rm -f /tmp/ssr-update." .. type)
end
if set == "gfw_data" then
update(uci:get_first("shadowsocksr", "global", "gfwlist_url", "https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt"), "/etc/ssr/gfw_list.conf", set, "/tmp/dnsmasq.ssr/gfw_list.conf")
end
if set == "ip_data" then
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'chnroute_url', 'https://ispip.clang.cn/all_cn.txt') .. " > /tmp/china_ssr.txt"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
icount = luci.sys.exec("cat /tmp/china_ssr.txt | wc -l")
if sret == 0 and tonumber(icount) > 1000 then
if nixio.fs.access("/etc/china_ssr.txt") then
oldcount = luci.sys.exec("cat /etc/china_ssr.txt | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/china_ssr.txt /etc/china_ssr.txt")
luci.sys.exec("/etc/init.d/shadowsocksr restart &")
retstring = tostring(tonumber(icount))
else
retstring = "0"
end
else
retstring = "-1"
end
luci.sys.exec("rm -f /tmp/china_ssr.txt")
end
if set == "nfip_data" then
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'nfip_url','https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt') .." > /tmp/netflixip.list"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
icount = luci.sys.exec("cat /tmp/netflixip.list | wc -l")
if sret == 0 and tonumber(icount) > 5 then
if nixio.fs.access("/etc/config/netflixip.list") then
oldcount = luci.sys.exec("cat /etc/config/netflixip.list | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/netflixip.list /etc/config/netflixip.list")
luci.sys.exec("/etc/init.d/shadowsocksr restart &")
retstring = tostring(tonumber(icount))
else
retstring = "0"
end
else
retstring = "-1"
end
luci.sys.exec("rm -f /tmp/netflixip.list")
update(uci:get_first("shadowsocksr", "global", "chnroute_url","https://ispip.clang.cn/all_cn.txt"), "/etc/ssr/china_ssr.txt", set)
end
if set == "ad_data" then
refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'adblock_url','https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt') .." > /tmp/adnew.conf"
sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
if sret == 0 then
luci.sys.call("/usr/bin/ssr-ad")
icount = luci.sys.exec("cat /tmp/ad.conf | wc -l")
if tonumber(icount) > 100 then
if nixio.fs.access("/etc/dnsmasq.ssr/ad.conf") then
oldcount = luci.sys.exec("cat /etc/dnsmasq.ssr/ad.conf | wc -l")
else
oldcount = "0"
end
if tonumber(icount) ~= tonumber(oldcount) then
luci.sys.exec("cp -f /tmp/ad.conf /etc/dnsmasq.ssr/ad.conf")
luci.sys.exec("cp -f /tmp/ad.conf /tmp/dnsmasq.ssr/ad.conf")
luci.sys.call("/etc/init.d/dnsmasq restart")
retstring = tostring(tonumber(icount))
else
retstring = "0"
end
else
retstring = "-1"
end
luci.sys.exec("rm -f /tmp/ad.conf")
else
retstring = "-1"
end
update(uci:get_first("shadowsocksr", "global", "adblock_url","https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt"), "/etc/ssr/ad.conf", set, "/tmp/dnsmasq.ssr/ad.conf")
end
if set == "nfip_data" then
update(uci:get_first("shadowsocksr", "global", "nfip_url","https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt"), "/etc/ssr/netflixip.list", set)
end
luci.http.prepare_content("application/json")
luci.http.write_json({ret = retstring,retcount = icount})

View File

@ -61,12 +61,13 @@ o.default = "https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt"
o = s:option(Value, "chnroute_url", translate("Chnroute Update url"))
o:value("https://ispip.clang.cn/all_cn.txt", translate("Clang.CN"))
o:value("https://ispip.clang.cn/all_cn_cidr.txt", translate("Clang.CN.CIDR"))
o.default = "https://ispip.clang.cn/all_cn.txt"
o = s:option(Value, "nfip_url", translate("nfip_url"))
o:value("https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt", translate("Netflix IP Only"))
o:value("https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/getflix.txt", translate("Netflix and AWS"))
o.default = "https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt"
o:value("https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt", translate("Netflix IP Only"))
o:value("https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/getflix.txt", translate("Netflix and AWS"))
o.default = "https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt"
o.description = translate("Customize Netflix IP Url")
-- [[ SOCKS5 Proxy ]]--

View File

@ -1,122 +1,118 @@
-- Copyright (C) 2017 yushi studio <ywb94@qq.com> github.com/ywb94
-- Licensed to the public under the GNU General Public License v3.
require "nixio.fs"
require "luci.sys"
require "luci.http"
local m, s, o,kcp_enable
local shadowsocksr = "shadowsocksr"
local uci = luci.model.uci.cursor()
local fs = require "nixio.fs"
local sys = require "luci.sys"
local sid = arg[1]
local uuid = luci.sys.exec("cat /proc/sys/kernel/random/uuid")
local http = require "luci.http"
local function isKcptun(file)
if not fs.access(file, "rwx", "rx", "rx") then
fs.chmod(file, 755)
end
local str = sys.exec(file .. " -v | awk '{printf $1}'")
return (str:lower() == "kcptun")
if not nixio.fs.access(file, "rwx", "rx", "rx") then
nixio.fs.chmod(file, 755)
end
local str = luci.sys.exec(file .. " -v | awk '{printf $1}'")
return (str:lower() == "kcptun")
end
local server_table = {}
local encrypt_methods = {
"none",
"table",
"rc4",
"rc4-md5-6",
"rc4-md5",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"bf-cfb",
"camellia-128-cfb",
"camellia-192-cfb",
"camellia-256-cfb",
"cast5-cfb",
"des-cfb",
"idea-cfb",
"rc2-cfb",
"seed-cfb",
"salsa20",
"chacha20",
"chacha20-ietf",
"none",
"table",
"rc4",
"rc4-md5-6",
"rc4-md5",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"bf-cfb",
"camellia-128-cfb",
"camellia-192-cfb",
"camellia-256-cfb",
"cast5-cfb",
"des-cfb",
"idea-cfb",
"rc2-cfb",
"seed-cfb",
"salsa20",
"chacha20",
"chacha20-ietf",
}
local encrypt_methods_ss = {
-- aead
"aes-128-gcm",
"aes-192-gcm",
"aes-256-gcm",
"chacha20-ietf-poly1305",
"xchacha20-ietf-poly1305",
-- stream
"table",
"rc4",
"rc4-md5",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"bf-cfb",
"camellia-128-cfb",
"camellia-192-cfb",
"camellia-256-cfb",
"salsa20",
"chacha20",
"chacha20-ietf",
-- aead
"aes-128-gcm",
"aes-192-gcm",
"aes-256-gcm",
"chacha20-ietf-poly1305",
"xchacha20-ietf-poly1305",
-- stream
"table",
"rc4",
"rc4-md5",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"bf-cfb",
"camellia-128-cfb",
"camellia-192-cfb",
"camellia-256-cfb",
"salsa20",
"chacha20",
"chacha20-ietf",
}
local protocol = {
"origin",
"verify_deflate",
"auth_sha1_v4",
"auth_aes128_sha1",
"auth_aes128_md5",
"auth_chain_a",
"auth_chain_b",
"auth_chain_c",
"auth_chain_d",
"auth_chain_e",
"auth_chain_f",
"origin",
"verify_deflate",
"auth_sha1_v4",
"auth_aes128_sha1",
"auth_aes128_md5",
"auth_chain_a",
"auth_chain_b",
"auth_chain_c",
"auth_chain_d",
"auth_chain_e",
"auth_chain_f",
}
obfs = {
"plain",
"http_simple",
"http_post",
"random_head",
"tls1.2_ticket_auth",
"plain",
"http_simple",
"http_post",
"random_head",
"tls1.2_ticket_auth",
}
local securitys = {
"auto",
"none",
"aes-128-gcm",
"chacha20-poly1305"
"auto",
"none",
"aes-128-gcm",
"chacha20-poly1305"
}
m = Map(shadowsocksr, translate("Edit ShadowSocksR Server"))
m.redirect = luci.dispatcher.build_url("admin/services/shadowsocksr/servers")
if m.uci:get(shadowsocksr, sid) ~= "servers" then
luci.http.redirect(m.redirect)
return
luci.http.redirect(m.redirect)
return
end
-- [[ Servers Setting ]]--
s = m:section(NamedSection, sid, "servers")
s.anonymous = true
s.addremove = false
s.addremove = false
o = s:option(DummyValue,"ssr_url","SS/SSR/V2RAY/TROJAN URL")
o.rawhtml = true
o.rawhtml = true
o.template = "shadowsocksr/ssrurl"
o.value =sid
@ -140,8 +136,8 @@ o.description = translate("Using incorrect encryption mothod may causes service
o = s:option(Value, "alias", translate("Alias(optional)"))
o = s:option(ListValue, "iface", translate("Network interface to use"))
for _, e in ipairs(sys.net.devices()) do
if e ~= "lo" then o:value(e) end
for _, e in ipairs(luci.sys.net.devices()) do
if e ~= "lo" then o:value(e) end
end
o:depends("type", "tun")
o.description = translate("Redirect traffic to this network interface")
@ -250,8 +246,8 @@ o:depends("type", "v2ray")
-- TCP伪装
o = s:option(ListValue, "tcp_guise", translate("Camouflage Type"))
o:depends("transport", "tcp")
o:value("http", "HTTP")
o:value("none", translate("None"))
o:value("http", "HTTP")
o.rmempty = true
-- HTTP域名
@ -292,10 +288,10 @@ o.rmempty = true
o = s:option(ListValue, "quic_security", translate("QUIC Security"))
o:depends("transport", "quic")
o.rmempty = true
o:value("none", translate("None"))
o:value("aes-128-gcm", translate("aes-128-gcm"))
o:value("chacha20-poly1305", translate("chacha20-poly1305"))
o.rmempty = true
o = s:option(Value, "quic_key", translate("QUIC Key"))
o:depends("transport", "quic")
@ -365,11 +361,11 @@ o.rmempty = true
-- [[ allowInsecure ]]--
o = s:option(Flag, "insecure", translate("allowInsecure"))
o.rmempty = true
o.rmempty = false
o:depends("type", "v2ray")
o:depends("type", "trojan")
o.default = "1"
o.description = translate("If true, allowss insecure connection at TLS client, e.g., TLS server uses unverifiable certificates.")
-- [[ TLS ]]--
o = s:option(Flag, "tls", translate("TLS"))
o.rmempty = true
@ -409,31 +405,31 @@ o:depends("certificate", 1)
cert_dir = "/etc/ssl/private/"
local path
http.setfilehandler(
function(meta, chunk, eof)
if not fd then
if (not meta) or (not meta.name) or (not meta.file) then return end
fd = nixio.open(cert_dir .. meta.file, "w")
if not fd then
path = translate("Create upload file error.")
return
end
end
if chunk and fd then
fd:write(chunk)
end
if eof and fd then
fd:close()
fd = nil
path = '/etc/ssl/private/' .. meta.file .. ''
end
end
)
luci.http.setfilehandler(
function(meta, chunk, eof)
if not fd then
if (not meta) or (not meta.name) or (not meta.file) then return end
fd = nixio.open(cert_dir .. meta.file, "w")
if not fd then
path = translate("Create upload file error.")
return
end
end
if chunk and fd then
fd:write(chunk)
end
if eof and fd then
fd:close()
fd = nil
path = '/etc/ssl/private/' .. meta.file .. ''
end
end
)
if luci.http.formvalue("upload") then
local f = luci.http.formvalue("ulfile")
if #f <= 0 then
path = translate("No specify upload file.")
end
local f = luci.http.formvalue("ulfile")
if #f <= 0 then
path = translate("No specify upload file.")
end
end
o = s:option(Value, "certpath", translate("Current Certificate Path"))
@ -459,7 +455,6 @@ o.default = 1234
o.rmempty = false
if nixio.fs.access("/usr/bin/kcptun-client") then
kcp_enable = s:option(Flag, "kcp_enable", translate("KcpTun Enable"), translate("bin:/usr/bin/kcptun-client"))
kcp_enable.rmempty = true
kcp_enable.default = "0"
@ -470,17 +465,17 @@ o = s:option(Value, "kcp_port", translate("KcpTun Port"))
o.datatype = "port"
o.default = 4000
function o.validate(self, value, section)
local kcp_file="/usr/bin/kcptun-client"
local enable = kcp_enable:formvalue(section) or kcp_enable.disabled
if enable == kcp_enable.enabled then
if not fs.access(kcp_file) then
return nil, translate("Haven't a Kcptun executable file")
elseif not isKcptun(kcp_file) then
return nil, translate("Not a Kcptun executable file")
end
end
local kcp_file="/usr/bin/kcptun-client"
local enable = kcp_enable:formvalue(section) or kcp_enable.disabled
if enable == kcp_enable.enabled then
if not nixio.fs.access(kcp_file) then
return nil, translate("Haven't a Kcptun executable file")
elseif not isKcptun(kcp_file) then
return nil, translate("Not a Kcptun executable file")
end
end
return value
return value
end
o:depends("type", "ssr")
o:depends("type", "ss")
@ -494,7 +489,6 @@ o = s:option(Value, "kcp_param", translate("KcpTun Param"))
o.default = "--nocomp"
o:depends("type", "ssr")
o:depends("type", "ss")
end
return m

View File

@ -5,12 +5,9 @@
local m, s, sec, o, kcp_enable
local shadowsocksr = "shadowsocksr"
local uci = luci.model.uci.cursor()
local sys = require "luci.sys"
m = Map(shadowsocksr, translate("ShadowSocksR Plus+ Settings"))
m:section(SimpleSection).template = "shadowsocksr/status"
m:section(SimpleSection).template = "shadowsocksr/status"
local server_table = {}
uci:foreach(shadowsocksr, "servers", function(s)
@ -106,4 +103,3 @@ o.description = translate("Custom DNS Server format as IP:PORT (default: 8.8.4.4
return m

View File

@ -1,5 +1,6 @@
require "luci.ip"
require "nixio.fs"
local m, s, o
local NXFS = require "nixio.fs"
m = Map("shadowsocksr", translate("IP black-and-white list"))
@ -27,9 +28,9 @@ o.rmempty = false
o = s:taboption("lan_ac", DynamicList, "lan_ac_ips", translate("LAN Host List"))
o.datatype = "ipaddr"
luci.ip.neighbors({ family = 4 }, function(entry)
if entry.reachable then
o:value(entry.dest:string())
end
if entry.reachable then
o:value(entry.dest:string())
end
end)
o:depends("lan_ac_mode", "w")
o:depends("lan_ac_mode", "b")
@ -37,25 +38,25 @@ o:depends("lan_ac_mode", "b")
o = s:taboption("lan_ac", DynamicList, "lan_bp_ips", translate("LAN Bypassed Host List"))
o.datatype = "ipaddr"
luci.ip.neighbors({ family = 4 }, function(entry)
if entry.reachable then
o:value(entry.dest:string())
end
if entry.reachable then
o:value(entry.dest:string())
end
end)
o = s:taboption("lan_ac", DynamicList, "lan_fp_ips", translate("LAN Force Proxy Host List"))
o.datatype = "ipaddr"
luci.ip.neighbors({ family = 4 }, function(entry)
if entry.reachable then
o:value(entry.dest:string())
end
if entry.reachable then
o:value(entry.dest:string())
end
end)
o = s:taboption("lan_ac", DynamicList, "lan_gm_ips", translate("Game Mode Host List"))
o.datatype = "ipaddr"
luci.ip.neighbors({ family = 4 }, function(entry)
if entry.reachable then
o:value(entry.dest:string())
end
if entry.reachable then
o:value(entry.dest:string())
end
end)
-- Part of Self
@ -66,73 +67,68 @@ end)
-- o:value("2", translatef("Forwarded Proxy"))
-- o.rmempty = false
s:tab("esc", translate("Bypass Domain List"))
local escconf = "/etc/config/white.list"
s:tab("esc", translate("Bypass Domain List"))
local escconf = "/etc/ssr/white.list"
o = s:taboption("esc", TextValue, "escconf")
o.rows = 13
o.wrap = "off"
o.rmempty = true
o.cfgvalue = function(self, section)
return NXFS.readfile(escconf) or ""
return nixio.fs.readfile(escconf) or ""
end
o.write = function(self, section, value)
NXFS.writefile(escconf, value:gsub("\r\n", "\n"))
nixio.fs.writefile(escconf, value:gsub("\r\n", "\n"))
end
o.remove = function(self, section, value)
NXFS.writefile(escconf, "")
nixio.fs.writefile(escconf, "")
end
s:tab("block", translate("Black Domain List"))
local blockconf = "/etc/config/black.list"
s:tab("block", translate("Black Domain List"))
local blockconf = "/etc/ssr/black.list"
o = s:taboption("block", TextValue, "blockconf")
o.rows = 13
o.wrap = "off"
o.rmempty = true
o.cfgvalue = function(self, section)
return NXFS.readfile(blockconf) or " "
return nixio.fs.readfile(blockconf) or " "
end
o.write = function(self, section, value)
NXFS.writefile(blockconf, value:gsub("\r\n", "\n"))
nixio.fs.writefile(blockconf, value:gsub("\r\n", "\n"))
end
o.remove = function(self, section, value)
NXFS.writefile(blockconf, "")
nixio.fs.writefile(blockconf, "")
end
s:tab("netflix", translate("Netflix Domain List"))
s:tab("denydomain", translate("Deny Domain List"))
local denydomainconf = "/etc/ssr/deny.list"
o = s:taboption("denydomain", TextValue, "denydomainconf")
o.rows = 13
o.wrap = "off"
o.rmempty = true
o.cfgvalue = function(self, section)
return nixio.fs.readfile(denydomainconf) or " "
end
o.write = function(self, section, value)
nixio.fs.writefile(denydomainconf, value:gsub("\r\n", "\n"))
end
o.remove = function(self, section, value)
nixio.fs.writefile(denydomainconf, "")
end
local netflixconf = "/etc/config/netflix.list"
s:tab("netflix", translate("Netflix Domain List"))
local netflixconf = "/etc/ssr/netflix.list"
o = s:taboption("netflix", TextValue, "netflixconf")
o.rows = 13
o.wrap = "off"
o.rmempty = true
o.cfgvalue = function(self, section)
return NXFS.readfile(netflixconf) or " "
return nixio.fs.readfile(netflixconf) or " "
end
o.write = function(self, section, value)
NXFS.writefile(netflixconf, value:gsub("\r\n", "\n"))
nixio.fs.writefile(netflixconf, value:gsub("\r\n", "\n"))
end
o.remove = function(self, section, value)
NXFS.writefile(netflixconf, "")
end
s:tab("netflixip", translate("Netflix IP List"))
local netflixipconf = "/etc/config/netflixip.list"
o = s:taboption("netflixip", TextValue, "netflixipconf")
o.rows = 13
o.wrap = "off"
o.rmempty = true
o.cfgvalue = function(self, section)
return NXFS.readfile(netflixipconf) or " "
end
o.write = function(self, section, value)
NXFS.writefile(netflixipconf, value:gsub("\r\n", "\n"))
end
o.remove = function(self, section, value)
NXFS.writefile(netflixipconf, "")
nixio.fs.writefile(netflixconf, "")
end
return m

View File

@ -1,20 +1,20 @@
local fs = require "nixio.fs"
require "luci.util"
require "nixio.fs"
f = SimpleForm("logview")
f.reset = false
f.submit = false
t = f:field(TextValue, "conf")
t.rmempty = true
t.rows = 20
function t.cfgvalue()
if fs.access("/tmp/ssrplus.log") then
local logs = luci.util.execi("cat /tmp/ssrplus.log")
local s = ""
for line in logs do
s = line .. "\n" .. s
end
return s
end
if nixio.fs.access("/tmp/ssrplus.log") then
local logs = luci.util.execi("cat /tmp/ssrplus.log")
local s = ""
for line in logs do
s = line .. "\n" .. s
end
return s
end
end
t.readonly="readonly"
return f
return f

View File

@ -9,38 +9,38 @@ local shadowsocksr = "shadowsocksr"
local sid = arg[1]
local encrypt_methods = {
"rc4-md5",
"rc4-md5-6",
"rc4",
"table",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"bf-cfb",
"camellia-128-cfb",
"camellia-192-cfb",
"camellia-256-cfb",
"cast5-cfb",
"des-cfb",
"idea-cfb",
"rc2-cfb",
"seed-cfb",
"salsa20",
"chacha20",
"chacha20-ietf",
"rc4-md5",
"rc4-md5-6",
"rc4",
"table",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"bf-cfb",
"camellia-128-cfb",
"camellia-192-cfb",
"camellia-256-cfb",
"cast5-cfb",
"des-cfb",
"idea-cfb",
"rc2-cfb",
"seed-cfb",
"salsa20",
"chacha20",
"chacha20-ietf",
}
local protocol = {
"origin",
"origin",
}
obfs = {
"plain",
"http_simple",
"http_post",
"plain",
"http_simple",
"http_post",
}
m = Map(shadowsocksr, translate("Edit ShadowSocksR Server"))
@ -51,13 +51,10 @@ if m.uci:get(shadowsocksr, sid) ~= "server_config" then
return
end
-- [[ Server Setting ]]--
s = m:section(NamedSection, sid, "server_config")
s.anonymous = true
s.addremove = false
s.addremove = false
o = s:option(Flag, "enable", translate("Enable"))
o.default = 1
@ -66,14 +63,16 @@ o.rmempty = false
o = s:option(ListValue, "type", translate("Server Type"))
o:value("socks5", translate("Socks5"))
if nixio.fs.access("/usr/bin/ssr-server") then
o:value("ssr", translate("ShadowsocksR"))
o:value("ssr", translate("ShadowsocksR"))
end
o.default = "socks5"
o = s:option(Value, "server_port", translate("Server Port"))
o.datatype = "port"
o.default = 8388
math.randomseed(tostring(os.time()):reverse():sub(1, 7))
o.default = math.random(10240,20480)
o.rmempty = false
o.description = translate("warning! Please do not reuse the port!")
o = s:option(Value, "timeout", translate("Connection Timeout"))
o.datatype = "uinteger"
@ -99,7 +98,6 @@ for _, v in ipairs(protocol) do o:value(v) end
o.rmempty = false
o:depends("type", "ssr")
o = s:option(ListValue, "obfs", translate("Obfs"))
for _, v in ipairs(obfs) do o:value(v) end
o.rmempty = false

View File

@ -1,56 +1,53 @@
-- Copyright (C) 2017 yushi studio <ywb94@qq.com>
-- Licensed to the public under the GNU General Public License v3.
require "luci.http"
require "luci.dispatcher"
local m, sec, o
local shadowsocksr = "shadowsocksr"
local uci = luci.model.uci.cursor()
m = Map(shadowsocksr)
local encrypt_methods = {
"table",
"rc4",
"rc4-md5",
"rc4-md5-6",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"bf-cfb",
"camellia-128-cfb",
"camellia-192-cfb",
"camellia-256-cfb",
"cast5-cfb",
"des-cfb",
"idea-cfb",
"rc2-cfb",
"seed-cfb",
"salsa20",
"chacha20",
"chacha20-ietf",
"table",
"rc4",
"rc4-md5",
"rc4-md5-6",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"bf-cfb",
"camellia-128-cfb",
"camellia-192-cfb",
"camellia-256-cfb",
"cast5-cfb",
"des-cfb",
"idea-cfb",
"rc2-cfb",
"seed-cfb",
"salsa20",
"chacha20",
"chacha20-ietf",
}
local protocol = {
"origin",
"verify_deflate",
"auth_sha1_v4",
"auth_aes128_sha1",
"auth_aes128_md5",
"auth_chain_a",
"origin",
"verify_deflate",
"auth_sha1_v4",
"auth_aes128_sha1",
"auth_aes128_md5",
"auth_chain_a",
}
obfs = {
"plain",
"http_simple",
"http_post",
"random_head",
"tls1.2_ticket_auth",
"tls1.2_ticket_fastauth",
"plain",
"http_simple",
"http_post",
"random_head",
"tls1.2_ticket_auth",
"tls1.2_ticket_fastauth",
}
m = Map(shadowsocksr)
-- [[ Global Setting ]]--
sec = m:section(TypedSection, "server_global", translate("Global Setting"))
sec.anonymous = true

Some files were not shown because too many files have changed in this diff Show More