From 10b9589db9b848802317c114151910e23b7d71e1 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Thu, 22 Aug 2019 18:24:15 +0800 Subject: [PATCH] luci-app-openclash: bump to v0.15.0-28-g48a2013 --- .../files/etc/init.d/openclash | 12 ++++----- .../usr/lib/lua/luci/view/openclash/myip.htm | 25 +++++++++---------- .../usr/share/openclash/dashboard/index.html | 5 ++-- ...s => 1.bundle.45da5278717379ab5871.min.js} | 0 ....js => bundle.45da5278717379ab5871.min.js} | 2 +- ...dbb2.css => main.45da5278717379ab5871.css} | 0 .../share/openclash/openclash_fake_block.sh | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) rename package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/{1.bundle.f56f0d5c26a32a6cdbb2.min.js => 1.bundle.45da5278717379ab5871.min.js} (100%) rename package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/{bundle.f56f0d5c26a32a6cdbb2.min.js => bundle.45da5278717379ab5871.min.js} (87%) rename package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/{main.f56f0d5c26a32a6cdbb2.css => main.45da5278717379ab5871.css} (100%) diff --git a/package/cnsztl/luci-app-openclash/files/etc/init.d/openclash b/package/cnsztl/luci-app-openclash/files/etc/init.d/openclash index bf6010477c..75b9c43dc6 100755 --- a/package/cnsztl/luci-app-openclash/files/etc/init.d/openclash +++ b/package/cnsztl/luci-app-openclash/files/etc/init.d/openclash @@ -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 diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/myip.htm b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/myip.htm index c32d5b8b63..9e3d677626 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/myip.htm +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/myip.htm @@ -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 @@ 淘宝    国内:

- IP.SB  海外: + IPAPI  海外:

IPIFY  海外: @@ -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); } - diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/index.html b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/index.html index 934ef6de48..050681c909 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/index.html +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/index.html @@ -3,9 +3,10 @@ + Clash - +

- + diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/1.bundle.f56f0d5c26a32a6cdbb2.min.js b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/1.bundle.45da5278717379ab5871.min.js similarity index 100% rename from package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/1.bundle.f56f0d5c26a32a6cdbb2.min.js rename to package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/1.bundle.45da5278717379ab5871.min.js diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/bundle.f56f0d5c26a32a6cdbb2.min.js b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/bundle.45da5278717379ab5871.min.js similarity index 87% rename from package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/bundle.f56f0d5c26a32a6cdbb2.min.js rename to package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/bundle.45da5278717379ab5871.min.js index 66247afdb1..6e38b3fab9 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/bundle.f56f0d5c26a32a6cdbb2.min.js +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/dashboard/js/bundle.45da5278717379ab5871.min.js @@ -1 +1 @@ -!function(e){function t(t){for(var r,l,i=t[0],u=t[1],s=t[2],f=0,d=[];fl[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorageItem=function(e,t){return void 0===t&&(t=""),window.localStorage.getItem(e)||t},t.setLocalStorageItem=function(e,t){return window.localStorage.setItem(e,t)},t.removeLocalStorageItem=function(e){return window.localStorage.removeItem(e)},t.noop=function(){},t.to=function(e){return r(this,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e];case 1:return[2,[t.sent(),null]];case 2:return[2,[null,t.sent()]];case 3:return[2]}})})},t.partition=function(e,t){var n,r,a=[],l=[];try{for(var i,u=o(e),s=u.next();!s.done;s=u.next())t(i=s.value)?a.push(i):l.push(i)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return[a,l]}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(125)),r(n(127)),r(n(128)),r(n(130)),r(n(132)),r(n(134)),r(n(135)),r(n(137)),r(n(139)),r(n(141)),r(n(143)),r(n(145)),r(n(147)),r(n(149))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(55))},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function l(e){try{u(r.next(e))}catch(e){o(e)}}function i(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?a(e.value):new n(function(t){t(e.value)}).then(l,i)}u((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(a)throw new TypeError("Generator is already executing.");for(;u;)try{if(a=1,o&&(l=2&n[0]?o.return:n[0]?o.throw||((l=o.return)&&l.call(o),0):o.next)&&!(l=l.call(o,n[1])).done)return l;switch(o=0,l&&(n=[2&n[0],l.value]),n[0]){case 0:case 1:l=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(!(l=0<(l=u.trys).length&&l[l.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!l||n[1]>l[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(74),l=n(75);t.useObject=function(e){var t=r(o.useImmer(e),2),n=t[0],l=t[1];return{value:n,setSingle:function(e,t){l(function(n){n[e]=t})},setMulti:function(e){l(function(t){var n,r;try{for(var o,l=a(Object.keys(e)),i=l.next();!i.done;i=l.next())t[o=i.value]=e[o]}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}})},set:l}},t.composeContainer=function(e){var t=l.createContainer(function(){return Object.keys(e).reduce(function(t,n){return t[n]=e[n](),t},{})});return{Provider:t.Provider,containers:Object.keys(e).reduce(function(e,n){return e[n]=function(){return t.useContainer()[n]},e},{})}}},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a,o=r(n(38));(a=t.Action||(t.Action={})).SPEED_NOTIFY="speed-notify";var l=function(){function e(){this.EE=new o.default}return e.prototype.notifySpeedTest=function(){this.EE.emit(a.SPEED_NOTIFY)},e.prototype.subscribe=function(e,t){this.EE.addListener(e,t)},e.prototype.unsubscribe=function(e,t){this.EE.removeListener(e,t)},e}();t.default=new l},,,function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(n(46)),o=n(10);o.isClashX()?o.setupJsBridge(a.default):a.default()},function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(0)),l=n(12),i=n(23),u=n(7),s=a(n(121));t.default=function(){var e=document.getElementById("root"),t=o.createElement(u.Provider,null,o.createElement(i.HashRouter,null,o.createElement(s.default,null)));l.render(t,e)}},,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nl[0]&&n[1]l[0]&&n[1]this.config.bufferLength&&this.innerBuffer.splice(0,this.innerBuffer.length-this.config.bufferLength)),[3,2]);case 4:return[2]}})})},e.prototype.retry=function(e){this.isClose||(this.EE.emit("error",e),window.setTimeout(this.loop,this.config.retryInterval))},e.prototype.subscribe=function(e,t){this.EE.addListener(e,t)},e.prototype.unsubscribe=function(e,t){this.EE.removeListener(e,t)},e.prototype.buffer=function(){return this.innerBuffer.slice()},e.prototype.destory=function(){this.EE.removeAllListeners(),this.isClose=!0},e}();t.StreamReader=c},,,function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),l=[];try{for(;(void 0===t||0l[0]&&n[1]l[0]&&n[1]l[0]&&n[1]l[0]&&n[1]l[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorageItem=function(e,t){return void 0===t&&(t=""),window.localStorage.getItem(e)||t},t.setLocalStorageItem=function(e,t){return window.localStorage.setItem(e,t)},t.removeLocalStorageItem=function(e){return window.localStorage.removeItem(e)},t.noop=function(){},t.to=function(e){return r(this,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e];case 1:return[2,[t.sent(),null]];case 2:return[2,[null,t.sent()]];case 3:return[2]}})})},t.partition=function(e,t){var n,r,a=[],l=[];try{for(var i,u=o(e),s=u.next();!s.done;s=u.next())t(i=s.value)?a.push(i):l.push(i)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return[a,l]}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(125)),r(n(127)),r(n(128)),r(n(130)),r(n(132)),r(n(134)),r(n(135)),r(n(137)),r(n(139)),r(n(141)),r(n(143)),r(n(145)),r(n(147)),r(n(149))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(55))},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function l(e){try{u(r.next(e))}catch(e){o(e)}}function i(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?a(e.value):new n(function(t){t(e.value)}).then(l,i)}u((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(a)throw new TypeError("Generator is already executing.");for(;u;)try{if(a=1,o&&(l=2&n[0]?o.return:n[0]?o.throw||((l=o.return)&&l.call(o),0):o.next)&&!(l=l.call(o,n[1])).done)return l;switch(o=0,l&&(n=[2&n[0],l.value]),n[0]){case 0:case 1:l=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(!(l=0<(l=u.trys).length&&l[l.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!l||n[1]>l[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(74),l=n(75);t.useObject=function(e){var t=r(o.useImmer(e),2),n=t[0],l=t[1];return{value:n,setSingle:function(e,t){l(function(n){n[e]=t})},setMulti:function(e){l(function(t){var n,r;try{for(var o,l=a(Object.keys(e)),i=l.next();!i.done;i=l.next())t[o=i.value]=e[o]}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}})},set:l}},t.composeContainer=function(e){var t=l.createContainer(function(){return Object.keys(e).reduce(function(t,n){return t[n]=e[n](),t},{})});return{Provider:t.Provider,containers:Object.keys(e).reduce(function(e,n){return e[n]=function(){return t.useContainer()[n]},e},{})}}},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a,o=r(n(38));(a=t.Action||(t.Action={})).SPEED_NOTIFY="speed-notify";var l=function(){function e(){this.EE=new o.default}return e.prototype.notifySpeedTest=function(){this.EE.emit(a.SPEED_NOTIFY)},e.prototype.subscribe=function(e,t){this.EE.addListener(e,t)},e.prototype.unsubscribe=function(e,t){this.EE.removeListener(e,t)},e}();t.default=new l},,,function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(n(46)),o=n(10);o.isClashX()?o.setupJsBridge(a.default):a.default()},function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(0)),l=n(12),i=n(23),u=n(7),s=a(n(121));t.default=function(){var e=document.getElementById("root"),t=o.createElement(u.Provider,null,o.createElement(i.HashRouter,null,o.createElement(s.default,null)));l.render(t,e)}},,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nl[0]&&n[1]l[0]&&n[1]this.config.bufferLength&&this.innerBuffer.splice(0,this.innerBuffer.length-this.config.bufferLength)),[3,2]);case 4:return[2]}})})},e.prototype.retry=function(e){this.isClose||(this.EE.emit("error",e),window.setTimeout(this.loop,this.config.retryInterval))},e.prototype.subscribe=function(e,t){this.EE.addListener(e,t)},e.prototype.unsubscribe=function(e,t){this.EE.removeListener(e,t)},e.prototype.buffer=function(){return this.innerBuffer.slice()},e.prototype.destory=function(){this.EE.removeAllListeners(),this.isClose=!0},e}();t.StreamReader=c},,,function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),l=[];try{for(;(void 0===t||0l[0]&&n[1]l[0]&&n[1]l[0]&&n[1]l[0]&&n[1]$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"