mirror of
https://github.com/kenzok8/small-package
synced 2025-01-08 13:27:36 +08:00
update-09.06
This commit is contained in:
parent
fb8c907573
commit
35261d1f1c
@ -59,14 +59,14 @@ o:value("gfw",translate("GFW List Mode"))
|
||||
o:value("all",translate("Global Mode"))
|
||||
o:value("oversea",translate("Oversea Mode"))
|
||||
|
||||
if luci.sys.call("test -f /lib/modules/*/gcm.ko") ~= 0 then
|
||||
if luci.sys.call("test `grep MemTotal /proc/meminfo | awk '{print $2}'` -le 500000") == 0 then
|
||||
o=s:option(Flag,"gfw_mode",translate("Load GFW List"),
|
||||
translate("If the domestic DNS does not hijack foreign domain name to domestic IP, No need to be enabled"))
|
||||
o:depends("run_mode","router")
|
||||
o.default=1
|
||||
end
|
||||
|
||||
if luci.sys.call("test -f /lib/modules/*/gcm.ko") == 0 then
|
||||
if luci.sys.call("test `grep MemTotal /proc/meminfo | awk '{print $2}'` -gt 500000") == 0 then
|
||||
o=s:option(Flag,"adguardhome",translate("Used with AdGuardHome"),
|
||||
translate("Luci-app-adguardhome require"))
|
||||
if luci.sys.call("test `which AdGuardHome` && test -r /etc/init.d/AdGuardHome") == 0 then
|
||||
|
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-openclash
|
||||
PKG_VERSION:=0.43.03
|
||||
PKG_VERSION:=0.43.04
|
||||
PKG_RELEASE:=beta
|
||||
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
|
||||
|
||||
|
@ -146,6 +146,14 @@ local function dase()
|
||||
return uci:get("openclash", "config", "dashboard_password")
|
||||
end
|
||||
|
||||
local function db_foward_domain()
|
||||
return uci:get("openclash", "config", "dashboard_forward_domain")
|
||||
end
|
||||
|
||||
local function db_foward_port()
|
||||
return uci:get("openclash", "config", "dashboard_forward_port")
|
||||
end
|
||||
|
||||
local function check_lastversion()
|
||||
luci.sys.exec("sh /usr/share/openclash/openclash_version.sh 2>/dev/null")
|
||||
return luci.sys.exec("sed -n '/^https:/,$p' /tmp/openclash_last_version 2>/dev/null")
|
||||
@ -690,6 +698,8 @@ function action_status()
|
||||
watchdog = is_watchdog(),
|
||||
daip = daip(),
|
||||
dase = dase(),
|
||||
db_foward_port = db_foward_port(),
|
||||
db_foward_domain = db_foward_domain(),
|
||||
web = is_web(),
|
||||
cn_port = cn_port(),
|
||||
restricted_mode = restricted_mode(),
|
||||
|
@ -67,6 +67,7 @@ o:depends("type", "load-balance")
|
||||
|
||||
o = s:option(Value, "name", translate("Group Name"))
|
||||
o.rmempty = false
|
||||
o.default = "Group -"..sid
|
||||
|
||||
o = s:option(ListValue, "disable_udp", translate("Disable UDP"))
|
||||
o:value("false", translate("Disable"))
|
||||
|
@ -57,6 +57,7 @@ o:value("file")
|
||||
|
||||
o = s:option(Value, "name", translate("Provider Name"))
|
||||
o.rmempty = false
|
||||
o.default = "Proxy-provider -"..sid
|
||||
|
||||
o = s:option(ListValue, "path", translate("Provider Path"))
|
||||
o.description = translate("Update Your Proxy Provider File From Config Luci Page")
|
||||
|
@ -52,6 +52,7 @@ end
|
||||
|
||||
o = s:option(Value, "name", translate("Rule Providers Name"))
|
||||
o.rmempty = false
|
||||
o.default = "Rule-provider -"..sid
|
||||
|
||||
o = s:option(ListValue, "type", translate("Rule Providers Type"))
|
||||
o.rmempty = true
|
||||
|
@ -125,6 +125,7 @@ o.description = translate("Using incorrect encryption mothod may causes service
|
||||
|
||||
o = s:option(Value, "name", translate("Server Alias"))
|
||||
o.rmempty = false
|
||||
o.default = "Server -"..sid
|
||||
|
||||
o = s:option(Value, "server", translate("Server Address"))
|
||||
o.datatype = "host"
|
||||
|
@ -591,6 +591,19 @@ o.title = translate("Dashboard Secret")
|
||||
o.rmempty = true
|
||||
o.description = translate("Set Dashboard Secret")
|
||||
|
||||
o = s:taboption("dashboard", Value, "dashboard_forward_domain")
|
||||
o.title = translate("Public Dashboard Address")
|
||||
o.datatype = "or(host, string)"
|
||||
o.placeholder = "example.com"
|
||||
o.rmempty = true
|
||||
o.description = translate("Domain Name For Dashboard Login From Public Network")
|
||||
|
||||
o = s:taboption("dashboard", Value, "dashboard_forward_port")
|
||||
o.title = translate("Public Dashboard Port")
|
||||
o.datatype = "port"
|
||||
o.rmempty = true
|
||||
o.description = translate("Port For Dashboard Login From Public Network")
|
||||
|
||||
---- version update
|
||||
core_update = s:taboption("version_update", DummyValue, "", nil)
|
||||
core_update.template = "openclash/update"
|
||||
|
@ -217,9 +217,7 @@
|
||||
mode.innerHTML = status.clash ? "<b><font color=green><%:Redir-Host (TUN-Mix)%></font></b>" : '<b><font color=red><%:Not Running%></font></b>';
|
||||
}
|
||||
watchdog.innerHTML = status.watchdog ? '<b><font color=green><%:Running%></font> </b>' : '<b><font color=red><%:Not Running%></font></b>';
|
||||
daip.innerHTML = status.daip ? "<b><font color=green>"+status.daip+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
dase.innerHTML = status.dase ? "<b><font color=green>"+status.dase+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
dapo.innerHTML = status.cn_port ? "<b><font color=green>"+status.cn_port+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
web.innerHTML = status.web ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Open Panel%>" onclick="return ycad_dashboard(this)"/>' : '<b><font color=red><%:Not Running%></font></b>';
|
||||
webo.innerHTML = status.web ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Open Panel%>" onclick="return net_dashboard(this)"/>' : '<b><font color=red><%:Not Running%></font></b>';
|
||||
close_all_connection.innerHTML = status.clash ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Close All Connections%>" onclick="return b_close_all_connection(this)"/>' : '<b><font color=red><%:Not Running%></font></b>';
|
||||
@ -228,9 +226,24 @@
|
||||
update_subscribe.innerHTML = '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Check Config Update%>" onclick="return b_update_subscribe(this)"/>';
|
||||
update_other_rules.innerHTML = '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Check Third Party Rules Update%>" onclick="return b_update_other_rules(this)"/>';
|
||||
update_geoip.innerHTML = '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Check GEOIP Data Update%>" onclick="return b_update_geoip(this)"/>';
|
||||
if (status.daip != "" && window.location.hostname == status.daip) {
|
||||
daip.innerHTML = status.daip ? "<b><font color=green>"+status.daip+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
dapo.innerHTML = status.cn_port ? "<b><font color=green>"+status.cn_port+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
luci_protocol = (window.location.protocol == "http:" ? "ws://" : "wss://") + status.daip + ":" + status.cn_port;
|
||||
}
|
||||
else if (status.daip != "" && window.location.hostname != status.daip && status.db_foward_domain != "" && status.db_foward_port != "")
|
||||
{
|
||||
daip.innerHTML = status.db_foward_domain ? "<b><font color=green>"+status.db_foward_domain+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
dapo.innerHTML = status.db_foward_port ? "<b><font color=green>"+status.db_foward_port+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
luci_protocol = (window.location.protocol == "http:" ? "ws://" : "wss://") + status.db_foward_domain + ":" + status.db_foward_port;
|
||||
}
|
||||
else {
|
||||
daip.innerHTML = status.daip ? "<b><font color=green>"+status.daip+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
dapo.innerHTML = status.cn_port ? "<b><font color=green>"+status.cn_port+"</font></b>" : "<b><font color=red>"+"<%:Not Set%>"+"</font></b>";
|
||||
luci_protocol = (window.location.protocol == "http:" ? "ws://" : "wss://") + status.daip + ":" + status.cn_port;
|
||||
}
|
||||
|
||||
function ws_open() {
|
||||
luci_protocol = (window.location.protocol == "http:" ? "ws://" : "wss://") + status.daip + ":" + status.cn_port;
|
||||
ws_t = new WebSocket(luci_protocol+"/traffic?token="+status.dase);
|
||||
ws_c = new WebSocket(luci_protocol+"/connections?token="+status.dase);
|
||||
ws_t.onmessage = ws_tmessage;
|
||||
@ -253,7 +266,7 @@
|
||||
}
|
||||
else if (ws_error && ws_retry >= 3)
|
||||
{
|
||||
setInterval("ws_terror()",1000*2);
|
||||
ws_terror();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -496,12 +509,15 @@
|
||||
|
||||
function ycad_dashboard(btn)
|
||||
{
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', status.cn_port, function(x, status) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', null, function(x, status) {
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Open Panel%>';
|
||||
if (status.daip != "" && window.location.hostname == status.daip) {
|
||||
url1='<%="http://'+window.location.hostname+':'+window.location.port+'/luci-static/openclash?hostname='+ window.location.hostname + '&port=' + status.cn_port + '&secret=' + status.dase +'"%>';
|
||||
}
|
||||
else if (status.daip != "" && window.location.hostname != status.daip && status.db_foward_domain != "" && status.db_foward_port != "") {
|
||||
url1='<%="http://'+window.location.hostname+':'+window.location.port+'/luci-static/openclash?hostname='+ status.db_foward_domain + '&port=' + status.db_foward_port + '&secret=' + status.dase +'"%>';
|
||||
}
|
||||
else {
|
||||
url1='<%="http://'+window.location.hostname+':'+window.location.port+'/luci-static/openclash"%>';
|
||||
}
|
||||
@ -511,12 +527,15 @@
|
||||
}
|
||||
function net_dashboard(btn)
|
||||
{
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', status.cn_port, function(x, status) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', null, function(x, status) {
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Open Panel%>';
|
||||
if (status.daip != "" && window.location.hostname == status.daip) {
|
||||
url2='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/?host='+ window.location.hostname + '&port=' + status.cn_port + '&secret=' + status.dase +'"%>';
|
||||
}
|
||||
else if (status.daip != "" && window.location.hostname != status.daip && status.db_foward_domain != "" && status.db_foward_port != "") {
|
||||
url2='<%="http://'+status.db_foward_domain+':'+status.db_foward_port+'/ui/?host='+ status.db_foward_domain + '&port=' + status.db_foward_port + '&secret=' + status.dase +'"%>';
|
||||
}
|
||||
else {
|
||||
url2='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/"%>';
|
||||
}
|
||||
@ -550,7 +569,7 @@
|
||||
}
|
||||
|
||||
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "currentversion")%>', status.currentversion, function(x, status) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "currentversion")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
clashversion.innerHTML = '<img id="currenntver" src="'+status.currentversion+'" alt="currentversion" height="21px" onload="return clashversion_check()" onclick="return go_update()">';
|
||||
}
|
||||
@ -558,7 +577,7 @@
|
||||
|
||||
function clashversion_check()
|
||||
{
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "lastversion")%>', status.lastversion, function(x, status) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "lastversion")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
if ( status.lastversion != "" )
|
||||
{
|
||||
@ -570,7 +589,7 @@
|
||||
|
||||
function clashversion_error()
|
||||
{
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "currentversion")%>', status.currentversion, function(x, status) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "currentversion")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
clashversion.innerHTML = '<img id="currenntver" src="'+status.currentversion+'" alt="currentversion" height="21px" onclick="return go_update()">';
|
||||
}
|
||||
@ -590,7 +609,7 @@
|
||||
}
|
||||
|
||||
var startlog = document.getElementById('_clashstart');
|
||||
XHR.poll(6, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', status.startlog, function(x, status) {
|
||||
XHR.poll(6, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
if ( status.startlog == "\n" || status.startlog == "" ) {
|
||||
var rdmdl=Math.floor(Math.random()*12)+1;
|
||||
@ -645,7 +664,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
XHR.poll(1, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', status.startlog, function(x, status) {
|
||||
XHR.poll(1, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
if ( status.startlog != "\n" && status.startlog != "" ) {
|
||||
startlog.innerHTML = '<b><font color="green">'+status.startlog+'</font></b>';
|
||||
|
@ -423,6 +423,18 @@ msgstr "管理页面地址示例:"
|
||||
msgid "Dashboard Port"
|
||||
msgstr "管理页面端口"
|
||||
|
||||
msgid "Public Dashboard Address"
|
||||
msgstr "管理页面公网域名"
|
||||
|
||||
msgid "Domain Name For Dashboard Login From Public Network"
|
||||
msgstr "设置公网域名,便于从公网访问时自动登录"
|
||||
|
||||
msgid "Public Dashboard Port"
|
||||
msgstr "管理页面映射端口"
|
||||
|
||||
msgid "Port For Dashboard Login From Public Network"
|
||||
msgstr "设置映射端口,便于从公网访问时自动登录"
|
||||
|
||||
msgid "GEOIP Update"
|
||||
msgstr "GEOIP数据库订阅"
|
||||
|
||||
|
@ -1849,8 +1849,8 @@ revert_firewall()
|
||||
ip6tables -t nat -D PREROUTING "$pre_line" >/dev/null 2>&1
|
||||
done >/dev/null 2>&1
|
||||
|
||||
ip6tables -t nat -D PREROUTING -p tcp -d 2001:4860:4860::8888 --dport 53 -j ACCEPT
|
||||
ip6tables -t nat -D PREROUTING -p tcp -d 2001:4860:4860::8844 --dport 53 -j ACCEPT
|
||||
ip6tables -t nat -D PREROUTING -p tcp -d 2001:4860:4860::8888 --dport 53 -j ACCEPT >/dev/null 2>&1
|
||||
ip6tables -t nat -D PREROUTING -p tcp -d 2001:4860:4860::8844 --dport 53 -j ACCEPT >/dev/null 2>&1
|
||||
|
||||
ip6tables -t mangle -F openclash >/dev/null 2>&1
|
||||
ip6tables -t mangle -X openclash >/dev/null 2>&1
|
||||
|
@ -229,8 +229,8 @@ cat >> "$DEBUG_LOG" <<-EOF
|
||||
UDP流量转发(tproxy): $(ts_cf "$enable_udp_proxy")
|
||||
DNS劫持: $(ts_cf "$enable_redirect_dns")
|
||||
自定义DNS: $(ts_cf "$enable_custom_dns")
|
||||
IPV6代理: $(ts_cf "$ipv6_dns")
|
||||
IPV6-DNS解析: $(ts_cf "$ipv6_enable")
|
||||
IPV6代理: $(ts_cf "$ipv6_enable")
|
||||
IPV6-DNS解析: $(ts_cf "$ipv6_dns")
|
||||
禁用Dnsmasq缓存: $(ts_cf "$disable_masq_cache")
|
||||
自定义规则: $(ts_cf "$enable_custom_clash_rules")
|
||||
仅允许内网: $(ts_cf "$intranet_allowed")
|
||||
|
File diff suppressed because one or more lines are too long
@ -41,7 +41,7 @@ local Value Value_1 RUBY_YAML_PARSE
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
return
|
||||
fi
|
||||
RUBY_YAML_PARSE="Thread.new{Value = YAML.load_file('$1'); if File::exist?('$3') then Value_1 = YAML.load_file('$3'); Value$2=Value_1$4; else Value.delete('$4'); end; File.open('$1','w') {|f| YAML.dump(Value, f)}}.join"
|
||||
RUBY_YAML_PARSE="Thread.new{Value = YAML.load_file('$1'); if File::exist?('$3') then Value_1 = YAML.load_file('$3'); if not '$4'.empty? then Value$2=Value_1['$4']; else Value$2=Value_1 end else if not '$4'.empty? then Value.delete('$4'); end; end; File.open('$1','w') {|f| YAML.dump(Value, f)}}.join"
|
||||
ruby -ryaml -E UTF-8 -e "$RUBY_YAML_PARSE" 2>/dev/null
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,6 @@ PKG_NAME:=luci-app-vssr
|
||||
PKG_VERSION:=1.22-2
|
||||
PKG_RELEASE:=20210904
|
||||
|
||||
PKG_MAINTAINER:=lean jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Trojan \
|
||||
|
Loading…
Reference in New Issue
Block a user