parent
f30787256f
commit
c0a2aea1c8
@ -12,6 +12,7 @@ PKG_RELEASE:=1
|
|||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \
|
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy \
|
CONFIG_PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy \
|
||||||
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Geoview \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy \
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria \
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy \
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy \
|
||||||
@ -26,7 +27,6 @@ PKG_CONFIG_DEPENDS:= \
|
|||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_Plus \
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_Plus \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_tuic_client \
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_tuic_client \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geodata \
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geodata \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geoview \
|
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin \
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray \
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray_Plugin
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray_Plugin
|
||||||
@ -64,6 +64,11 @@ config PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy
|
|||||||
select PACKAGE_kmod-nft-nat
|
select PACKAGE_kmod-nft-nat
|
||||||
default y if PACKAGE_firewall4
|
default y if PACKAGE_firewall4
|
||||||
|
|
||||||
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Geoview
|
||||||
|
bool "Include Geoview"
|
||||||
|
select PACKAGE_geoview
|
||||||
|
default n
|
||||||
|
|
||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy
|
||||||
bool "Include Haproxy"
|
bool "Include Haproxy"
|
||||||
select PACKAGE_haproxy
|
select PACKAGE_haproxy
|
||||||
@ -141,11 +146,6 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geodata
|
|||||||
select PACKAGE_v2ray-geosite
|
select PACKAGE_v2ray-geosite
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geoview
|
|
||||||
bool "Include V2ray_Geoview"
|
|
||||||
select PACKAGE_geoview
|
|
||||||
default n
|
|
||||||
|
|
||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin
|
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin
|
||||||
bool "Include V2ray-Plugin (Shadowsocks Plugin)"
|
bool "Include V2ray-Plugin (Shadowsocks Plugin)"
|
||||||
select PACKAGE_v2ray-plugin
|
select PACKAGE_v2ray-plugin
|
||||||
|
@ -289,6 +289,12 @@ function connect_status()
|
|||||||
local gfw_list = uci:get(appname, "@global[0]", "use_gfw_list") or "1"
|
local gfw_list = uci:get(appname, "@global[0]", "use_gfw_list") or "1"
|
||||||
local proxy_mode = uci:get(appname, "@global[0]", "tcp_proxy_mode") or "proxy"
|
local proxy_mode = uci:get(appname, "@global[0]", "tcp_proxy_mode") or "proxy"
|
||||||
local socks_server = api.get_cache_var("GLOBAL_TCP_SOCKS_server")
|
local socks_server = api.get_cache_var("GLOBAL_TCP_SOCKS_server")
|
||||||
|
|
||||||
|
-- 兼容 curl 8.6 time_starttransfer 错误
|
||||||
|
local curl_ver = luci.sys.exec("curl -V 2>/dev/null | head -n 1 | awk '{print $2}' | cut -d. -f1,2 | tr -d ' \n'") or "0"
|
||||||
|
url = (curl_ver == "8.6") and "-w %{http_code}:%{time_appconnect} https://" .. url
|
||||||
|
or "-w %{http_code}:%{time_starttransfer} http://" .. url
|
||||||
|
|
||||||
if socks_server and socks_server ~= "" then
|
if socks_server and socks_server ~= "" then
|
||||||
if (chn_list == "proxy" and gfw_list == "0" and proxy_mode ~= "proxy" and baidu ~= nil) or (chn_list == "0" and gfw_list == "0" and proxy_mode == "proxy") then
|
if (chn_list == "proxy" and gfw_list == "0" and proxy_mode ~= "proxy" and baidu ~= nil) or (chn_list == "0" and gfw_list == "0" and proxy_mode == "proxy") then
|
||||||
-- 中国列表+百度 or 全局
|
-- 中国列表+百度 or 全局
|
||||||
@ -298,7 +304,7 @@ function connect_status()
|
|||||||
url = "-x socks5h://" .. socks_server .. " " .. url
|
url = "-x socks5h://" .. socks_server .. " " .. url
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -sk -w "%{http_code}:%{time_starttransfer}" ' .. url)
|
local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -sk ' .. url)
|
||||||
local code = tonumber(luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $1}'") or "0")
|
local code = tonumber(luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $1}'") or "0")
|
||||||
if code ~= 0 then
|
if code ~= 0 then
|
||||||
local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")
|
local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")
|
||||||
|
@ -290,6 +290,9 @@ o:depends({ _tcp_node_bool = "1" })
|
|||||||
o:value("dnsmasq", "Dnsmasq")
|
o:value("dnsmasq", "Dnsmasq")
|
||||||
o:value("chinadns-ng", translate("ChinaDNS-NG (recommended)"))
|
o:value("chinadns-ng", translate("ChinaDNS-NG (recommended)"))
|
||||||
|
|
||||||
|
o = s:option(DummyValue, "view_chinadns_log", " ")
|
||||||
|
o.template = appname .. "/acl/view_chinadns_log"
|
||||||
|
|
||||||
o = s:option(Flag, "filter_proxy_ipv6", translate("Filter Proxy Host IPv6"), translate("Experimental feature."))
|
o = s:option(Flag, "filter_proxy_ipv6", translate("Filter Proxy Host IPv6"), translate("Experimental feature."))
|
||||||
o.default = "0"
|
o.default = "0"
|
||||||
o:depends({ _tcp_node_bool = "1" })
|
o:depends({ _tcp_node_bool = "1" })
|
||||||
@ -418,6 +421,4 @@ o:value("direct", translate("Direct DNS"))
|
|||||||
o.description = desc .. "</ul>"
|
o.description = desc .. "</ul>"
|
||||||
o:depends({dns_shunt = "dnsmasq", tcp_proxy_mode = "proxy", chn_list = "direct"})
|
o:depends({dns_shunt = "dnsmasq", tcp_proxy_mode = "proxy", chn_list = "direct"})
|
||||||
|
|
||||||
m:append(Template(appname .. "/acl/footer"))
|
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
@ -16,9 +16,9 @@ s = fb:section(SimpleSection, translate("Backup and Restore"), translate("Backup
|
|||||||
"<br><font color='red'>" ..
|
"<br><font color='red'>" ..
|
||||||
translate("Note: Restoring configurations across different versions may cause compatibility issues.") ..
|
translate("Note: Restoring configurations across different versions may cause compatibility issues.") ..
|
||||||
"</font>")
|
"</font>")
|
||||||
o = s:option(DummyValue, '', nil)
|
|
||||||
o.template = appname .. "/log/backup_restore"
|
|
||||||
|
|
||||||
|
s.anonymous = true
|
||||||
|
s:append(Template(appname .. "/log/backup_restore"))
|
||||||
|
|
||||||
local backup_files = {
|
local backup_files = {
|
||||||
"/etc/config/passwall",
|
"/etc/config/passwall",
|
||||||
|
@ -4,7 +4,6 @@ bin = require "nixio".bin
|
|||||||
fs = require "nixio.fs"
|
fs = require "nixio.fs"
|
||||||
sys = require "luci.sys"
|
sys = require "luci.sys"
|
||||||
uci = require "luci.model.uci".cursor()
|
uci = require "luci.model.uci".cursor()
|
||||||
libuci = require "uci".cursor()
|
|
||||||
util = require "luci.util"
|
util = require "luci.util"
|
||||||
datatypes = require "luci.cbi.datatypes"
|
datatypes = require "luci.cbi.datatypes"
|
||||||
jsonc = require "luci.jsonc"
|
jsonc = require "luci.jsonc"
|
||||||
@ -35,33 +34,20 @@ function is_js_luci()
|
|||||||
return sys.call('[ -f "/www/luci-static/resources/uci.js" ]') == 0
|
return sys.call('[ -f "/www/luci-static/resources/uci.js" ]') == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function uci_set_list(cursor, config, section, option, value)
|
function is_old_uci()
|
||||||
if config and section and option then
|
return sys.call("grep 'require \"uci\"' /usr/lib/lua/luci/model/uci.lua >/dev/null 2>&1") == 0
|
||||||
if not value or #value == 0 then
|
|
||||||
return cursor:delete(config, section, option)
|
|
||||||
end
|
|
||||||
return cursor:set(
|
|
||||||
config, section, option,
|
|
||||||
( type(value) == "table" and value or { value } )
|
|
||||||
)
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
function uci_section(cursor, config, type, name, values)
|
|
||||||
local stat = true
|
|
||||||
if name then
|
|
||||||
stat = cursor:set(config, name, type)
|
|
||||||
else
|
|
||||||
name = cursor:add(config, type)
|
|
||||||
stat = name and true
|
|
||||||
end
|
|
||||||
|
|
||||||
return stat and name
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function uci_save(cursor, config, commit, apply)
|
function uci_save(cursor, config, commit, apply)
|
||||||
if is_js_luci() then
|
if is_old_uci() then
|
||||||
|
cursor:save(config)
|
||||||
|
if commit then
|
||||||
|
cursor:commit(config)
|
||||||
|
if apply then
|
||||||
|
sys.call("/etc/init.d/" .. config .. " reload > /dev/null 2>&1 &")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
commit = true
|
commit = true
|
||||||
if commit then
|
if commit then
|
||||||
if apply then
|
if apply then
|
||||||
@ -70,14 +56,6 @@ function uci_save(cursor, config, commit, apply)
|
|||||||
sh_uci_commit(config)
|
sh_uci_commit(config)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
|
||||||
cursor:save(config)
|
|
||||||
if commit then
|
|
||||||
cursor:commit(config)
|
|
||||||
if apply then
|
|
||||||
sys.call("/etc/init.d/" .. config .. " reload > /dev/null 2>&1 &")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -5,12 +5,6 @@ local api = require "luci.passwall.api"
|
|||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
var url = window.location.href;
|
|
||||||
var sid_match = url.match(/\/acl_config\/(cfg[0-9a-f]+)/);
|
|
||||||
var sid = sid_match ? sid_match[1] : null;
|
|
||||||
if (!sid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var selects = document.querySelectorAll("select[id*='dns_shunt']");
|
var selects = document.querySelectorAll("select[id*='dns_shunt']");
|
||||||
selects.forEach(function (select) {
|
selects.forEach(function (select) {
|
||||||
if (select.value === "chinadns-ng") {
|
if (select.value === "chinadns-ng") {
|
||||||
@ -32,7 +26,7 @@ local api = require "luci.passwall.api"
|
|||||||
logLink.href = "#";
|
logLink.href = "#";
|
||||||
logLink.className = "log-link";
|
logLink.className = "log-link";
|
||||||
logLink.style.marginLeft = "10px";
|
logLink.style.marginLeft = "10px";
|
||||||
logLink.setAttribute("onclick", "window.open('" + '<%=api.url("get_chinadns_log")%>' + "?flag=" + sid + "', '_blank')");
|
logLink.setAttribute("onclick", "window.open('" + '<%=api.url("get_chinadns_log") .. "?flag=" .. section%>' + "', '_blank')");
|
||||||
select.insertAdjacentElement("afterend", logLink);
|
select.insertAdjacentElement("afterend", logLink);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
@ -166,7 +166,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-4 check" onclick="check_connect('baidu', 'http://www.baidu.com')">
|
<div class="pure-u-1-4 check" onclick="check_connect('baidu', 'www.baidu.com')">
|
||||||
<div class="block pure-g">
|
<div class="block pure-g">
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<div class="img-con">
|
<div class="img-con">
|
||||||
@ -178,7 +178,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-4 check" onclick="check_connect('google', 'http://www.google.com/generate_204')">
|
<div class="pure-u-1-4 check" onclick="check_connect('google', 'www.google.com/generate_204')">
|
||||||
<div class="block pure-g">
|
<div class="block pure-g">
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<div class="img-con">
|
<div class="img-con">
|
||||||
@ -190,7 +190,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-4 check" onclick="check_connect('github', 'http://github.com')">
|
<div class="pure-u-1-4 check" onclick="check_connect('github', 'github.com')">
|
||||||
<div class="block pure-g">
|
<div class="block pure-g">
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<div class="img-con">
|
<div class="img-con">
|
||||||
@ -202,7 +202,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-4 check" onclick="check_connect('instagram', 'http://www.instagram.com')">
|
<div class="pure-u-1-4 check" onclick="check_connect('instagram', 'www.instagram.com')">
|
||||||
<div class="block pure-g">
|
<div class="block pure-g">
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<div class="img-con">
|
<div class="img-con">
|
||||||
|
@ -2,25 +2,24 @@
|
|||||||
local api = require "luci.passwall.api"
|
local api = require "luci.passwall.api"
|
||||||
-%>
|
-%>
|
||||||
|
|
||||||
<%+cbi/valueheader%>
|
|
||||||
<div class="cbi-value" id="_backup_div">
|
<div class="cbi-value" id="_backup_div">
|
||||||
<label class="cbi-value-title"><%:Create Backup File%></label>
|
<label class="cbi-value-title"><%:Create Backup File%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="button" class="btn cbi-button cbi-input-apply" onclick="dl_backup()" value="<%:DL Backup%>" />
|
<input class="btn cbi-button cbi-button-save" type="button" onclick="dl_backup()" value="<%:DL Backup%>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cbi-value" id="_upload_div">
|
<div class="cbi-value" id="_upload_div">
|
||||||
<label class="cbi-value-title"><%:Restore Backup File%></label>
|
<label class="cbi-value-title"><%:Restore Backup File%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="button" class="btn cbi-button cbi-input-apply" id="upload-btn" value="<%:RST Backup%>" />
|
<input class="btn cbi-button cbi-button-apply" type="button" id="upload-btn" value="<%:RST Backup%>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cbi-value" id="_reset_div">
|
<div class="cbi-value" id="_reset_div">
|
||||||
<label class="cbi-value-title"><%:Restore to default configuration%></label>
|
<label class="cbi-value-title"><%:Restore to default configuration%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="button" class="btn cbi-button cbi-button-remove" onclick="do_reset()" value="<%:Do Reset%>" />
|
<input class="btn cbi-button cbi-button-reset" type="button" onclick="do_reset()" value="<%:Do Reset%>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -32,8 +31,8 @@ local api = require "luci.passwall.api"
|
|||||||
<input class="cbi-input-file" type="file" id="ulfile" name="ulfile" accept=".tar.gz" required />
|
<input class="cbi-input-file" type="file" id="ulfile" name="ulfile" accept=".tar.gz" required />
|
||||||
<br />
|
<br />
|
||||||
<div class="up-button-container">
|
<div class="up-button-container">
|
||||||
<input type="submit" class="btn cbi-button cbi-input-apply" value="<%:UL Restore%>" />
|
<input class="btn cbi-button cbi-button-apply" type="submit" value="<%:UL Restore%>" />
|
||||||
<button class="btn cbi-button cbi-button-remove" id="upload-close"><%:CLOSE WIN%></button>
|
<input class="btn cbi-button cbi-button-remove" type="button" id="upload-close" value="<%:CLOSE WIN%>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -131,4 +130,3 @@ local api = require "luci.passwall.api"
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<%+cbi/valuefooter%>
|
|
||||||
|
@ -20,6 +20,9 @@ local api = require "luci.passwall.api"
|
|||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
<div id="cbi-<%=self.config.."-"..section.."-"..self.option%>" data-index="<%=self.index%>" data-depends="<%=pcdata(self:deplist2json(section))%>">
|
<div id="cbi-<%=self.config.."-"..section.."-"..self.option%>" data-index="<%=self.index%>" data-depends="<%=pcdata(self:deplist2json(section))%>">
|
||||||
|
<label class="cbi-value-title"></label>
|
||||||
|
<div class="cbi-value-field">
|
||||||
<input class="btn cbi-button cbi-button-add" type="button" onclick="add_node_by_key()" value="<%:Add nodes to the standby node list by keywords%>" />
|
<input class="btn cbi-button cbi-button-add" type="button" onclick="add_node_by_key()" value="<%:Add nodes to the standby node list by keywords%>" />
|
||||||
<input class="btn cbi-button cbi-button-remove" type="button" onclick="remove_node_by_key()" value="<%:Delete nodes in the standby node list by keywords%>" />
|
<input class="btn cbi-button cbi-button-remove" type="button" onclick="remove_node_by_key()" value="<%:Delete nodes in the standby node list by keywords%>" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -233,11 +233,7 @@ check_ver() {
|
|||||||
|
|
||||||
get_new_port() {
|
get_new_port() {
|
||||||
port=$1
|
port=$1
|
||||||
[ "$port" == "auto" ] && {
|
[ "$port" == "auto" ] && port=2082
|
||||||
port=2082
|
|
||||||
local GET_NEW_PORT=$(get_cache_var "get_new_port")
|
|
||||||
[ -n "${GET_NEW_PORT}" ] && port=${GET_NEW_PORT}
|
|
||||||
}
|
|
||||||
protocol=$(echo $2 | tr 'A-Z' 'a-z')
|
protocol=$(echo $2 | tr 'A-Z' 'a-z')
|
||||||
result=$(check_port_exists $port $protocol)
|
result=$(check_port_exists $port $protocol)
|
||||||
if [ "$result" != 0 ]; then
|
if [ "$result" != 0 ]; then
|
||||||
@ -249,7 +245,6 @@ get_new_port() {
|
|||||||
fi
|
fi
|
||||||
get_new_port $temp $protocol
|
get_new_port $temp $protocol
|
||||||
else
|
else
|
||||||
set_cache_var "get_new_port" "$port"
|
|
||||||
echo $port
|
echo $port
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,15 @@ microsoft.com
|
|||||||
dyndns.com
|
dyndns.com
|
||||||
douyucdn.cn
|
douyucdn.cn
|
||||||
douyucdn2.cn
|
douyucdn2.cn
|
||||||
ghgo.xyz
|
|
||||||
gitmirror.com
|
|
||||||
location.services.mozilla.com
|
location.services.mozilla.com
|
||||||
|
|
||||||
# google
|
# google
|
||||||
dl.google.com
|
dl.google.com
|
||||||
|
|
||||||
|
# github proxy
|
||||||
|
gh-proxy.com
|
||||||
|
gitmirror.com
|
||||||
|
|
||||||
#steam
|
#steam
|
||||||
steamcontent.com
|
steamcontent.com
|
||||||
dl.steam.clngaa.com
|
dl.steam.clngaa.com
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
223.6.6.6
|
223.6.6.6
|
||||||
119.29.29.29
|
119.29.29.29
|
||||||
180.76.76.76
|
180.76.76.76
|
||||||
34.149.0.0/16
|
|
||||||
72.18.83.0/24
|
|
||||||
1.12.12.12
|
1.12.12.12
|
||||||
120.53.53.53
|
120.53.53.53
|
||||||
203.208.39.192/28
|
|
||||||
203.208.40.0/23
|
|
||||||
180.184.1.1
|
180.184.1.1
|
||||||
180.184.2.2
|
180.184.2.2
|
||||||
|
203.208.39.192/28
|
||||||
|
203.208.40.0/23
|
||||||
|
34.149.0.0/16
|
||||||
|
72.18.83.0/24
|
||||||
|
@ -17,7 +17,7 @@ local ssub, slen, schar, sbyte, sformat, sgsub = string.sub, string.len, string.
|
|||||||
local split = api.split
|
local split = api.split
|
||||||
local jsonParse, jsonStringify = luci.jsonc.parse, luci.jsonc.stringify
|
local jsonParse, jsonStringify = luci.jsonc.parse, luci.jsonc.stringify
|
||||||
local base64Decode = api.base64Decode
|
local base64Decode = api.base64Decode
|
||||||
local uci = api.libuci
|
local uci = api.uci
|
||||||
local fs = api.fs
|
local fs = api.fs
|
||||||
uci:revert(appname)
|
uci:revert(appname)
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ do
|
|||||||
set = function(o)
|
set = function(o)
|
||||||
for kk, vv in pairs(CONFIG) do
|
for kk, vv in pairs(CONFIG) do
|
||||||
if (vv.remarks == id .. "备用节点的列表") then
|
if (vv.remarks == id .. "备用节点的列表") then
|
||||||
api.uci_set_list(uci, appname, id, "autoswitch_backup_node", vv.new_nodes)
|
uci:set_list(appname, id, "autoswitch_backup_node", vv.new_nodes)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -299,8 +299,8 @@ do
|
|||||||
if (vv.remarks == "Xray负载均衡节点[" .. node_id .. "]列表") then
|
if (vv.remarks == "Xray负载均衡节点[" .. node_id .. "]列表") then
|
||||||
uci:foreach(appname, "nodes", function(node2)
|
uci:foreach(appname, "nodes", function(node2)
|
||||||
if node2[".name"] == node[".name"] then
|
if node2[".name"] == node[".name"] then
|
||||||
local section = api.uci_section(uci, appname, "nodes", node_id)
|
local section = uci:section(appname, "nodes", node_id)
|
||||||
api.uci_set_list(uci, appname, section, "balancing_node", vv.new_nodes)
|
uci:set_list(appname, section, "balancing_node", vv.new_nodes)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@ -1454,7 +1454,7 @@ local function update_node(manual)
|
|||||||
local remark = v["remark"]
|
local remark = v["remark"]
|
||||||
local list = v["list"]
|
local list = v["list"]
|
||||||
for _, vv in ipairs(list) do
|
for _, vv in ipairs(list) do
|
||||||
local cfgid = api.uci_section(uci, appname, "nodes", api.gen_short_uuid())
|
local cfgid = uci:section(appname, "nodes", api.gen_short_uuid())
|
||||||
for kkk, vvv in pairs(vv) do
|
for kkk, vvv in pairs(vv) do
|
||||||
uci:set(appname, cfgid, kkk, vvv)
|
uci:set(appname, cfgid, kkk, vvv)
|
||||||
-- sing-box 域名解析策略
|
-- sing-box 域名解析策略
|
||||||
|
@ -73,10 +73,15 @@ url_test_node() {
|
|||||||
local curlx="socks5h://127.0.0.1:${_tmp_port}"
|
local curlx="socks5h://127.0.0.1:${_tmp_port}"
|
||||||
fi
|
fi
|
||||||
sleep 1s
|
sleep 1s
|
||||||
|
# 兼容 curl 8.6 time_starttransfer 错误
|
||||||
|
local curl_ver=$(curl -V 2>/dev/null | head -n 1 | awk '{print $2}' | cut -d. -f1,2 | tr -d ' \n')
|
||||||
|
local curl_arg="-w %{http_code}:%{time_starttransfer} http://"
|
||||||
|
[ "${curl_ver}" = "8.6" ] && curl_arg="-w %{http_code}:%{time_appconnect} https://"
|
||||||
|
|
||||||
local chn_list=$(config_n_get @global[0] chn_list direct)
|
local chn_list=$(config_n_get @global[0] chn_list direct)
|
||||||
local probeUrl="https://www.google.com/generate_204"
|
local probeUrl="www.google.com/generate_204"
|
||||||
[ "${chn_list}" = "proxy" ] && probeUrl="https://www.baidu.com"
|
[ "${chn_list}" = "proxy" ] && probeUrl="www.baidu.com"
|
||||||
result=$(curl --connect-timeout 3 -o /dev/null -I -skL -w "%{http_code}:%{time_appconnect}" -x $curlx "${probeUrl}")
|
result=$(curl --connect-timeout 3 -o /dev/null -I -skL -x $curlx ${curl_arg}${probeUrl})
|
||||||
pgrep -af "url_test_${node_id}" | awk '! /test\.sh/{print $1}' | xargs kill -9 >/dev/null 2>&1
|
pgrep -af "url_test_${node_id}" | awk '! /test\.sh/{print $1}' | xargs kill -9 >/dev/null 2>&1
|
||||||
rm -rf "/tmp/etc/${CONFIG}/url_test_${node_id}.json"
|
rm -rf "/tmp/etc/${CONFIG}/url_test_${node_id}.json"
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile
|
diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile
|
||||||
index 6653f5f..b83e4c1 100644
|
index 18cdd8d..44f5958 100644
|
||||||
--- a/luci-app-passwall/Makefile
|
--- a/luci-app-passwall/Makefile
|
||||||
+++ b/luci-app-passwall/Makefile
|
+++ b/luci-app-passwall/Makefile
|
||||||
@@ -144,7 +144,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geodata
|
@@ -67,7 +67,7 @@ config PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy
|
||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geoview
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Geoview
|
||||||
bool "Include V2ray_Geoview"
|
bool "Include Geoview"
|
||||||
select PACKAGE_geoview
|
select PACKAGE_geoview
|
||||||
- default y if aarch64||arm||i386||x86_64
|
- default y if aarch64||arm||i386||x86_64
|
||||||
+ default n
|
+ default n
|
||||||
|
|
||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy
|
||||||
bool "Include V2ray-Plugin (Shadowsocks Plugin)"
|
bool "Include Haproxy"
|
||||||
@@ -177,7 +177,6 @@ define Package/$(PKG_NAME)/conffiles
|
@@ -177,7 +177,6 @@ define Package/$(PKG_NAME)/conffiles
|
||||||
/usr/share/passwall/rules/lanlist_ipv4
|
/usr/share/passwall/rules/lanlist_ipv4
|
||||||
/usr/share/passwall/rules/lanlist_ipv6
|
/usr/share/passwall/rules/lanlist_ipv6
|
||||||
@ -19,19 +19,6 @@ index 6653f5f..b83e4c1 100644
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/postrm
|
define Package/$(PKG_NAME)/postrm
|
||||||
diff --git a/luci-app-passwall/luasrc/controller/passwall.lua b/luci-app-passwall/luasrc/controller/passwall.lua
|
|
||||||
index c01e5ef..8df6d62 100644
|
|
||||||
--- a/luci-app-passwall/luasrc/controller/passwall.lua
|
|
||||||
+++ b/luci-app-passwall/luasrc/controller/passwall.lua
|
|
||||||
@@ -298,7 +298,7 @@ function connect_status()
|
|
||||||
url = "-x socks5h://" .. socks_server .. " " .. url
|
|
||||||
end
|
|
||||||
end
|
|
||||||
- local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -sk -w "%{http_code}:%{time_appconnect}" ' .. url)
|
|
||||||
+ local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -sk -w "%{http_code}:%{time_starttransfer}" ' .. url)
|
|
||||||
local code = tonumber(luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $1}'") or "0")
|
|
||||||
if code ~= 0 then
|
|
||||||
local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")
|
|
||||||
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
||||||
index 3f6dd8c..952e4c8 100644
|
index 3f6dd8c..952e4c8 100644
|
||||||
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
|
||||||
@ -59,7 +46,7 @@ index 3f6dd8c..952e4c8 100644
|
|||||||
|
|
||||||
if (m:get("@global_forwarding[0]", "use_nft") or "0") == "1" then
|
if (m:get("@global_forwarding[0]", "use_nft") or "0") == "1" then
|
||||||
diff --git a/luci-app-passwall/luasrc/view/passwall/global/status.htm b/luci-app-passwall/luasrc/view/passwall/global/status.htm
|
diff --git a/luci-app-passwall/luasrc/view/passwall/global/status.htm b/luci-app-passwall/luasrc/view/passwall/global/status.htm
|
||||||
index e8d76ec..a872950 100644
|
index eb5527e..133c295 100644
|
||||||
--- a/luci-app-passwall/luasrc/view/passwall/global/status.htm
|
--- a/luci-app-passwall/luasrc/view/passwall/global/status.htm
|
||||||
+++ b/luci-app-passwall/luasrc/view/passwall/global/status.htm
|
+++ b/luci-app-passwall/luasrc/view/passwall/global/status.htm
|
||||||
@@ -1,5 +1,11 @@
|
@@ -1,5 +1,11 @@
|
||||||
@ -105,42 +92,6 @@ index e8d76ec..a872950 100644
|
|||||||
.check {
|
.check {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@@ -138,7 +166,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
- <div class="pure-u-1-4 check" onclick="check_connect('baidu', 'https://www.baidu.com')">
|
|
||||||
+ <div class="pure-u-1-4 check" onclick="check_connect('baidu', 'http://www.baidu.com')">
|
|
||||||
<div class="block pure-g">
|
|
||||||
<div class="pure-u-1-3">
|
|
||||||
<div class="img-con">
|
|
||||||
@@ -150,7 +178,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
- <div class="pure-u-1-4 check" onclick="check_connect('google', 'https://www.google.com/generate_204')">
|
|
||||||
+ <div class="pure-u-1-4 check" onclick="check_connect('google', 'http://www.google.com/generate_204')">
|
|
||||||
<div class="block pure-g">
|
|
||||||
<div class="pure-u-1-3">
|
|
||||||
<div class="img-con">
|
|
||||||
@@ -162,7 +190,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
- <div class="pure-u-1-4 check" onclick="check_connect('github', 'https://github.com')">
|
|
||||||
+ <div class="pure-u-1-4 check" onclick="check_connect('github', 'http://github.com')">
|
|
||||||
<div class="block pure-g">
|
|
||||||
<div class="pure-u-1-3">
|
|
||||||
<div class="img-con">
|
|
||||||
@@ -174,7 +202,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
- <div class="pure-u-1-4 check" onclick="check_connect('instagram', 'https://www.instagram.com')">
|
|
||||||
+ <div class="pure-u-1-4 check" onclick="check_connect('instagram', 'http://www.instagram.com')">
|
|
||||||
<div class="block pure-g">
|
|
||||||
<div class="pure-u-1-3">
|
|
||||||
<div class="img-con">
|
|
||||||
diff --git a/luci-app-passwall/root/usr/share/passwall/0_default_config b/luci-app-passwall/root/usr/share/passwall/0_default_config
|
diff --git a/luci-app-passwall/root/usr/share/passwall/0_default_config b/luci-app-passwall/root/usr/share/passwall/0_default_config
|
||||||
index acacfed..427dc3a 100644
|
index acacfed..427dc3a 100644
|
||||||
--- a/luci-app-passwall/root/usr/share/passwall/0_default_config
|
--- a/luci-app-passwall/root/usr/share/passwall/0_default_config
|
||||||
@ -155,24 +106,24 @@ index acacfed..427dc3a 100644
|
|||||||
config global_forwarding
|
config global_forwarding
|
||||||
option tcp_no_redir_ports 'disable'
|
option tcp_no_redir_ports 'disable'
|
||||||
diff --git a/luci-app-passwall/root/usr/share/passwall/rules/direct_host b/luci-app-passwall/root/usr/share/passwall/rules/direct_host
|
diff --git a/luci-app-passwall/root/usr/share/passwall/rules/direct_host b/luci-app-passwall/root/usr/share/passwall/rules/direct_host
|
||||||
index a3b1464..90bcf58 100644
|
index a3b1464..ae67f3b 100644
|
||||||
--- a/luci-app-passwall/root/usr/share/passwall/rules/direct_host
|
--- a/luci-app-passwall/root/usr/share/passwall/rules/direct_host
|
||||||
+++ b/luci-app-passwall/root/usr/share/passwall/rules/direct_host
|
+++ b/luci-app-passwall/root/usr/share/passwall/rules/direct_host
|
||||||
@@ -4,8 +4,13 @@ microsoft.com
|
@@ -6,6 +6,13 @@ douyucdn.cn
|
||||||
dyndns.com
|
|
||||||
douyucdn.cn
|
|
||||||
douyucdn2.cn
|
douyucdn2.cn
|
||||||
+ghgo.xyz
|
|
||||||
+gitmirror.com
|
|
||||||
location.services.mozilla.com
|
location.services.mozilla.com
|
||||||
|
|
||||||
+# google
|
+# google
|
||||||
+dl.google.com
|
+dl.google.com
|
||||||
|
+
|
||||||
|
+# github proxy
|
||||||
|
+gh-proxy.com
|
||||||
|
+gitmirror.com
|
||||||
+
|
+
|
||||||
#steam
|
#steam
|
||||||
steamcontent.com
|
steamcontent.com
|
||||||
dl.steam.clngaa.com
|
dl.steam.clngaa.com
|
||||||
@@ -19,6 +24,15 @@ cdn-qc.content.steamchina.com
|
@@ -19,6 +26,15 @@ cdn-qc.content.steamchina.com
|
||||||
cdn-ali.content.steamchina.com
|
cdn-ali.content.steamchina.com
|
||||||
epicgames-download1-1251447533.file.myqcloud.com
|
epicgames-download1-1251447533.file.myqcloud.com
|
||||||
|
|
||||||
@ -189,21 +140,17 @@ index a3b1464..90bcf58 100644
|
|||||||
dns.alidns.com
|
dns.alidns.com
|
||||||
doh.pub
|
doh.pub
|
||||||
diff --git a/luci-app-passwall/root/usr/share/passwall/rules/direct_ip b/luci-app-passwall/root/usr/share/passwall/rules/direct_ip
|
diff --git a/luci-app-passwall/root/usr/share/passwall/rules/direct_ip b/luci-app-passwall/root/usr/share/passwall/rules/direct_ip
|
||||||
index b73edaa..d48bc4a 100644
|
index b73edaa..ada52ad 100644
|
||||||
--- a/luci-app-passwall/root/usr/share/passwall/rules/direct_ip
|
--- a/luci-app-passwall/root/usr/share/passwall/rules/direct_ip
|
||||||
+++ b/luci-app-passwall/root/usr/share/passwall/rules/direct_ip
|
+++ b/luci-app-passwall/root/usr/share/passwall/rules/direct_ip
|
||||||
@@ -4,7 +4,11 @@
|
@@ -8,3 +8,7 @@
|
||||||
223.6.6.6
|
|
||||||
119.29.29.29
|
|
||||||
180.76.76.76
|
|
||||||
+34.149.0.0/16
|
|
||||||
+72.18.83.0/24
|
|
||||||
1.12.12.12
|
|
||||||
120.53.53.53
|
120.53.53.53
|
||||||
+203.208.39.192/28
|
|
||||||
+203.208.40.0/23
|
|
||||||
180.184.1.1
|
180.184.1.1
|
||||||
180.184.2.2
|
180.184.2.2
|
||||||
|
+203.208.39.192/28
|
||||||
|
+203.208.40.0/23
|
||||||
|
+34.149.0.0/16
|
||||||
|
+72.18.83.0/24
|
||||||
diff --git a/luci-app-passwall/root/usr/share/passwall/rules/proxy_host b/luci-app-passwall/root/usr/share/passwall/rules/proxy_host
|
diff --git a/luci-app-passwall/root/usr/share/passwall/rules/proxy_host b/luci-app-passwall/root/usr/share/passwall/rules/proxy_host
|
||||||
index 72c498c..4aa1a8c 100644
|
index 72c498c..4aa1a8c 100644
|
||||||
--- a/luci-app-passwall/root/usr/share/passwall/rules/proxy_host
|
--- a/luci-app-passwall/root/usr/share/passwall/rules/proxy_host
|
||||||
|
Loading…
Reference in New Issue
Block a user