luci-app-openclash: bump to v0.15.0-28-g48a2013
This commit is contained in:
parent
799c8812a5
commit
10b9589db9
@ -50,7 +50,7 @@ change_dns() {
|
||||
}
|
||||
|
||||
revert_dns() {
|
||||
dns_port=$(uci get openclash.config.dns_port 2>/dev/null)
|
||||
dns_port=$(uci get openclash.config.dns_port 2>/dev/null)
|
||||
uci del_list dhcp.@dnsmasq[0].server=127.0.0.1#"$dns_port" >/dev/null 2>&1
|
||||
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
|
||||
uci set dhcp.@dnsmasq[0].noresolv=0
|
||||
@ -61,9 +61,9 @@ revert_dns() {
|
||||
fake_block() {
|
||||
if [ "$1" = "fake-ip" ]; then
|
||||
if [ ! -f /etc/openclash/dnsmasq_fake_block.conf ]; then
|
||||
sh /usr/share/openclash/openclash_fake_block.sh
|
||||
elif [ "$(awk -F '/' '{print $3}' /etc/openclash/dnsmasq_fake_block.conf |head -1)" != "$2" ] && [ ! -z "$2" ]; then
|
||||
sh /usr/share/openclash/openclash_fake_block.sh
|
||||
sh /usr/share/openclash/openclash_fake_block.sh
|
||||
elif [ "$(awk -F '/' '{print $3}' /etc/openclash/dnsmasq_fake_block.conf |head -1)" != "$2" ] && [ ! -z "$2" ]; then
|
||||
sh /usr/share/openclash/openclash_fake_block.sh
|
||||
fi
|
||||
mkdir -p /tmp/dnsmasq.d
|
||||
ln -s /etc/openclash/dnsmasq_fake_block.conf /tmp/dnsmasq.d/dnsmasq_openclash.conf
|
||||
@ -236,7 +236,7 @@ yml_dns_custom()
|
||||
sed -i "/^ \{0,\}fallback:/c\ fallback:" "$2" 2>/dev/null
|
||||
if [ ! -z "$(grep "^ \{0,1\}- " $2)" ]; then
|
||||
sed -i "s/^ \{0,\}- / - /" "$2" 2>/dev/null #添加参数空格
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
@ -423,7 +423,7 @@ fi
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
else
|
||||
if [ "$rule_source" != 0 ]; then
|
||||
if [ "$rule_source" != 0 ] || [ "$enable_custom_clash_rules" != 0 ]; then
|
||||
echo "错误: OpenClash 启动失败,尝试还原规则并重新启动 Clash 主程序..." >$START_LOG
|
||||
echo "${LOGTIME} OpenClash Can Not Start, Try Use Backup Rules Start Again" >> $LOG_FILE
|
||||
mv "$BACKUP_FILE" /etc/openclash/configrules.bak
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
.ip-result {
|
||||
color: #444;
|
||||
font-size:16px;
|
||||
margin:0px 0px 0px 30px;
|
||||
white-space: nowrap; /*强制span不换行*/
|
||||
display: inline-block; /*将span当做块级元素对待*/
|
||||
width: 29%; /*限制宽度*/
|
||||
@ -61,7 +62,7 @@
|
||||
line-height:20px;
|
||||
white-space: nowrap; /*强制span不换行*/
|
||||
display: inline-block; /*将span当做块级元素对待*/
|
||||
width: 40%; /*限制宽度*/
|
||||
width: 30%; /*限制宽度*/
|
||||
overflow: hidden; /*超出宽度部分隐藏*/
|
||||
text-overflow: ellipsis; /*超出部分以点号代替*/
|
||||
vertical-align:bottom;
|
||||
@ -141,7 +142,7 @@
|
||||
<span class="ip-title">淘宝 国内:</span><span class="ip-result" id="ip-taobao"></span> <span class="ip-geo" id="ip-taobao-ipip"></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="ip-title">IP.SB 海外:</span><span class="ip-result" id="ip-ipsb"></span> <span class="ip-geo" id="ip-ipsb-geo"></span>
|
||||
<span class="ip-title">IPAPI 海外:</span><span class="ip-result" id="ip-ipapi"></span> <span class="ip-geo" id="ip-ipapi-geo"></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="ip-title">IPIFY 海外:</span><span class="ip-result" id="ip-ipify"></span> <span class="ip-geo" id="ip-ipify-ipip"></span>
|
||||
@ -183,7 +184,7 @@
|
||||
$$.getElementById('ip-taobao').innerHTML = '查询中...';
|
||||
$$.getElementById('ip-ipify').innerHTML = '查询中...';
|
||||
$$.getElementById('ip-ipipnet').innerHTML = '查询中...';
|
||||
$$.getElementById('ip-ipsb').innerHTML = '查询中...';
|
||||
$$.getElementById('ip-ipapi').innerHTML = '查询中...';
|
||||
let random = parseInt(Math.random() * 100000000);
|
||||
let IP = {
|
||||
get: (url, type) =>
|
||||
@ -249,9 +250,12 @@
|
||||
$$.getElementById('ip-taobao').innerHTML = data.ip;
|
||||
IP.parseIPIpip(data.ip, 'ip-taobao-ipip');
|
||||
},
|
||||
getIpsbIP: (data) => {
|
||||
$$.getElementById('ip-ipsb').innerHTML = data.address;
|
||||
$$.getElementById('ip-ipsb-geo').innerHTML = `${data.country} ${data.province} ${data.city} ${data.isp.name}`
|
||||
getIPApiIP: () => {
|
||||
IP.get(`https://ipapi.co/json?z=${random}`, 'json')
|
||||
.then(resp => {
|
||||
$$.getElementById('ip-ipapi').innerHTML = resp.data.ip;
|
||||
IP.parseIPIpip(resp.data.ip, 'ip-ipapi-geo');
|
||||
})
|
||||
},
|
||||
getIpifyIP: () => {
|
||||
IP.get(`https://api.ipify.org/?format=json&z=${random}`, 'json')
|
||||
@ -303,6 +307,7 @@
|
||||
HTTP.runcheck();
|
||||
IP.getIpipnetIP();
|
||||
IP.getIpifyIP();
|
||||
IP.getIPApiIP();
|
||||
IP.getWebrtcIP();
|
||||
|
||||
window.onload=myip_Load();
|
||||
@ -315,25 +320,19 @@
|
||||
tbipScript.src='https://www.taobao.com/help/getip.php';
|
||||
tbip.appendChild( tbipScript);
|
||||
|
||||
var sbip = document.getElementsByTagName('HEAD').item(0);
|
||||
var sbipScript= document.createElement("script");
|
||||
sbipScript.async = "async";
|
||||
sbipScript.src='https://ipv4.ip.sb/addrinfo?callback=IP.getIpsbIP';
|
||||
sbip.appendChild( sbipScript);
|
||||
|
||||
const $$ = document;
|
||||
random = parseInt(Math.random() * 100000000);
|
||||
window.ipCallback = (data) => IP.getTaobaoIP(data);
|
||||
HTTP.runcheck();
|
||||
IP.getIpipnetIP();
|
||||
IP.getIpifyIP();
|
||||
IP.getIPApiIP();
|
||||
IP.getWebrtcIP();
|
||||
setTimeout("myip_Load()",1000*8);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script async="async" src="https://www.taobao.com/help/getip.php"></script>
|
||||
<script async="async" src="https://ipv4.ip.sb/addrinfo?callback=IP.getIpsbIP"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
<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.f56f0d5c26a32a6cdbb2.css" rel="stylesheet"></head>
|
||||
<link href="main.45da5278717379ab5871.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="text/javascript" src="js/1.bundle.f56f0d5c26a32a6cdbb2.min.js"></script><script type="text/javascript" src="js/bundle.f56f0d5c26a32a6cdbb2.min.js"></script></body>
|
||||
<script type="text/javascript" src="js/1.bundle.45da5278717379ab5871.min.js"></script><script type="text/javascript" src="js/bundle.45da5278717379ab5871.min.js"></script></body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
echo "<EFBFBD>零Fake-IP붚츰데..." >$START_LOG
|
||||
echo "设置Fake-IP黑名单..." >$START_LOG
|
||||
direct_dns=$(uci get openclash.config.direct_dns 2>/dev/null)
|
||||
[ -z "$direct_dns" ] && {
|
||||
direct_dns="114.114.114.114"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user