update 2023-02-03 17:09:06
This commit is contained in:
parent
1d272bcd34
commit
ddfd10364e
|
@ -7,7 +7,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=IstoreX
|
||||
PKG_VERSION:=0.5.7
|
||||
PKG_VERSION:=0.5.8
|
||||
LUCI_DEPENDS:=+luci-app-quickstart +luci-app-store +luci-lib-taskd
|
||||
LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.15)
|
||||
LUCI_MINIFY_CSS:=0
|
||||
|
|
|
@ -1 +1 @@
|
|||
import{_ as r}from"./index.js?v=c1b13aa2";const e={};function n(_,c){return null}var a=r(e,[["render",n]]);export{a as default};
|
||||
import{_ as r}from"./index.js?v=acacf0dc";const e={};function n(_,c){return null}var a=r(e,[["render",n]]);export{a as default};
|
|
@ -1 +1 @@
|
|||
var C=Object.defineProperty;var F=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var v=(l,t,u)=>t in l?C(l,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[t]=u,b=(l,t)=>{for(var u in t||(t={}))f.call(t,u)&&v(l,u,t[u]);if(F)for(var u of F(t))A.call(t,u)&&v(l,u,t[u]);return l};var E=(l,t,u)=>new Promise((r,d)=>{var c=n=>{try{a(u.next(n))}catch(o){d(o)}},s=n=>{try{a(u.throw(n))}catch(o){d(o)}},a=n=>n.done?r(n.value):Promise.resolve(n.value).then(c,s);a((u=u.apply(l,t)).next())});import{d as y,s as m,j as x,o as D,c as _,a as e,x as i,z as p,y as B,l as V,m as g,A as I,G as w,B as h,T as S,C as k}from"./index.js?v=c1b13aa2";const M=["onSubmit"],N=w('<div class="label-info"> \u65C1\u8DEF\u7531\u6A21\u5F0F\uFF0C\u4E5F\u53EB\u5355\u81C2\u8DEF\u7531\u6A21\u5F0F\u3002\u60A8\u53EF\u4EE5\u7528\u4E0A\u4E00\u7EA7\u8DEF\u7531\u62E8\u53F7\uFF0C\u7136\u540E\u7531\u8BE5\u8BBE\u5907\u6765\u5B9E\u73B0\u4E00\u4E9B\u9AD8\u7EA7\u529F\u80FD\u3002 </div><div class="label-name"><span>LAN \u63A5\u53E3\u914D\u7F6E\u65B9\u5F0F</span></div><div class="label-value"><select disabled><option> \u65C1\u8DEF\u7531\u6A21\u5F0F\u4EC5\u652F\u6301\u9759\u6001IP\u5730\u5740 </option></select></div><div class="label-name"><span>IP \u5730\u5740\uFF08\u8BF7\u548C\u4E0A\u4E00\u6B65\u8BB0\u5F55\u7684\u4E3B\u8DEF\u7531\u5730\u5740\u5728\u540C\u4E00\u7F51\u6BB5\uFF09</span></div>',4),P={class:"label-value"},U=e("div",{class:"label-name"},[e("span",null,"\u5B50\u7F51\u63A9\u7801")],-1),q={class:"label-value"},L=e("div",{class:"label-name"},[e("span",null,"\u7F51\u5173\u5730\u5740")],-1),T={class:"label-value"},G=e("div",{class:"label-name"},[e("span",null,"DNS\u670D\u52A1\u5668")],-1),H={class:"label-value"},R=e("div",{class:"label-name"},[e("span",null,"\u662F\u5426\u63D0\u4F9B DHCP\uFF08\u5982\u679C\u662F\u63D0\u4F9B DHCP\uFF0C\u5219\u9700\u8981\u5173\u95ED\u4E3B\u8DEF\u7531 DHCP\uFF09")],-1),j={class:"label-value"},z={class:"label-flex"},O=h("\u5173\u95ED"),J=h("\u542F\u7528"),K={class:"label-btns"},Q=["disabled"],W={key:0,class:"label-msg"},Z=y({__name:"index",setup(l){const t=m(""),u=x({subnetMask:"255.255.255.0",staticDnsIp:"223.5.5.5",staticLanIp:"",gateway:"",enableDhcp:!0}),r=m(!1),d=()=>E(this,null,function*(){const c=b({},u),s=S.Loading("\u914D\u7F6E\u4E2D...");try{const a=yield k.Guide.GatewayRouter.POST(c);if(a!=null&&a.data){const{success:n,error:o}=a==null?void 0:a.data;o&&(t.value=o),(n==null||n==0)&&(t.value="\u914D\u7F6E\u6210\u529F")}}catch(a){t.value=a}s.Close()});return(c,s)=>(D(),_("form",{class:"form-container",onSubmit:I(d,["prevent"])},[N,e("div",P,[i(e("input",{type:"text",placeholder:"ip\u5730\u5740","onUpdate:modelValue":s[0]||(s[0]=a=>u.staticLanIp=a),required:""},null,512),[[p,u.staticLanIp,void 0,{trim:!0}]])]),U,e("div",q,[i(e("input",{type:"text",placeholder:"\u5B50\u7F51\u63A9\u7801\u5730\u5740","onUpdate:modelValue":s[1]||(s[1]=a=>u.subnetMask=a),required:""},null,512),[[p,u.subnetMask,void 0,{trim:!0}]])]),L,e("div",T,[i(e("input",{type:"text",placeholder:"\u7F51\u5173\u5730\u5740","onUpdate:modelValue":s[2]||(s[2]=a=>u.gateway=a),required:""},null,512),[[p,u.gateway,void 0,{trim:!0}]])]),G,e("div",H,[i(e("input",{type:"text",placeholder:"dns\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":s[3]||(s[3]=a=>u.staticDnsIp=a),required:""},null,512),[[p,u.staticDnsIp,void 0,{trim:!0}]])]),R,e("div",j,[e("div",z,[e("label",null,[i(e("input",{type:"radio",value:!1,"onUpdate:modelValue":s[4]||(s[4]=a=>u.enableDhcp=a)},null,512),[[B,u.enableDhcp]]),O]),e("label",null,[i(e("input",{type:"radio",value:!0,"onUpdate:modelValue":s[5]||(s[5]=a=>u.enableDhcp=a)},null,512),[[B,u.enableDhcp]]),J])])]),e("div",K,[e("button",{class:"sumbit",disabled:r.value},"\u4FDD\u5B58",8,Q)]),t.value?(D(),_("div",W,[e("span",null,V(t.value),1)])):g("",!0)],40,M))}});export{Z as default};
|
||||
var C=Object.defineProperty;var F=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var v=(l,t,u)=>t in l?C(l,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[t]=u,b=(l,t)=>{for(var u in t||(t={}))f.call(t,u)&&v(l,u,t[u]);if(F)for(var u of F(t))A.call(t,u)&&v(l,u,t[u]);return l};var E=(l,t,u)=>new Promise((r,d)=>{var c=n=>{try{a(u.next(n))}catch(o){d(o)}},s=n=>{try{a(u.throw(n))}catch(o){d(o)}},a=n=>n.done?r(n.value):Promise.resolve(n.value).then(c,s);a((u=u.apply(l,t)).next())});import{d as y,s as m,j as x,o as D,c as _,a as e,x as i,z as p,y as B,l as V,m as g,A as I,G as w,B as h,T as S,C as k}from"./index.js?v=acacf0dc";const M=["onSubmit"],N=w('<div class="label-info"> \u65C1\u8DEF\u7531\u6A21\u5F0F\uFF0C\u4E5F\u53EB\u5355\u81C2\u8DEF\u7531\u6A21\u5F0F\u3002\u60A8\u53EF\u4EE5\u7528\u4E0A\u4E00\u7EA7\u8DEF\u7531\u62E8\u53F7\uFF0C\u7136\u540E\u7531\u8BE5\u8BBE\u5907\u6765\u5B9E\u73B0\u4E00\u4E9B\u9AD8\u7EA7\u529F\u80FD\u3002 </div><div class="label-name"><span>LAN \u63A5\u53E3\u914D\u7F6E\u65B9\u5F0F</span></div><div class="label-value"><select disabled><option> \u65C1\u8DEF\u7531\u6A21\u5F0F\u4EC5\u652F\u6301\u9759\u6001IP\u5730\u5740 </option></select></div><div class="label-name"><span>IP \u5730\u5740\uFF08\u8BF7\u548C\u4E0A\u4E00\u6B65\u8BB0\u5F55\u7684\u4E3B\u8DEF\u7531\u5730\u5740\u5728\u540C\u4E00\u7F51\u6BB5\uFF09</span></div>',4),P={class:"label-value"},U=e("div",{class:"label-name"},[e("span",null,"\u5B50\u7F51\u63A9\u7801")],-1),q={class:"label-value"},L=e("div",{class:"label-name"},[e("span",null,"\u7F51\u5173\u5730\u5740")],-1),T={class:"label-value"},G=e("div",{class:"label-name"},[e("span",null,"DNS\u670D\u52A1\u5668")],-1),H={class:"label-value"},R=e("div",{class:"label-name"},[e("span",null,"\u662F\u5426\u63D0\u4F9B DHCP\uFF08\u5982\u679C\u662F\u63D0\u4F9B DHCP\uFF0C\u5219\u9700\u8981\u5173\u95ED\u4E3B\u8DEF\u7531 DHCP\uFF09")],-1),j={class:"label-value"},z={class:"label-flex"},O=h("\u5173\u95ED"),J=h("\u542F\u7528"),K={class:"label-btns"},Q=["disabled"],W={key:0,class:"label-msg"},Z=y({__name:"index",setup(l){const t=m(""),u=x({subnetMask:"255.255.255.0",staticDnsIp:"223.5.5.5",staticLanIp:"",gateway:"",enableDhcp:!0}),r=m(!1),d=()=>E(this,null,function*(){const c=b({},u),s=S.Loading("\u914D\u7F6E\u4E2D...");try{const a=yield k.Guide.GatewayRouter.POST(c);if(a!=null&&a.data){const{success:n,error:o}=a==null?void 0:a.data;o&&(t.value=o),(n==null||n==0)&&(t.value="\u914D\u7F6E\u6210\u529F")}}catch(a){t.value=a}s.Close()});return(c,s)=>(D(),_("form",{class:"form-container",onSubmit:I(d,["prevent"])},[N,e("div",P,[i(e("input",{type:"text",placeholder:"ip\u5730\u5740","onUpdate:modelValue":s[0]||(s[0]=a=>u.staticLanIp=a),required:""},null,512),[[p,u.staticLanIp,void 0,{trim:!0}]])]),U,e("div",q,[i(e("input",{type:"text",placeholder:"\u5B50\u7F51\u63A9\u7801\u5730\u5740","onUpdate:modelValue":s[1]||(s[1]=a=>u.subnetMask=a),required:""},null,512),[[p,u.subnetMask,void 0,{trim:!0}]])]),L,e("div",T,[i(e("input",{type:"text",placeholder:"\u7F51\u5173\u5730\u5740","onUpdate:modelValue":s[2]||(s[2]=a=>u.gateway=a),required:""},null,512),[[p,u.gateway,void 0,{trim:!0}]])]),G,e("div",H,[i(e("input",{type:"text",placeholder:"dns\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":s[3]||(s[3]=a=>u.staticDnsIp=a),required:""},null,512),[[p,u.staticDnsIp,void 0,{trim:!0}]])]),R,e("div",j,[e("div",z,[e("label",null,[i(e("input",{type:"radio",value:!1,"onUpdate:modelValue":s[4]||(s[4]=a=>u.enableDhcp=a)},null,512),[[B,u.enableDhcp]]),O]),e("label",null,[i(e("input",{type:"radio",value:!0,"onUpdate:modelValue":s[5]||(s[5]=a=>u.enableDhcp=a)},null,512),[[B,u.enableDhcp]]),J])])]),e("div",K,[e("button",{class:"sumbit",disabled:r.value},"\u4FDD\u5B58",8,Q)]),t.value?(D(),_("div",W,[e("span",null,V(t.value),1)])):g("",!0)],40,M))}});export{Z as default};
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
import{_ as o,r as n,o as r,c as t,b as a}from"./index.js?v=acacf0dc";const c={},s={id:"page",class:"page-container"};function _(d,i){const e=n("router-loading");return r(),t("div",s,[a(e)])}var p=o(c,[["render",_]]);export{p as default};
|
|
@ -1 +1 @@
|
|||
var p=(o,u,s)=>new Promise((h,c)=>{var f=r=>{try{t(s.next(r))}catch(l){c(l)}},x=r=>{try{t(s.throw(r))}catch(l){c(l)}},t=r=>r.done?h(r.value):Promise.resolve(r.value).then(f,x);t((s=s.apply(o,u)).next())});import{_ as v,d as w,j as B,v as m,k as g,o as i,c as a,a as e,F as k,E as y,l as n,p as A,q as C,B as _,C as M}from"./index.js?v=c1b13aa2";const d=o=>(A("data-v-16a9b49b"),o=o(),C(),o),D={class:"page-table"},F=d(()=>e("colgroup",null,[e("col"),e("col"),e("col"),e("col"),e("col"),e("col")],-1)),E=d(()=>e("thead",null,[e("tr",null,[e("th",null," \u72B6\u6001 "),e("th",null," \u63A5\u53E3 "),e("th",null," \u7C7B\u578B "),e("th",null," mac "),e("th",null," \u63A5\u6536 "),e("th",null," \u53D1\u9001 ")])],-1)),b={class:"flex-icon"},N=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:v":"https://vecta.io/nano",width:"48",height:"38",viewBox:"0 0 12.7 10.05"},[e("defs",null,[e("filter",{id:"A","color-interpolation-filters":"sRGB"},[e("feColorMatrix",{result:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "}),e("feColorMatrix",{values:"0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"}),e("feColorMatrix",{in:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "})]),e("path",{id:"B",d:"M80.56 75.75h3.91v22.79h-3.91z"})]),e("g",{transform:"translate(0 -286.95)"},[e("rect",{x:".21",y:"287.25",width:"12.33",height:"9.5",ry:".57",fill:"#e6e6e6",stroke:"#e6e6e6","stroke-linejoin":"round","stroke-width":".37","paint-order":"normal"}),e("path",{transform:"matrix(.105 0 0 .0989 -6.0834 280.6)",d:"M73.96 75.66h89.41c2.31 0 4.17 1.86 4.17 4.17v52.65h-21.74v9.41h-8.69v12.59h-36.87v-12.59h-8.69v-9.41H69.79V79.83c0-2.31 1.86-4.17 4.17-4.17z",fill:"#999",filter:"url(#A)",stroke:"#999","stroke-width":"2.5"}),e("g",{transform:"matrix(.1048 0 0 .1048 -6.0999 280.7)",fill:"#fff",filter:"url(#A)",stroke:"#fff"},[e("use",{"xlink:href":"#B"}),e("use",{"xlink:href":"#B",x:"73.04"}),e("use",{"xlink:href":"#B",x:"52.17"}),e("use",{"xlink:href":"#B",x:"41.74"}),e("use",{"xlink:href":"#B",x:"31.3"}),e("use",{"xlink:href":"#B",x:"20.87"}),e("use",{"xlink:href":"#B",x:"10.43"}),e("use",{"xlink:href":"#B",x:"62.61"})]),e("rect",{x:"1.24",y:"294.55",width:"1.6",height:"1.38",ry:".11",fill:"#ccc",stroke:"#ccc","stroke-width":".22","paint-order":"normal"})])],-1)),S=_("\u672A\u8FDE\u63A5 "),j=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"48",height:"38",viewBox:"0 0 12.7 10.05","xmlns:v":"https://vecta.io/nano"},[e("defs",null,[e("filter",{id:"A","color-interpolation-filters":"sRGB"},[e("feColorMatrix",{result:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "}),e("feColorMatrix",{values:"0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"}),e("feColorMatrix",{in:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "})]),e("path",{id:"B",d:"M80.56 75.75h3.91v22.79h-3.91z"})]),e("g",{transform:"translate(-.03 -287.07)"},[e("rect",{x:".24",y:"287.36",width:"12.33",height:"9.5",ry:".57",fill:"#e6e6e6",stroke:"#e6e6e6","stroke-linejoin":"round","stroke-width":".37","paint-order":"normal"}),e("path",{transform:"matrix(.105 0 0 .0989 -6.0532 280.72)",d:"M73.96 75.66h89.41c2.31 0 4.17 1.86 4.17 4.17v52.65h-21.74v9.41h-8.69v12.59h-36.87v-12.59h-8.69v-9.41H69.79V79.83c0-2.31 1.86-4.17 4.17-4.17z",fill:"#4d4d4d",filter:"url(#A)",stroke:"#4d4d4d","stroke-width":"2.5"}),e("g",{transform:"matrix(.1048 0 0 .1048 -6.0697 280.81)",fill:"#fff",filter:"url(#A)",stroke:"#fff"},[e("use",{"xlink:href":"#B"}),e("use",{"xlink:href":"#B",x:"73.04"}),e("use",{"xlink:href":"#B",x:"52.17"}),e("use",{"xlink:href":"#B",x:"41.74"}),e("use",{"xlink:href":"#B",x:"31.3"}),e("use",{"xlink:href":"#B",x:"20.87"}),e("use",{"xlink:href":"#B",x:"10.43"}),e("use",{"xlink:href":"#B",x:"62.61"})]),e("rect",{x:"1.27",y:"294.67",width:"1.6",height:"1.38",ry:".11",fill:"#55d400",stroke:"#55d400","stroke-width":".22","paint-order":"normal"})])],-1)),z=_(" \u5DF2\u8FDE\u63A5 "),I=w({__name:"index",setup(o){return p(this,null,function*(){let u,s;const h=B({ports:[]}),c=t=>{switch(t){case"full":return"\u5168\u53CC\u5DE5";case"half":return"\u534A\u53CC\u5DE5"}};let f=!1;const x=()=>p(this,null,function*(){try{const t=yield M.Network.PortList.GET();if(t!=null&&t.data){const{result:r}=t==null?void 0:t.data;r&&(h.ports=r.ports||[])}}catch(t){console.log(t)}setTimeout(()=>{f||x()},1e4)});return[u,s]=m(()=>x()),yield u,s(),g(()=>{f=!0}),(t,r)=>(i(),a("table",D,[F,E,e("tbody",null,[(i(!0),a(k,null,y(h.ports,l=>(i(),a("tr",null,[e("th",b,[l.linkState=="DOWN"?(i(),a(k,{key:0},[N,S],64)):(i(),a(k,{key:1},[j,z],64))]),e("th",null,n(l.name)+"\uFF08"+n(l.interfaceNames.join(",").toLocaleUpperCase())+"\uFF09 ",1),e("th",null,n(c(l.duplex)),1),e("th",null,n(l.macAddress||"--"),1),e("th",null,n(l.rx_packets||"--"),1),e("th",null,n(l.tx_packets||"--"),1)]))),256))])]))})}});var G=v(I,[["__scopeId","data-v-16a9b49b"]]);export{G as default};
|
||||
var p=(o,u,s)=>new Promise((h,c)=>{var f=r=>{try{t(s.next(r))}catch(l){c(l)}},x=r=>{try{t(s.throw(r))}catch(l){c(l)}},t=r=>r.done?h(r.value):Promise.resolve(r.value).then(f,x);t((s=s.apply(o,u)).next())});import{_ as v,d as w,j as B,v as m,k as g,o as i,c as a,a as e,F as k,E as y,l as n,p as A,q as C,B as _,C as M}from"./index.js?v=acacf0dc";const d=o=>(A("data-v-16a9b49b"),o=o(),C(),o),D={class:"page-table"},F=d(()=>e("colgroup",null,[e("col"),e("col"),e("col"),e("col"),e("col"),e("col")],-1)),E=d(()=>e("thead",null,[e("tr",null,[e("th",null," \u72B6\u6001 "),e("th",null," \u63A5\u53E3 "),e("th",null," \u7C7B\u578B "),e("th",null," mac "),e("th",null," \u63A5\u6536 "),e("th",null," \u53D1\u9001 ")])],-1)),b={class:"flex-icon"},N=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:v":"https://vecta.io/nano",width:"48",height:"38",viewBox:"0 0 12.7 10.05"},[e("defs",null,[e("filter",{id:"A","color-interpolation-filters":"sRGB"},[e("feColorMatrix",{result:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "}),e("feColorMatrix",{values:"0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"}),e("feColorMatrix",{in:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "})]),e("path",{id:"B",d:"M80.56 75.75h3.91v22.79h-3.91z"})]),e("g",{transform:"translate(0 -286.95)"},[e("rect",{x:".21",y:"287.25",width:"12.33",height:"9.5",ry:".57",fill:"#e6e6e6",stroke:"#e6e6e6","stroke-linejoin":"round","stroke-width":".37","paint-order":"normal"}),e("path",{transform:"matrix(.105 0 0 .0989 -6.0834 280.6)",d:"M73.96 75.66h89.41c2.31 0 4.17 1.86 4.17 4.17v52.65h-21.74v9.41h-8.69v12.59h-36.87v-12.59h-8.69v-9.41H69.79V79.83c0-2.31 1.86-4.17 4.17-4.17z",fill:"#999",filter:"url(#A)",stroke:"#999","stroke-width":"2.5"}),e("g",{transform:"matrix(.1048 0 0 .1048 -6.0999 280.7)",fill:"#fff",filter:"url(#A)",stroke:"#fff"},[e("use",{"xlink:href":"#B"}),e("use",{"xlink:href":"#B",x:"73.04"}),e("use",{"xlink:href":"#B",x:"52.17"}),e("use",{"xlink:href":"#B",x:"41.74"}),e("use",{"xlink:href":"#B",x:"31.3"}),e("use",{"xlink:href":"#B",x:"20.87"}),e("use",{"xlink:href":"#B",x:"10.43"}),e("use",{"xlink:href":"#B",x:"62.61"})]),e("rect",{x:"1.24",y:"294.55",width:"1.6",height:"1.38",ry:".11",fill:"#ccc",stroke:"#ccc","stroke-width":".22","paint-order":"normal"})])],-1)),S=_("\u672A\u8FDE\u63A5 "),j=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"48",height:"38",viewBox:"0 0 12.7 10.05","xmlns:v":"https://vecta.io/nano"},[e("defs",null,[e("filter",{id:"A","color-interpolation-filters":"sRGB"},[e("feColorMatrix",{result:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "}),e("feColorMatrix",{values:"0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"}),e("feColorMatrix",{in:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "})]),e("path",{id:"B",d:"M80.56 75.75h3.91v22.79h-3.91z"})]),e("g",{transform:"translate(-.03 -287.07)"},[e("rect",{x:".24",y:"287.36",width:"12.33",height:"9.5",ry:".57",fill:"#e6e6e6",stroke:"#e6e6e6","stroke-linejoin":"round","stroke-width":".37","paint-order":"normal"}),e("path",{transform:"matrix(.105 0 0 .0989 -6.0532 280.72)",d:"M73.96 75.66h89.41c2.31 0 4.17 1.86 4.17 4.17v52.65h-21.74v9.41h-8.69v12.59h-36.87v-12.59h-8.69v-9.41H69.79V79.83c0-2.31 1.86-4.17 4.17-4.17z",fill:"#4d4d4d",filter:"url(#A)",stroke:"#4d4d4d","stroke-width":"2.5"}),e("g",{transform:"matrix(.1048 0 0 .1048 -6.0697 280.81)",fill:"#fff",filter:"url(#A)",stroke:"#fff"},[e("use",{"xlink:href":"#B"}),e("use",{"xlink:href":"#B",x:"73.04"}),e("use",{"xlink:href":"#B",x:"52.17"}),e("use",{"xlink:href":"#B",x:"41.74"}),e("use",{"xlink:href":"#B",x:"31.3"}),e("use",{"xlink:href":"#B",x:"20.87"}),e("use",{"xlink:href":"#B",x:"10.43"}),e("use",{"xlink:href":"#B",x:"62.61"})]),e("rect",{x:"1.27",y:"294.67",width:"1.6",height:"1.38",ry:".11",fill:"#55d400",stroke:"#55d400","stroke-width":".22","paint-order":"normal"})])],-1)),z=_(" \u5DF2\u8FDE\u63A5 "),I=w({__name:"index",setup(o){return p(this,null,function*(){let u,s;const h=B({ports:[]}),c=t=>{switch(t){case"full":return"\u5168\u53CC\u5DE5";case"half":return"\u534A\u53CC\u5DE5"}};let f=!1;const x=()=>p(this,null,function*(){try{const t=yield M.Network.PortList.GET();if(t!=null&&t.data){const{result:r}=t==null?void 0:t.data;r&&(h.ports=r.ports||[])}}catch(t){console.log(t)}setTimeout(()=>{f||x()},1e4)});return[u,s]=m(()=>x()),yield u,s(),g(()=>{f=!0}),(t,r)=>(i(),a("table",D,[F,E,e("tbody",null,[(i(!0),a(k,null,y(h.ports,l=>(i(),a("tr",null,[e("th",b,[l.linkState=="DOWN"?(i(),a(k,{key:0},[N,S],64)):(i(),a(k,{key:1},[j,z],64))]),e("th",null,n(l.name)+"\uFF08"+n(l.interfaceNames.join(",").toLocaleUpperCase())+"\uFF09 ",1),e("th",null,n(c(l.duplex)),1),e("th",null,n(l.macAddress||"--"),1),e("th",null,n(l.rx_packets||"--"),1),e("th",null,n(l.tx_packets||"--"),1)]))),256))])]))})}});var G=v(I,[["__scopeId","data-v-16a9b49b"]]);export{G as default};
|
|
@ -1 +1 @@
|
|||
import{d as a,r as e,o as u,e as r,w as s,b as p}from"./index.js?v=c1b13aa2";const m=a({__name:"index",setup(i){const t=[{name:"setting-index",title:"\u529F\u80FD\u4FE1\u606F",path:"/router/setting"},{name:"opkg",title:"\u8F6F\u4EF6\u6E90\u914D\u7F6E",path:"/router/setting/opkg"},{name:"opkg",title:"\u5411\u5BFC\u6A21\u5F0F",path:"/wizard"}];return(_,c)=>{const o=e("router-loading"),n=e("layout-page");return u(),r(n,{menus:t},{default:s(()=>[p(o)]),_:1})}}});export{m as default};
|
||||
import{d as a,r as e,o as u,e as r,w as s,b as p}from"./index.js?v=acacf0dc";const m=a({__name:"index",setup(i){const t=[{name:"setting-index",title:"\u529F\u80FD\u4FE1\u606F",path:"/router/setting"},{name:"opkg",title:"\u8F6F\u4EF6\u6E90\u914D\u7F6E",path:"/router/setting/opkg"},{name:"opkg",title:"\u5411\u5BFC\u6A21\u5F0F",path:"/wizard"}];return(_,c)=>{const o=e("router-loading"),n=e("layout-page");return u(),r(n,{menus:t},{default:s(()=>[p(o)]),_:1})}}});export{m as default};
|
|
@ -1 +1 @@
|
|||
var d=(_,i,l)=>new Promise((t,e)=>{var n=o=>{try{c(l.next(o))}catch(u){e(u)}},p=o=>{try{c(l.throw(o))}catch(u){e(u)}},c=o=>o.done?t(o.value):Promise.resolve(o.value).then(n,p);c((l=l.apply(_,i)).next())});import{d as E,s as v,j as h,v as F,o as D,c as f,a,x as b,z as w,l as y,m as A,A as C,C as B,T as x}from"./index.js?v=c1b13aa2";const g=["onSubmit"],S=a("div",{class:"label-info"}," \u8BF7\u786E\u4FDD\u60A8\u5DF2\u5C06\u8DEF\u7531 WAN \u53E3\u8FDE\u63A5\u5230\u5149\u732B ",-1),T=a("div",{class:"label-name"},[a("span",null,"\u8D26\u53F7")],-1),V={class:"label-value"},k=a("div",{class:"label-name"},[a("span",null,"\u5BC6\u7801")],-1),q={class:"label-value"},G={class:"label-btns"},N=["disabled"],P={key:0,class:"label-msg"},j=E({__name:"index",setup(_){return d(this,null,function*(){let i,l;const t=v(""),e=h({account:"",password:""}),n=v(!1),p=v(!1),c=()=>d(this,null,function*(){n.value=!0;try{const u=yield B.Guide.Pppoe.GET(),{result:s}=u.data;s&&(e.account=s.account||"",e.password=s.password||"")}catch(u){t.value=u}finally{}n.value=!1,p.value=!0});[i,l]=F(()=>c()),yield i,l();const o=()=>d(this,null,function*(){if(e.account==""){t.value="\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A";return}if(e.password==""){t.value="\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A";return}n.value=!0;const u=x.Loading("\u4FDD\u5B58\u4E2D...");try{const s=yield B.Guide.Pppoe.POST({account:e.account,password:e.password});if(s.data){const{error:r,success:m}=s.data;r&&(t.value=r),(m==null||m==0)&&(t.value="\u914D\u7F6E\u5B8C\u6210")}}catch(s){t.value=s}finally{}n.value=!1,u.Close()});return(u,s)=>(D(),f("form",{class:"form-container",onSubmit:C(o,["prevent"])},[S,T,a("div",V,[b(a("input",{type:"text",placeholder:"\u5BBD\u5E26\u8D26\u53F7","onUpdate:modelValue":s[0]||(s[0]=r=>e.account=r),required:""},null,512),[[w,e.account,void 0,{trim:!0}]])]),k,a("div",q,[b(a("input",{type:"password",placeholder:"\u5BBD\u5E26\u5BC6\u7801","onUpdate:modelValue":s[1]||(s[1]=r=>e.password=r),required:""},null,512),[[w,e.password,void 0,{trim:!0}]])]),a("div",G,[a("button",{class:"sumbit",disabled:n.value},"\u4FDD\u5B58",8,N)]),t.value?(D(),f("div",P,[a("span",null,y(t.value),1)])):A("",!0)],40,g))})}});export{j as default};
|
||||
var d=(_,i,l)=>new Promise((t,e)=>{var n=o=>{try{c(l.next(o))}catch(u){e(u)}},p=o=>{try{c(l.throw(o))}catch(u){e(u)}},c=o=>o.done?t(o.value):Promise.resolve(o.value).then(n,p);c((l=l.apply(_,i)).next())});import{d as E,s as v,j as h,v as F,o as D,c as f,a,x as b,z as w,l as y,m as A,A as C,C as B,T as x}from"./index.js?v=acacf0dc";const g=["onSubmit"],S=a("div",{class:"label-info"}," \u8BF7\u786E\u4FDD\u60A8\u5DF2\u5C06\u8DEF\u7531 WAN \u53E3\u8FDE\u63A5\u5230\u5149\u732B ",-1),T=a("div",{class:"label-name"},[a("span",null,"\u8D26\u53F7")],-1),V={class:"label-value"},k=a("div",{class:"label-name"},[a("span",null,"\u5BC6\u7801")],-1),q={class:"label-value"},G={class:"label-btns"},N=["disabled"],P={key:0,class:"label-msg"},j=E({__name:"index",setup(_){return d(this,null,function*(){let i,l;const t=v(""),e=h({account:"",password:""}),n=v(!1),p=v(!1),c=()=>d(this,null,function*(){n.value=!0;try{const u=yield B.Guide.Pppoe.GET(),{result:s}=u.data;s&&(e.account=s.account||"",e.password=s.password||"")}catch(u){t.value=u}finally{}n.value=!1,p.value=!0});[i,l]=F(()=>c()),yield i,l();const o=()=>d(this,null,function*(){if(e.account==""){t.value="\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A";return}if(e.password==""){t.value="\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A";return}n.value=!0;const u=x.Loading("\u4FDD\u5B58\u4E2D...");try{const s=yield B.Guide.Pppoe.POST({account:e.account,password:e.password});if(s.data){const{error:r,success:m}=s.data;r&&(t.value=r),(m==null||m==0)&&(t.value="\u914D\u7F6E\u5B8C\u6210")}}catch(s){t.value=s}finally{}n.value=!1,u.Close()});return(u,s)=>(D(),f("form",{class:"form-container",onSubmit:C(o,["prevent"])},[S,T,a("div",V,[b(a("input",{type:"text",placeholder:"\u5BBD\u5E26\u8D26\u53F7","onUpdate:modelValue":s[0]||(s[0]=r=>e.account=r),required:""},null,512),[[w,e.account,void 0,{trim:!0}]])]),k,a("div",q,[b(a("input",{type:"password",placeholder:"\u5BBD\u5E26\u5BC6\u7801","onUpdate:modelValue":s[1]||(s[1]=r=>e.password=r),required:""},null,512),[[w,e.password,void 0,{trim:!0}]])]),a("div",G,[a("button",{class:"sumbit",disabled:n.value},"\u4FDD\u5B58",8,N)]),t.value?(D(),f("div",P,[a("span",null,y(t.value),1)])):A("",!0)],40,g))})}});export{j as default};
|
|
@ -1 +1 @@
|
|||
var C=(r,h,d)=>new Promise((k,c)=>{var F=l=>{try{E(d.next(l))}catch(v){c(v)}},t=l=>{try{E(d.throw(l))}catch(v){c(v)}},E=l=>l.done?k(l.value):Promise.resolve(l.value).then(F,t);E((d=d.apply(r,h)).next())});import{_ as S,d as w,s as m,j as I,v as N,o,c as n,F as _,a as s,x,D as g,E as A,m as D,l as p,A as T,p as G,q as U,C as y,T as B}from"./index.js?v=c1b13aa2";const i=r=>(G("data-v-6bbc1a4d"),r=r(),U(),r),V=["onSubmit"],M=i(()=>s("p",null,"\u4E00\u4E2A\u7B80\u6613\u6C99\u7BB1\uFF0C\u65B9\u4FBF\u7528\u6765\u5B9E\u9A8C\u7CFB\u7EDF\u914D\u7F6E\u548C\u7A0B\u5E8F\uFF0C\u65B9\u4FBF\u5F00\u53D1\u672A\u5B8C\u6210\u7684\u8F6F\u4EF6\uFF0C\u4F46\u4E0D\u4FDD\u62A4Docker\u548C\u786C\u76D8\u7684\u6570\u636E",-1)),q={key:0,class:"label-msg warning"},z=i(()=>s("div",{class:"label-value"},null,-1)),L=i(()=>s("div",{class:"label-name"},[s("span",null,"\u72B6\u6001")],-1)),P={class:"label-value"},$=["value"],j=i(()=>s("option",{disabled:"",selected:"true"},"\u83B7\u53D6\u4E2D...",-1)),O=i(()=>s("option",{disabled:"",value:"stopped"},"\u672A\u5F00\u542F",-1)),W=i(()=>s("option",{disabled:"",value:"running"},"\u5F00\u542F\u4E2D",-1)),H=[j,O,W],J={key:0,class:"label-btns"},K=i(()=>s("div",{class:"label-name"},[s("span",null,"\u76EE\u6807\u78C1\u76D8\uFF08\u5EFA\u8BAE\u9009\u62E9U\u76D8\u6216\u8005\u79FB\u52A8\u786C\u76D8\uFF0C\u65B9\u4FBF\u88C5\u5378\uFF09")],-1)),Q={class:"label-value"},R=i(()=>s("option",{value:""},"\u8BF7\u9009\u62E9\u76EE\u6807\u78C1\u76D8",-1)),X=["value"],Y=i(()=>s("div",{class:"label-name"},[s("span",null,"\u76EE\u6807\u5206\u533A\uFF08\u5206\u533A\u5927\u5C0F\u987B\u5927\u4E8E8G\uFF0C\u5C06\u6B64\u5206\u533A\u4F5C\u4E3A\u5916\u90E8 overlay \u4F7F\u7528\uFF09")],-1)),Z={class:"label-value"},uu=i(()=>s("option",{selected:"true",value:""},"\u8BF7\u9009\u62E9\u76EE\u6807\u5206\u533A",-1)),su=["value","disabled"],tu={key:1,class:"label-btns"},eu=["disabled"],au={key:2,class:"label-msg warning"},ou=w({__name:"index",setup(r){return C(this,null,function*(){let h,d;const k=m(!1),c=m(""),F=m(0),t=I({status:"stopped",diskpath:"",partition:"",sandboxDisks:{disks:[]}}),E=()=>C(this,null,function*(){const b=yield Promise.all([y.Nas.SandboxDisks.GET(),y.Nas.GetSandbox.GET()]);try{const u=b[0];if(u!=null&&u.data){const{result:e,error:a}=u.data;e&&(t.sandboxDisks.disks=e.disks||[]),a&&(c.value=a)}}catch(u){c.value=u,F.value=3}try{const u=b[1];if(u!=null&&u.data){const{result:e}=u.data;e&&(t.status=e.status)}}catch(u){console.log(u)}});[h,d]=N(()=>E()),yield h,d();const l=()=>{t.partition=""},v=()=>C(this,null,function*(){if(confirm("\u6B64\u64CD\u4F5C\u4F1A\u5C06\u4F1A\u5220\u9664\u8BE5\u5206\u533A\u5168\u90E8\u6570\u636E,\u662F\u5426\u7EE7\u7EED?")){const b=B.Loading("\u914D\u7F6E\u4E2D...");try{const u=yield y.Nas.Sandbox.POST({path:t.partition});if(u!=null&&u.data){const{result:e,error:a,success:f}=u.data;a&&B.Warning(a),(u.data.success||0)==0&&B.Success("\u914D\u7F6E\u6210\u529F")}}catch(u){B.Error(`${u}`)}b.Close()}});return(b,u)=>(o(),n("form",{class:"form-container",onSubmit:T(v,["prevent"])},[M,t.sandboxDisks.disks.length==0?(o(),n("div",q," \u68C0\u6D4B\u4E0D\u5230\u6302\u8F7D\u7684\u78C1\u76D8\u4FE1\u606F\uFF0C\u8BF7\u5148\u63D2\u4E0A\u78C1\u76D8\uFF0C\u5EFA\u8BAE\u4F7F\u7528U\u76D8\u6216\u8005\u79FB\u52A8\u786C\u76D8\uFF0C\u65B9\u4FBF\u88C5\u5378 ")):(o(),n(_,{key:1},[z,L,s("div",P,[s("select",{value:t.status,disabled:""},H,8,$)]),F.value==0?(o(),n("div",J,[s("button",{class:"sumbit",type:"button",onClick:u[0]||(u[0]=e=>F.value=1)},"\u914D\u7F6E")])):F.value==1?(o(),n(_,{key:1},[K,s("div",Q,[x(s("select",{"onUpdate:modelValue":u[1]||(u[1]=e=>t.diskpath=e),onChange:l},[R,(o(!0),n(_,null,A(t.sandboxDisks.disks,(e,a)=>(o(),n("option",{value:e.path,key:a},p(e.venderModel)+"\uFF08"+p(e.size)+"\uFF09 ",9,X))),128))],544),[[g,t.diskpath]])]),t.diskpath?(o(),n(_,{key:0},[Y,(o(!0),n(_,null,A(t.sandboxDisks.disks,e=>(o(),n("div",Z,[e.path==t.diskpath?x((o(),n("select",{key:0,"onUpdate:modelValue":u[2]||(u[2]=a=>t.partition=a)},[uu,(o(!0),n(_,null,A(e.childrens,(a,f)=>(o(),n("option",{value:a.path,key:f,disabled:a.sizeInt<8192e6},p(a.name)+"\uFF08"+p(a.filesystem||"\u672A\u683C\u5F0F\u5316")+"\uFF09"+p(a.total),9,su))),128))],512)),[[g,t.partition]]):D("",!0)]))),256))],64)):D("",!0),t.diskpath&&t.partition?(o(),n("div",tu,[s("button",{class:"sumbit",disabled:k.value},"\u4FDD\u5B58",8,eu)])):D("",!0)],64)):D("",!0)],64)),c.value?(o(),n("div",au,p(c.value),1)):D("",!0)],40,V))})}});var lu=S(ou,[["__scopeId","data-v-6bbc1a4d"]]);export{lu as default};
|
||||
var C=(r,h,d)=>new Promise((k,c)=>{var F=l=>{try{E(d.next(l))}catch(v){c(v)}},t=l=>{try{E(d.throw(l))}catch(v){c(v)}},E=l=>l.done?k(l.value):Promise.resolve(l.value).then(F,t);E((d=d.apply(r,h)).next())});import{_ as S,d as w,s as m,j as I,v as N,o,c as n,F as _,a as s,x,D as g,E as A,m as D,l as p,A as T,p as G,q as U,C as y,T as B}from"./index.js?v=acacf0dc";const i=r=>(G("data-v-6bbc1a4d"),r=r(),U(),r),V=["onSubmit"],M=i(()=>s("p",null,"\u4E00\u4E2A\u7B80\u6613\u6C99\u7BB1\uFF0C\u65B9\u4FBF\u7528\u6765\u5B9E\u9A8C\u7CFB\u7EDF\u914D\u7F6E\u548C\u7A0B\u5E8F\uFF0C\u65B9\u4FBF\u5F00\u53D1\u672A\u5B8C\u6210\u7684\u8F6F\u4EF6\uFF0C\u4F46\u4E0D\u4FDD\u62A4Docker\u548C\u786C\u76D8\u7684\u6570\u636E",-1)),q={key:0,class:"label-msg warning"},z=i(()=>s("div",{class:"label-value"},null,-1)),L=i(()=>s("div",{class:"label-name"},[s("span",null,"\u72B6\u6001")],-1)),P={class:"label-value"},$=["value"],j=i(()=>s("option",{disabled:"",selected:"true"},"\u83B7\u53D6\u4E2D...",-1)),O=i(()=>s("option",{disabled:"",value:"stopped"},"\u672A\u5F00\u542F",-1)),W=i(()=>s("option",{disabled:"",value:"running"},"\u5F00\u542F\u4E2D",-1)),H=[j,O,W],J={key:0,class:"label-btns"},K=i(()=>s("div",{class:"label-name"},[s("span",null,"\u76EE\u6807\u78C1\u76D8\uFF08\u5EFA\u8BAE\u9009\u62E9U\u76D8\u6216\u8005\u79FB\u52A8\u786C\u76D8\uFF0C\u65B9\u4FBF\u88C5\u5378\uFF09")],-1)),Q={class:"label-value"},R=i(()=>s("option",{value:""},"\u8BF7\u9009\u62E9\u76EE\u6807\u78C1\u76D8",-1)),X=["value"],Y=i(()=>s("div",{class:"label-name"},[s("span",null,"\u76EE\u6807\u5206\u533A\uFF08\u5206\u533A\u5927\u5C0F\u987B\u5927\u4E8E8G\uFF0C\u5C06\u6B64\u5206\u533A\u4F5C\u4E3A\u5916\u90E8 overlay \u4F7F\u7528\uFF09")],-1)),Z={class:"label-value"},uu=i(()=>s("option",{selected:"true",value:""},"\u8BF7\u9009\u62E9\u76EE\u6807\u5206\u533A",-1)),su=["value","disabled"],tu={key:1,class:"label-btns"},eu=["disabled"],au={key:2,class:"label-msg warning"},ou=w({__name:"index",setup(r){return C(this,null,function*(){let h,d;const k=m(!1),c=m(""),F=m(0),t=I({status:"stopped",diskpath:"",partition:"",sandboxDisks:{disks:[]}}),E=()=>C(this,null,function*(){const b=yield Promise.all([y.Nas.SandboxDisks.GET(),y.Nas.GetSandbox.GET()]);try{const u=b[0];if(u!=null&&u.data){const{result:e,error:a}=u.data;e&&(t.sandboxDisks.disks=e.disks||[]),a&&(c.value=a)}}catch(u){c.value=u,F.value=3}try{const u=b[1];if(u!=null&&u.data){const{result:e}=u.data;e&&(t.status=e.status)}}catch(u){console.log(u)}});[h,d]=N(()=>E()),yield h,d();const l=()=>{t.partition=""},v=()=>C(this,null,function*(){if(confirm("\u6B64\u64CD\u4F5C\u4F1A\u5C06\u4F1A\u5220\u9664\u8BE5\u5206\u533A\u5168\u90E8\u6570\u636E,\u662F\u5426\u7EE7\u7EED?")){const b=B.Loading("\u914D\u7F6E\u4E2D...");try{const u=yield y.Nas.Sandbox.POST({path:t.partition});if(u!=null&&u.data){const{result:e,error:a,success:f}=u.data;a&&B.Warning(a),(u.data.success||0)==0&&B.Success("\u914D\u7F6E\u6210\u529F")}}catch(u){B.Error(`${u}`)}b.Close()}});return(b,u)=>(o(),n("form",{class:"form-container",onSubmit:T(v,["prevent"])},[M,t.sandboxDisks.disks.length==0?(o(),n("div",q," \u68C0\u6D4B\u4E0D\u5230\u6302\u8F7D\u7684\u78C1\u76D8\u4FE1\u606F\uFF0C\u8BF7\u5148\u63D2\u4E0A\u78C1\u76D8\uFF0C\u5EFA\u8BAE\u4F7F\u7528U\u76D8\u6216\u8005\u79FB\u52A8\u786C\u76D8\uFF0C\u65B9\u4FBF\u88C5\u5378 ")):(o(),n(_,{key:1},[z,L,s("div",P,[s("select",{value:t.status,disabled:""},H,8,$)]),F.value==0?(o(),n("div",J,[s("button",{class:"sumbit",type:"button",onClick:u[0]||(u[0]=e=>F.value=1)},"\u914D\u7F6E")])):F.value==1?(o(),n(_,{key:1},[K,s("div",Q,[x(s("select",{"onUpdate:modelValue":u[1]||(u[1]=e=>t.diskpath=e),onChange:l},[R,(o(!0),n(_,null,A(t.sandboxDisks.disks,(e,a)=>(o(),n("option",{value:e.path,key:a},p(e.venderModel)+"\uFF08"+p(e.size)+"\uFF09 ",9,X))),128))],544),[[g,t.diskpath]])]),t.diskpath?(o(),n(_,{key:0},[Y,(o(!0),n(_,null,A(t.sandboxDisks.disks,e=>(o(),n("div",Z,[e.path==t.diskpath?x((o(),n("select",{key:0,"onUpdate:modelValue":u[2]||(u[2]=a=>t.partition=a)},[uu,(o(!0),n(_,null,A(e.childrens,(a,f)=>(o(),n("option",{value:a.path,key:f,disabled:a.sizeInt<8192e6},p(a.name)+"\uFF08"+p(a.filesystem||"\u672A\u683C\u5F0F\u5316")+"\uFF09"+p(a.total),9,su))),128))],512)),[[g,t.partition]]):D("",!0)]))),256))],64)):D("",!0),t.diskpath&&t.partition?(o(),n("div",tu,[s("button",{class:"sumbit",disabled:k.value},"\u4FDD\u5B58",8,eu)])):D("",!0)],64)):D("",!0)],64)),c.value?(o(),n("div",au,p(c.value),1)):D("",!0)],40,V))})}});var lu=S(ou,[["__scopeId","data-v-6bbc1a4d"]]);export{lu as default};
|
|
@ -1 +1 @@
|
|||
import{d as a,r as e,o as u,e as r,w as p,b as s}from"./index.js?v=c1b13aa2";const _=a({__name:"index",setup(c){const t=[{name:"index",title:"\u7F51\u7EDC\u914D\u7F6E",path:"/router/network"},{name:"pppoe",title:"\u62E8\u53F7\u8FDE\u63A5",path:"/router/network/pppoe"},{name:"dhcp",title:"DHCP\u8FDE\u63A5",path:"/router/network/dhcp"},{name:"gateway",title:"\u65C1\u8DEF\u7531\u8FDE\u63A5",path:"/router/network/gateway"},{name:"intranet",title:"\u5185\u7F51\u914D\u7F6E",path:"/router/network/intranet"},{name:"dns",title:"DNS\u914D\u7F6E",path:"/router/network/dns"}];return(i,l)=>{const o=e("router-loading"),n=e("layout-page");return u(),r(n,{menus:t},{default:p(()=>[s(o)]),_:1})}}});export{_ as default};
|
||||
import{d as a,r as e,o as u,e as r,w as p,b as s}from"./index.js?v=acacf0dc";const _=a({__name:"index",setup(c){const t=[{name:"index",title:"\u7F51\u7EDC\u914D\u7F6E",path:"/router/network"},{name:"pppoe",title:"\u62E8\u53F7\u8FDE\u63A5",path:"/router/network/pppoe"},{name:"dhcp",title:"DHCP\u8FDE\u63A5",path:"/router/network/dhcp"},{name:"gateway",title:"\u65C1\u8DEF\u7531\u8FDE\u63A5",path:"/router/network/gateway"},{name:"intranet",title:"\u5185\u7F51\u914D\u7F6E",path:"/router/network/intranet"},{name:"dns",title:"DNS\u914D\u7F6E",path:"/router/network/dns"}];return(i,l)=>{const o=e("router-loading"),n=e("layout-page");return u(),r(n,{menus:t},{default:p(()=>[s(o)]),_:1})}}});export{_ as default};
|
|
@ -1 +1 @@
|
|||
import{_ as D,d as $,i as f,r as C,o as t,c as n,a as s,b as B,l,H as S,p as g,q as I,u as F,g as a,F as k,E as h,m,e as v}from"./index.js?v=c1b13aa2";const b=e=>(g("data-v-f0f8da84"),e=e(),I(),e),E={class:"disk-item"},z={class:"disk-item_contanier"},N={class:"disk-item_icon"},w={class:"disk-item_name"},O=b(()=>s("div",{class:"auto"},null,-1)),V={class:"disk-item_used"},j={key:0,class:"disk-item_info"},q={class:"label-msg.warning"},M={key:1,class:"disk-item_info"},A=b(()=>s("div",{class:"auto"},null,-1)),H=$({__name:"item",props:{disk:{type:Object,required:!0}},setup(e){const c=e;f(()=>{var o;return((o=c.disk.childrens)==null?void 0:o.length)||0}),f(()=>{var u,r;let o=0;return(r=(u=c.disk)==null?void 0:u.childrens)==null||r.forEach(i=>{if(!i.mountPoint){const _=Number(i.sizeInt),x=(1<<30)*2;_>x&&o++}}),o});const d=()=>{S.OpenDisk({disk:c.disk})};return(o,u)=>{const r=C("icon-disk");return t(),n("div",E,[s("div",z,[s("div",N,[B(r)]),s("div",w,[s("span",null,l(e.disk.name)+" \u3010"+l(e.disk.size)+"\u3011"+l(e.disk.venderModel),1)]),O,s("div",V,[s("span",null,l(e.disk.used)+" / "+l(e.disk.total),1)])]),e.disk.errorInfo?(t(),n("div",j,[s("span",q,l(e.disk.errorInfo),1)])):(t(),n("div",M,[s("span",null,l(e.disk.path),1),A,s("a",{onClick:u[0]||(u[0]=i=>d())}," \u67E5\u770B ")]))])}}});var p=D(H,[["__scopeId","data-v-f0f8da84"]]);const y=e=>(g("data-v-bf0d8af0"),e=e(),I(),e),L={key:0,class:"ul-container"},P=y(()=>s("div",{class:"ul-container_title"},[s("span",null,"\u7CFB\u7EDF\u78C1\u76D8")],-1)),G={class:"ul-container_body"},J={key:1,class:"ul-container"},K=y(()=>s("div",{class:"ul-container_title"},[s("span",null,"\u5DF2\u6302\u8F7D\u78C1\u76D8")],-1)),Q={class:"ul-container_body"},R={key:2,class:"ul-container"},T=y(()=>s("div",{class:"ul-container_title"},[s("span",null,"\u672A\u8BC6\u522B\u78C1\u76D8")],-1)),U={class:"ul-container_body"},W={key:3,class:"ul-container"},X=y(()=>s("div",{class:"ul-container_title"},[s("span",null,"raid")],-1)),Y={class:"ul-container_body"},Z=$({__name:"index",setup(e){const c=F(),d=f(()=>c.disk),o=f(()=>c.raid.disks);return(u,r)=>(t(),n("main",null,[a(d).rootDisks.length>0?(t(),n("ul",L,[P,s("div",G,[(t(!0),n(k,null,h(a(d).rootDisks,(i,_)=>(t(),v(p,{disk:i},null,8,["disk"]))),256))])])):m("",!0),a(d).mountedDisks.length>0?(t(),n("ul",J,[K,s("div",Q,[(t(!0),n(k,null,h(a(d).mountedDisks,(i,_)=>(t(),v(p,{disk:i},null,8,["disk"]))),256))])])):m("",!0),a(d).errorDisks.length>0?(t(),n("ul",R,[T,s("div",U,[(t(!0),n(k,null,h(a(d).errorDisks,(i,_)=>(t(),v(p,{disk:i},null,8,["disk"]))),256))])])):m("",!0),a(o).length>0?(t(),n("ul",W,[X,s("div",Y,[(t(!0),n(k,null,h(a(o),(i,_)=>(t(),v(p,{disk:i},null,8,["disk"]))),256))])])):m("",!0)]))}});var es=D(Z,[["__scopeId","data-v-bf0d8af0"]]);export{es as default};
|
||||
import{_ as D,d as $,i as f,r as C,o as t,c as n,a as s,b as B,l,H as S,p as g,q as I,u as F,g as a,F as k,E as h,m,e as v}from"./index.js?v=acacf0dc";const b=e=>(g("data-v-f0f8da84"),e=e(),I(),e),E={class:"disk-item"},z={class:"disk-item_contanier"},N={class:"disk-item_icon"},w={class:"disk-item_name"},O=b(()=>s("div",{class:"auto"},null,-1)),V={class:"disk-item_used"},j={key:0,class:"disk-item_info"},q={class:"label-msg.warning"},M={key:1,class:"disk-item_info"},A=b(()=>s("div",{class:"auto"},null,-1)),H=$({__name:"item",props:{disk:{type:Object,required:!0}},setup(e){const c=e;f(()=>{var o;return((o=c.disk.childrens)==null?void 0:o.length)||0}),f(()=>{var u,r;let o=0;return(r=(u=c.disk)==null?void 0:u.childrens)==null||r.forEach(i=>{if(!i.mountPoint){const _=Number(i.sizeInt),x=(1<<30)*2;_>x&&o++}}),o});const d=()=>{S.OpenDisk({disk:c.disk})};return(o,u)=>{const r=C("icon-disk");return t(),n("div",E,[s("div",z,[s("div",N,[B(r)]),s("div",w,[s("span",null,l(e.disk.name)+" \u3010"+l(e.disk.size)+"\u3011"+l(e.disk.venderModel),1)]),O,s("div",V,[s("span",null,l(e.disk.used)+" / "+l(e.disk.total),1)])]),e.disk.errorInfo?(t(),n("div",j,[s("span",q,l(e.disk.errorInfo),1)])):(t(),n("div",M,[s("span",null,l(e.disk.path),1),A,s("a",{onClick:u[0]||(u[0]=i=>d())}," \u67E5\u770B ")]))])}}});var p=D(H,[["__scopeId","data-v-f0f8da84"]]);const y=e=>(g("data-v-bf0d8af0"),e=e(),I(),e),L={key:0,class:"ul-container"},P=y(()=>s("div",{class:"ul-container_title"},[s("span",null,"\u7CFB\u7EDF\u78C1\u76D8")],-1)),G={class:"ul-container_body"},J={key:1,class:"ul-container"},K=y(()=>s("div",{class:"ul-container_title"},[s("span",null,"\u5DF2\u6302\u8F7D\u78C1\u76D8")],-1)),Q={class:"ul-container_body"},R={key:2,class:"ul-container"},T=y(()=>s("div",{class:"ul-container_title"},[s("span",null,"\u672A\u8BC6\u522B\u78C1\u76D8")],-1)),U={class:"ul-container_body"},W={key:3,class:"ul-container"},X=y(()=>s("div",{class:"ul-container_title"},[s("span",null,"raid")],-1)),Y={class:"ul-container_body"},Z=$({__name:"index",setup(e){const c=F(),d=f(()=>c.disk),o=f(()=>c.raid.disks);return(u,r)=>(t(),n("main",null,[a(d).rootDisks.length>0?(t(),n("ul",L,[P,s("div",G,[(t(!0),n(k,null,h(a(d).rootDisks,(i,_)=>(t(),v(p,{disk:i},null,8,["disk"]))),256))])])):m("",!0),a(d).mountedDisks.length>0?(t(),n("ul",J,[K,s("div",Q,[(t(!0),n(k,null,h(a(d).mountedDisks,(i,_)=>(t(),v(p,{disk:i},null,8,["disk"]))),256))])])):m("",!0),a(d).errorDisks.length>0?(t(),n("ul",R,[T,s("div",U,[(t(!0),n(k,null,h(a(d).errorDisks,(i,_)=>(t(),v(p,{disk:i},null,8,["disk"]))),256))])])):m("",!0),a(o).length>0?(t(),n("ul",W,[X,s("div",Y,[(t(!0),n(k,null,h(a(o),(i,_)=>(t(),v(p,{disk:i},null,8,["disk"]))),256))])])):m("",!0)]))}});var es=D(Z,[["__scopeId","data-v-bf0d8af0"]]);export{es as default};
|
|
@ -1 +1 @@
|
|||
var v=(r,D,l)=>new Promise((n,d)=>{var h=i=>{try{_(l.next(i))}catch(c){d(c)}},k=i=>{try{_(l.throw(i))}catch(c){d(c)}},_=i=>i.done?n(i.value):Promise.resolve(i.value).then(h,k);_((l=l.apply(r,D)).next())});import{_ as y,d as E,j as x,v as A,i as f,o as a,c as u,a as e,g as o,l as p,F as S,K as B,L as b,p as N,q as w,C as $}from"./index.js?v=c1b13aa2";const F=r=>(N("data-v-613b66e3"),r=r(),w(),r),I={id:"page",class:"page-container"},P=F(()=>e("div",{class:"notice_info"},[e("li",null," \u52A8\u6001 DNS \uFF08DDNS\uFF09\u8BA9\u60A8\u5373\u4F7F\u5728\u6CA1\u6709\u9759\u6001 IP \u5730\u5740\u7684\u60C5\u51B5\u4E0B\uFF0C\u4ECD\u53EF\u5C06\u670D\u52A1\u5668\u8FDE\u540C\u7ED1\u5B9A\u7684\u57DF\u540D\u6620\u5C04\u81F3\u516C\u7F51\u4E0A\u3002 "),e("li",null," \u5982\u679C\u60A8\u6CA1\u6709\u516C\u7F51 IP \u8BF7\u4F7F\u7528 DDNSTO \uFF0C\u521D\u6B21\u4F7F\u7528 DDNSTO \u9700\u8981\u521D\u59CB\u5316\u914D\u7F6E ")],-1)),T={class:"text-container"},O={class:"text-container_item"},q=F(()=>e("div",{class:"text-container_item_title"},[e("span",null,"DDNSTO\uFF1A")],-1)),G={class:"text-container_item_flex"},j={class:"text-container_item_block"},K=["href"],L={key:0,class:"domain"},V={key:1,class:"domain"},z={class:"text-container_item"},H=F(()=>e("div",{class:"text-container_item_title"},[e("span",null,"myddns_ipv4\uFF1A")],-1)),J={class:"text-container_item_flex"},M={class:"text-container_item_block"},Q=["href"],R={key:1,class:"domain"},U={class:"text-container_item"},W=F(()=>e("div",{class:"text-container_item_title"},[e("span",null,"myddns_ipv6\uFF1A")],-1)),X={class:"text-container_item_flex"},Y={class:"text-container_item_block"},Z=["href"],tt={key:1,class:"domain"},et=E({__name:"index",setup(r){return v(this,null,function*(){let D,l;x({ipv4:"",ipv6:""});const n=x({ddnstoDomain:"",ipv4Domain:"",ipv6Domain:""}),d=x({install:!0,error:null}),h=()=>v(this,null,function*(){yield Promise.all([k()])}),k=()=>v(this,null,function*(){try{const t=yield $.Guide.Ddns.GET(),{result:s,error:m}=t.data;if(m)throw m;s&&(n.ddnstoDomain=s.ddnstoDomain,n.ipv4Domain=s.ipv4Domain,n.ipv6Domain=s.ipv6Domain)}catch(t){console.log(t)}});[D,l]=A(()=>h()),yield D,l();const _=f(()=>n.ddnstoDomain),i=f(()=>{const t=n.ipv4Domain;return t!=null&&t!=""&&t!="Stopped"?{url:`http://${t}`,title:t,ok:!0}:{url:`http://${t}`,title:"\u672A\u914D\u7F6E",ok:!1}}),c=f(()=>{const t=n.ipv6Domain;return t!=null&&t!=""&&t!="Stopped"?{url:`http://${t}`,title:t,ok:!0}:{url:`http://${t}`,title:"\u672A\u914D\u7F6E",ok:!1}}),g=()=>{B({domain:_.value,callback:t=>{}})},C=t=>{b({setup:t,callback:s=>{switch(t){case"ipv4":n.ipv4Domain=s.domain;break;case"ipv6":n.ipv6Domain=s.domain;break}}})};return(t,s)=>(a(),u("div",I,[P,e("div",T,[e("div",O,[q,e("div",G,[e("div",j,[d.install?(a(),u("a",{key:0,href:o(_),target:"_blank",class:"domain"},p(o(_)),9,K)):(a(),u(S,{key:1},[d.error?(a(),u("a",L,p(d.error),1)):(a(),u("a",V,"\u672A\u5B89\u88C5"))],64)),e("a",{class:"setting",onClick:s[0]||(s[0]=m=>g())},"\u5FEB\u901F\u914D\u7F6E")])])]),e("div",z,[H,e("div",J,[e("div",M,[o(i).ok?(a(),u("a",{key:0,href:o(i).url,target:"_blank",class:"domain"},p(o(i).title),9,Q)):(a(),u("a",R,p(o(i).title),1)),e("a",{class:"setting",onClick:s[1]||(s[1]=m=>C("ipv4"))},"\u5FEB\u901F\u914D\u7F6E")])])]),e("div",U,[W,e("div",X,[e("div",Y,[o(c).ok?(a(),u("a",{key:0,href:o(c).url,target:"_blank",class:"domain"},p(o(c).title),9,Z)):(a(),u("a",tt,p(o(c).title),1)),e("a",{class:"setting",onClick:s[2]||(s[2]=m=>C("ipv6"))},"\u5FEB\u901F\u914D\u7F6E")])])])])]))})}});var nt=y(et,[["__scopeId","data-v-613b66e3"]]);export{nt as default};
|
||||
var v=(r,D,l)=>new Promise((n,d)=>{var h=i=>{try{_(l.next(i))}catch(c){d(c)}},k=i=>{try{_(l.throw(i))}catch(c){d(c)}},_=i=>i.done?n(i.value):Promise.resolve(i.value).then(h,k);_((l=l.apply(r,D)).next())});import{_ as y,d as E,j as x,v as A,i as f,o as a,c as u,a as e,g as o,l as p,F as S,K as B,L as b,p as N,q as w,C as $}from"./index.js?v=acacf0dc";const F=r=>(N("data-v-613b66e3"),r=r(),w(),r),I={id:"page",class:"page-container"},P=F(()=>e("div",{class:"notice_info"},[e("li",null," \u52A8\u6001 DNS \uFF08DDNS\uFF09\u8BA9\u60A8\u5373\u4F7F\u5728\u6CA1\u6709\u9759\u6001 IP \u5730\u5740\u7684\u60C5\u51B5\u4E0B\uFF0C\u4ECD\u53EF\u5C06\u670D\u52A1\u5668\u8FDE\u540C\u7ED1\u5B9A\u7684\u57DF\u540D\u6620\u5C04\u81F3\u516C\u7F51\u4E0A\u3002 "),e("li",null," \u5982\u679C\u60A8\u6CA1\u6709\u516C\u7F51 IP \u8BF7\u4F7F\u7528 DDNSTO \uFF0C\u521D\u6B21\u4F7F\u7528 DDNSTO \u9700\u8981\u521D\u59CB\u5316\u914D\u7F6E ")],-1)),T={class:"text-container"},O={class:"text-container_item"},q=F(()=>e("div",{class:"text-container_item_title"},[e("span",null,"DDNSTO\uFF1A")],-1)),G={class:"text-container_item_flex"},j={class:"text-container_item_block"},K=["href"],L={key:0,class:"domain"},V={key:1,class:"domain"},z={class:"text-container_item"},H=F(()=>e("div",{class:"text-container_item_title"},[e("span",null,"myddns_ipv4\uFF1A")],-1)),J={class:"text-container_item_flex"},M={class:"text-container_item_block"},Q=["href"],R={key:1,class:"domain"},U={class:"text-container_item"},W=F(()=>e("div",{class:"text-container_item_title"},[e("span",null,"myddns_ipv6\uFF1A")],-1)),X={class:"text-container_item_flex"},Y={class:"text-container_item_block"},Z=["href"],tt={key:1,class:"domain"},et=E({__name:"index",setup(r){return v(this,null,function*(){let D,l;x({ipv4:"",ipv6:""});const n=x({ddnstoDomain:"",ipv4Domain:"",ipv6Domain:""}),d=x({install:!0,error:null}),h=()=>v(this,null,function*(){yield Promise.all([k()])}),k=()=>v(this,null,function*(){try{const t=yield $.Guide.Ddns.GET(),{result:s,error:m}=t.data;if(m)throw m;s&&(n.ddnstoDomain=s.ddnstoDomain,n.ipv4Domain=s.ipv4Domain,n.ipv6Domain=s.ipv6Domain)}catch(t){console.log(t)}});[D,l]=A(()=>h()),yield D,l();const _=f(()=>n.ddnstoDomain),i=f(()=>{const t=n.ipv4Domain;return t!=null&&t!=""&&t!="Stopped"?{url:`http://${t}`,title:t,ok:!0}:{url:`http://${t}`,title:"\u672A\u914D\u7F6E",ok:!1}}),c=f(()=>{const t=n.ipv6Domain;return t!=null&&t!=""&&t!="Stopped"?{url:`http://${t}`,title:t,ok:!0}:{url:`http://${t}`,title:"\u672A\u914D\u7F6E",ok:!1}}),g=()=>{B({domain:_.value,callback:t=>{}})},C=t=>{b({setup:t,callback:s=>{switch(t){case"ipv4":n.ipv4Domain=s.domain;break;case"ipv6":n.ipv6Domain=s.domain;break}}})};return(t,s)=>(a(),u("div",I,[P,e("div",T,[e("div",O,[q,e("div",G,[e("div",j,[d.install?(a(),u("a",{key:0,href:o(_),target:"_blank",class:"domain"},p(o(_)),9,K)):(a(),u(S,{key:1},[d.error?(a(),u("a",L,p(d.error),1)):(a(),u("a",V,"\u672A\u5B89\u88C5"))],64)),e("a",{class:"setting",onClick:s[0]||(s[0]=m=>g())},"\u5FEB\u901F\u914D\u7F6E")])])]),e("div",z,[H,e("div",J,[e("div",M,[o(i).ok?(a(),u("a",{key:0,href:o(i).url,target:"_blank",class:"domain"},p(o(i).title),9,Q)):(a(),u("a",R,p(o(i).title),1)),e("a",{class:"setting",onClick:s[1]||(s[1]=m=>C("ipv4"))},"\u5FEB\u901F\u914D\u7F6E")])])]),e("div",U,[W,e("div",X,[e("div",Y,[o(c).ok?(a(),u("a",{key:0,href:o(c).url,target:"_blank",class:"domain"},p(o(c).title),9,Z)):(a(),u("a",tt,p(o(c).title),1)),e("a",{class:"setting",onClick:s[2]||(s[2]=m=>C("ipv6"))},"\u5FEB\u901F\u914D\u7F6E")])])])])]))})}});var nt=y(et,[["__scopeId","data-v-613b66e3"]]);export{nt as default};
|
|
@ -1 +1 @@
|
|||
import{_ as o,r,o as t,e as n,w as s,S as a,b as c}from"./index.js?v=c1b13aa2";const _={};function u(f,i){const e=r("router-view");return t(),n(a,null,{default:s(()=>[c(e)]),_:1})}var p=o(_,[["render",u]]);export{p as default};
|
||||
import{_ as o,r,o as t,e as n,w as s,S as a,b as c}from"./index.js?v=acacf0dc";const _={};function u(f,i){const e=r("router-view");return t(),n(a,null,{default:s(()=>[c(e)]),_:1})}var p=o(_,[["render",u]]);export{p as default};
|
|
@ -1 +1 @@
|
|||
import{d as c,u,i as r,s as d,o as l,c as e,a as t,F as _,E as i,g as h,l as s}from"./index.js?v=c1b13aa2";const p={class:"ul-container"},m={class:"ul-container_body"},v={class:"page-table"},f=t("colgroup",null,[t("col"),t("col"),t("col"),t("col")],-1),g=t("thead",null,[t("tr",null,[t("th",null,"Mac"),t("th",null,"IPv4"),t("th",null,"IPv6"),t("th")])],-1),b=t("th",null,null,-1),x=t("th",null,null,-1),F=c({__name:"index",setup(y){const o=u(),a=r(()=>o.device.devices);return d(),(B,k)=>(l(),e("main",null,[t("ul",p,[t("div",m,[t("table",v,[f,g,t("tbody",null,[(l(!0),e(_,null,i(h(a),n=>(l(),e("tr",null,[t("th",null,s(n.mac),1),t("th",null,s(n.ipv4addr),1),b,x]))),256))])])])])]))}});export{F as default};
|
||||
import{d as c,u,i as r,s as d,o as l,c as e,a as t,F as _,E as i,g as h,l as s}from"./index.js?v=acacf0dc";const p={class:"ul-container"},m={class:"ul-container_body"},v={class:"page-table"},f=t("colgroup",null,[t("col"),t("col"),t("col"),t("col")],-1),g=t("thead",null,[t("tr",null,[t("th",null,"Mac"),t("th",null,"IPv4"),t("th",null,"IPv6"),t("th")])],-1),b=t("th",null,null,-1),x=t("th",null,null,-1),F=c({__name:"index",setup(y){const o=u(),a=r(()=>o.device.devices);return d(),(B,k)=>(l(),e("main",null,[t("ul",p,[t("div",m,[t("table",v,[f,g,t("tbody",null,[(l(!0),e(_,null,i(h(a),n=>(l(),e("tr",null,[t("th",null,s(n.mac),1),t("th",null,s(n.ipv4addr),1),b,x]))),256))])])])])]))}});export{F as default};
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
import{_ as o,r as n,o as r,c as t,b as a}from"./index.js?v=c1b13aa2";const c={},s={id:"page",class:"page-container"};function _(d,i){const e=n("router-loading");return r(),t("div",s,[a(e)])}var p=o(c,[["render",_]]);export{p as default};
|
|
@ -1 +1 @@
|
|||
var m=(v,c,d)=>new Promise((l,e)=>{var u=o=>{try{r(d.next(o))}catch(a){e(a)}},i=o=>{try{r(d.throw(o))}catch(a){e(a)}},r=o=>o.done?l(o.value):Promise.resolve(o.value).then(u,i);r((d=d.apply(v,c)).next())});import{d as S,s as h,j as F,v as N,o as p,c as D,a as n,x as _,D as P,F as x,z as I,m as g,l as B,A as k,C as y,T as w}from"./index.js?v=c1b13aa2";const C=["onSubmit"],E=n("div",{class:"label-name"},[n("span",null,"DNS\u9009\u9879")],-1),A={class:"label-value"},T=n("option",{value:"auto"},"\u4F7F\u7528\u8FD0\u8425\u5546\u63D0\u4F9B\u7684DNS",-1),V=n("option",{value:"manual"},"\u81EA\u5B9A\u4E49DNS",-1),G=[T,V],M=n("div",{class:"label-name"},[n("span",null,"DNS\u670D\u52A1\u5668\u5730\u5740")],-1),U={class:"label-value"},q=n("div",{class:"label-name"}," \u5907\u7528DNS\u670D\u52A1\u5668\u5730\u5740 ",-1),j={class:"label-value"},z={class:"label-btns"},L=["disabled"],O={key:1,class:"label-msg"},K=S({__name:"index",setup(v){return m(this,null,function*(){let c,d;const l=h(""),e=F({interfaceName:"",dnsProto:"auto",manualDnsIp:[]}),u=F({dns1:"",dns2:""}),i=h(!1),r=()=>m(this,null,function*(){i.value=!0;try{const a=yield y.Guide.DnsConfig.GET();if(a!=null&&a.data){const{result:t}=a.data;if(t){e.dnsProto=t.dnsProto,e.manualDnsIp=t.manualDnsIp||[];for(let s=0;s<e.manualDnsIp.length;s++){s==0?u.dns1=e.manualDnsIp[s]:s==1&&(u.dns2=e.manualDnsIp[s]);break}}}}catch(a){l.value=a}i.value=!1});[c,d]=N(()=>r()),yield c,d();const o=()=>m(this,null,function*(){let a={};switch(e.dnsProto){case"auto":break;case"manual":a.manualDnsIp=[],e.manualDnsIp!=null&&e.manualDnsIp.length>0?a.manualDnsIp=e.manualDnsIp:(a.manualDnsIp.push(u.dns1),u.dns2&&a.manualDnsIp.push(u.dns2));break}a.dnsProto=e.dnsProto,a.interfaceName=e.interfaceName;const t=w.Loading("\u914D\u7F6E\u4E2D...");try{const s=yield y.Guide.DnsConfig.POST(a);if(s!=null&&s.data){const{success:f,error:b}=s==null?void 0:s.data;b&&(l.value=b),(f==null||f==0)&&(l.value="\u914D\u7F6E\u6210\u529F")}}catch(s){l.value=s}t.Close()});return(a,t)=>(p(),D("form",{class:"form-container",onSubmit:k(o,["prevent"])},[E,n("div",A,[_(n("select",{"onUpdate:modelValue":t[0]||(t[0]=s=>e.dnsProto=s)},G,512),[[P,e.dnsProto]])]),e.dnsProto=="manual"?(p(),D(x,{key:0},[M,n("div",U,[_(n("input",{type:"text",placeholder:"\u8BF7\u8F93\u5165 dns \u5730\u5740","onUpdate:modelValue":t[1]||(t[1]=s=>u.dns1=s),required:""},null,512),[[I,u.dns1,void 0,{trim:!0}]])]),q,n("div",j,[_(n("input",{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5907\u7528 dns \u5730\u5740","onUpdate:modelValue":t[2]||(t[2]=s=>u.dns2=s)},null,512),[[I,u.dns2,void 0,{trim:!0}]])])],64)):g("",!0),n("div",z,[n("button",{class:"sumbit",disabled:i.value},"\u4FDD\u5B58",8,L)]),l.value?(p(),D("div",O,[n("span",null,B(l.value),1)])):g("",!0)],40,C))})}});export{K as default};
|
||||
var m=(v,c,d)=>new Promise((l,e)=>{var u=o=>{try{r(d.next(o))}catch(a){e(a)}},i=o=>{try{r(d.throw(o))}catch(a){e(a)}},r=o=>o.done?l(o.value):Promise.resolve(o.value).then(u,i);r((d=d.apply(v,c)).next())});import{d as S,s as h,j as F,v as N,o as p,c as D,a as n,x as _,D as P,F as x,z as I,m as g,l as B,A as k,C as y,T as w}from"./index.js?v=acacf0dc";const C=["onSubmit"],E=n("div",{class:"label-name"},[n("span",null,"DNS\u9009\u9879")],-1),A={class:"label-value"},T=n("option",{value:"auto"},"\u4F7F\u7528\u8FD0\u8425\u5546\u63D0\u4F9B\u7684DNS",-1),V=n("option",{value:"manual"},"\u81EA\u5B9A\u4E49DNS",-1),G=[T,V],M=n("div",{class:"label-name"},[n("span",null,"DNS\u670D\u52A1\u5668\u5730\u5740")],-1),U={class:"label-value"},q=n("div",{class:"label-name"}," \u5907\u7528DNS\u670D\u52A1\u5668\u5730\u5740 ",-1),j={class:"label-value"},z={class:"label-btns"},L=["disabled"],O={key:1,class:"label-msg"},K=S({__name:"index",setup(v){return m(this,null,function*(){let c,d;const l=h(""),e=F({interfaceName:"",dnsProto:"auto",manualDnsIp:[]}),u=F({dns1:"",dns2:""}),i=h(!1),r=()=>m(this,null,function*(){i.value=!0;try{const a=yield y.Guide.DnsConfig.GET();if(a!=null&&a.data){const{result:t}=a.data;if(t){e.dnsProto=t.dnsProto,e.manualDnsIp=t.manualDnsIp||[];for(let s=0;s<e.manualDnsIp.length;s++){s==0?u.dns1=e.manualDnsIp[s]:s==1&&(u.dns2=e.manualDnsIp[s]);break}}}}catch(a){l.value=a}i.value=!1});[c,d]=N(()=>r()),yield c,d();const o=()=>m(this,null,function*(){let a={};switch(e.dnsProto){case"auto":break;case"manual":a.manualDnsIp=[],e.manualDnsIp!=null&&e.manualDnsIp.length>0?a.manualDnsIp=e.manualDnsIp:(a.manualDnsIp.push(u.dns1),u.dns2&&a.manualDnsIp.push(u.dns2));break}a.dnsProto=e.dnsProto,a.interfaceName=e.interfaceName;const t=w.Loading("\u914D\u7F6E\u4E2D...");try{const s=yield y.Guide.DnsConfig.POST(a);if(s!=null&&s.data){const{success:f,error:b}=s==null?void 0:s.data;b&&(l.value=b),(f==null||f==0)&&(l.value="\u914D\u7F6E\u6210\u529F")}}catch(s){l.value=s}t.Close()});return(a,t)=>(p(),D("form",{class:"form-container",onSubmit:k(o,["prevent"])},[E,n("div",A,[_(n("select",{"onUpdate:modelValue":t[0]||(t[0]=s=>e.dnsProto=s)},G,512),[[P,e.dnsProto]])]),e.dnsProto=="manual"?(p(),D(x,{key:0},[M,n("div",U,[_(n("input",{type:"text",placeholder:"\u8BF7\u8F93\u5165 dns \u5730\u5740","onUpdate:modelValue":t[1]||(t[1]=s=>u.dns1=s),required:""},null,512),[[I,u.dns1,void 0,{trim:!0}]])]),q,n("div",j,[_(n("input",{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5907\u7528 dns \u5730\u5740","onUpdate:modelValue":t[2]||(t[2]=s=>u.dns2=s)},null,512),[[I,u.dns2,void 0,{trim:!0}]])])],64)):g("",!0),n("div",z,[n("button",{class:"sumbit",disabled:i.value},"\u4FDD\u5B58",8,L)]),l.value?(p(),D("div",O,[n("span",null,B(l.value),1)])):g("",!0)],40,C))})}});export{K as default};
|
|
@ -1 +1 @@
|
|||
import{_ as u,d as l,u as p,r as t,o as e,c as i,a as m,b as o,w as a,e as s,f as v,S as f,t as x,g as y}from"./index.js?v=c1b13aa2";const h={class:"body"},k=l({__name:"index",setup(C){const n=p();return(w,B)=>{const _=t("layout-header"),r=t("router-view");return e(),i("div",{id:"main",key:y(n).reloadCount},[m("div",h,[o(_),o(r,null,{default:a(({Component:c,route:d})=>[(e(),s(f,null,{default:a(()=>[(e(),s(v(c),{key:d.path}))]),_:2},1024))]),_:1}),o(x)])])}}});var S=u(k,[["__scopeId","data-v-5f4eb506"]]);export{S as default};
|
||||
import{_ as u,d as l,u as p,r as t,o as e,c as i,a as m,b as o,w as a,e as s,f as v,S as f,t as x,g as y}from"./index.js?v=acacf0dc";const h={class:"body"},k=l({__name:"index",setup(C){const n=p();return(w,B)=>{const _=t("layout-header"),r=t("router-view");return e(),i("div",{id:"main",key:y(n).reloadCount},[m("div",h,[o(_),o(r,null,{default:a(({Component:c,route:d})=>[(e(),s(f,null,{default:a(()=>[(e(),s(v(c),{key:d.path}))]),_:2},1024))]),_:1}),o(x)])])}}});var S=u(k,[["__scopeId","data-v-5f4eb506"]]);export{S as default};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
var c=(p,t,a)=>new Promise((n,o)=>{var r=e=>{try{s(a.next(e))}catch(_){o(_)}},d=e=>{try{s(a.throw(e))}catch(_){o(_)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,d);s((a=a.apply(p,t)).next())});import{_ as i,d as u,I as l,o as x,c as g,b as m,J as v}from"./index.js?v=c1b13aa2";const f={id:"page",class:"page-top-container"},b=u({__name:"index",setup(p){const t=l();return(()=>c(this,null,function*(){yield t.getApp()}))(),(n,o)=>(x(),g("div",f,[m(v)]))}});var h=i(b,[["__scopeId","data-v-701aba0b"]]);export{h as default};
|
||||
var c=(p,t,a)=>new Promise((n,o)=>{var r=e=>{try{s(a.next(e))}catch(_){o(_)}},d=e=>{try{s(a.throw(e))}catch(_){o(_)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,d);s((a=a.apply(p,t)).next())});import{_ as i,d as u,I as l,o as x,c as g,b as m,J as v}from"./index.js?v=acacf0dc";const f={id:"page",class:"page-top-container"},b=u({__name:"index",setup(p){const t=l();return(()=>c(this,null,function*(){yield t.getApp()}))(),(n,o)=>(x(),g("div",f,[m(v)]))}});var h=i(b,[["__scopeId","data-v-701aba0b"]]);export{h as default};
|
|
@ -1 +1 @@
|
|||
var _=(p,d,a)=>new Promise((c,n)=>{var o=s=>{try{i(a.next(s))}catch(e){n(e)}},f=s=>{try{i(a.throw(s))}catch(e){n(e)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(o,f);i((a=a.apply(p,d)).next())});import{d as g,s as b,j as E,v as w,o as S,c as m,a as r,F as x,E as F,l as h,m as L,A as B,x as D,y as G,B as T,C as y,T as v}from"./index.js?v=c1b13aa2";const C=["onSubmit"],k=r("div",{class:"label-name"},[r("span",null,"\u9009\u62E9\u8F6F\u4EF6\u6E90 ")],-1),I={class:"label-value"},V={class:"label-flex"},N=["value"],A={class:"label-btns"},M=["disabled"],j={key:0,class:"label-msg"},P=g({__name:"index",setup(p){return _(this,null,function*(){let d,a;const c=b(!1),n=b(""),o=E({softsourceListIfo:[],softSource:{},currSoftSource:{}}),f=()=>_(this,null,function*(){var s,e,u;try{const t=yield y.Guide.SoftSourceList.GET();if((s=t==null?void 0:t.data)!=null&&s.result){const l=(e=t==null?void 0:t.data)==null?void 0:e.result;o.softsourceListIfo=l.softSourceList||[]}}catch(t){console.log(t)}try{const t=yield y.Guide.GetSoftSource.GET();if((u=t==null?void 0:t.data)!=null&&u.result){const l=t.data.result;o.softSource=l.softSource,o.currSoftSource=l.softSource}}catch(t){console.log(t)}});[d,a]=w(()=>f()),yield d,a();const i=()=>_(this,null,function*(){const s=v.Loading("\u6B63\u5728\u5207\u6362\u4E2D...");c.value=!0;try{const e=yield y.Guide.SoftSource.POST({softSourceIdentity:o.softSource.identity});if(e!=null&&e.data){const{result:u,error:t,success:l}=e.data;t&&v.Warning(t),(e.data.success||0)==0&&(v.Success("\u5207\u6362\u6210\u529F"),yield f())}}catch(e){v.Error(`${e}`)}finally{c.value=!1,s.Close()}});return(s,e)=>(S(),m("form",{class:"form-container",onSubmit:B(i,["prevent"])},[k,r("div",I,[(S(!0),m(x,null,F(o.softsourceListIfo,u=>(S(),m("label",V,[D(r("input",{type:"radio",value:u.identity,"onUpdate:modelValue":e[0]||(e[0]=t=>o.softSource.identity=t)},null,8,N),[[G,o.softSource.identity,void 0,{trim:!0}]]),T(" "+h(u.name),1)]))),256))]),r("div",A,[r("button",{class:"sumbit",disabled:c.value},"\u4FDD\u5B58",8,M)]),n.value?(S(),m("div",j,[r("span",null,h(n.value),1)])):L("",!0)],40,C))})}});export{P as default};
|
||||
var _=(p,d,a)=>new Promise((c,n)=>{var o=s=>{try{i(a.next(s))}catch(e){n(e)}},f=s=>{try{i(a.throw(s))}catch(e){n(e)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(o,f);i((a=a.apply(p,d)).next())});import{d as g,s as b,j as E,v as w,o as S,c as m,a as r,F as x,E as F,l as h,m as L,A as B,x as D,y as G,B as T,C as y,T as v}from"./index.js?v=acacf0dc";const C=["onSubmit"],k=r("div",{class:"label-name"},[r("span",null,"\u9009\u62E9\u8F6F\u4EF6\u6E90 ")],-1),I={class:"label-value"},V={class:"label-flex"},N=["value"],A={class:"label-btns"},M=["disabled"],j={key:0,class:"label-msg"},P=g({__name:"index",setup(p){return _(this,null,function*(){let d,a;const c=b(!1),n=b(""),o=E({softsourceListIfo:[],softSource:{},currSoftSource:{}}),f=()=>_(this,null,function*(){var s,e,u;try{const t=yield y.Guide.SoftSourceList.GET();if((s=t==null?void 0:t.data)!=null&&s.result){const l=(e=t==null?void 0:t.data)==null?void 0:e.result;o.softsourceListIfo=l.softSourceList||[]}}catch(t){console.log(t)}try{const t=yield y.Guide.GetSoftSource.GET();if((u=t==null?void 0:t.data)!=null&&u.result){const l=t.data.result;o.softSource=l.softSource,o.currSoftSource=l.softSource}}catch(t){console.log(t)}});[d,a]=w(()=>f()),yield d,a();const i=()=>_(this,null,function*(){const s=v.Loading("\u6B63\u5728\u5207\u6362\u4E2D...");c.value=!0;try{const e=yield y.Guide.SoftSource.POST({softSourceIdentity:o.softSource.identity});if(e!=null&&e.data){const{result:u,error:t,success:l}=e.data;t&&v.Warning(t),(e.data.success||0)==0&&(v.Success("\u5207\u6362\u6210\u529F"),yield f())}}catch(e){v.Error(`${e}`)}finally{c.value=!1,s.Close()}});return(s,e)=>(S(),m("form",{class:"form-container",onSubmit:B(i,["prevent"])},[k,r("div",I,[(S(!0),m(x,null,F(o.softsourceListIfo,u=>(S(),m("label",V,[D(r("input",{type:"radio",value:u.identity,"onUpdate:modelValue":e[0]||(e[0]=t=>o.softSource.identity=t)},null,8,N),[[G,o.softSource.identity,void 0,{trim:!0}]]),T(" "+h(u.name),1)]))),256))]),r("div",A,[r("button",{class:"sumbit",disabled:c.value},"\u4FDD\u5B58",8,M)]),n.value?(S(),m("div",j,[r("span",null,h(n.value),1)])):L("",!0)],40,C))})}});export{P as default};
|
|
@ -1 +1 @@
|
|||
var r=(c,m,i)=>new Promise((h,t)=>{var n=l=>{try{o(i.next(l))}catch(v){t(v)}},s=l=>{try{o(i.throw(l))}catch(v){t(v)}},o=l=>l.done?h(l.value):Promise.resolve(l.value).then(n,s);o((i=i.apply(c,m)).next())});import{_ as V,d as T,u as I,s as w,j as A,v as M,o as E,c as b,a as u,x as F,y as f,z as k,m as y,l as U,A as q,B as D,p as G,q as N,C as B,T as x}from"./index.js?v=c1b13aa2";const p=c=>(G("data-v-c5783954"),c=c(),N(),c),L=["onSubmit"],O=p(()=>u("p",null,[D(" \u6B22\u8FCE\u4F7F\u7528\u5FEB\u901F\u7F51\u7EDC\u914D\u7F6E\u5411\u5BFC\uFF0C\u8BF7\u9009\u62E9\u4E00\u79CD\u8FDE\u63A5\u65B9\u5F0F\u4EE5\u5F00\u59CB\u8054\u7F51\uFF0C\u6216\u4F7F\u7528\u5DE6\u4FA7\u83DC\u5355\u8FDB\u884C\u8054\u7F51\u914D\u7F6E "),u("br"),D(" \u6CA1\u627E\u5230\u60F3\u8981\u7684\u914D\u7F6E\uFF1F\u8BF7\u4F7F\u7528 "),u("a",{href:"/cgi-bin/luci/admin/network/network",target:"_blank"},"\u9AD8\u7EA7\u6A21\u5F0F")],-1)),j=p(()=>u("div",{class:"label-name"},[u("span",null,"\u8054\u7F51\u65B9\u5F0F")],-1)),z={class:"label-value"},R={class:"label-flex"},H=D("\u8D26\u53F7\u5BC6\u7801"),J=D("\u81EA\u52A8\u8054\u7F51"),K={style:{display:"none"}},Q=D("\u7F51\u5173\u8054\u7F51"),W={key:0,class:"ul-container"},X=p(()=>u("div",{class:"ul-container_title"},[u("span",null,"\u62E8\u53F7\u8054\u7F51\u914D\u7F6E")],-1)),Y=p(()=>u("div",{class:"label-value"},null,-1)),Z=p(()=>u("div",{class:"label-name"},[u("span",null,"\u8D26\u53F7")],-1)),$={class:"label-value"},uu=p(()=>u("div",{class:"label-name"},[u("span",null,"\u5BC6\u7801")],-1)),eu={class:"label-value"},au={key:1,class:"label-btns"},tu=["disabled"],su={key:2,class:"label-msg"},ou=T({__name:"index",setup(c){return r(this,null,function*(){let m,i;const h=I(),t=w(""),n=w(!1),s=w(""),o=A({account:"",password:""}),l=A({wanProto:"dhcp",dnsProto:"auto",staticIp:"",subnetMask:"",manualDnsIp:[],gateway:""}),v=()=>r(this,null,function*(){n.value=!0;try{const d=yield B.Guide.Pppoe.GET(),{result:e}=d.data;e&&(o.account=e.account||"",o.password=e.password||"")}catch(d){s.value=d}t.value=yield h.getAsyncNetworkProto,n.value=!1});[m,i]=M(()=>v()),yield m,i();const P=()=>r(this,null,function*(){switch(t.value){case"pppoe":yield S();break;case"dhcp":yield g();break;default:s.value="\u627E\u4E0D\u5230\u4F60\u8981\u7684\u914D\u7F6E";break}}),S=()=>r(this,null,function*(){if(o.account==""){s.value="\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A";return}if(o.password==""){s.value="\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A";return}n.value=!0;const d=x.Loading("\u4FDD\u5B58\u4E2D...");try{const e=yield B.Guide.Pppoe.POST({account:o.account,password:o.password});if(e.data){const{error:a,success:_}=e.data;a&&(s.value=a),(_==null||_==0)&&(s.value="\u914D\u7F6E\u5B8C\u6210")}}catch(e){s.value=e}finally{}n.value=!1,d.Close()}),g=()=>r(this,null,function*(){const d={wanProto:l.wanProto,dnsProto:l.dnsProto};n.value=!0;const e=x.Loading("\u4FDD\u5B58\u4E2D...");try{const a=yield B.Guide.ClientModel.POST(d);if(a!=null&&a.data){const{success:_,error:C}=a==null?void 0:a.data;C&&(s.value=C),(_==null||_==0)&&(s.value="\u914D\u7F6E\u5B8C\u6210")}}catch(a){s.value=a}n.value=!1,e.Close()});return(d,e)=>(E(),b("form",{class:"form-container",onSubmit:q(P,["prevent"])},[O,j,u("div",z,[u("div",R,[u("label",null,[F(u("input",{type:"radio",value:"pppoe","onUpdate:modelValue":e[0]||(e[0]=a=>t.value=a)},null,512),[[f,t.value]]),H]),u("label",null,[F(u("input",{type:"radio",value:"dhcp","onUpdate:modelValue":e[1]||(e[1]=a=>t.value=a)},null,512),[[f,t.value]]),J]),u("label",K,[F(u("input",{type:"radio",value:"static",hidden:"true","onUpdate:modelValue":e[2]||(e[2]=a=>t.value=a)},null,512),[[f,t.value]]),Q])])]),t.value=="pppoe"?(E(),b("ul",W,[X,Y,Z,u("div",$,[F(u("input",{type:"text",placeholder:"\u5BBD\u5E26\u8D26\u53F7","onUpdate:modelValue":e[3]||(e[3]=a=>o.account=a),required:""},null,512),[[k,o.account,void 0,{trim:!0}]])]),uu,u("div",eu,[F(u("input",{type:"password",placeholder:"\u5BBD\u5E26\u5BC6\u7801","onUpdate:modelValue":e[4]||(e[4]=a=>o.password=a),required:""},null,512),[[k,o.password,void 0,{trim:!0}]])])])):y("",!0),t.value=="pppoe"||t.value=="dhcp"?(E(),b("div",au,[u("button",{class:"sumbit",disabled:n.value},"\u4FDD\u5B58",8,tu)])):y("",!0),s.value?(E(),b("div",su,[u("span",null,U(s.value),1)])):y("",!0)],40,L))})}});var du=V(ou,[["__scopeId","data-v-c5783954"]]);export{du as default};
|
||||
var r=(c,m,i)=>new Promise((h,t)=>{var n=l=>{try{o(i.next(l))}catch(v){t(v)}},s=l=>{try{o(i.throw(l))}catch(v){t(v)}},o=l=>l.done?h(l.value):Promise.resolve(l.value).then(n,s);o((i=i.apply(c,m)).next())});import{_ as V,d as T,u as I,s as w,j as A,v as M,o as E,c as b,a as u,x as F,y as f,z as k,m as y,l as U,A as q,B as D,p as G,q as N,C as B,T as x}from"./index.js?v=acacf0dc";const p=c=>(G("data-v-c5783954"),c=c(),N(),c),L=["onSubmit"],O=p(()=>u("p",null,[D(" \u6B22\u8FCE\u4F7F\u7528\u5FEB\u901F\u7F51\u7EDC\u914D\u7F6E\u5411\u5BFC\uFF0C\u8BF7\u9009\u62E9\u4E00\u79CD\u8FDE\u63A5\u65B9\u5F0F\u4EE5\u5F00\u59CB\u8054\u7F51\uFF0C\u6216\u4F7F\u7528\u5DE6\u4FA7\u83DC\u5355\u8FDB\u884C\u8054\u7F51\u914D\u7F6E "),u("br"),D(" \u6CA1\u627E\u5230\u60F3\u8981\u7684\u914D\u7F6E\uFF1F\u8BF7\u4F7F\u7528 "),u("a",{href:"/cgi-bin/luci/admin/network/network",target:"_blank"},"\u9AD8\u7EA7\u6A21\u5F0F")],-1)),j=p(()=>u("div",{class:"label-name"},[u("span",null,"\u8054\u7F51\u65B9\u5F0F")],-1)),z={class:"label-value"},R={class:"label-flex"},H=D("\u8D26\u53F7\u5BC6\u7801"),J=D("\u81EA\u52A8\u8054\u7F51"),K={style:{display:"none"}},Q=D("\u7F51\u5173\u8054\u7F51"),W={key:0,class:"ul-container"},X=p(()=>u("div",{class:"ul-container_title"},[u("span",null,"\u62E8\u53F7\u8054\u7F51\u914D\u7F6E")],-1)),Y=p(()=>u("div",{class:"label-value"},null,-1)),Z=p(()=>u("div",{class:"label-name"},[u("span",null,"\u8D26\u53F7")],-1)),$={class:"label-value"},uu=p(()=>u("div",{class:"label-name"},[u("span",null,"\u5BC6\u7801")],-1)),eu={class:"label-value"},au={key:1,class:"label-btns"},tu=["disabled"],su={key:2,class:"label-msg"},ou=T({__name:"index",setup(c){return r(this,null,function*(){let m,i;const h=I(),t=w(""),n=w(!1),s=w(""),o=A({account:"",password:""}),l=A({wanProto:"dhcp",dnsProto:"auto",staticIp:"",subnetMask:"",manualDnsIp:[],gateway:""}),v=()=>r(this,null,function*(){n.value=!0;try{const d=yield B.Guide.Pppoe.GET(),{result:e}=d.data;e&&(o.account=e.account||"",o.password=e.password||"")}catch(d){s.value=d}t.value=yield h.getAsyncNetworkProto,n.value=!1});[m,i]=M(()=>v()),yield m,i();const P=()=>r(this,null,function*(){switch(t.value){case"pppoe":yield S();break;case"dhcp":yield g();break;default:s.value="\u627E\u4E0D\u5230\u4F60\u8981\u7684\u914D\u7F6E";break}}),S=()=>r(this,null,function*(){if(o.account==""){s.value="\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A";return}if(o.password==""){s.value="\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A";return}n.value=!0;const d=x.Loading("\u4FDD\u5B58\u4E2D...");try{const e=yield B.Guide.Pppoe.POST({account:o.account,password:o.password});if(e.data){const{error:a,success:_}=e.data;a&&(s.value=a),(_==null||_==0)&&(s.value="\u914D\u7F6E\u5B8C\u6210")}}catch(e){s.value=e}finally{}n.value=!1,d.Close()}),g=()=>r(this,null,function*(){const d={wanProto:l.wanProto,dnsProto:l.dnsProto};n.value=!0;const e=x.Loading("\u4FDD\u5B58\u4E2D...");try{const a=yield B.Guide.ClientModel.POST(d);if(a!=null&&a.data){const{success:_,error:C}=a==null?void 0:a.data;C&&(s.value=C),(_==null||_==0)&&(s.value="\u914D\u7F6E\u5B8C\u6210")}}catch(a){s.value=a}n.value=!1,e.Close()});return(d,e)=>(E(),b("form",{class:"form-container",onSubmit:q(P,["prevent"])},[O,j,u("div",z,[u("div",R,[u("label",null,[F(u("input",{type:"radio",value:"pppoe","onUpdate:modelValue":e[0]||(e[0]=a=>t.value=a)},null,512),[[f,t.value]]),H]),u("label",null,[F(u("input",{type:"radio",value:"dhcp","onUpdate:modelValue":e[1]||(e[1]=a=>t.value=a)},null,512),[[f,t.value]]),J]),u("label",K,[F(u("input",{type:"radio",value:"static",hidden:"true","onUpdate:modelValue":e[2]||(e[2]=a=>t.value=a)},null,512),[[f,t.value]]),Q])])]),t.value=="pppoe"?(E(),b("ul",W,[X,Y,Z,u("div",$,[F(u("input",{type:"text",placeholder:"\u5BBD\u5E26\u8D26\u53F7","onUpdate:modelValue":e[3]||(e[3]=a=>o.account=a),required:""},null,512),[[k,o.account,void 0,{trim:!0}]])]),uu,u("div",eu,[F(u("input",{type:"password",placeholder:"\u5BBD\u5E26\u5BC6\u7801","onUpdate:modelValue":e[4]||(e[4]=a=>o.password=a),required:""},null,512),[[k,o.password,void 0,{trim:!0}]])])])):y("",!0),t.value=="pppoe"||t.value=="dhcp"?(E(),b("div",au,[u("button",{class:"sumbit",disabled:n.value},"\u4FDD\u5B58",8,tu)])):y("",!0),s.value?(E(),b("div",su,[u("span",null,U(s.value),1)])):y("",!0)],40,L))})}});var du=V(ou,[["__scopeId","data-v-c5783954"]]);export{du as default};
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{_ as r}from"./index.js?v=c1b13aa2";const e={};function n(_,c){return null}var a=r(e,[["render",n]]);export{a as default};
|
||||
import{_ as r}from"./index.js?v=acacf0dc";const e={};function n(_,c){return null}var a=r(e,[["render",n]]);export{a as default};
|
|
@ -1 +1 @@
|
|||
import{d as u,r as e,o as r,e as s,w as i,b as c,P as t}from"./index.js?v=c1b13aa2";const _=u({__name:"index",setup(l){const a=[{name:"disk",title:"\u6211\u7684\u78C1\u76D8",path:"/router/disk"},{name:"disk-raid",title:"\u78C1\u76D8\u9635\u5217",fn:()=>{t({full:!0,title:"\u78C1\u76D8\u9635\u5217",src:"/cgi-bin/luci/admin/nas/raid"})}},{name:"disk-smart",title:"S.M.A.R.T",fn:()=>{t({full:!0,title:"S.M.A.R.T",src:"/cgi-bin/luci/admin/nas/smart"})}}];return(m,d)=>{const n=e("router-loading"),o=e("layout-page");return r(),s(o,{menus:a},{default:i(()=>[c(n)]),_:1})}}});export{_ as default};
|
||||
import{d as u,r as e,o as r,e as s,w as i,b as c,P as t}from"./index.js?v=acacf0dc";const _=u({__name:"index",setup(l){const a=[{name:"disk",title:"\u6211\u7684\u78C1\u76D8",path:"/router/disk"},{name:"disk-raid",title:"\u78C1\u76D8\u9635\u5217",fn:()=>{t({full:!0,title:"\u78C1\u76D8\u9635\u5217",src:"/cgi-bin/luci/admin/nas/raid"})}},{name:"disk-smart",title:"S.M.A.R.T",fn:()=>{t({full:!0,title:"S.M.A.R.T",src:"/cgi-bin/luci/admin/nas/smart"})}}];return(m,d)=>{const n=e("router-loading"),o=e("layout-page");return r(),s(o,{menus:a},{default:i(()=>[c(n)]),_:1})}}});export{_ as default};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,16 +1,16 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-mosdns
|
||||
PKG_VERSION:=1.5
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.4.4
|
||||
PKG_RELEASE:=2
|
||||
|
||||
LUCI_TITLE:=LuCI Support for mosdns
|
||||
LUCI_PKGARCH:=all
|
||||
LUCI_DEPENDS:=+mosdns-v5 +jsonfilter +bash +luci-compat +zoneinfo-asia
|
||||
LUCI_DEPENDS:=+mosdns +jsonfilter +luci-compat +curl +v2ray-geoip +v2ray-geosite
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/mosdns/cus_config.yaml
|
||||
/etc/config/mosdns
|
||||
/etc/mosdns/config_custom.yaml
|
||||
/etc/mosdns/rule
|
||||
endef
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ function index()
|
|||
if not nixio.fs.access("/etc/config/mosdns") then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local page = entry({"admin", "services", "mosdns"}, alias("admin", "services", "mosdns", "basic"), _("MosDNS"), 30)
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-mosdns" }
|
||||
|
||||
|
||||
entry({"admin", "services", "mosdns", "basic"}, cbi("mosdns/basic"), _("Basic Setting"), 1).leaf = true
|
||||
entry({"admin", "services", "mosdns", "rule_list"}, cbi("mosdns/rule_list"), _("Rule List"), 2).leaf = true
|
||||
entry({"admin", "services", "mosdns", "update"}, cbi("mosdns/update"), _("Geodata Update"), 3).leaf = true
|
||||
|
@ -16,6 +16,7 @@ function index()
|
|||
entry({"admin", "services", "mosdns", "status"}, call("act_status")).leaf = true
|
||||
entry({"admin", "services", "mosdns", "get_log"}, call("get_log")).leaf = true
|
||||
entry({"admin", "services", "mosdns", "clear_log"}, call("clear_log")).leaf = true
|
||||
entry({"admin", "services", "mosdns", "geo_update"}, call("geo_update")).leaf = true
|
||||
end
|
||||
|
||||
function act_status()
|
||||
|
@ -26,9 +27,16 @@ function act_status()
|
|||
end
|
||||
|
||||
function get_log()
|
||||
luci.http.write(luci.sys.exec("cat $(/etc/mosdns/lib.sh logfile)"))
|
||||
luci.http.write(luci.sys.exec("cat $(/usr/share/mosdns/mosdns.sh logfile)"))
|
||||
end
|
||||
|
||||
function clear_log()
|
||||
luci.sys.call("true > $(/etc/mosdns/lib.sh logfile)")
|
||||
luci.sys.call("cat /dev/null > $(/usr/share/mosdns/mosdns.sh logfile)")
|
||||
end
|
||||
|
||||
function geo_update()
|
||||
local e = {}
|
||||
e.updating = luci.sys.call("/usr/share/mosdns/mosdns.sh geodata >/dev/null") == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
|
|
@ -11,75 +11,126 @@ s.anonymous = true
|
|||
enable = s:option(Flag, "enabled", translate("Enable"))
|
||||
enable.rmempty = false
|
||||
|
||||
configfile = s:option(ListValue, "configfile", translate("MosDNS Config File"))
|
||||
configfile:value("./def_config.yaml", translate("Def Config"))
|
||||
configfile:value("./cus_config.yaml", translate("Cus Config"))
|
||||
configfile.default = "./def_config.yaml"
|
||||
configfile = s:option(ListValue, "configfile", translate("Config File"))
|
||||
configfile:value("/etc/mosdns/config.yaml", translate("Default Config"))
|
||||
configfile:value("/etc/mosdns/config_custom.yaml", translate("Custom Config"))
|
||||
configfile.default = "/etc/mosdns/config.yaml"
|
||||
|
||||
listenport = s:option(Value, "listen_port", translate("Listen port"))
|
||||
listenport.datatype = "and(port,min(1))"
|
||||
listenport.default = 5335
|
||||
listenport:depends( "configfile", "./def_config.yaml")
|
||||
listenport:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
loglv = s:option(ListValue, "loglv", translate("Log Level"))
|
||||
loglv:value("debug", translate("Debug"))
|
||||
loglv:value("info", translate("Info"))
|
||||
loglv:value("warn", translate("Warning"))
|
||||
loglv:value("error", translate("Error"))
|
||||
loglv.default = "error"
|
||||
loglv:depends( "configfile", "./def_config.yaml")
|
||||
loglevel = s:option(ListValue, "log_level", translate("Log Level"))
|
||||
loglevel:value("debug", translate("Debug"))
|
||||
loglevel:value("info", translate("Info"))
|
||||
loglevel:value("warn", translate("Warning"))
|
||||
loglevel:value("error", translate("Error"))
|
||||
loglevel.default = "info"
|
||||
loglevel:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
logfile = s:option(Value, "logfile", translate("MosDNS Log File"))
|
||||
logfile.placeholder = "/tmp/mosdns.txt"
|
||||
logfile.default = "/tmp/mosdns.txt"
|
||||
logfile:depends( "configfile", "./def_config.yaml")
|
||||
logfile = s:option(Value, "logfile", translate("Log File"))
|
||||
logfile.placeholder = "/tmp/mosdns.log"
|
||||
logfile.default = "/tmp/mosdns.log"
|
||||
logfile:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
remote_dns = s:option(Value, "remote_dns1", translate("Remote DNS"))
|
||||
remote_dns.default = "tls://8.8.4.4"
|
||||
remote_dns:value("tls://8.8.8.8", "8.8.8.8 (Google DNS)")
|
||||
remote_dns:value("tls://8.8.4.4", "8.8.4.4 (Google DNS)")
|
||||
remote_dns:value("tls://1.1.1.1", "1.1.1.1 (CloudFlare DNS)")
|
||||
remote_dns:value("tls://1.0.0.1", "1.0.0.1 (CloudFlare DNS)")
|
||||
remote_dns:value("tls://208.67.222.222", "208.67.222.222 (Open DNS)")
|
||||
remote_dns:value("tls://208.67.220.220", "208.67.220.220 (Open DNS)")
|
||||
remote_dns:value("tls://94.140.14.140", "94.140.14.140 (AdGuard)")
|
||||
remote_dns:value("tls://94.140.14.141", "94.140.14.141 (AdGuard)")
|
||||
remote_dns:depends( "configfile", "./def_config.yaml")
|
||||
remote_dns = s:option(Value, "remote_dns2", " ")
|
||||
remote_dns.default = "tls://1.0.0.1"
|
||||
remote_dns:value("tls://8.8.8.8", "8.8.8.8 (Google DNS)")
|
||||
remote_dns:value("tls://8.8.4.4", "8.8.4.4 (Google DNS)")
|
||||
remote_dns:value("tls://1.1.1.1", "1.1.1.1 (CloudFlare DNS)")
|
||||
remote_dns:value("tls://1.0.0.1", "1.0.0.1 (CloudFlare DNS)")
|
||||
remote_dns:value("tls://208.67.222.222", "208.67.222.222 (Open DNS)")
|
||||
remote_dns:value("tls://208.67.220.220", "208.67.220.220 (Open DNS)")
|
||||
remote_dns:value("tls://94.140.14.140", "94.140.14.140 (AdGuard)")
|
||||
remote_dns:value("tls://94.140.14.141", "94.140.14.141 (AdGuard)")
|
||||
remote_dns:depends( "configfile", "./def_config.yaml")
|
||||
|
||||
redirect = s:option(Flag, "redirect", translate("Enable DNS Redirect"))
|
||||
redirect:depends( "configfile", "./def_config.yaml")
|
||||
redirect = s:option(Flag, "redirect", translate("DNS Forward"), translate("Forward Dnsmasq Domain Name resolution requests to MosDNS"))
|
||||
redirect.default = true
|
||||
|
||||
custom_local_dns = s:option(Flag, "custom_local_dns", translate("Local DNS"), translate("Follow WAN interface DNS if not enabled"))
|
||||
custom_local_dns:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
custom_local_dns.default = false
|
||||
|
||||
custom_local_dns = s:option(DynamicList, "local_dns", translate("Upstream DNS servers"))
|
||||
custom_local_dns:value("119.29.29.29", "119.29.29.29 (DNSPod Primary)")
|
||||
custom_local_dns:value("119.28.28.28", "119.28.28.28 (DNSPod Secondary)")
|
||||
custom_local_dns:value("223.5.5.5", "223.5.5.5 (AliDNS Primary)")
|
||||
custom_local_dns:value("223.6.6.6", "223.6.6.6 (AliDNS Secondary)")
|
||||
custom_local_dns:value("114.114.114.114", "114.114.114.114 (114DNS Primary)")
|
||||
custom_local_dns:value("114.114.115.115", "114.114.115.115 (114DNS Secondary)")
|
||||
custom_local_dns:value("180.76.76.76", "180.76.76.76 (Baidu DNS)")
|
||||
custom_local_dns:depends("custom_local_dns", "1")
|
||||
|
||||
custom_local_dns = s:option(ListValue, "bootstrap_dns", translate("Bootstrap DNS servers"), translate("Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams"))
|
||||
custom_local_dns:value("119.29.29.29", "119.29.29.29 (DNSPod Primary)")
|
||||
custom_local_dns:value("119.28.28.28", "119.28.28.28 (DNSPod Secondary)")
|
||||
custom_local_dns:value("223.5.5.5", "223.5.5.5 (AliDNS Primary)")
|
||||
custom_local_dns:value("223.6.6.6", "223.6.6.6 (AliDNS Secondary)")
|
||||
custom_local_dns:value("114.114.114.114", "114.114.114.114 (114DNS Primary)")
|
||||
custom_local_dns:value("114.114.115.115", "114.114.115.115 (114DNS Secondary)")
|
||||
custom_local_dns:value("180.76.76.76", "180.76.76.76 (Baidu DNS)")
|
||||
custom_local_dns.default = "119.29.29.29"
|
||||
custom_local_dns:depends("custom_local_dns", "1")
|
||||
|
||||
remote_dns = s:option(DynamicList, "remote_dns", translate("Remote DNS"))
|
||||
remote_dns:value("tls://1.1.1.1", "1.1.1.1 (CloudFlare DNS)")
|
||||
remote_dns:value("tls://1.0.0.1", "1.0.0.1 (CloudFlare DNS)")
|
||||
remote_dns:value("tls://8.8.8.8", "8.8.8.8 (Google DNS)")
|
||||
remote_dns:value("tls://8.8.4.4", "8.8.4.4 (Google DNS)")
|
||||
remote_dns:value("tls://9.9.9.9", "9.9.9.9 (Quad9 DNS)")
|
||||
remote_dns:value("tls://149.112.112.112", "149.112.112.112 (Quad9 DNS)")
|
||||
remote_dns:value("tls://45.11.45.11", "45.11.45.11 (DNS.SB)")
|
||||
remote_dns:value("tls://208.67.222.222", "208.67.222.222 (Open DNS)")
|
||||
remote_dns:value("tls://208.67.220.220", "208.67.220.220 (Open DNS)")
|
||||
remote_dns:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
remote_dns_pipeline = s:option(Flag, "enable_pipeline", translate("Remote DNS Connection Multiplexing"), translate("Enable TCP/DoT RFC 7766 new Query Pipelining connection multiplexing mode"))
|
||||
remote_dns_pipeline.rmempty = false
|
||||
remote_dns_pipeline.default = false
|
||||
remote_dns_pipeline:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
cache_size = s:option(Value, "cache_size", translate("DNS Cache Size"))
|
||||
cache_size.datatype = "and(uinteger,min(0))"
|
||||
cache_size.default = "200000"
|
||||
cache_size:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
cache_size = s:option(Value, "cache_survival_time", translate("Cache Survival Time"))
|
||||
cache_size.datatype = "and(uinteger,min(0))"
|
||||
cache_size.default = "259200"
|
||||
cache_size:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
minimal_ttl = s:option(Value, "minimal_ttl", translate("Minimum TTL"))
|
||||
minimal_ttl.datatype = "and(uinteger,min(0))"
|
||||
minimal_ttl.datatype = "and(uinteger,max(3600))"
|
||||
minimal_ttl.default = "0"
|
||||
minimal_ttl:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
maximum_ttl = s:option(Value, "maximum_ttl", translate("Maximum TTL"))
|
||||
maximum_ttl.datatype = "and(uinteger,min(0))"
|
||||
maximum_ttl.default = "0"
|
||||
maximum_ttl:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
|
||||
adblock = s:option(Flag, "adblock", translate("Enable DNS ADblock"))
|
||||
adblock:depends( "configfile", "./def_config.yaml")
|
||||
adblock:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||
adblock.default = false
|
||||
|
||||
set_config = s:option(Button, "set_config", translate("DNS Helper"))
|
||||
set_config.inputtitle = translate("Apply")
|
||||
set_config.inputstyle = "reload"
|
||||
set_config.description = translate("This will make the necessary adjustments to other plug-in settings.")
|
||||
set_config.write = function()
|
||||
luci.sys.exec("/etc/mosdns/set.sh &> /dev/null &")
|
||||
end
|
||||
set_config:depends( "configfile", "./def_config.yaml")
|
||||
adblock = s:option(Value, "ad_source", translate("ADblock Source"))
|
||||
adblock:depends("adblock", "1")
|
||||
adblock.default = "https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt"
|
||||
adblock:value("geosite.dat", "v2ray-geosite")
|
||||
adblock:value("https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt", "anti-AD")
|
||||
adblock:value("https://raw.githubusercontent.com/sjhgvr/oisd/main/dbl_basic.txt", "oisd (basic)")
|
||||
adblock:value("https://raw.githubusercontent.com/QiuSimons/openwrt-mos/master/dat/serverlist.txt", "QiuSimons/openwrt-mos")
|
||||
|
||||
unset_config = s:option(Button, "unset_config", translate("Revert Settings"))
|
||||
unset_config.inputtitle = translate("Apply")
|
||||
unset_config.inputstyle = "reload"
|
||||
unset_config.description = translate("This will revert the adjustments.")
|
||||
unset_config.write = function()
|
||||
luci.sys.exec("/etc/mosdns/set.sh unset &> /dev/null &")
|
||||
reload_service = s:option( Button, "_reload", translate("Reload Service"), translate("Reload service to take effect of new configuration"))
|
||||
reload_service.write = function()
|
||||
luci.sys.exec("/etc/init.d/mosdns reload")
|
||||
end
|
||||
reload_service:depends( "configfile", "/etc/mosdns/config_custom.yaml")
|
||||
|
||||
config = s:option(TextValue, "manual-config")
|
||||
config.description = translate("<font color=\"ff0000\"><strong>View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.</strong></font>")
|
||||
config.template = "cbi/tvalue"
|
||||
config.rows = 25
|
||||
config:depends( "configfile", "/etc/mosdns/config_custom.yaml")
|
||||
|
||||
function config.cfgvalue(self, section)
|
||||
return nixio.fs.readfile("/etc/mosdns/config_custom.yaml")
|
||||
end
|
||||
|
||||
function config.write(self, section, value)
|
||||
value = value:gsub("\r\n?", "\n")
|
||||
nixio.fs.writefile("/etc/mosdns/config_custom.yaml", value)
|
||||
end
|
||||
|
||||
return m
|
||||
|
|
|
@ -2,9 +2,10 @@ local datatypes = require "luci.cbi.datatypes"
|
|||
|
||||
local white_list_file = "/etc/mosdns/rule/whitelist.txt"
|
||||
local block_list_file = "/etc/mosdns/rule/blocklist.txt"
|
||||
local grey_list_file = "/etc/mosdns/rule/greylist.txt"
|
||||
local hosts_list_file = "/etc/mosdns/rule/hosts.txt"
|
||||
local redirect_list_file = "/etc/mosdns/rule/redirect.txt"
|
||||
local cus_config_file = "/etc/mosdns/cus_config.yaml"
|
||||
local local_ptr_file = "/etc/mosdns/rule/local-ptr.txt"
|
||||
|
||||
m = Map("mosdns")
|
||||
|
||||
|
@ -13,9 +14,10 @@ s.anonymous = true
|
|||
|
||||
s:tab("white_list", translate("White Lists"))
|
||||
s:tab("block_list", translate("Block Lists"))
|
||||
s:tab("grey_list", translate("Grey Lists"))
|
||||
s:tab("hosts_list", translate("Hosts"))
|
||||
s:tab("redirect_list", translate("Redirect"))
|
||||
s:tab("cus_config", translate("Cus Config"))
|
||||
s:tab("local_ptr_list", translate("Block PTR"))
|
||||
|
||||
o = s:taboption("white_list", TextValue, "whitelist", "", "<font color='red'>" .. translate("These domain names allow DNS resolution with the highest priority. Please input the domain names of websites, every line can input only one website domain. For example: hm.baidu.com.") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
|
||||
o.rows = 15
|
||||
|
@ -37,6 +39,16 @@ o.validate = function(self, value)
|
|||
return value
|
||||
end
|
||||
|
||||
o = s:taboption("grey_list", TextValue, "greylist", "", "<font color='red'>" .. translate("These domains are always resolved using remote DNS. Please input the domain names of websites, every line can input only one website domain. For example: google.com.") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
|
||||
o.rows = 15
|
||||
o.wrap = "off"
|
||||
o.cfgvalue = function(self, section) return nixio.fs.readfile(grey_list_file) or "" end
|
||||
o.write = function(self, section, value) nixio.fs.writefile(grey_list_file, value:gsub("\r\n", "\n")) end
|
||||
o.remove = function(self, section, value) nixio.fs.writefile(grey_list_file, "") end
|
||||
o.validate = function(self, value)
|
||||
return value
|
||||
end
|
||||
|
||||
o = s:taboption("hosts_list", TextValue, "hosts", "", "<font color='red'>" .. translate("Hosts For example: baidu.com 10.0.0.1") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
|
||||
o.rows = 15
|
||||
o.wrap = "off"
|
||||
|
@ -57,12 +69,12 @@ o.validate = function(self, value)
|
|||
return value
|
||||
end
|
||||
|
||||
o = s:taboption("cus_config", TextValue, "Cus Config", "", "<font color='red'>" .. translate("View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Custom Config' profiles.") .. "</font>")
|
||||
o.rows = 30
|
||||
o = s:taboption("local_ptr_list", TextValue, "local_ptr", "", "<font color='red'>" .. translate("These domains are blocked from PTR requests") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
|
||||
o.rows = 15
|
||||
o.wrap = "off"
|
||||
o.cfgvalue = function(self, section) return nixio.fs.readfile(cus_config_file) or "" end
|
||||
o.write = function(self, section, value) nixio.fs.writefile(cus_config_file, value:gsub("\r\n", "\n")) end
|
||||
o.remove = function(self, section, value) nixio.fs.writefile(cus_config_file, "") end
|
||||
o.cfgvalue = function(self, section) return nixio.fs.readfile(local_ptr_file) or "" end
|
||||
o.write = function(self, section, value) nixio.fs.writefile(local_ptr_file, value:gsub("\r\n", "\n")) end
|
||||
o.remove = function(self, section, value) nixio.fs.writefile(local_ptr_file, "") end
|
||||
o.validate = function(self, value)
|
||||
return value
|
||||
end
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
m = Map("mosdns")
|
||||
|
||||
s = m:section(TypedSection, "mosdns", translate("Geodata Update"))
|
||||
s = m:section(TypedSection, "mosdns", translate("Update GeoIP & GeoSite dat"))
|
||||
s.addremove = false
|
||||
s.anonymous = true
|
||||
|
||||
enable = s:option(Flag, "geo_auto_update", translate("Enable Auto Database Update"))
|
||||
enable.rmempty = false
|
||||
|
||||
enable = s:option(Flag, "syncconfig", translate("Enable Config Update"))
|
||||
enable.rmempty = false
|
||||
|
||||
o = s:option(ListValue, "geo_update_week_time", translate("Update Cycle"))
|
||||
o:value("*", translate("Every Day"))
|
||||
o:value("1", translate("Every Monday"))
|
||||
|
@ -21,17 +18,14 @@ o:value("6", translate("Every Saturday"))
|
|||
o:value("7", translate("Every Sunday"))
|
||||
o.default = "*"
|
||||
|
||||
update_time = s:option(ListValue, "geo_update_day_time", translate("Update Time (Every Day)"))
|
||||
update_time = s:option(ListValue, "geo_update_day_time", translate("Update Time"))
|
||||
for t = 0, 23 do
|
||||
update_time:value(t, t..":00")
|
||||
end
|
||||
update_time.default = 0
|
||||
|
||||
data_update = s:option(Button, "geo_update_database", translate("Database Update"))
|
||||
data_update.inputtitle = translate("Check And Update")
|
||||
data_update.inputstyle = "reload"
|
||||
data_update.write = function()
|
||||
luci.sys.exec("/etc/mosdns/mosupdater.sh &> /dev/null &")
|
||||
end
|
||||
data_update.rawhtml = true
|
||||
data_update.template = "mosdns/geo_update"
|
||||
|
||||
return m
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<%+cbi/valueheader%>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
function update_data(btn, dataname)
|
||||
{
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Updating...%> ';
|
||||
st=dataname;
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "mosdns", "geo_update")%>',
|
||||
{ set:st },
|
||||
function(x,data)
|
||||
{
|
||||
var tb = document.getElementById(dataname+'-status');
|
||||
if (tb)
|
||||
{
|
||||
switch (data.updating)
|
||||
{
|
||||
case true:
|
||||
tb.innerHTML = "<font color='green'>" + "<%:Update success%>" + "</font>";
|
||||
break;
|
||||
case false:
|
||||
tb.innerHTML = "<font color='red'>" + "<%:Update failed, Please check the network status%>" + "</font>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
btn.disabled = false;
|
||||
btn.value = '<%:Check And Update%>';
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
//]]></script>
|
||||
<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Check And Update%>" onclick="return update_data(this,'<%=self.option%>')" />
|
||||
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
|
||||
<%+cbi/valuefooter%>
|
|
@ -1,9 +1,6 @@
|
|||
msgid "Basic Setting"
|
||||
msgstr "基本设置"
|
||||
|
||||
msgid "Manual Configuration"
|
||||
msgstr "手动配置"
|
||||
|
||||
msgid "MosDNS is a 'programmable' DNS forwarder."
|
||||
msgstr "MosDNS 是一个插件化的 DNS 转发/分流器。"
|
||||
|
||||
|
@ -19,20 +16,41 @@ msgstr "获取数据中..."
|
|||
msgid "Enable"
|
||||
msgstr "启用"
|
||||
|
||||
msgid "Enable DNS Redirect"
|
||||
msgstr "启用 DNS 重定向"
|
||||
msgid "Listen port"
|
||||
msgstr "监听端口"
|
||||
|
||||
msgid "Log Level"
|
||||
msgstr "日志等级"
|
||||
|
||||
msgid "DNS Forward"
|
||||
msgstr "DNS 转发"
|
||||
|
||||
msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS"
|
||||
msgstr "将 Dnsmasq 域名解析请求转发到 MosDNS 服务器"
|
||||
|
||||
msgid "Enable DNS ADblock"
|
||||
msgstr "启用 DNS 广告过滤"
|
||||
|
||||
msgid "View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need."
|
||||
msgstr "注意!此页的更改仅当 'MosDNS 配置文件选择' 为 '自定义配置' 时才会生效"
|
||||
msgid "ADblock Source"
|
||||
msgstr "广告过滤来源"
|
||||
|
||||
msgid "Reload Service"
|
||||
msgstr "重载服务"
|
||||
|
||||
msgid "Reload service to take effect of new configuration"
|
||||
msgstr "重载 MosDNS 服务生效配置文件"
|
||||
|
||||
msgid "<font color=\"ff0000\"><strong>View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.</strong></font>"
|
||||
msgstr "<font color=\"ff0000\"><strong>注意!此页的更改仅当配置文件为 “自定义” 时才会生效</strong></font>"
|
||||
|
||||
msgid "Geodata Update"
|
||||
msgstr "数据库更新"
|
||||
msgstr "更新数据库"
|
||||
|
||||
msgid "Update Time (Every Day)"
|
||||
msgstr "更新时间(每天)"
|
||||
msgid "Update GeoIP & GeoSite dat"
|
||||
msgstr "更新 GeoIP & GeoSite 数据库"
|
||||
|
||||
msgid "Update Time"
|
||||
msgstr "更新时间"
|
||||
|
||||
msgid "Update Cycle"
|
||||
msgstr "更新周期"
|
||||
|
@ -68,49 +86,70 @@ msgid "Check And Update"
|
|||
msgstr "检查并更新"
|
||||
|
||||
msgid "Enable Auto Database Update"
|
||||
msgstr "启用数据库自动更新"
|
||||
msgstr "启用自动更新"
|
||||
|
||||
msgid "Enable Config Update"
|
||||
msgstr "启用配置文件同步"
|
||||
msgid "Updating..."
|
||||
msgstr "正在更新..."
|
||||
|
||||
msgid "Enable AutoConfiguration"
|
||||
msgstr "启用自动化配置"
|
||||
msgid "Update success"
|
||||
msgstr "更新成功"
|
||||
|
||||
msgid "This will make the necessary adjustments to other plug-in settings."
|
||||
msgstr "对其他插件的设置进行必要的设置,目前仅支持 SSRP VSSR PASSWALL。"
|
||||
msgid "Update failed, Please check the network status"
|
||||
msgstr "更新失败,请检查网络状态"
|
||||
|
||||
msgid "This will revert the adjustments."
|
||||
msgstr "还原设置助手对其他插件进行的配置设定。"
|
||||
msgid "Config File"
|
||||
msgstr "配置文件"
|
||||
|
||||
msgid "DNS Helper"
|
||||
msgstr "DNS 设置助手"
|
||||
|
||||
msgid "Revert Settings"
|
||||
msgstr "DNS 设置还原"
|
||||
|
||||
msgid "Apply"
|
||||
msgstr "应用"
|
||||
|
||||
msgid "MosDNS Config File"
|
||||
msgstr "MosDNS 配置文件选择"
|
||||
|
||||
msgid "Def Config"
|
||||
msgid "Default Config"
|
||||
msgstr "内置预设"
|
||||
|
||||
msgid "Cus Config"
|
||||
msgstr "自定义配置"
|
||||
msgid "Custom Config"
|
||||
msgstr "自定义"
|
||||
|
||||
msgid "Log Level"
|
||||
msgstr "日志级别"
|
||||
|
||||
msgid "MosDNS Log File"
|
||||
msgid "Log File"
|
||||
msgstr "日志文件"
|
||||
|
||||
msgid "Local DNS"
|
||||
msgstr "本地 DNS"
|
||||
|
||||
msgid "Follow WAN interface DNS if not enabled"
|
||||
msgstr "不启用则遵循 WAN 接口 DNS"
|
||||
|
||||
msgid "Upstream DNS servers"
|
||||
msgstr "上游 DNS 服务器"
|
||||
|
||||
msgid "Bootstrap DNS servers"
|
||||
msgstr "Bootstrap DNS 服务器"
|
||||
|
||||
msgid "Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams"
|
||||
msgstr "Bootstrap DNS 服务器用于解析所指定为上游的 DoH / DoT 解析器的 IP 地址"
|
||||
|
||||
msgid "Remote DNS"
|
||||
msgstr "远程 DNS"
|
||||
|
||||
msgid "Listen port"
|
||||
msgstr "监听端口"
|
||||
msgid "Remote DNS Connection Multiplexing"
|
||||
msgstr "远程 DNS 连接复用"
|
||||
|
||||
msgid "Enable TCP/DoT RFC 7766 new Query Pipelining connection multiplexing mode"
|
||||
msgstr "启用 TCP/DoT RFC 7766 新型 Query Pipelining 连接复用模式"
|
||||
|
||||
msgid "DNS Cache Size"
|
||||
msgstr "DNS 缓存大小(条)"
|
||||
|
||||
msgid "Cache Survival Time"
|
||||
msgstr "缓存生存时间(秒)"
|
||||
|
||||
msgid "Minimum TTL"
|
||||
msgstr "覆盖最小 TTL 值(默认 0)"
|
||||
|
||||
msgid "Maximum TTL"
|
||||
msgstr "覆盖最大 TTL 值(默认 0)"
|
||||
|
||||
msgid "Logs"
|
||||
msgstr "日志"
|
||||
|
||||
msgid "Clear logs"
|
||||
msgstr "清空日志"
|
||||
|
||||
msgid "Rule List"
|
||||
msgstr "规则列表"
|
||||
|
@ -118,9 +157,6 @@ msgstr "规则列表"
|
|||
msgid "Rule Settings"
|
||||
msgstr "自定义规则列表"
|
||||
|
||||
msgid "<br>The list of rules only apply to 'Custom Config' profiles."
|
||||
msgstr "<br>规则列表仅适用于 “自定义配置” 配置文件"
|
||||
|
||||
msgid "<br>The list of rules only apply to 'Default Config' profiles."
|
||||
msgstr "<br>规则列表仅适用于 “内置预设” 配置文件"
|
||||
|
||||
|
@ -128,13 +164,19 @@ msgid "White Lists"
|
|||
msgstr "白名单"
|
||||
|
||||
msgid "These domain names allow DNS resolution with the highest priority. Please input the domain names of websites, every line can input only one website domain. For example: hm.baidu.com."
|
||||
msgstr "加入的域名始终允许 DNS 解析,且优先级最高(每个域名一行,允许使用规则匹配)"
|
||||
msgstr "加入的域名始终允许使用 “本地 DNS” 进行解析,且优先级最高(每个域名一行,支持域名匹配规则)"
|
||||
|
||||
msgid "Block Lists"
|
||||
msgstr "黑名单"
|
||||
|
||||
msgid "These domains are blocked from DNS resolution. Please input the domain names of websites, every line can input only one website domain. For example: baidu.com."
|
||||
msgstr "加入的域名将屏蔽 DNS 解析(每个域名一行,允许使用规则匹配)"
|
||||
msgstr "加入的域名将屏蔽 DNS 解析(每个域名一行,支持域名匹配规则)"
|
||||
|
||||
msgid "Grey Lists"
|
||||
msgstr "灰名单"
|
||||
|
||||
msgid "These domains are always resolved using remote DNS. Please input the domain names of websites, every line can input only one website domain. For example: google.com."
|
||||
msgstr "加入的域名始终使用 “远程 DNS” 进行解析(每个域名一行,支持域名匹配规则)"
|
||||
|
||||
msgid "Hosts For example: baidu.com 10.0.0.1"
|
||||
msgstr "自定义 Hosts 重写,如:baidu.com 10.0.0.1(每个规则一行)"
|
||||
|
@ -145,8 +187,8 @@ msgstr "重定向"
|
|||
msgid "The domain name to redirect the request to. Requests domain A, but returns records for domain B. example: a.com b.com"
|
||||
msgstr "重定向请求的域名。请求域名 A,但返回域名 B 的记录,如:baidu.com qq.com(每个规则一行)"
|
||||
|
||||
msgid "Logs"
|
||||
msgstr "日志"
|
||||
msgid "Block PTR"
|
||||
msgstr "PTR 黑名单"
|
||||
|
||||
msgid "Clear logs"
|
||||
msgstr "清空日志"
|
||||
msgid "These domains are blocked from PTR requests"
|
||||
msgstr "加入的域名将阻止 PTR 请求(每个域名一行,支持域名匹配规则)"
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
|
||||
config mosdns 'mosdns'
|
||||
option not_first_start '0'
|
||||
config mosdns 'config'
|
||||
option enabled '0'
|
||||
option listen_port '5335'
|
||||
option geo_auto_update '0'
|
||||
option geo_update_week_time 'all'
|
||||
option geo_update_week_time '*'
|
||||
option geo_update_day_time '2'
|
||||
option redirect '1'
|
||||
option autoconf '1'
|
||||
option syncconfig '1'
|
||||
option adblock '0'
|
||||
option configfile './def_config.yaml'
|
||||
option loglv 'info'
|
||||
option logfile '/tmp/mosdns.txt'
|
||||
option remote_dns1 'tls://8.8.4.4'
|
||||
option remote_dns2 'tls://1.0.0.1'
|
||||
option listen_port '5335'
|
||||
option configfile '/etc/mosdns/config.yaml'
|
||||
option log_level 'info'
|
||||
option logfile '/tmp/mosdns.log'
|
||||
option cache_size '200000'
|
||||
option cache_survival_time '259200'
|
||||
option minimal_ttl '0'
|
||||
option maximum_ttl '0'
|
||||
option custom_local_dns '0'
|
||||
option enable_pipeline '0'
|
||||
list remote_dns 'tls://8.8.8.8'
|
||||
list remote_dns 'tls://1.1.1.1'
|
||||
|
||||
|
|
|
@ -1,153 +1,157 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2020 IrineSistiana
|
||||
# shellcheck disable=SC2034
|
||||
#
|
||||
# Copyright (C) 2020-2022, IrineSistiana
|
||||
#
|
||||
# This file is part of mosdns.
|
||||
#
|
||||
# mosdns is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# mosdns is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
##### ONLY CHANGE THIS BLOCK ######
|
||||
PROG=/usr/bin/mosdns # where is mosdns
|
||||
RES_DIR=/etc/mosdns/ # resource dir / working dir / the dir where you store ip/domain lists
|
||||
CONF=$(uci -q get mosdns.mosdns.configfile) # where is the config file, it can be a relative path to $RES_DIR
|
||||
PROG=/usr/bin/mosdns
|
||||
CONF=$(uci -q get mosdns.config.configfile)
|
||||
CRON_FILE=/etc/crontabs/root
|
||||
##### ONLY CHANGE THIS BLOCK ######
|
||||
|
||||
inital_conf() {
|
||||
config_load "mosdns"
|
||||
config_get "enabled" "mosdns" "enabled" "0"
|
||||
get_config() {
|
||||
config_get enabled $1 enabled 0
|
||||
config_get adblock $1 adblock 0
|
||||
config_get ad_source $1 ad_source ""
|
||||
config_get cache_size $1 cache_size 200000
|
||||
config_get cache_survival_time $1 cache_survival_time 259200
|
||||
config_get enable_pipeline $1 enable_pipeline 0
|
||||
config_get geo_auto_update $1 geo_auto_update 0
|
||||
config_get geo_update_day_time $1 geo_update_day_time 2
|
||||
config_get geo_update_week_time $1 geo_update_week_time "*"
|
||||
config_get listen_port $1 listen_port 5335
|
||||
config_get log_file $1 logfile "/tmp/mosdns.log"
|
||||
config_get log_level $1 log_level "info"
|
||||
config_get maximum_ttl_custom $1 maximum_ttl 0
|
||||
config_get minimal_ttl_custom $1 minimal_ttl 0
|
||||
config_get redirect $1 redirect 0
|
||||
config_get remote_dns $1 remote_dns "tls://8.8.8.8 tls://1.1.1.1"
|
||||
config_get custom_local_dns $1 custom_local_dns 0
|
||||
config_get bootstrap_dns $1 bootstrap_dns "119.29.29.29"
|
||||
}
|
||||
|
||||
init_yaml() {
|
||||
tmpdir=$(mktemp -d) || exit 1
|
||||
adlist=$(/usr/share/mosdns/mosdns.sh ad)
|
||||
[ $enable_pipeline = 1 ] && enable_pipeline=true || enable_pipeline=false
|
||||
local_dns=$(/usr/share/mosdns/mosdns.sh dns | xargs -n1 echo " - addr:")
|
||||
remote_dns=$(echo $remote_dns | awk '{for(i=1;i<=NF;i++)printf "%s- addr: %s\n%s enable_pipeline: '${enable_pipeline}'\n",s,$i,s}' s=' ')
|
||||
sed "s,log_level,$log_level,g;s,log_file,$log_file,g; \
|
||||
s,listen_port,$listen_port,g;s,cache_size,$cache_size,g; \
|
||||
s,cache_survival_time,$cache_survival_time,g; \
|
||||
s,minimal_ttl_custom,$minimal_ttl_custom,g; \
|
||||
s,maximum_ttl_custom,$maximum_ttl_custom,g; \
|
||||
s,adblock,$adlist,g;s,remote_dns_pipeline,$enable_pipeline,g" \
|
||||
/usr/share/mosdns/default.yaml > $CONF
|
||||
[ "$custom_local_dns" -eq 0 ] && sed -i "/bootstrap/d" $CONF || \
|
||||
sed -i "s,bootstrap_dns,$bootstrap_dns,g" $CONF
|
||||
echo "${local_dns}" > $tmpdir/local_dns.txt
|
||||
echo "${remote_dns}" > $tmpdir/remote_dns.txt
|
||||
sed -i -e '/- addr: local_dns/{r '$tmpdir/local_dns.txt -e';d};/- addr: remote_dns/{r '$tmpdir/remote_dns.txt -e';d}' \
|
||||
$CONF
|
||||
rm -rf $tmpdir
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "mosdns"
|
||||
procd_add_reload_trigger "mosdns"
|
||||
}
|
||||
|
||||
restore_setting() {
|
||||
sed -i "/list server/d" /etc/config/dhcp
|
||||
uci set dhcp.@dnsmasq[0].noresolv='0'
|
||||
uci del dhcp.@dnsmasq[0].cachesize
|
||||
uci set dhcp.@dnsmasq[0].filter_aaaa='1'
|
||||
uci del dhcp.@dnsmasq[0].setbymosdns
|
||||
uci commit dhcp
|
||||
rm -f /etc/mosdns/redirect.lock
|
||||
sed -i "/list server/d" /etc/config/dhcp
|
||||
uci set dhcp.@dnsmasq[0].noresolv='0'
|
||||
uci del dhcp.@dnsmasq[0].cachesize
|
||||
uci commit dhcp
|
||||
}
|
||||
|
||||
prepare_setting() {
|
||||
redirect=$(uci -q get mosdns.mosdns.redirect)
|
||||
if [ "$redirect" -eq 1 ]; then
|
||||
sed -i "/list server/d" /etc/config/dhcp
|
||||
uci add_list dhcp.@dnsmasq[0].server="127.0.0.1#$(uci -q get mosdns.mosdns.listen_port)"
|
||||
uci set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci set dhcp.@dnsmasq[0].noresolv="1"
|
||||
uci set dhcp.@dnsmasq[0].cachesize='0'
|
||||
uci set dhcp.@dnsmasq[0].filter_aaaa='0'
|
||||
uci set dhcp.@dnsmasq[0].setbymosdns='1'
|
||||
uci commit dhcp
|
||||
fi
|
||||
redirect_setting() {
|
||||
if [ "${CONF}" = "/etc/mosdns/config.yaml" ]; then
|
||||
sed -i "/list server/d" /etc/config/dhcp
|
||||
uci add_list dhcp.@dnsmasq[0].server="127.0.0.1#$listen_port"
|
||||
uci set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci set dhcp.@dnsmasq[0].noresolv="1"
|
||||
uci set dhcp.@dnsmasq[0].cachesize='0'
|
||||
uci commit dhcp
|
||||
else
|
||||
sed -i "/list server/d" /etc/config/dhcp
|
||||
uci add_list dhcp.@dnsmasq[0].server="127.0.0.1#$(cat /etc/mosdns/config_custom.yaml | awk -F'[:" ]+' '/^\s+addr:/{for(i=1;i<=NF;i++){if($i~/^[0-9]+$/){print $i;exit}}}')"
|
||||
uci set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci set dhcp.@dnsmasq[0].noresolv="1"
|
||||
uci set dhcp.@dnsmasq[0].cachesize='0'
|
||||
uci commit dhcp
|
||||
fi
|
||||
touch /etc/mosdns/redirect.lock
|
||||
}
|
||||
|
||||
restart_others() {
|
||||
/etc/init.d/network reload
|
||||
/etc/init.d/dnsmasq reload
|
||||
reload_others() {
|
||||
/etc/init.d/network reload
|
||||
/etc/init.d/dnsmasq reload
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
sleep 2s
|
||||
echo "MosDNS is restarted!"
|
||||
start
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
setcron() {
|
||||
touch $CRON_FILE
|
||||
sed -i '/mosupdater.sh/d' $CRON_FILE 2> /dev/null
|
||||
[ "$(uci -q get mosdns.mosdns.geo_auto_update)" -eq 1 ] && echo "0 $(uci -q get mosdns.mosdns.geo_update_day_time) * * $(uci -q get mosdns.mosdns.geo_update_week_time) /etc/mosdns/mosupdater.sh" >> $CRON_FILE
|
||||
crontab $CRON_FILE
|
||||
sed -i '/mosdns.sh/d' $CRON_FILE 2>/dev/null
|
||||
[ "$geo_auto_update" -eq 1 ] && echo "0 $geo_update_day_time * * $geo_update_week_time /usr/share/mosdns/mosdns.sh geodata" >>$CRON_FILE
|
||||
crontab $CRON_FILE
|
||||
}
|
||||
|
||||
delcron() {
|
||||
sed -i '/mosupdater.sh/d' $CRON_FILE 2> /dev/null
|
||||
crontab $CRON_FILE
|
||||
}
|
||||
|
||||
adblock() {
|
||||
cp -f /etc/mosdns/rule/serverlist.txt /etc/mosdns/rule/serverlist.bak
|
||||
modns_adblock=$(uci -q get mosdns.mosdns.adblock)
|
||||
if [ "$modns_adblock" = 0 ]; then
|
||||
: > /etc/mosdns/rule/serverlist.txt
|
||||
else
|
||||
cat /etc/mosdns/rule/serverlist.bak > /etc/mosdns/rule/serverlist.txt
|
||||
fi
|
||||
}
|
||||
|
||||
v4config() {
|
||||
rm -rf /etc/mosdns/def_config.yaml
|
||||
cp -rf /etc/mosdns/def_config_orig.yaml /etc/mosdns/def_config.yaml
|
||||
sed -i "s,listenport,$(uci -q get mosdns.mosdns.listen_port),g" /etc/mosdns/def_config.yaml
|
||||
sed -i "s,loglvl,$(uci -q get mosdns.mosdns.loglv),g" /etc/mosdns/def_config.yaml
|
||||
sed -i "s,logfile,$(uci -q get mosdns.mosdns.logfile),g" /etc/mosdns/def_config.yaml
|
||||
sed -i "s,remotedns1,$(uci -q get mosdns.mosdns.remote_dns1),g" /etc/mosdns/def_config.yaml
|
||||
sed -i "s,remotedns2,$(uci -q get mosdns.mosdns.remote_dns2),g" /etc/mosdns/def_config.yaml
|
||||
sed -i "s,localdns1,$(/etc/mosdns/lib.sh dns 0),g" /etc/mosdns/def_config.yaml
|
||||
sed -i "s,localdns2,$(/etc/mosdns/lib.sh dns 1),g" /etc/mosdns/def_config.yaml
|
||||
sed -i '/mosdns.sh/d' $CRON_FILE 2>/dev/null
|
||||
crontab $CRON_FILE
|
||||
}
|
||||
|
||||
start_service() {
|
||||
|
||||
# Reading config
|
||||
inital_conf
|
||||
if [ "$enabled" -eq 0 ]; then
|
||||
firstblood=$(uci -q get mosdns.mosdns.not_first_start)
|
||||
[ "${firstblood}" = "0" ] && restore_setting
|
||||
[ "${firstblood}" = "0" ] && restart_others
|
||||
uci set mosdns.mosdns.not_first_start='1'
|
||||
uci commit mosdns
|
||||
echo "MosDNS has turned off"
|
||||
return 1
|
||||
fi
|
||||
delcron
|
||||
setcron
|
||||
adblock
|
||||
true > "$(/etc/mosdns/lib.sh logfile)"
|
||||
sysctl -w net.core.rmem_max=2500000
|
||||
v4config
|
||||
procd_open_instance mosdns
|
||||
procd_set_param command $PROG start -d $RES_DIR -c "$CONF"
|
||||
procd_set_param user root
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
|
||||
procd_close_instance mosdns
|
||||
|
||||
configfile=$(uci -q get mosdns.mosdns.configfile)
|
||||
if [ "${configfile}" = "./def_config.yaml" ]; then
|
||||
restore_setting
|
||||
prepare_setting
|
||||
if [ "$(uci -q get mosdns.mosdns.redirect)" -eq 1 ] && [ "$(uci -q get shadowsocksr.@global[0].run_mode)" != gfw ]; then
|
||||
true > /etc/ssrplus/gfw_list.conf
|
||||
sed -i '/update.lua/d' /usr/share/shadowsocksr/ssrplusupdate.sh
|
||||
sed -i '/bin\/sh/a\/usr/bin/lua /usr/share/shadowsocksr/update.lua ad_data' /usr/share/shadowsocksr/ssrplusupdate.sh
|
||||
sed -i '/bin\/sh/a\/usr/bin/lua /usr/share/shadowsocksr/update.lua nfip_data' /usr/share/shadowsocksr/ssrplusupdate.sh
|
||||
sed -i '/bin\/sh/a\/usr/bin/lua /usr/share/shadowsocksr/update.lua ip_data' /usr/share/shadowsocksr/ssrplusupdate.sh
|
||||
fi
|
||||
restart_others
|
||||
fi
|
||||
|
||||
echo "MosDNS turn on"
|
||||
echo "enabled=$enabled"
|
||||
|
||||
config_load "mosdns"
|
||||
config_foreach get_config "mosdns"
|
||||
[ $enabled != 1 ] && return 1
|
||||
delcron
|
||||
setcron
|
||||
[ "${CONF}" = "/etc/mosdns/config.yaml" ] && init_yaml
|
||||
:> $(/usr/share/mosdns/mosdns.sh logfile)
|
||||
procd_open_instance mosdns
|
||||
procd_set_param command $PROG start -c "$CONF"
|
||||
procd_set_param user root
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
|
||||
procd_close_instance mosdns
|
||||
[ "$redirect" -ne 1 ] && [ -f "/etc/mosdns/redirect.lock" ] && restore_setting
|
||||
[ "$redirect" -eq 1 ] && redirect_setting
|
||||
reload_others
|
||||
update_list=0
|
||||
[ "$adblock" -eq 1 ] && [ "$ad_source" != "geosite.dat" ] && {
|
||||
[ -s "/etc/mosdns/rule/adlist.txt" ] && [ -f "/etc/mosdns/rule/.ad_source" ] && url_adlist=$(cat /etc/mosdns/rule/.ad_source) || update_list=1
|
||||
[ "$ad_source" != "$url_adlist" ] && update_list=1
|
||||
}
|
||||
[ "$update_list" -eq 1 ] && /usr/share/mosdns/mosdns.sh adlist_update &> /dev/null &
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
|
||||
pgrep -f /usr/bin/mosdns | xargs kill -9
|
||||
echo "MosDNS turn off"
|
||||
echo "enabled=$enabled"
|
||||
|
||||
configfile=$(uci -q get mosdns.mosdns.configfile)
|
||||
if [ "${configfile}" = "./def_config.yaml" ]; then
|
||||
config_load "mosdns"
|
||||
enabled=$(uci -q get mosdns.mosdns.enabled)
|
||||
[ "${enabled}" = "0" ] && [ "$(uci -q get dhcp.@dnsmasq[0].setbymosdns)" -eq 1 ] && restore_setting
|
||||
restart_others
|
||||
fi
|
||||
delcron
|
||||
|
||||
pgrep -f /usr/bin/mosdns | xargs kill -9 >/dev/null 2>&1
|
||||
config_load "mosdns"
|
||||
config_foreach get_config "mosdns"
|
||||
[ "$enabled" = "0" ] && [ -f "/etc/mosdns/redirect.lock" ] && restore_setting
|
||||
reload_others
|
||||
delcron
|
||||
}
|
||||
|
|
|
@ -0,0 +1,162 @@
|
|||
log:
|
||||
level: info
|
||||
file: "/tmp/mosdns.log"
|
||||
|
||||
include: []
|
||||
|
||||
data_providers:
|
||||
- tag: geoip
|
||||
file: "/usr/share/v2ray/geoip.dat"
|
||||
auto_reload: true
|
||||
|
||||
- tag: geosite
|
||||
file: "/usr/share/v2ray/geosite.dat"
|
||||
auto_reload: true
|
||||
|
||||
- tag: whitelist
|
||||
file: "/etc/mosdns/rule/whitelist.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: blocklist
|
||||
file: "/etc/mosdns/rule/blocklist.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: hosts
|
||||
file: "/etc/mosdns/rule/hosts.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: redirect
|
||||
file: "/etc/mosdns/rule/redirect.txt"
|
||||
auto_reload: true
|
||||
|
||||
plugins:
|
||||
- tag: lazy_cache
|
||||
type: cache
|
||||
args:
|
||||
size: 200000
|
||||
lazy_cache_ttl: 259200
|
||||
|
||||
- tag: modify_ttl
|
||||
type: ttl
|
||||
args:
|
||||
minimal_ttl: 0
|
||||
maximum_ttl: 0
|
||||
|
||||
- tag: "forward_local"
|
||||
type: fast_forward
|
||||
args:
|
||||
upstream:
|
||||
- addr: 119.29.29.29
|
||||
- addr: 114.114.114.114
|
||||
|
||||
- tag: "forward_remote"
|
||||
type: fast_forward
|
||||
args:
|
||||
upstream:
|
||||
- addr: tls://8.8.8.8
|
||||
- addr: tls://1.1.1.1
|
||||
|
||||
- tag: query_is_whitelist_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:whitelist"
|
||||
|
||||
- tag: query_is_blocklist_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:blocklist"
|
||||
|
||||
- tag: query_is_hosts_domain
|
||||
type: hosts
|
||||
args:
|
||||
hosts:
|
||||
- "provider:hosts"
|
||||
|
||||
- tag: query_is_redirect_domain
|
||||
type: redirect
|
||||
args:
|
||||
rule:
|
||||
- "provider:redirect"
|
||||
|
||||
- tag: query_is_local_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:geosite:cn"
|
||||
|
||||
- tag: query_is_non_local_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:geosite:geolocation-!cn"
|
||||
|
||||
- tag: response_has_local_ip
|
||||
type: response_matcher
|
||||
args:
|
||||
ip:
|
||||
- "provider:geoip:cn"
|
||||
|
||||
- tag: query_is_ad_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:geosite:category-ads-all"
|
||||
|
||||
- tag: match_qtype65
|
||||
type: query_matcher
|
||||
args:
|
||||
qtype: [65]
|
||||
|
||||
- tag: "main_sequence"
|
||||
type: "sequence"
|
||||
args:
|
||||
exec:
|
||||
- _misc_optm
|
||||
- query_is_hosts_domain
|
||||
- query_is_redirect_domain
|
||||
|
||||
- if: query_is_whitelist_domain
|
||||
exec:
|
||||
- forward_local
|
||||
- modify_ttl
|
||||
- _return
|
||||
|
||||
- if: "query_is_blocklist_domain || query_is_ad_domain || match_qtype65"
|
||||
exec:
|
||||
- _new_nxdomain_response
|
||||
- _return
|
||||
|
||||
- lazy_cache
|
||||
|
||||
- if: query_is_local_domain
|
||||
exec:
|
||||
- forward_local
|
||||
- modify_ttl
|
||||
- _return
|
||||
|
||||
- if: query_is_non_local_domain
|
||||
exec:
|
||||
- _prefer_ipv4
|
||||
- forward_remote
|
||||
- modify_ttl
|
||||
- _return
|
||||
- primary:
|
||||
- forward_local
|
||||
- if: "(! response_has_local_ip) && [_response_valid_answer]"
|
||||
exec:
|
||||
- _drop_response
|
||||
secondary:
|
||||
- _prefer_ipv4
|
||||
- forward_remote
|
||||
- modify_ttl
|
||||
fast_fallback: 200
|
||||
|
||||
servers:
|
||||
- exec: main_sequence
|
||||
listeners:
|
||||
- protocol: udp
|
||||
addr: ":5335"
|
||||
- protocol: tcp
|
||||
addr: ":5335"
|
|
@ -1,31 +0,0 @@
|
|||
# 日志设置
|
||||
log:
|
||||
level: info # 日志级别。可选 "debug" "info" "warn" "error"。默认 "info"。
|
||||
file: "/path/to/log/file" # 记录日志到文件。
|
||||
|
||||
# 数据源设置
|
||||
data_providers:
|
||||
- tag: data1 # 数据源的 tag。由用户自由设定。不能重复。
|
||||
file: "/path/to/data/file" # 文件位置
|
||||
auto_reload: true # 文件有变化时是否自动重载。
|
||||
|
||||
# 插件设置
|
||||
plugins:
|
||||
- tag: tag1 # 插件的 tag。由用户自由设定。不能重复。
|
||||
type: type1 # 插件类型。详见下文。
|
||||
args: # 插件参数。取决于插件类型。详见下文。
|
||||
key1: value1
|
||||
key2: value2
|
||||
|
||||
# 服务器设置
|
||||
servers:
|
||||
- exec: tag1 # 本服务器运行插件的 tag。
|
||||
timeout: 5 # 请求处理超时时间。单位: 秒。默认: 5。
|
||||
listener: # 监听设置
|
||||
- protocol: https # 协议,支持 "udp", "tcp", "tls", "https" 和 "http"
|
||||
addr: ":443" # 监听地址。
|
||||
cert: "/path/to/my/cert" # TLS 所需证书文件。
|
||||
key: "/path/to/my/key" # TLS 所需密钥文件。
|
||||
url_path: "/dns-query" # DoH 路径。
|
||||
get_user_ip_from_header: "X-Forwarded-For" # DoH 尝试从 HTTP 头获取用户 IP。
|
||||
idle_timeout: 10 # 连接复用空连接超时时间。单位: 秒。默认: 10。
|
|
@ -1,206 +0,0 @@
|
|||
log:
|
||||
level: loglvl
|
||||
file: "logfile"
|
||||
|
||||
# api:
|
||||
# http: "127.0.0.1:8080" # 在该地址启动 api 接口。
|
||||
|
||||
plugins:
|
||||
# 加载配置
|
||||
# 国内域名
|
||||
- tag: geosite_cn
|
||||
type: domain_set
|
||||
args:
|
||||
files: # 从文本文件载入
|
||||
- "/etc/mosdns/rule/geosite_cn.txt"
|
||||
|
||||
# 国内ip
|
||||
- tag: geoip_cn
|
||||
type: ip_set
|
||||
args:
|
||||
files: # 从文本文件载入
|
||||
- "/etc/mosdns/rule/geoip_cn.txt"
|
||||
|
||||
# 国外域名
|
||||
- tag: geosite_no_cn
|
||||
type: domain_set
|
||||
args:
|
||||
files: # 从文本文件载入
|
||||
- "/etc/mosdns/rule/geosite_no_cn.txt"
|
||||
|
||||
# 白名单 加入的域名始终允许使用 “本地 DNS” 进行解析
|
||||
- tag: whitelist
|
||||
type: domain_set
|
||||
args:
|
||||
files: # 从文本文件载入
|
||||
- "/etc/mosdns/rule/whitelist.txt"
|
||||
|
||||
# 黑名单 加入的域名将屏蔽 DNS 解析
|
||||
- tag: blocklist
|
||||
type: domain_set
|
||||
args:
|
||||
files: # 从文本文件载入
|
||||
- "/etc/mosdns/rule/blocklist.txt"
|
||||
|
||||
# 自定义 Hosts 重写
|
||||
- tag: hosts
|
||||
type: hosts
|
||||
args:
|
||||
files: # 从文本文件载入
|
||||
- "/etc/mosdns/rule/hosts.txt"
|
||||
|
||||
# 重定向请求的域名
|
||||
- tag: redirect
|
||||
type: redirect
|
||||
args:
|
||||
files:
|
||||
- "/etc/mosdns/rule/redirect.txt"
|
||||
|
||||
# 广告列表
|
||||
- tag: adlist
|
||||
type: domain_set
|
||||
args:
|
||||
files:
|
||||
- "/etc/mosdns/rule/serverlist.txt"
|
||||
|
||||
# 缓存
|
||||
- tag: cache
|
||||
type: cache
|
||||
args:
|
||||
size: 200000
|
||||
lazy_cache_ttl: 259200
|
||||
|
||||
# 转发至本地服务器
|
||||
- tag: forward_local
|
||||
type: forward
|
||||
args:
|
||||
upstreams:
|
||||
- addr: localdns1
|
||||
- addr: localdns2
|
||||
|
||||
# 转发至远程服务器
|
||||
- tag: forward_remote
|
||||
type: forward
|
||||
args:
|
||||
upstreams:
|
||||
- addr: remotedns1
|
||||
enable_pipeline: true
|
||||
- addr: remotedns2
|
||||
enable_pipeline: true
|
||||
|
||||
# 国内解析
|
||||
- tag: local_sequence
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $forward_local
|
||||
|
||||
# 国外解析
|
||||
- tag: remote_sequence
|
||||
type: sequence
|
||||
args:
|
||||
- exec: prefer_ipv4
|
||||
- exec: $forward_remote
|
||||
|
||||
# 有响应终止返回
|
||||
- tag: has_resp_sequence
|
||||
type: sequence
|
||||
args:
|
||||
- matches: has_resp
|
||||
exec: accept
|
||||
|
||||
|
||||
# fallback 用本地服务器 sequence
|
||||
# 返回不包含本地 ip 则 reject
|
||||
- tag: query_is_local_ip
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $local_sequence
|
||||
- matches: resp_ip $geoip_cn
|
||||
exec: accept
|
||||
- exec: reject
|
||||
|
||||
# fallback 用远程服务器 sequence
|
||||
- tag: query_is_remote
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $remote_sequence
|
||||
- exec: accept
|
||||
|
||||
# fallback 用远程服务器 sequence
|
||||
- tag: fallback
|
||||
type: fallback
|
||||
args:
|
||||
primary: query_is_local_ip
|
||||
secondary: query_is_remote
|
||||
threshold: 150
|
||||
always_standby: true
|
||||
|
||||
|
||||
# 查询国内域名
|
||||
- tag: query_is_local_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $geosite_cn
|
||||
exec: $local_sequence
|
||||
|
||||
# 查询国外域名
|
||||
- tag: query_is_no_local_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $geosite_no_cn
|
||||
exec: $remote_sequence
|
||||
|
||||
# 查询白名单
|
||||
- tag: query_is_whitelist_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $whitelist
|
||||
exec: $local_sequence
|
||||
- exec: jump has_resp_sequence
|
||||
|
||||
# 拒绝名单
|
||||
- tag: query_is_reject_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $blocklist
|
||||
exec: reject 3
|
||||
- matches: qname $adlist
|
||||
exec: reject 3
|
||||
- matches:
|
||||
- qtype 12
|
||||
exec: reject 3
|
||||
- matches: qtype 65
|
||||
exec: reject 3
|
||||
|
||||
# 主要的运行逻辑插件
|
||||
# sequence 插件中调用的插件 tag 必须在 sequence 前定义,
|
||||
# 否则 sequence 找不到对应插件。
|
||||
- tag: main_sequence
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $hosts
|
||||
- exec: jump has_resp_sequence
|
||||
- exec: $redirect
|
||||
- exec: jump has_resp_sequence
|
||||
- exec: $query_is_whitelist_domain
|
||||
- exec: $query_is_reject_domain
|
||||
- exec: $cache
|
||||
- exec: jump has_resp_sequence
|
||||
- exec: $query_is_local_domain
|
||||
- exec: jump has_resp_sequence
|
||||
- exec: $query_is_no_local_domain
|
||||
- exec: jump has_resp_sequence
|
||||
- exec: $fallback
|
||||
|
||||
# 启动 udp 服务器。
|
||||
- tag: udp_server
|
||||
type: udp_server
|
||||
args:
|
||||
entry: main_sequence
|
||||
listen: "127.0.0.1:listenport"
|
||||
# 启动 tcp 服务器。
|
||||
- tag: tcp_server
|
||||
type: tcp_server
|
||||
args:
|
||||
entry: main_sequence
|
||||
listen: "127.0.0.1:listenport"
|
|
@ -1,79 +0,0 @@
|
|||
#!/bin/bash
|
||||
# shellcheck disable=SC2034 # Unused variables left for readability
|
||||
LAN_DNS0="119.29.29.29"
|
||||
LAN_DNS1="101.226.4.6"
|
||||
WAN_DNS0="8.8.4.4"
|
||||
WAN_DNS1="8.8.8.8"
|
||||
REPO_URL="https://github.com/QiuSimons/openwrt-mos/raw/master/dat"
|
||||
CDN_URL="https://gh.404delivr.workers.dev"
|
||||
DAT_PREFIX="$CDN_URL/$REPO_URL"
|
||||
|
||||
logfile_path() (
|
||||
configfile=$(uci -q get mosdns.mosdns.configfile)
|
||||
if [ "$configfile" = "./def_config.yaml" ]; then
|
||||
uci -q get mosdns.mosdns.logfile
|
||||
else
|
||||
[ ! -f /etc/mosdns/cus_config.yaml ] && exit 1
|
||||
awk '/^log:/{f=1;next}f==1{if($0~/file:/){print;exit}if($0~/^[^ ]/)exit}' /etc/mosdns/cus_config.yaml | grep -Eo "/[^'\"]+"
|
||||
fi
|
||||
)
|
||||
|
||||
ext() {
|
||||
command -v "$1" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
uci_ext() {
|
||||
if [ "$1" == "ssrp" ]; then
|
||||
uci get shadowsocksr.@global[0].global_server &> /dev/null
|
||||
elif [ "$1" == "pw" ]; then
|
||||
uci get passwall.@global[0].enabled &> /dev/null
|
||||
elif [ "$1" == "pw2" ]; then
|
||||
uci get passwall2.@global[0].enabled &> /dev/null
|
||||
elif [ "$1" == "vssr" ]; then
|
||||
uci get vssr.@global[0].global_server &> /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
bakdns() {
|
||||
if [ "$1" -eq 0 ]; then
|
||||
echo "$LAN_DNS0"
|
||||
elif [ "$1" -eq 1 ]; then
|
||||
echo "$LAN_DNS1"
|
||||
fi
|
||||
}
|
||||
|
||||
getdat() {
|
||||
if ext curl; then
|
||||
curl -fSLo "$TMPDIR/$1" "$DAT_PREFIX/$1"
|
||||
else
|
||||
wget "$DAT_PREFIX/$1" --no-check-certificate -O "$TMPDIR/$1"
|
||||
fi
|
||||
}
|
||||
|
||||
getdns() {
|
||||
if [ "$2" == "inactive" ]; then
|
||||
ubus call network.interface.wan status | jsonfilter -e "@['inactive']['dns-server'][$1]"
|
||||
else
|
||||
ubus call network.interface.wan status | jsonfilter -e "@['dns-server'][$1]"
|
||||
fi
|
||||
}
|
||||
|
||||
pid() {
|
||||
pgrep -f "$1"
|
||||
}
|
||||
|
||||
if [ "$1" == "logfile" ]; then
|
||||
logfile_path
|
||||
elif [[ "$1" == "dns" && "$2" -le 1 ]]; then
|
||||
if [ "$(ifconfig | grep -c wan)" = 0 ]; then
|
||||
bakdns "$2"
|
||||
exit 0
|
||||
fi
|
||||
if [[ "$(getdns 0)" =~ ^127\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
getdns "$2" inactive
|
||||
elif [[ "$(getdns "$2")" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
getdns "$2"
|
||||
else
|
||||
bakdns "$2"
|
||||
fi
|
||||
fi
|
|
@ -1,45 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
# shellcheck source=/dev/null
|
||||
set -o pipefail
|
||||
source /etc/mosdns/lib.sh
|
||||
|
||||
TMPDIR=$(mktemp -d) || exit 1
|
||||
getdat geosite_cn.txt
|
||||
getdat geosite_no_cn.txt
|
||||
getdat geoip_cn.txt
|
||||
if [ "$(grep -o cn "$TMPDIR"/geosite_cn.txt | wc -l)" -lt 100 ]; then
|
||||
rm -rf "$TMPDIR"/geosite_cn.txt
|
||||
fi
|
||||
if [ "$(grep -o google "$TMPDIR"/geosite_no_cn.txt | wc -l)" -eq 0 ]; then
|
||||
rm -rf "$TMPDIR"/geosite_no_cn.txt
|
||||
fi
|
||||
cp -rf "$TMPDIR"/* /etc/mosdns/rule
|
||||
rm -rf "$TMPDIR"
|
||||
|
||||
syncconfig=$(uci -q get mosdns.mosdns.syncconfig)
|
||||
if [ "$syncconfig" -eq 1 ]; then
|
||||
TMPDIR=$(mktemp -d) || exit 2
|
||||
getdat def_config_v5.yaml
|
||||
|
||||
if [ "$(grep -o plugin "$TMPDIR"/def_config_v5.yaml | wc -l)" -eq 0 ]; then
|
||||
rm -rf "$TMPDIR"/def_config_v5.yaml
|
||||
else
|
||||
mv "$TMPDIR"/def_config_v5.yaml "$TMPDIR"/def_config_orig.yaml
|
||||
fi
|
||||
cp -rf "$TMPDIR"/* /etc/mosdns
|
||||
rm -rf "$TMPDIR"
|
||||
fi
|
||||
|
||||
adblock=$(uci -q get mosdns.mosdns.adblock)
|
||||
if [ "$adblock" -eq 1 ]; then
|
||||
TMPDIR=$(mktemp -d) || exit 3
|
||||
getdat serverlist.txt
|
||||
|
||||
if [ "$(grep -o .com "$TMPDIR"/serverlist.txt | wc -l)" -lt 1000 ]; then
|
||||
rm -rf "$TMPDIR"/serverlist.txt
|
||||
fi
|
||||
cp -rf "$TMPDIR"/* /etc/mosdns/rule
|
||||
rm -rf /etc/mosdns/rule/serverlist.bak "$TMPDIR"
|
||||
fi
|
||||
|
||||
exit 0
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
|||
domain:gstatic.com
|
||||
domain:kernel.org
|
||||
keyword:github
|
|
@ -1,10 +1,6 @@
|
|||
# from unbound.conf
|
||||
127.in-addr.arpa
|
||||
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
|
||||
onion
|
||||
test
|
||||
invalid
|
||||
0.in-addr.arpa
|
||||
10.in-addr.arpa
|
||||
127.in-addr.arpa
|
||||
16.172.in-addr.arpa
|
||||
17.172.in-addr.arpa
|
||||
18.172.in-addr.arpa
|
||||
|
@ -21,21 +17,6 @@ invalid
|
|||
29.172.in-addr.arpa
|
||||
30.172.in-addr.arpa
|
||||
31.172.in-addr.arpa
|
||||
168.192.in-addr.arpa
|
||||
0.in-addr.arpa
|
||||
254.169.in-addr.arpa
|
||||
2.0.192.in-addr.arpa
|
||||
100.51.198.in-addr.arpa
|
||||
113.0.203.in-addr.arpa
|
||||
255.255.255.255.in-addr.arpa
|
||||
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
|
||||
d.f.ip6.arpa
|
||||
8.e.f.ip6.arpa
|
||||
9.e.f.ip6.arpa
|
||||
a.e.f.ip6.arpa
|
||||
b.e.f.ip6.arpa
|
||||
8.b.d.0.1.0.0.2.ip6.arpa
|
||||
# 100.64.0.0/10 保留地址
|
||||
64.100.in-addr.arpa
|
||||
65.100.in-addr.arpa
|
||||
66.100.in-addr.arpa
|
||||
|
@ -99,4 +80,8 @@ b.e.f.ip6.arpa
|
|||
124.100.in-addr.arpa
|
||||
125.100.in-addr.arpa
|
||||
126.100.in-addr.arpa
|
||||
127.100.in-addr.arpa
|
||||
127.100.in-addr.arpa
|
||||
2.0.192.in-addr.arpa
|
||||
168.192.in-addr.arpa
|
||||
255.255.255.255.in-addr.arpa
|
||||
domain:ip6.arpa
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,29 +1,24 @@
|
|||
tracking.miui.com
|
||||
tracking.intl.miui.com
|
||||
api.intl.miui.com
|
||||
stat.xiaomi.com
|
||||
checkip.synology.com
|
||||
checkipv6.synology.com
|
||||
checkport.synology.com
|
||||
ddns.synology.com
|
||||
account.synology.com
|
||||
whatismyip.akamai.com
|
||||
checkip.dyndns.org
|
||||
teamviewer.com
|
||||
bing.com
|
||||
api.ipify.org
|
||||
epicgames.com
|
||||
emby.kyarucloud.moe
|
||||
ntp.aliyun.com
|
||||
ntp.tencent.com
|
||||
cn.ntp.org.cn
|
||||
ntp.ntsc.ac.cn
|
||||
keyword:sglong
|
||||
keyword:sgshort
|
||||
keyword:sgminorshort
|
||||
keyword:sgaxshort
|
||||
keyword:sgfindershort
|
||||
keyword:apple
|
||||
domain:bing.com
|
||||
domain:live.com
|
||||
domain:msn.com
|
||||
domain:ntp.org
|
||||
domain:office.com
|
||||
domain:qlogo.cn
|
||||
domain:qq.com
|
||||
domain:redhat.com
|
||||
keyword:aaplimg
|
||||
keyword:itunes
|
||||
keyword:aicdn
|
||||
keyword:akadns
|
||||
keyword:akamai
|
||||
keyword:apple
|
||||
keyword:douyin
|
||||
keyword:fclouddns
|
||||
keyword:icloud
|
||||
keyword:itunes
|
||||
keyword:microsoft
|
||||
keyword:mzstatic
|
||||
keyword:ssrcdn
|
||||
keyword:windows
|
||||
keyword:xxpkg
|
||||
keyword:yximgs
|
||||
keyword:yxygslb
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
#!/bin/bash
|
||||
# shellcheck source=/dev/null
|
||||
source /etc/mosdns/lib.sh
|
||||
|
||||
if uci_ext ssrp; then
|
||||
if [ "$1" = "unset" ]; then
|
||||
uci set shadowsocksr.@global[0].pdnsd_enable='1'
|
||||
uci set shadowsocksr.@global[0].tunnel_forward="$WAN_DNS0:53"
|
||||
elif [ "$1" = "" ]; then
|
||||
if [ "$(uci -q get mosdns.mosdns.listen_port)" -eq 5335 ]; then
|
||||
uci set shadowsocksr.@global[0].pdnsd_enable='0'
|
||||
uci del shadowsocksr.@global[0].tunnel_forward
|
||||
uci del shadowsocksr.@global[0].adblock_url
|
||||
else
|
||||
uci set shadowsocksr.@global[0].pdnsd_enable='1'
|
||||
uci set shadowsocksr.@global[0].tunnel_forward="127.0.0.1:$(uci -q get mosdns.mosdns.listen_port)"
|
||||
fi
|
||||
fi
|
||||
uci commit shadowsocksr
|
||||
if [ "$(pid ssrplus)" ]; then
|
||||
/etc/init.d/shadowsocksr restart
|
||||
fi
|
||||
fi
|
||||
if uci_ext pw; then
|
||||
if [ "$1" = "unset" ]; then
|
||||
uci set passwall.@global[0].dns_mode='dns2tcp'
|
||||
uci set passwall.@global[0].dns_forward="$WAN_DNS1"
|
||||
uci set passwall.@global[0].remote_dns="$WAN_DNS1"
|
||||
uci set passwall.@global[0].dns_cache='1'
|
||||
uci set passwall.@global[0].chinadns_ng='1'
|
||||
elif [ "$1" = "" ]; then
|
||||
uci set passwall.@global[0].dns_mode='udp'
|
||||
uci set passwall.@global[0].dns_forward="127.0.0.1:$(uci -q get mosdns.mosdns.listen_port)"
|
||||
uci set passwall.@global[0].remote_dns="127.0.0.1:$(uci -q get mosdns.mosdns.listen_port)"
|
||||
uci del passwall.@global[0].dns_cache
|
||||
uci del passwall.@global[0].chinadns_ng
|
||||
fi
|
||||
uci commit passwall
|
||||
if [ "$(pid passwall)" ]; then
|
||||
/etc/init.d/passwall restart
|
||||
fi
|
||||
fi
|
||||
|
||||
if uci_ext pw2; then
|
||||
if [ "$1" = "unset" ]; then
|
||||
uci set passwall2.@global[0].direct_dns_protocol='auto'
|
||||
uci del passwall2.@global[0].direct_dns
|
||||
uci set passwall2.@global[0].remote_dns="$WAN_DNS0"
|
||||
uci set passwall2.@global[0].dns_query_strategy='UseIPv4'
|
||||
elif [ "$1" = "" ]; then
|
||||
uci set passwall2.@global[0].direct_dns_protocol='udp'
|
||||
uci set passwall2.@global[0].direct_dns="127.0.0.1:$(uci -q get mosdns.mosdns.listen_port)"
|
||||
uci set passwall2.@global[0].remote_dns_protocol='udp'
|
||||
uci set passwall2.@global[0].remote_dns="127.0.0.1:$(uci -q get mosdns.mosdns.listen_port)"
|
||||
uci set passwall2.@global[0].dns_query_strategy='UseIP'
|
||||
fi
|
||||
uci commit passwall2
|
||||
if [ "$(pid passwall2)" ]; then
|
||||
/etc/init.d/passwall2 restart
|
||||
fi
|
||||
fi
|
||||
|
||||
if uci_ext vssr; then
|
||||
if [ "$1" = "unset" ]; then
|
||||
uci set vssr.@global[0].pdnsd_enable='1'
|
||||
elif [ "$1" = "" ]; then
|
||||
uci set vssr.@global[0].pdnsd_enable='0'
|
||||
fi
|
||||
uci commit vssr
|
||||
if [ "$(pid vssr)" ]; then
|
||||
/etc/init.d/vssr restart
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,193 @@
|
|||
log:
|
||||
level: log_level
|
||||
file: "log_file"
|
||||
|
||||
include: []
|
||||
|
||||
data_providers:
|
||||
- tag: geoip
|
||||
file: "/usr/share/v2ray/geoip.dat"
|
||||
auto_reload: true
|
||||
|
||||
- tag: geosite
|
||||
file: "/usr/share/v2ray/geosite.dat"
|
||||
auto_reload: true
|
||||
|
||||
- tag: whitelist
|
||||
file: "/etc/mosdns/rule/whitelist.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: blocklist
|
||||
file: "/etc/mosdns/rule/blocklist.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: greylist
|
||||
file: "/etc/mosdns/rule/greylist.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: hosts
|
||||
file: "/etc/mosdns/rule/hosts.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: redirect
|
||||
file: "/etc/mosdns/rule/redirect.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: local_ptr
|
||||
file: "/etc/mosdns/rule/local-ptr.txt"
|
||||
auto_reload: true
|
||||
|
||||
- tag: adlist
|
||||
file: "/etc/mosdns/rule/adlist.txt"
|
||||
auto_reload: true
|
||||
|
||||
plugins:
|
||||
- tag: lazy_cache
|
||||
type: cache
|
||||
args:
|
||||
size: cache_size
|
||||
lazy_cache_ttl: cache_survival_time
|
||||
|
||||
- tag: modify_ttl
|
||||
type: ttl
|
||||
args:
|
||||
minimal_ttl: minimal_ttl_custom
|
||||
maximum_ttl: maximum_ttl_custom
|
||||
|
||||
- tag: "forward_local"
|
||||
type: forward
|
||||
args:
|
||||
upstream:
|
||||
- addr: local_dns
|
||||
bootstrap:
|
||||
- "bootstrap_dns"
|
||||
|
||||
- tag: "forward_remote"
|
||||
type: fast_forward
|
||||
args:
|
||||
upstream:
|
||||
- addr: remote_dns
|
||||
|
||||
- tag: query_is_whitelist_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:whitelist"
|
||||
|
||||
- tag: query_is_blocklist_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:blocklist"
|
||||
|
||||
- tag: query_is_greylist_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:greylist"
|
||||
|
||||
- tag: query_is_hosts_domain
|
||||
type: hosts
|
||||
args:
|
||||
hosts:
|
||||
- "provider:hosts"
|
||||
|
||||
- tag: query_is_redirect_domain
|
||||
type: redirect
|
||||
args:
|
||||
rule:
|
||||
- "provider:redirect"
|
||||
|
||||
- tag: query_is_local_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:geosite:cn"
|
||||
|
||||
- tag: query_is_non_local_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "provider:geosite:geolocation-!cn"
|
||||
|
||||
- tag: response_has_local_ip
|
||||
type: response_matcher
|
||||
args:
|
||||
ip:
|
||||
- "provider:geoip:cn"
|
||||
|
||||
- tag: query_is_ad_domain
|
||||
type: query_matcher
|
||||
args:
|
||||
domain:
|
||||
- "adblock"
|
||||
|
||||
- tag: match_local_ptr
|
||||
type: query_matcher
|
||||
args:
|
||||
qtype: [12]
|
||||
domain:
|
||||
- "provider:local_ptr"
|
||||
|
||||
- tag: match_qtype65
|
||||
type: query_matcher
|
||||
args:
|
||||
qtype: [65]
|
||||
|
||||
- tag: "main_sequence"
|
||||
type: "sequence"
|
||||
args:
|
||||
exec:
|
||||
- _misc_optm
|
||||
- query_is_hosts_domain
|
||||
- query_is_redirect_domain
|
||||
|
||||
- if: query_is_whitelist_domain
|
||||
exec:
|
||||
- forward_local
|
||||
- modify_ttl
|
||||
- _return
|
||||
|
||||
- if: "query_is_blocklist_domain || query_is_ad_domain || match_local_ptr || match_qtype65"
|
||||
exec:
|
||||
- _new_nxdomain_response
|
||||
- _return
|
||||
|
||||
- lazy_cache
|
||||
|
||||
- if: query_is_greylist_domain
|
||||
exec:
|
||||
- forward_remote
|
||||
- modify_ttl
|
||||
- _return
|
||||
|
||||
- if: query_is_local_domain
|
||||
exec:
|
||||
- forward_local
|
||||
- modify_ttl
|
||||
- _return
|
||||
|
||||
- if: query_is_non_local_domain
|
||||
exec:
|
||||
- _prefer_ipv4
|
||||
- forward_remote
|
||||
- modify_ttl
|
||||
- _return
|
||||
- primary:
|
||||
- forward_local
|
||||
- if: "(! response_has_local_ip) && [_response_valid_answer]"
|
||||
exec:
|
||||
- _drop_response
|
||||
secondary:
|
||||
- _prefer_ipv4
|
||||
- forward_remote
|
||||
- modify_ttl
|
||||
fast_fallback: 200
|
||||
|
||||
servers:
|
||||
- exec: main_sequence
|
||||
listeners:
|
||||
- protocol: udp
|
||||
addr: ":listen_port"
|
||||
- protocol: tcp
|
||||
addr: ":listen_port"
|
|
@ -0,0 +1,102 @@
|
|||
#!/bin/sh
|
||||
|
||||
script_action=${1}
|
||||
|
||||
logfile_path() (
|
||||
configfile=$(uci -q get mosdns.config.configfile)
|
||||
if [ "$configfile" = "/etc/mosdns/config.yaml" ]; then
|
||||
uci -q get mosdns.config.logfile
|
||||
else
|
||||
[ ! -f /etc/mosdns/config_custom.yaml ] && exit 1
|
||||
awk '/^log:/{f=1;next}f==1{if($0~/file:/){print;exit}if($0~/^[^ ]/)exit}' /etc/mosdns/config_custom.yaml | grep -Eo "/[^'\"]+"
|
||||
fi
|
||||
)
|
||||
|
||||
interface_dns() (
|
||||
if [ "$(uci -q get mosdns.config.custom_local_dns)" -eq 1 ]; then
|
||||
uci -q get mosdns.config.local_dns
|
||||
else
|
||||
peerdns=$(uci -q get network.wan.peerdns)
|
||||
proto=$(uci -q get network.wan.proto)
|
||||
if [ "$peerdns" = 0 ] || [ "$proto" = "static" ]; then
|
||||
uci -q get network.wan.dns
|
||||
else
|
||||
interface_status=$(ubus call network.interface.wan status)
|
||||
echo $interface_status | jsonfilter -e "@['dns-server'][0]"
|
||||
echo $interface_status | jsonfilter -e "@['dns-server'][1]"
|
||||
fi
|
||||
[ $? -ne 0 ] && echo "119.29.29.29"
|
||||
fi
|
||||
)
|
||||
|
||||
ad_block() (
|
||||
adblock=$(uci -q get mosdns.config.adblock)
|
||||
if [ "$adblock" -eq 1 ]; then
|
||||
ad_source=$(uci -q get mosdns.config.ad_source)
|
||||
if [ "$ad_source" = "geosite.dat" ]; then
|
||||
echo "provider:geosite:category-ads-all"
|
||||
else
|
||||
echo "provider:adlist"
|
||||
fi
|
||||
else
|
||||
echo "full:disable-category-ads-all.null"
|
||||
fi
|
||||
)
|
||||
|
||||
adlist_update() (
|
||||
ad_source=$(uci -q get mosdns.config.ad_source)
|
||||
[ "$ad_source" = "geosite.dat" ] || [ -z "$ad_source" ] && exit 0
|
||||
AD_TMPDIR=$(mktemp -d) || exit 1
|
||||
if echo "$ad_source" | grep -Eq "^https://raw.githubusercontent.com" ; then
|
||||
google_status=$(curl -I -4 -m 3 -o /dev/null -s -w %{http_code} http://www.google.com/generate_204)
|
||||
[ "$google_status" -ne "204" ] && mirror="https://ghproxy.com/"
|
||||
fi
|
||||
echo -e "\e[1;32mDownloading $mirror$ad_source\e[0m"
|
||||
curl --connect-timeout 60 -m 90 --ipv4 -fSLo "$AD_TMPDIR/adlist.txt" "$mirror$ad_source"
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf "$AD_TMPDIR"
|
||||
exit 1
|
||||
else
|
||||
\cp "$AD_TMPDIR/adlist.txt" /etc/mosdns/rule/adlist.txt
|
||||
echo "$ad_source" > /etc/mosdns/rule/.ad_source
|
||||
rm -rf "$AD_TMPDIR"
|
||||
fi
|
||||
)
|
||||
|
||||
geodat_update() (
|
||||
geodat_download() (
|
||||
google_status=$(curl -I -4 -m 3 -o /dev/null -s -w %{http_code} http://www.google.com/generate_204)
|
||||
[ "$google_status" -ne "204" ] && mirror="https://ghproxy.com/"
|
||||
echo -e "\e[1;32mDownloading "$mirror"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1\e[0m"
|
||||
curl --connect-timeout 60 -m 900 --ipv4 -fSLo "$TMPDIR/$1" ""$mirror"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1"
|
||||
)
|
||||
TMPDIR=$(mktemp -d) || exit 1
|
||||
geodat_download geoip.dat && geodat_download geosite.dat
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf "$TMPDIR"
|
||||
exit 1
|
||||
fi
|
||||
cp -f "$TMPDIR"/* /usr/share/v2ray
|
||||
rm -rf "$TMPDIR"
|
||||
)
|
||||
|
||||
case $script_action in
|
||||
"dns")
|
||||
interface_dns
|
||||
;;
|
||||
"ad")
|
||||
ad_block
|
||||
;;
|
||||
"geodata")
|
||||
geodat_update && adlist_update
|
||||
;;
|
||||
"logfile")
|
||||
logfile_path
|
||||
;;
|
||||
"adlist_update")
|
||||
adlist_update
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
|
@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for quickstart
|
|||
LUCI_DEPENDS:=+quickstart +luci-app-store
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_VERSION:=0.6.4-2
|
||||
PKG_VERSION:=0.6.5-1
|
||||
# PKG_RELEASE MUST be empty for luci.mk
|
||||
PKG_RELEASE:=
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,6 @@
|
|||
# LuCI Theme Ifit Freedom
|
||||
# LuCI Theme Infinity Freedom
|
||||
#
|
||||
#
|
||||
# Licensed under the Apache License v2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
|
@ -8,7 +10,8 @@ THEME_NAME:=ifit
|
|||
THEME_TITLE:=ifit
|
||||
|
||||
PKG_NAME:=luci-theme-$(THEME_NAME)
|
||||
PKG_VERSION:=1.6
|
||||
PKG_VERSION:=1.5.2
|
||||
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -18,7 +21,7 @@ define Package/luci-theme-$(THEME_NAME)
|
|||
CATEGORY:=LuCI
|
||||
SUBMENU:=4. Themes
|
||||
DEPENDS:=+libc
|
||||
TITLE:=Ifit by kenzo
|
||||
TITLE:=Ifit Theme
|
||||
URL:=https://github.com/kenzok8/luci-theme-ifit
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/**
|
||||
* InfinityFreedom is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
* ifit is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
*
|
||||
* luci-theme-ifit
|
||||
* Copyright 2020-2023 Richard Yu <xiaoqingfengatgm@gmail.com>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/kenzok8/luci-theme-ifit/issues
|
||||
|
@ -1763,6 +1764,15 @@ small {
|
|||
background-color: #9876AA;
|
||||
}
|
||||
|
||||
.cbi-button-selectAll,
|
||||
.cbi-button-test {
|
||||
display: inline-block;
|
||||
min-width: 0;
|
||||
padding: 0.2rem 0.3rem;
|
||||
font-size: 10pt;
|
||||
background-color: #9876AA;
|
||||
}
|
||||
|
||||
.cbi-optionals {
|
||||
padding: 1rem 1rem 0 1rem;
|
||||
border-top: 1px solid #CCC;
|
||||
|
@ -2209,6 +2219,7 @@ div#cbi-passwall.cbi-map fieldset > fieldset > div#add_link_div
|
|||
position: fixed;
|
||||
width: 55rem;
|
||||
height: 20rem;
|
||||
background-color: rgba(7,34,62,.95);
|
||||
}
|
||||
|
||||
#add_link_div > div:nth-child(1) > label
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/**
|
||||
* InfinityFreedom is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
* ifit is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
*
|
||||
* luci-theme-ifit
|
||||
*
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/kenzok8/luci-theme-ifit/issues
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<%#
|
||||
|
||||
InfinityFreedom is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
ifit is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
|
||||
luci-theme-ifit
|
||||
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/kenzok8/luci-theme-ifit/issues
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<%#
|
||||
|
||||
InfinityFreedom is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
ifit is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
|
||||
luci-theme-ifit
|
||||
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/kenzok8/luci-theme-ifit/issues
|
||||
|
|
|
@ -5,86 +5,41 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mosdns
|
||||
PKG_VERSION:=5.0.1
|
||||
PKG_VERSION:=4.5.3
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=mosdns-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/IrineSistiana/mosdns/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=036007a5e38f1853203c038f34c966a8cc3cb05d06624e73c4bf705938989b56
|
||||
PKG_HASH:=2a13b1b1d862731cf946a8ceaa99523a0eb0eaae56045dd31207b61a5a6d47ae
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_MOSDNS_COMPRESS_GOPROXY \
|
||||
CONFIG_MOSDNS_COMPRESS_UPX
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host upx/host
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/IrineSistiana/mosdns
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
|
||||
GO_PKG_LDFLAGS_X:=main.version=v$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/mosdns/Default
|
||||
define Package/mosdns
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=IP Addresses and Names
|
||||
TITLE:=A plug-in DNS forwarder/splitter
|
||||
URL:=https://github.com/IrineSistiana/mosdns
|
||||
endef
|
||||
|
||||
define Package/mosdns
|
||||
$(call Package/mosdns/Default)
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/mosdns-v5
|
||||
$(call Package/mosdns/Default)
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/mosdns/config
|
||||
config MOSDNS_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config MOSDNS_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_MOSDNS_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
endef
|
||||
|
||||
GO_PKG_TARGET_VARS:=$(filter-out CGO_ENABLED=%,$(GO_PKG_TARGET_VARS)) CGO_ENABLED=0
|
||||
|
||||
define Build/Compile
|
||||
$(call GoPackage/Build/Compile)
|
||||
ifneq ($(CONFIG_MOSDNS_COMPRESS_UPX),)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/mosdns
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/mosdns/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
endef
|
||||
|
||||
define Package/mosdns-v5/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,mosdns))
|
||||
$(eval $(call BuildPackage,mosdns))
|
||||
$(eval $(call BuildPackage,mosdns-v5))
|
||||
|
|
|
@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
|
|||
PKG_ARCH_quickstart:=$(ARCH)
|
||||
|
||||
PKG_NAME:=quickstart
|
||||
PKG_VERSION:=0.6.4
|
||||
PKG_VERSION:=0.6.5
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://fw.koolcenter.com/binary/quickstart/
|
||||
PKG_HASH:=6c33f4878865f1e33a724677e9c03a9884991f8a2edd55133121ee3371ab95f5
|
||||
PKG_HASH:=84dd3e0703ac600ddea398f8ca574088a48b2ef313d99cfc2cd9c9606c0fbb66
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)
|
||||
|
||||
|
|
Loading…
Reference in New Issue