← Back
Editing: index-legacy39.js
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var n,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(n){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),u=new T(r||[]);return a(i,"_invoke",{value:S(t,n,u)}),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var d="suspendedStart",v="suspendedYield",y="executing",m="completed",g={};function w(){}function x(){}function b(){}var _={};f(_,c,(function(){return this}));var L=Object.getPrototypeOf,j=L&&L(L(V([])));j&&j!==o&&i.call(j,c)&&(_=j);var k=b.prototype=w.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(e,n){function r(o,a,u,c){var l=h(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):n.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(i,i):i()}})}function S(t,e,r){var o=d;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:n,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=O(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var l=h(t,e,r);if("normal"===l.type){if(o=r.done?m:v,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function O(t,e){var r=e.method,o=t.iterator[r];if(o===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=n,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function V(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return x.prototype=b,a(k,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:x,configurable:!0}),x.displayName=f(b,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,s,"GeneratorFunction")),t.prototype=Object.create(k),t},r.awrap=function(t){return{__await:t}},E(P.prototype),f(P.prototype,l,(function(){return this})),r.AsyncIterator=P,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new P(p(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(k),f(k,s,"Generator"),f(k,c,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},r.values=V,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:V(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}},r}function n(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function r(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy130.js?v=VERSION_NUMBER","./useMethod-legacy6.js?v=VERSION_NUMBER","./useStore-legacy5.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./firewall-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang-legacy.js?v=VERSION_NUMBER"],(function(t,n){"use strict";var o,i,a,u,c,l,s,f,p,h,d,v,y,m,g,w,x,b,_,L,j,k,E,P,S,O,I,N,T,V,C,G,q,F,z,A,M,W,H,U;return{setters:[function(t){o=t.n,i=t.L,a=t.p,u=t.K,c=t.M,l=t.al,s=t.j},function(t){f=t._},function(t){p=t.g,h=t.a,d=t.l,v=t.s,y=t.b},function(t){m=t.g},function(t){g=t.c,w=t.r,x=t.p,b=t.q,_=t.v,L=t.y,j=t.e,k=t.x,E=t.B,P=t.z,S=t.L,O=t.A,I=t.al,N=t.D,T=t.k,V=t.w,C=t.a4,G=t.P,q=t.M,F=t.C},function(t){z=t.s,A=t.a,M=t.c,W=t.b,H=t.g},function(t){U=t.o},null,null,null,null],execute:function(){var D={class:"tab-header-operate"},Y={class:"flex items-center"},B={class:"mx-[0.4rem]"},K=g({__name:"index",setup:function(t,l){var s=l.expose,f=m().refs.firewallInfo,h=w(""),d=w(""),v=function(){var t=r(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f.value.status=!r,!r){t.next=5;break}o({title:"启用系统防火墙",area:46,component:function(){return i((function(){return n.import("./set-firewall-legacy.js?v=VERSION_NUMBER")}),void 0,n.meta.url)},confirmText:"启用",showFooter:!0,compData:{callback:function(){f.value.status=r}}}),t.next=10;break;case 5:return t.next=7,a({icon:"question-filled",title:r?"启用系统防火墙":"停用系统防火墙",content:r?"推荐启用,启用系统防火墙后,可以更好的防护当前的服务器安全,是否继续操作?":"停用系统防火墙,服务器将失去安全防护,是否继续操作?"});case 7:return t.next=9,u({loading:"正在"+(r?"启用系统防火墙":"停用系统防火墙")+",请稍后...",request:z({status:Number(r)}),message:!0});case 9:f.value.status=r;case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),y=function(){var t=r(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f.value.ping=!n,t.next=3,a({icon:"question-filled",title:n?"禁Ping":"解Ping",content:n?"禁PING后不影响服务器正常使用,但无法ping通服务器,您真的要禁PING吗?":"解除禁PING状态可能会被黑客发现您的服务器,您真的要解禁吗?"});case 3:return t.next=5,u({loading:"正在"+(n?"禁Ping":"解Ping")+",请稍后...",request:A({status:n?"0":"1"}),message:!0});case 5:f.value.ping=n;case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=r(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a({icon:"question-filled",type:"calc",title:"清空Web日志",content:"清空Web日志后,网站访问数据将彻底删除,此操作不可逆,是否继续操作?"});case 2:return t.next=4,u({loading:"正在清空Web日志,请稍后...",request:M(),data:[String,h]});case 4:c.success("清空Web日志成功");case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a({icon:"question-filled",title:"清理缓存",content:"清理缓存后,系统将重新加载,是否继续操作?"});case 2:return t.next=4,u({loading:"正在清理缓存,请稍后...",request:W(),message:!0});case 4:setTimeout((function(){window.location.reload()}),1e3);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),V=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u({request:H(),data:{size:[String,h],log_path:[String,d]}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),C=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p();case 2:V();case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return x(C),s({onChangeFirewall:v}),function(t,e){var n=I,r=N;return b(),_("div",D,[e[7]||(e[7]=L("div",{class:"mr-4"},"防火墙开关",-1)),L("div",null,[j(n,{modelValue:k(f).status,"onUpdate:modelValue":e[0]||(e[0]=function(t){return k(f).status=t}),width:36,onChange:v},null,8,["modelValue"])]),e[8]||(e[8]=L("div",{class:"bg-[#ccc] w-[1px] h-2rem mx-8"},null,-1)),e[9]||(e[9]=L("div",{class:"mr-4"},"禁ping",-1)),L("div",null,[j(n,{modelValue:k(f).ping,"onUpdate:modelValue":e[1]||(e[1]=function(t){return k(f).ping=t}),width:36,onChange:y},null,8,["modelValue"])]),e[10]||(e[10]=L("div",{class:"bg-[#ccc] w-[1px] h-2rem mx-8"},null,-1)),L("div",Y,[e[4]||(e[4]=L("span",null,"Web日志:",-1)),L("span",{onClick:e[2]||(e[2]=function(t){return k(U)({path:k(d)})}),class:"bt-link"},[E(P(k(d)||"--")+" ",1),S(t.$slots,"default")]),L("span",B,P(k(h)),1)]),j(r,{onClick:e[3]||(e[3]=function(t){return g()})},{default:O((function(){return e[5]||(e[5]=[E("清空")])})),_:1}),j(r,{class:"ml-[1rem]",onClick:T},{default:O((function(){return e[6]||(e[6]=[E("清理缓存")])})),_:1})])}}}),R=["innerHTML"];t("default",g({__name:"index",setup:function(t){var o,a,u,c,p,g=m().refs,P=g.firewallInfo,S=g.systemTabActive,I=w(),N=T([{label:"端口规则:"+(null!==(o=P.value.port)&&void 0!==o?o:"获取中..."),name:"port",render:function(){return i((function(){return n.import("./index-legacy270.js?v=VERSION_NUMBER")}),void 0,n.meta.url)}},{label:"IP规则:"+((null===(a=P.value)||void 0===a?void 0:a.ip)||"获取中..."),name:"ip",lazy:!0,render:function(){return i((function(){return n.import("./index-legacy271.js?v=VERSION_NUMBER")}),void 0,n.meta.url)}},{label:"端口转发:"+((null===(u=P.value)||void 0===u?void 0:u.trans)||"获取中..."),name:"forward",lazy:!0,render:function(){return i((function(){return n.import("./index-legacy272.js?v=VERSION_NUMBER")}),void 0,n.meta.url)}},{label:"地区规则:"+((null===(c=P.value)||void 0===c?void 0:c.country)||"获取中..."),name:"area",lazy:!0,render:function(){return i((function(){return n.import("./index-legacy273.js?v=VERSION_NUMBER")}),void 0,n.meta.url)}},{label:"恶意IP自动封禁:"+((null===(p=P.value)||void 0===p?void 0:p.banned)||"获取中..."),name:"banned",lazy:!0,render:function(){return i((function(){return n.import("./index-legacy274.js?v=VERSION_NUMBER")}),void 0,n.meta.url)}}]),z=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:I.value.onChangeFirewall(!0);case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),A=function(t){y.value="ALL"};return V((function(){return P.value}),(function(t){if(t){var e=t.port,n=t.ip,r=t.trans,o=t.country,i=t.banned;N[0].label="端口规则:"+e,N[1].label="IP规则:"+n,N[2].label="端口转发:"+r,N[3].label="地区规则:"+o,N[4].label="恶意IP自动封禁:"+i}})),x((function(){h()})),C((function(){S.value="port"})),function(t,e){var n=l,r=f,o=s;return b(),_("div",null,[j(K,{ref_key:"HeaderRef",ref:I},null,512),L("div",null,[j(n,{type:"card",modelValue:k(S),"onUpdate:modelValue":e[0]||(e[0]=function(t){return G(S)?S.value=t:null}),options:k(N),onTabClick:A},null,8,["modelValue","options"]),k(P).status?F("",!0):(b(),q(r,{key:0,width:"38rem"},{content:O((function(){return[L("div",{class:"content-mask"},[e[3]||(e[3]=L("i",{class:"svgtofont-el-warning text-orange mr-[4px] !text-[2rem]"},null,-1)),L("div",{class:"flex items-center"},[e[2]||(e[2]=E(" 未开启防火墙,请 ")),L("span",{onClick:z,class:"bt-link"},"点击开启")])])]})),_:1})),j(o,{modelValue:k(v),"onUpdate:modelValue":e[1]||(e[1]=function(t){return G(v)?v.value=t:null}),width:"50rem",title:"正在初始化防火墙,请稍后...",area:54,showClose:!1},{default:O((function(){return[L("div",{class:"flex flex-col bg-[#333] text-white leading-[2.2rem] h-[30rem] overflow-y-auto p-[1rem]",innerHTML:k(d)},null,8,R)]})),_:1},8,["modelValue"])])])}}}))}}}))}();
Save File
Cancel