diff --git a/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash b/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash index a49076bd4a..95a661afd2 100755 --- a/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash +++ b/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash @@ -761,7 +761,7 @@ mkdir -p /var/etc cat > "/var/etc/openclash.include" <<-EOF /etc/init.d/openclash restart EOF - + iptables -t nat -I PREROUTING -p tcp --dport 53 -j ACCEPT if [ -z "$en_mode_tun" ]; then iptables -t nat -N openclash iptables -t nat -A openclash -d 0.0.0.0/8 -j RETURN @@ -829,7 +829,7 @@ EOF fi echo "第九步: 重启 Dnsmasq 程序..." >$START_LOG - if [ "$(iptables -t nat -nL PREROUTING --line-number |grep dpt:53 |wc -l)" -gt 2 ]; then + if [ "$(iptables -t nat -nL PREROUTING --line-number |grep "udp dpt:53" |wc -l)" -gt 1 ]; then echo "发现53端口被劫持,如连接异常请将OpenClash设置为劫持53端口程序的上游DNS服务器!" >$START_LOG echo "${LOGTIME} Warring: OpenClash May Can Not Take Over DNS, Please Use OpenClash for Upstream DNS Resolve Server" >> $LOG_FILE sleep 5 @@ -954,6 +954,7 @@ stop() ip rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1 iptables -t mangle -D OUTPUT -j openclash >/dev/null 2>&1 + iptables -t nat -D PREROUTING -p tcp --dport 53 -j ACCEPT >/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 ip6tables -t mangle -D PREROUTING -j MARK --set-mark "$PROXY_FWMARK" >/dev/null 2>&1 iptables -t mangle -F openclash >/dev/null 2>&1 diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/dashboard/index.html b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/dashboard/index.html index 13a494dc27..ad630255e7 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/dashboard/index.html +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/dashboard/index.html @@ -5,8 +5,8 @@ Clash - +
- + diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/dashboard/js/1.bundle.0bddb85299f970595cb5.min.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/dashboard/js/1.bundle.0bddb85299f970595cb5.min.js deleted file mode 100644 index 7bc830d892..0000000000 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/dashboard/js/1.bundle.0bddb85299f970595cb5.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1.bundle.0bddb85299f970595cb5.min.js.LICENSE */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,n){"use strict";e.exports=n(51)},function(e,t,n){e.exports=n(55)()},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},,,,function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(52)},function(e,t,n){var r=n(42)(Object,"create");e.exports=r},function(e,t,n){var r=n(110);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(116);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";var r=Array.isArray,o=Object.keys,i=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,u,l,c=r(t),s=r(n);if(c&&s){if((u=t.length)!=n.length)return!1;for(a=u;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(c!=s)return!1;var f=t instanceof Date,d=n instanceof Date;if(f!=d)return!1;if(f&&d)return t.getTime()==n.getTime();var p=t instanceof RegExp,h=n instanceof RegExp;if(p!=h)return!1;if(p&&h)return t.toString()==n.toString();var m=o(t);if((u=m.length)!==o(n).length)return!1;for(a=u;0!=a--;)if(!i.call(n,m[a]))return!1;for(a=u;0!=a--;)if(!e(t[l=m[a]],n[l]))return!1;return!0}return t!=t&&n!=n}},,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(41),o=n(89),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==i}},function(e,t,n){var r=n(23).Symbol;e.exports=r},function(e,t,n){var r=n(86),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){e.exports=function(){"use strict";var e="millisecond",t="second",n="minute",r="hour",o="day",i="week",a="month",u="quarter",l="year",c=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,s=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},d={s:f,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+f(r,2,"0")+":"+f(o,2,"0")},m:function(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,a),o=t-r<0,i=e.clone().add(n+(o?-1:1),a);return Number(-(n+(t-r)/(o?r-i:i-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(c){return{M:a,y:l,w:i,d:o,h:r,m:n,s:t,ms:e,Q:u}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",m={};m[h]=p;var v=function(e){return e instanceof w},g=function(e,t,n){var r;if(!e)return h;if("string"==typeof e)m[e]&&(r=e),t&&(m[e]=t,r=e);else{var o=e.name;m[o]=e,r=o}return n||(h=r),r},y=function(e,t,n){if(v(e))return e.clone();var r=t?"string"==typeof t?{format:t,pl:n}:t:{};return r.date=e,new w(r)},b=d;b.l=g,b.i=v,b.w=function(e,t){return y(e,{locale:t.$L,utc:t.$u,$offset:t.$offset})};var w=function(){function f(e){this.$L=this.$L||g(e.locale,null,!0),this.parse(e)}var d=f.prototype;return d.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(c);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(t)}(e),this.init()},d.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},d.$utils=function(){return b},d.isValid=function(){return!("Invalid Date"===this.$d.toString())},d.isSame=function(e,t){var n=y(e);return this.startOf(t)<=n&&n<=this.endOf(t)},d.isAfter=function(e,t){return y(e)=0;d--){var p=o[d];"."===p?s(o,d):".."===p?(s(o,d),f++):f&&(s(o,d),f--)}if(!u)for(;f--;f)o.unshift("..");!u||""===o[0]||o[0]&&c(o[0])||o.unshift("");var h=o.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function d(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var p=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=d(t),o=d(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},h=!0,m="Invariant failed";var v=function(e,t){if(!e)throw h?new Error(m):new Error(m+": "+(t||""))};function g(e){return"/"===e.charAt(0)?e:"/"+e}function y(e){return"/"===e.charAt(0)?e.substr(1):e}function b(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function w(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function x(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function S(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(l.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(i){throw i instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):i}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=f(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function E(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=S(e,t,d(),g.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(g.entries[g.index]=r,f({action:"REPLACE",location:r}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=g.index+e;return t>=0&&t=0;t--){var n=e[t][a];n.modified||(Array.isArray(n.base)?K(n)&&A(n):w(n.base)?Q(n)&&A(n):S(n.base)?X(n)&&A(n):G(n)&&A(n))}}function G(e){for(var t=e.base,n=e.draft,r=Object.keys(n),o=r.length-1;o>=0;o--){var i=r[o],u=t[i];if(void 0===u&&!m(t,i))return!0;var l=n[i],c=l&&l[a];if(c?c.base!==u:!g(l,u))return!0}return r.length!==Object.keys(t).length}function K(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}function Q(e){var t=e.base,n=e.draft;if(t.size!==n.size)return!0;var r=!1;return n.forEach((function(e,n){r||(r=l(e)?e.modified:e!==t.get(n))})),r}function X(e){var t=e.base,n=e.draft;if(t.size!==n.size)return!0;var r=!1;return n.forEach((function(e,n){r||(r=l(e)?e.modified:!t.has(n))})),r}var J,Z,ee=Object.freeze({__proto__:null,willFinalize:function(e,t,n){e.drafts.forEach((function(e){e[a].finalizing=!0})),n?u(t)&&t[a].scope===e&&Y(e.drafts):(e.patches&&function e(t){if(!t||"object"!=typeof t)return;var n=t[a];if(!n)return;var r=n.base,o=n.draft,i=n.assigned;if(Array.isArray(t)){if(K(n)){if(A(n),i.length=!0,o.lengths&&a[f-1]===u[f+c-1];)--f;for(var d=s;d=f;--d){p=t.concat([d]);n[h+d-f]={op:"add",path:p,value:u[d]},r.push({op:"remove",path:p})}}function he(e,t,n,r){var o=e.base,i=e.copy;p(e.assigned,(function(e,a){var u=v(o,e),l=v(i,e),c=a?m(o,e)?"replace":"add":"remove";if(u!==l||"replace"!==c){var s=t.concat(e);n.push("remove"===c?{op:c,path:s}:{op:c,path:s,value:l}),r.push("add"===c?{op:"remove",path:s}:"remove"===c?{op:"add",path:s,value:u}:{op:"replace",path:s,value:u})}}))}function me(e,t,n,r){var o=e.base,i=e.copy,a=0;o.forEach((function(e){if(!i.has(e)){var o=t.concat([a]);n.push({op:"remove",path:o,value:e}),r.unshift({op:"add",path:o,value:e})}a++})),a=0,i.forEach((function(e){if(!o.has(e)){var i=t.concat([a]);n.push({op:"add",path:i,value:e}),r.unshift({op:"remove",path:i,value:e})}a++}))}function ve(e,t){return t.forEach((function(t){var n=t.path,r=t.op;if(!n.length)throw new Error("Illegal state");for(var o=e,i=0;i=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}return u(e)?ve(e,t):this.produce(e,(function(e){return ve(e,t.slice(n+1))}))},e.prototype.processResult=function(e,t){var n=t.drafts[0],r=void 0!==e&&e!==n;if(this.willFinalize(t,e,r),r){if(n[a].modified)throw t.revoke(),new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");l(e)&&(e=this.finalize(e,null,t),this.maybeFreeze(e)),t.patches&&(t.patches.push({op:"replace",path:[],value:e}),t.inversePatches.push({op:"replace",path:[],value:n[a].base}))}else e=this.finalize(n,[],t);return t.revoke(),t.patches&&t.patchListener(t.patches,t.inversePatches),e!==o?e:void 0},e.prototype.finalize=function(e,t,n){var r=this,o=e[a];if(!o)return Object.isFrozen(e)?e:this.finalizeTree(e,null,n);if(o.scope!==n)return e;if(!o.modified)return this.maybeFreeze(o.base,!0),o.base;if(!o.finalized){if(o.finalized=!0,this.finalizeTree(o.draft,t,n),this.onDelete&&!S(o.base))if(this.useProxies){p(o.assigned,(function(e,t){var n,i;t||null===(i=(n=r).onDelete)||void 0===i||i.call(n,o,e)}))}else{var i=o.base,u=o.copy;p(i,(function(e){var t,n;m(u,e)||null===(n=(t=r).onDelete)||void 0===n||n.call(t,o,e)}))}this.onCopy&&this.onCopy(o),this.autoFreeze&&n.canAutoFreeze&&P(o.copy,!1),t&&n.patches&&function(e,t,n,r){(Array.isArray(e.base)?pe:S(e.base)?me:he)(e,t,n,r)}(o,t,n.patches,n.inversePatches)}return o.copy},e.prototype.finalizeTree=function(e,t,n){var r=this,o=e[a];o&&(this.useProxies||(o.copy=d(o.draft,!0)),e=o.copy);var i=!!t&&!!n.patches,c=function(a,s,f){if(s===f)throw Error("Immer forbids circular references");var d=!!o&&f===e,y=S(f);if(u(s)){var b=d&&i&&!y&&!m(o.assigned,a)?t.concat(a):null;if(function(e,t,n){w(e)?e.set(t,n):S(e)?(e.delete(t),e.add(n)):Array.isArray(e)||h(e,t)?e[t]=n:Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}(f,a,s=r.finalize(s,b,n)),u(s)&&(n.canAutoFreeze=!1),d&&s===v(o.base,a))return}else{if(d&&g(s,v(o.base,a)))return;l(s)&&!Object.isFrozen(s)&&(p(s,c),r.maybeFreeze(s))}d&&r.onAssign&&!y&&r.onAssign(o,a,s)};return p(e,c),e},e.prototype.maybeFreeze=function(e,t){void 0===t&&(t=!1),this.autoFreeze&&!u(e)&&P(e,t)},e}()),be=ye.produce;ye.produceWithPatches.bind(ye),ye.setAutoFreeze.bind(ye),ye.setUseProxies.bind(ye),ye.applyPatches.bind(ye),ye.createDraft.bind(ye),ye.finishDraft.bind(ye);t.a=be}).call(this,n(35))},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,u,l=a(e),c=1;c=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(i)})),e.exports=l}).call(this,n(35))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],s=!1,f=-1;function d(){s&&l&&(s=!1,l.length?c=l.concat(c):f=-1,c.length&&p())}function p(){if(!s){var e=u(d);s=!0;for(var t=c.length;t;){for(l=c,c=[];++f1)for(var n=1;nM.length&&M.push(e)}function j(e,t,n){return null==e?0:function e(t,n,r,o){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var l=!1;if(null===t)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case a:l=!0}}if(l)return r(o,t,""===n?"."+N(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c