diff --git a/web/public/js/components.js b/web/public/js/components.js index 74c6beda..16da0270 100644 --- a/web/public/js/components.js +++ b/web/public/js/components.js @@ -1015,6 +1015,14 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio `}),Vue.component("plan-user-selector",{props:["v-user-id"],data:function(){return{}},methods:{change:function(e){this.$emit("change",e)}},template:`
+
`}),Vue.component("plan-limit-view",{props:["value","v-single-mode"],data:function(){var e=this.value;let t=!1;return this.vSingleMode||(null!=e.trafficLimit&&e.trafficLimit.isOn&&(null!=e.trafficLimit.dailySize&&0 +
+
+ 日流量限制:{{config.trafficLimit.dailySize.count}}{{config.trafficLimit.dailySize.unit.toUpperCase()}}
+ 月流量限制:{{config.trafficLimit.monthlySize.count}}{{config.trafficLimit.monthlySize.unit.toUpperCase()}}
+
+
单日请求数限制:{{formatNumber(config.dailyRequests)}}
+
单月请求数限制:{{formatNumber(config.monthlyRequests)}}
`}),Vue.component("plan-price-view",{props:["v-plan"],data:function(){return{plan:this.vPlan}},template:`
按时间周期计费 @@ -1065,6 +1073,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
+

如果为0表示免费。

@@ -1074,6 +1083,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio +

如果为0表示免费。

@@ -1083,6 +1093,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio +

如果为0表示免费。

@@ -1653,20 +1664,6 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
{{action.name}} ({{action.code.toUpperCase()}})
-`}),Vue.component("http-request-scripts-config-box",{props:["vRequestScriptsConfig","v-is-location"],data:function(){let e=this.vRequestScriptsConfig;return{config:e=null==e?{}:e}},methods:{changeInitGroup:function(e){this.config.initGroup=e,this.$forceUpdate()},changeRequestGroup:function(e){this.config.requestGroup=e,this.$forceUpdate()}},template:`
- -
-

请求初始化

-

在请求刚初始化时调用,此时自定义Header等尚未生效。

-
- -
-

准备发送请求

-

在准备执行请求或者转发请求之前调用,此时自定义Header、源站等已准备好。

-
- -
-
`}),Vue.component("http-firewall-rule-label",{props:["v-rule"],data:function(){return{rule:this.vRule}},methods:{showErr:function(e){teaweb.popupTip('规则校验错误,请修正:'+teaweb.encodeHTML(e)+"")},operatorName:function(t){var i=t;return null!=typeof window.WAF_RULE_OPERATORS&&window.WAF_RULE_OPERATORS.forEach(function(e){e.code==t&&(i=e.name)}),i},isEmptyString:function(e){return"string"==typeof e&&0==e.length}},template:`
{{rule.name}}[{{rule.param}}] @@ -1973,7 +1970,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
-

选中后,当响应的Header中有Set-Cookie时不缓存响应内容。

+

选中后,当响应的报头中有Set-Cookie时不缓存响应内容,防止动态内容被缓存。

@@ -1983,7 +1980,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
-

选中后,当请求的Header中含有Pragma: no-cache或Cache-Control: no-cache时,会跳过缓存直接读取源内容。

+

选中后,当请求的报头中含有Pragma: no-cache或Cache-Control: no-cache时,会跳过缓存直接读取源内容,一般仅用于调试。

@@ -3021,11 +3018,15 @@ example2.com
`}),Vue.component("http-firewall-actions-box",{props:["v-actions","v-firewall-policy","v-action-configs","v-group-type"],mounted:function(){let o=this;Tea.action("/servers/iplists/levelOptions").success(function(e){o.ipListLevels=e.data.levels}).post(),this.loadJS(function(){let s=document.getElementById("actions-box");Sortable.create(s,{draggable:".label",handle:".icon.handle",onStart:function(){o.cancel()},onUpdate:function(e){let t=s.getElementsByClassName("label"),i=[];for(let e=0;e - + 403 Forbidden +

403 Forbidden

-
Request ID: \${requestId}.
+
Connection: \${remoteAddr} (Client) -> \${serverAddr} (Server)
+
Request ID: \${requestId}
`;return{id:t,actions:this.vActions,configs:e,isAdding:!1,editingIndex:-1,action:null,actionCode:"",actionOptions:{},ipListLevels:[],blockTimeout:"",blockTimeoutMax:"",blockScope:"global",captchaLife:"",captchaMaxFails:"",captchaFailBlockTimeout:"",get302Life:"",post307Life:"",recordIPType:"black",recordIPLevel:"critical",recordIPTimeout:"",recordIPListId:0,recordIPListName:"",tagTags:[],pageStatus:403,pageBody:i,defaultPageBody:i,redirectStatus:307,redirectURL:"",goGroupName:"",goGroupId:0,goGroup:null,goSetId:0,goSetName:"",jsCookieLife:"",jsCookieMaxFails:"",jsCookieFailBlockTimeout:"",statusOptions:[{code:301,text:"Moved Permanently"},{code:308,text:"Permanent Redirect"},{code:302,text:"Found"},{code:303,text:"See Other"},{code:307,text:"Temporary Redirect"}]}},watch:{actionCode:function(i){this.action=this.actions.$find(function(e,t){return t.code==i}),this.actionOptions={}},blockTimeout:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.timeout=0:this.actionOptions.timeout=e},blockTimeoutMax:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.timeoutMax=0:this.actionOptions.timeoutMax=e},blockScope:function(e){this.actionOptions.scope=e},captchaLife:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.life=0:this.actionOptions.life=e},captchaMaxFails:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.maxFails=0:this.actionOptions.maxFails=e},captchaFailBlockTimeout:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.failBlockTimeout=0:this.actionOptions.failBlockTimeout=e},get302Life:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.life=0:this.actionOptions.life=e},post307Life:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.life=0:this.actionOptions.life=e},recordIPType:function(e){this.recordIPListId=0},recordIPTimeout:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.timeout=0:this.actionOptions.timeout=e},goGroupId:function(i){let e=this.vFirewallPolicy.inbound.groups.$find(function(e,t){return t.id==i});null==(this.goGroup=e)?null==(e=this.vFirewallPolicy.outbound.groups.$find(function(e,t){return t.id==i}))?this.goGroupName="":(this.goGroup=e,this.goGroupName=e.name):this.goGroupName=e.name,this.goSetId=0,this.goSetName=""},goSetId:function(i){var e;null!=this.goGroup&&(null==(e=this.goGroup.sets.$find(function(e,t){return t.id==i}))?(this.goSetId=0,this.goSetName=""):this.goSetName=e.name)},jsCookieLife:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.life=0:this.actionOptions.life=e},jsCookieMaxFails:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.maxFails=0:this.actionOptions.maxFails=e},jsCookieFailBlockTimeout:function(e){e=parseInt(e),isNaN(e)?this.actionOptions.failBlockTimeout=0:this.actionOptions.failBlockTimeout=e}},methods:{add:function(){this.action=null,this.actionCode="block",this.isAdding=!0,this.actionOptions={},this.blockTimeout="",this.blockTimeoutMax="",this.blockScope="global",this.captchaLife="",this.captchaMaxFails="",this.captchaFailBlockTimeout="",this.jsCookieLife="",this.jsCookieMaxFails="",this.jsCookieFailBlockTimeout="",this.get302Life="",this.post307Life="",this.recordIPLevel="critical",this.recordIPType="black",this.recordIPTimeout="",this.recordIPListId=0,this.recordIPListName="",this.tagTags=[],this.pageStatus=403,this.pageBody=this.defaultPageBody,this.redirectStatus=307,this.redirectURL="",this.goGroupName="",this.goGroupId=0,this.goGroup=null,this.goSetId=0,this.goSetName="";let i=this;this.action=this.vActions.$find(function(e,t){return t.code==i.actionCode}),this.scroll()},remove:function(e){this.isAdding=!1,this.editingIndex=-1,this.configs.$remove(e)},update:function(e,i){if(this.isAdding&&this.editingIndex==e)this.cancel();else{switch(this.add(),this.isAdding=!0,this.editingIndex=e,this.actionCode=i.code,i.code){case"block":this.blockTimeout="",this.blockTimeoutMax="",(null!=i.options.timeout||0 @@ -3586,17 +3587,21 @@ example2.com [选择已有策略]     [创建新策略] `}),Vue.component("http-pages-and-shutdown-box",{props:["v-pages","v-shutdown-config","v-is-location"],data:function(){let e=[],t=(null!=this.vPages&&(e=this.vPages),{isPrior:!1,isOn:!1,bodyType:"html",url:"",body:"",status:0}),i=(null!=this.vShutdownConfig&&(null==this.vShutdownConfig.body&&(this.vShutdownConfig.body=""),null==this.vShutdownConfig.bodyType&&(this.vShutdownConfig.bodyType="html"),t=this.vShutdownConfig),"");return 0 - + 升级中 +

网站升级中

为了给您提供更好的服务,我们正在升级网站,请稍后重新访问。

-
Request ID: \${requestId}.
+
Connection: \${remoteAddr} (Client) -> \${serverAddr} (Server)
+
Request ID: \${requestId}
`}},template:`
@@ -4000,7 +4005,7 @@ example2.com - 耗时:{{formatCost(accessLog.requestTime)}} ms   ({{accessLog.humanTime}})  
-`});var punycode=new function(){this.utf16={decode:function(e){for(var t,i,n=[],s=0,o=e.length;s>>10&1023|55296)),t=56320|1023&t),i.push(String.fromCharCode(t))}return i.join("")}};var b=2147483647;function y(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,i){var n;for(e=i?Math.floor(e/700):e>>1,e+=Math.floor(e/t),n=0;455= 0x80");d.push(e.charCodeAt(n))}for(s=0Math.floor((b-v)/a))throw RangeError("punycode_overflow(1)");if(v+=c*a,c<(c=l<=m?1:m+26<=l?26:l-m))break;if(a>Math.floor(b/(36-c)))throw RangeError("punycode_overflow(2)");a*=36-c}if(m=x(v-o,i=d.length+1,0===o),Math.floor(v/i)>b-h)throw RangeError("punycode_overflow(3)");h+=Math.floor(v/i),v%=i,t&&p.splice(v,0,e.charCodeAt(s-1)-65<26),d.splice(v,0,h),v++}if(t)for(v=0,r=d.length;vMath.floor((b-m)/(i+1)))throw RangeError("punycode_overflow (1)");for(m+=(s-v)*(i+1),v=s,g=0;gb)return Error("punycode_overflow(2)");if(r==v){for(o=m,a=36;!(o<(l=a<=f?1:f+26<=a?26:a-f));a+=36)h.push(String.fromCharCode(y(l+(o-l)%(36-l),0))),o=Math.floor((o-l)/(36-l));h.push(String.fromCharCode(y(o,t&&c[g]?1:0))),f=x(m,i+1,i==n),m=0,++i}}++m,++v}return h.join("")},this.ToASCII=function(e){for(var t=e.split("."),i=[],n=0;n +`});var punycode=new function(){this.utf16={decode:function(e){for(var t,i,n=[],s=0,o=e.length;s>>10&1023|55296)),t=56320|1023&t),i.push(String.fromCharCode(t))}return i.join("")}};var b=2147483647;function y(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,i){var n;for(e=i?Math.floor(e/700):e>>1,e+=Math.floor(e/t),n=0;455= 0x80");d.push(e.charCodeAt(n))}for(s=0Math.floor((b-m)/a))throw RangeError("punycode_overflow(1)");if(m+=c*a,c<(c=l<=v?1:v+26<=l?26:l-v))break;if(a>Math.floor(b/(36-c)))throw RangeError("punycode_overflow(2)");a*=36-c}if(v=x(m-o,i=d.length+1,0===o),Math.floor(m/i)>b-h)throw RangeError("punycode_overflow(3)");h+=Math.floor(m/i),m%=i,t&&p.splice(m,0,e.charCodeAt(s-1)-65<26),d.splice(m,0,h),m++}if(t)for(m=0,r=d.length;mMath.floor((b-v)/(i+1)))throw RangeError("punycode_overflow (1)");for(v+=(s-m)*(i+1),m=s,g=0;gb)return Error("punycode_overflow(2)");if(r==m){for(o=v,a=36;!(o<(l=a<=f?1:f+26<=a?26:a-f));a+=36)h.push(String.fromCharCode(y(l+(o-l)%(36-l),0))),o=Math.floor((o-l)/(36-l));h.push(String.fromCharCode(y(o,t&&c[g]?1:0))),f=x(v,i+1,i==n),v=0,++i}}++v,++m}return h.join("")},this.ToASCII=function(e){for(var t=e.split("."),i=[],n=0;n 默认设置
状态码:{{options.statusCode}} / 提示内容:[{{options.body.length}}字符][无] / 超时时间:{{options.timeout}}秒 / 最大封禁时长:{{options.timeoutMax}}秒 @@ -4094,12 +4099,6 @@ example2.com
-`}),Vue.component("traffic-limit-view",{props:["v-traffic-limit"],data:function(){return{config:this.vTrafficLimit}},template:`
-
- 日流量限制:{{config.dailySize.count}}{{config.dailySize.unit.toUpperCase()}}
- 月流量限制:{{config.monthlySize.count}}{{config.monthlySize.unit.toUpperCase()}}
-
- 没有限制。
`}),Vue.component("http-auth-basic-auth-user-box",{props:["v-users"],data:function(){let e=this.vUsers;return{users:e=null==e?[]:e,isAdding:!1,updatingIndex:-1,username:"",password:""}},methods:{add:function(){this.isAdding=!0,this.username="",this.password="";let e=this;setTimeout(function(){e.$refs.username.focus()},100)},cancel:function(){this.isAdding=!1,this.updatingIndex=-1},confirm:function(){let e=this;0==this.username.length?teaweb.warn("请输入用户名",function(){e.$refs.username.focus()}):0==this.password.length?teaweb.warn("请输入密码",function(){e.$refs.password.focus()}):(this.updatingIndex<0?this.users.push({username:this.username,password:this.password}):(this.users[this.updatingIndex].username=this.username,this.users[this.updatingIndex].password=this.password),this.cancel())},update:function(e,t){this.updatingIndex=e,this.isAdding=!0,this.username=t.username,this.password=t.password;let i=this;setTimeout(function(){i.$refs.username.focus()},100)},remove:function(e){this.users.$remove(e)}},template:`
@@ -4276,7 +4275,7 @@ example2.com
`}),Vue.component("http-firewall-captcha-options-viewer",{props:["v-captcha-options"],mounted:function(){this.updateSummary()},data:function(){let e=this.vCaptchaOptions;return{options:e=null==e?{life:0,maxFails:0,failBlockTimeout:0,failBlockScopeAll:!1,uiIsOn:!1,uiTitle:"",uiPrompt:"",uiButtonTitle:"",uiShowRequestId:!1,uiCss:"",uiFooter:"",uiBody:"",cookieId:"",lang:""}:e,summary:""}},methods:{updateSummary:function(){let e=[];0{{summary}} -`}),Vue.component("reverse-proxy-box",{props:["v-reverse-proxy-ref","v-reverse-proxy-config","v-is-location","v-is-group","v-family"],data:function(){let e=this.vReverseProxyRef,t=(null==e&&(e={isPrior:!1,isOn:!1,reverseProxyId:0}),this.vReverseProxyConfig),i=(null==(t=null==t?{requestPath:"",stripPrefix:"",requestURI:"",requestHost:"",requestHostType:0,requestHostExcludingPort:!1,addHeaders:[],connTimeout:{count:0,unit:"second"},readTimeout:{count:0,unit:"second"},idleTimeout:{count:0,unit:"second"},maxConns:0,maxIdleConns:0,followRedirects:!1}:t).addHeaders&&(t.addHeaders=[]),null==t.connTimeout&&(t.connTimeout={count:0,unit:"second"}),null==t.readTimeout&&(t.readTimeout={count:0,unit:"second"}),null==t.idleTimeout&&(t.idleTimeout={count:0,unit:"second"}),null==t.proxyProtocol&&Vue.set(t,"proxyProtocol",{isOn:!1,version:1}),[{name:"X-Real-IP",isChecked:!1},{name:"X-Forwarded-For",isChecked:!1},{name:"X-Forwarded-By",isChecked:!1},{name:"X-Forwarded-Host",isChecked:!1},{name:"X-Forwarded-Proto",isChecked:!1}]);return i.forEach(function(e){e.isChecked=t.addHeaders.$contains(e.name)}),{reverseProxyRef:e,reverseProxyConfig:t,advancedVisible:!1,family:this.vFamily,forwardHeaders:i}},watch:{"reverseProxyConfig.requestHostType":function(e){let t=parseInt(e);isNaN(t)&&(t=0),this.reverseProxyConfig.requestHostType=t},"reverseProxyConfig.connTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.connTimeout.count=t},"reverseProxyConfig.readTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.readTimeout.count=t},"reverseProxyConfig.idleTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.idleTimeout.count=t},"reverseProxyConfig.maxConns":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.maxConns=t},"reverseProxyConfig.maxIdleConns":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.maxIdleConns=t},"reverseProxyConfig.proxyProtocol.version":function(e){let t=parseInt(e);isNaN(t)&&(t=1),this.reverseProxyConfig.proxyProtocol.version=t}},methods:{isOn:function(){return(!this.vIsLocation&&!this.vIsGroup||this.reverseProxyRef.isPrior)&&this.reverseProxyRef.isOn},changeAdvancedVisible:function(e){this.advancedVisible=e},changeAddHeader:function(){this.reverseProxyConfig.addHeaders=this.forwardHeaders.filter(function(e){return e.isChecked}).map(function(e){return e.name})}},template:`
+`}),Vue.component("reverse-proxy-box",{props:["v-reverse-proxy-ref","v-reverse-proxy-config","v-is-location","v-is-group","v-family"],data:function(){let e=this.vReverseProxyRef,t=(null==e&&(e={isPrior:!1,isOn:!1,reverseProxyId:0}),this.vReverseProxyConfig),i=(null==(t=null==t?{requestPath:"",stripPrefix:"",requestURI:"",requestHost:"",requestHostType:0,requestHostExcludingPort:!1,addHeaders:[],connTimeout:{count:0,unit:"second"},readTimeout:{count:0,unit:"second"},idleTimeout:{count:0,unit:"second"},maxConns:0,maxIdleConns:0,followRedirects:!1,retry50X:!0}:t).addHeaders&&(t.addHeaders=[]),null==t.connTimeout&&(t.connTimeout={count:0,unit:"second"}),null==t.readTimeout&&(t.readTimeout={count:0,unit:"second"}),null==t.idleTimeout&&(t.idleTimeout={count:0,unit:"second"}),null==t.proxyProtocol&&Vue.set(t,"proxyProtocol",{isOn:!1,version:1}),[{name:"X-Real-IP",isChecked:!1},{name:"X-Forwarded-For",isChecked:!1},{name:"X-Forwarded-By",isChecked:!1},{name:"X-Forwarded-Host",isChecked:!1},{name:"X-Forwarded-Proto",isChecked:!1}]);return i.forEach(function(e){e.isChecked=t.addHeaders.$contains(e.name)}),{reverseProxyRef:e,reverseProxyConfig:t,advancedVisible:!1,family:this.vFamily,forwardHeaders:i}},watch:{"reverseProxyConfig.requestHostType":function(e){let t=parseInt(e);isNaN(t)&&(t=0),this.reverseProxyConfig.requestHostType=t},"reverseProxyConfig.connTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.connTimeout.count=t},"reverseProxyConfig.readTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.readTimeout.count=t},"reverseProxyConfig.idleTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.idleTimeout.count=t},"reverseProxyConfig.maxConns":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.maxConns=t},"reverseProxyConfig.maxIdleConns":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.maxIdleConns=t},"reverseProxyConfig.proxyProtocol.version":function(e){let t=parseInt(e);isNaN(t)&&(t=1),this.reverseProxyConfig.proxyProtocol.version=t}},methods:{isOn:function(){return(!this.vIsLocation&&!this.vIsGroup||this.reverseProxyRef.isPrior)&&this.reverseProxyRef.isOn},changeAdvancedVisible:function(e){this.advancedVisible=e},changeAddHeader:function(){this.reverseProxyConfig.addHeaders=this.forwardHeaders.filter(function(e){return e.isChecked}).map(function(e){return e.name})}},template:`
@@ -4289,6 +4288,7 @@ example2.com +

选中后,所有源站设置才会生效。

@@ -4300,7 +4300,7 @@ example2.com
-

请求源站时的Host,用于修改源站接收到的域名 +

请求源站时的主机名(Host),用于修改源站接收到的域名 ,"跟随CDN域名"是指源站接收到的域名和当前CDN访问域名保持一致 ,"跟随源站"是指源站接收到的域名仍然是填写的源站地址中的信息,不随代理服务域名改变而改变 ,自定义Host内容中支持请求变量

@@ -4323,7 +4323,7 @@ example2.com - + @@ -4422,6 +4422,13 @@ example2.com

源站保持等待的空闲超时时间,0表示使用默认时间。

+ + + + @@ -5545,10 +5574,13 @@ example2.com {{item.ipFrom}}  New   - {{item.ipTo}}* +
{{item.region}} | {{item.isp}}
+
{{item.isp}}
+
添加于 {{item.createdTime}} @@ -6034,7 +6066,7 @@ example2.com
-
`}),Vue.component("digit-input",{props:["value","maxlength","size","min","max","required","placeholder"],mounted:function(){let e=this;setTimeout(function(){e.check()})},data:function(){let e=this.maxlength,t=(null==e&&(e=20),this.size);return null==t&&(t=6),{realValue:this.value,realMaxLength:e,realSize:t,isValid:!0}},watch:{realValue:function(e){this.notifyChange()}},methods:{notifyChange:function(){let e=parseInt(this.realValue.toString(),10);isNaN(e)&&(e=0),this.check(),this.$emit("input",e)},check:function(){var e;null!=this.realValue&&(e=this.realValue.toString(),/^\d+$/.test(e)?(e=parseInt(e,10),isNaN(e)?this.isValid=!1:this.required?this.isValid=(null==this.min||this.min<=e)&&(null==this.max||this.max>=e):this.isValid=0==e||(null==this.min||this.min<=e)&&(null==this.max||this.max>=e)):this.isValid=!1)}},template:''}),Vue.component("keyword",{props:["v-word"],data:function(){let e=this.vWord;e=null==e?"":(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/\)/g,"\\)")).replace(/\(/g,"\\(")).replace(/\+/g,"\\+")).replace(/\^/g,"\\^")).replace(/\$/g,"\\$")).replace(/\?/g,"\\?")).replace(/\*/g,"\\*")).replace(/\[/g,"\\[")).replace(/{/g,"\\{")).replace(/\./g,"\\.");let t=this.$slots.default[0].text;if(0",t="$TMP__KEY__"+s.toString()+"$";return n.push([t,e]),t}),t=this.encodeHTML(t),n.forEach(function(e){t=t.replace(e[0],e[1])})}else t=this.encodeHTML(t);return{word:e,text:t}},methods:{encodeHTML:function(e){return e=(e=(e=(e=e.replace(/&/g,"&")).replace(//g,">")).replace(/"/g,""")}},template:''}),Vue.component("bits-var",{props:["v-bits"],data:function(){let e=this.vBits;return"number"!=typeof e&&(e=0),{format:teaweb.splitFormat(teaweb.formatBits(e))}},template:` +`}),Vue.component("digit-input",{props:["value","maxlength","size","min","max","required","placeholder"],mounted:function(){let e=this;setTimeout(function(){e.check()})},data:function(){let e=this.maxlength,t=(null==e&&(e=20),this.size);return null==t&&(t=6),{realValue:this.value,realMaxLength:e,realSize:t,isValid:!0}},watch:{realValue:function(e){this.notifyChange()}},methods:{notifyChange:function(){let e=parseInt(this.realValue.toString(),10);isNaN(e)&&(e=0),this.check(),this.$emit("input",e)},check:function(){var e;null!=this.realValue&&(e=this.realValue.toString(),/^\d+$/.test(e)?(e=parseInt(e,10),isNaN(e)?this.isValid=!1:this.required?this.isValid=(null==this.min||this.min<=e)&&(null==this.max||this.max>=e):this.isValid=0==e||(null==this.min||this.min<=e)&&(null==this.max||this.max>=e)):this.isValid=!1)}},template:''}),Vue.component("keyword",{props:["v-word"],data:function(){let e=this.vWord;e=null==e?"":(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/\)/g,"\\)")).replace(/\(/g,"\\(")).replace(/\+/g,"\\+")).replace(/\^/g,"\\^")).replace(/\$/g,"\\$")).replace(/\?/g,"\\?")).replace(/\*/g,"\\*")).replace(/\[/g,"\\[")).replace(/{/g,"\\{")).replace(/\./g,"\\.");let t=this.$slots.default[0].text;if(0",t="$TMP__KEY__"+s.toString()+"$";return n.push([t,e]),t}),t=this.encodeHTML(t),n.forEach(function(e){t=t.replace(e[0],e[1])})}else t=this.encodeHTML(t);return{word:e,text:t}},methods:{encodeHTML:function(e){return e=(e=(e=(e=e.replace(/&/g,"&")).replace(//g,">")).replace(/"/g,""")}},template:''}),Vue.component("bits-var",{props:["v-bits"],data:function(){let e=this.vBits;return"number"!=typeof e&&(e=0),{format:teaweb.splitFormat(teaweb.formatBits(e))}},template:` {{format[0]}}{{format[1]}} `}),Vue.component("bytes-var",{props:["v-bytes"],data:function(){let e=this.vBytes;return"number"!=typeof e&&(e=0),{format:teaweb.splitFormat(teaweb.formatBytes(e))}},template:` {{format[0]}}{{format[1]}} @@ -6571,7 +6603,7 @@ example2.com    -`}),Vue.component("dns-route-selector",{props:["v-all-routes","v-routes"],data:function(){let e=this.vRoutes;return(e=null==e?[]:e).$sort(function(e,t){return e.domainId==t.domainId?e.code +`}),Vue.component("dns-route-selector",{props:["v-all-routes","v-routes"],data:function(){let e=this.vRoutes;return(e=null==e?[]:e).$sort(function(e,t){return e.domainId==t.domainId?e.code
@@ -6585,16 +6617,22 @@ example2.com
- +
自动添加的Header自动添加报头
@@ -4331,7 +4331,7 @@ example2.com
-

选中后,会自动向源站请求添加这些Header。

+

选中后,会自动向源站请求添加这些报头,以便于源站获取客户端信息。

自动重试50X + +

选中后,表示当源站返回状态码为50X(比如502、504)时,自动重试。

+
PROXY Protocol @@ -4469,7 +4476,7 @@ example2.com

可以对参数值进行特定的编解码处理。

-`}),Vue.component("http-remote-addr-config-box",{props:["v-remote-addr-config","v-is-location","v-is-group"],data:function(){let e=this.vRemoteAddrConfig,t="";return(e=null==e?{isPrior:!1,isOn:!1,value:"${rawRemoteAddr}",isCustomized:!1}:e).isCustomized||"${remoteAddr}"!=e.value&&"${rawRemoteAddr}"!=e.value||(t=e.value),{config:e,options:[{name:"直接获取",description:'用户直接访问边缘节点,即 "用户 --\x3e 边缘节点" 模式,这时候可以直接从连接中读取到真实的IP地址。',value:"${rawRemoteAddr}"},{name:"从上级代理中获取",description:'用户和边缘节点之间有别的代理服务转发,即 "用户 --\x3e [第三方代理服务] --\x3e 边缘节点",这时候只能从上级代理中获取传递的IP地址。',value:"${remoteAddr}"},{name:"[自定义]",description:"通过自定义变量来获取客户端真实的IP地址。",value:""}],optionValue:t}},methods:{isOn:function(){return(!this.vIsLocation&&!this.vIsGroup||this.config.isPrior)&&this.config.isOn},changeOptionValue:function(){0 +`}),Vue.component("http-remote-addr-config-box",{props:["v-remote-addr-config","v-is-location","v-is-group"],data:function(){let e=this.vRemoteAddrConfig;if(null==(e=null==e?{isPrior:!1,isOn:!1,value:"${rawRemoteAddr}",type:"default",requestHeaderName:""}:e).type||0==e.type.length)switch(e.type="default",e.value){case"${rawRemoteAddr}":case"${remoteAddrValue}":e.type="default";break;case"${remoteAddr}":e.type="proxy";break;default:null!=e.value&&0 @@ -4481,7 +4488,7 @@ example2.com -

选中后表示使用自定义的请求变量获取客户端IP。

+

选中后,表示使用自定义的请求变量获取客户端IP。

@@ -4489,20 +4496,28 @@ example2.com - + + + + + + + + + @@ -4674,7 +4689,7 @@ example2.com
获取IP方式 * - + -

{{option.description}}

+

{{option.description}}

请求报头 * + +

请输入包含有客户端IP的请求报头,需要注意大小写,常见的有X-Forwarded-ForX-Real-IPX-Client-IP等。

+
读取IP变量值 * - -
- -

通过此变量获取用户的IP地址。具体可用的请求变量列表可参考官方网站文档。

-
+ +

通过此变量获取用户的IP地址。具体可用的请求变量列表可参考官方网站文档;比如通过报头传递IP的情形,可以使用\${header.你的自定义报头}(类似于\${header.X-Forwarded-For},需要注意大小写规范)。

-`}),Vue.component("http-webp-config-box",{props:["v-webp-config","v-is-location","v-is-group","v-require-cache"],data:function(){let e=this.vWebpConfig;return null==(e=null==e?{isPrior:!1,isOn:!1,quality:50,minLength:{count:0,unit:"kb"},maxLength:{count:0,unit:"kb"},mimeTypes:["image/png","image/jpeg","image/bmp","image/x-ico","image/gif"],extensions:[".png",".jpeg",".jpg",".bmp",".ico"],conds:null}:e).mimeTypes&&(e.mimeTypes=[]),null==e.extensions&&(e.extensions=[]),{config:e,moreOptionsVisible:!1,quality:e.quality}},watch:{quality:function(e){let t=parseInt(e);isNaN(t)?t=90:t<1?t=1:100 +`}),Vue.component("http-webp-config-box",{props:["v-webp-config","v-is-location","v-is-group","v-require-cache"],data:function(){let e=this.vWebpConfig;return null==(e=null==e?{isPrior:!1,isOn:!1,quality:50,minLength:{count:0,unit:"kb"},maxLength:{count:0,unit:"kb"},mimeTypes:["image/png","image/jpeg","image/bmp","image/x-ico"],extensions:[".png",".jpeg",".jpg",".bmp",".ico"],conds:null}:e).mimeTypes&&(e.mimeTypes=[]),null==e.extensions&&(e.extensions=[]),{config:e,moreOptionsVisible:!1,quality:e.quality}},watch:{quality:function(e){let t=parseInt(e);isNaN(t)?t=90:t<1?t=1:100 @@ -4686,7 +4701,7 @@ example2.com -

选中后表示开启自动WebP压缩;只有满足缓存条件的图片内容才会被转换

+

选中后表示开启自动WebP压缩;图片的宽和高均不能超过16383像素;只有满足缓存条件的图片内容才会被转换

@@ -4815,7 +4830,21 @@ example2.com

{{name}}参数名称,比如?myBucketName=BUCKET-NAME中的myBucketName

-`}),Vue.component("http-request-cond-view",{props:["v-cond"],data:function(){return{cond:this.vCond,components:window.REQUEST_COND_COMPONENTS}},methods:{typeName:function(i){var e=this.components.$find(function(e,t){return t.type==i.type});return null!=e?e.name:i.param+" "+i.operator},updateConds:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(this.cond[i]=t[i])},notifyChange:function(){}},template:`
+`}),Vue.component("http-request-scripts-config-box",{props:["vRequestScriptsConfig","v-is-location"],data:function(){let e=this.vRequestScriptsConfig;return{config:e=null==e?{}:e}},methods:{changeInitGroup:function(e){this.config.initGroup=e,this.$forceUpdate()},changeRequestGroup:function(e){this.config.requestGroup=e,this.$forceUpdate()}},template:`
+ +
+

请求初始化

+

在请求刚初始化时调用,此时自定义报头等尚未生效。

+
+ +
+

准备发送请求

+

在准备执行请求或者转发请求之前调用,此时自定义报头、源站等已准备好。

+
+ +
+
+
`}),Vue.component("http-request-cond-view",{props:["v-cond"],data:function(){return{cond:this.vCond,components:window.REQUEST_COND_COMPONENTS}},methods:{typeName:function(i){var e=this.components.$find(function(e,t){return t.type==i.type});return null!=e?e.name:i.param+" "+i.operator},updateConds:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(this.cond[i]=t[i])},notifyChange:function(){}},template:`
{{cond.param}} {{cond.operator}} {{typeName(cond)}}: @@ -5245,7 +5274,7 @@ example2.com
-`}),Vue.component("http-firewall-captcha-options",{props:["v-captcha-options"],mounted:function(){this.updateSummary()},data:function(){let e=this.vCaptchaOptions;return(e=null==e?{countLetters:0,life:0,maxFails:0,failBlockTimeout:0,failBlockScopeAll:!1,uiIsOn:!1,uiTitle:"",uiPrompt:"",uiButtonTitle:"",uiShowRequestId:!0,uiCss:"",uiFooter:"",uiBody:"",cookieId:"",lang:""}:e).countLetters<=0&&(e.countLetters=6),{options:e,isEditing:!1,summary:""}},watch:{"options.countLetters":function(e){let t=parseInt(e,10);isNaN(t)||t<0?t=0:10 +`}),Vue.component("http-firewall-captcha-options",{props:["v-captcha-options"],mounted:function(){this.updateSummary()},data:function(){let e=this.vCaptchaOptions;return(e=null==e?{countLetters:0,life:0,maxFails:0,failBlockTimeout:0,failBlockScopeAll:!1,uiIsOn:!1,uiTitle:"",uiPrompt:"",uiButtonTitle:"",uiShowRequestId:!0,uiCss:"",uiFooter:"",uiBody:"",cookieId:"",lang:""}:e).countLetters<=0&&(e.countLetters=6),{options:e,isEditing:!1,summary:"",uiBodyWarning:""}},watch:{"options.countLetters":function(e){let t=parseInt(e,10);isNaN(t)||t<0?t=0:10|\s).+\$\{body}.*<\/form>/s.test(e)?this.uiBodyWarning="页面模板中不能使用
标签包裹${body}变量,否则将导致验证码表单无法提交。":this.uiBodyWarning=""}},methods:{edit:function(){this.isEditing=!this.isEditing},updateSummary:function(){let e=[];0 {{summary}}
@@ -5346,7 +5375,7 @@ example2.com
页面模板 -

模板中必须包含\${body}表示验证码表单!整个页面的模板,支持HTML,其中必须使用\${body}变量代表验证码表单,否则将无法正常显示验证码。

+

警告:{{uiBodyWarning}}模板中必须包含\${body}表示验证码表单!整个页面的模板,支持HTML,其中必须使用\${body}变量代表验证码表单,否则将无法正常显示验证码。

所有线路 - + 没有和关键词“{{keyword}}”匹配的线路 + + +
搜索搜索线路 - +
+ + +
diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js index d4037ac4..a1c3d2b0 100755 --- a/web/public/js/components.src.js +++ b/web/public/js/components.src.js @@ -2840,6 +2840,42 @@ Vue.component("plan-user-selector", {
` }) +// 显示流量限制说明 +Vue.component("plan-limit-view", { + props: ["value", "v-single-mode"], + data: function () { + let config = this.value + + let hasLimit = false + if (!this.vSingleMode) { + if (config.trafficLimit != null && config.trafficLimit.isOn && ((config.trafficLimit.dailySize != null && config.trafficLimit.dailySize.count > 0) || (config.trafficLimit.monthlySize != null && config.trafficLimit.monthlySize.count > 0))) { + hasLimit = true + } else if (config.dailyRequests > 0 || config.monthlyRequests > 0) { + hasLimit = true + } + } + + return { + config: config, + hasLimit: hasLimit + } + }, + methods: { + formatNumber: function (n) { + return teaweb.formatNumber(n) + } + }, + template: `
+
+
+ 日流量限制:{{config.trafficLimit.dailySize.count}}{{config.trafficLimit.dailySize.unit.toUpperCase()}}
+ 月流量限制:{{config.trafficLimit.monthlySize.count}}{{config.trafficLimit.monthlySize.unit.toUpperCase()}}
+
+
单日请求数限制:{{formatNumber(config.dailyRequests)}}
+
单月请求数限制:{{formatNumber(config.monthlyRequests)}}
+
` +}) + Vue.component("plan-price-view", { props: ["v-plan"], data: function () { @@ -3033,6 +3069,7 @@ Vue.component("plan-price-config-box", {
+

如果为0表示免费。

@@ -3042,6 +3079,7 @@ Vue.component("plan-price-config-box", { +

如果为0表示免费。

@@ -3051,6 +3089,7 @@ Vue.component("plan-price-config-box", { +

如果为0表示免费。

@@ -4505,44 +4544,6 @@ Vue.component("http-firewall-actions-view", { ` }) -Vue.component("http-request-scripts-config-box", { - props: ["vRequestScriptsConfig", "v-is-location"], - data: function () { - let config = this.vRequestScriptsConfig - if (config == null) { - config = {} - } - return { - config: config - } - }, - methods: { - changeInitGroup: function (group) { - this.config.initGroup = group - this.$forceUpdate() - }, - changeRequestGroup: function (group) { - this.config.requestGroup = group - this.$forceUpdate() - } - }, - template: `
- -
-

请求初始化

-

在请求刚初始化时调用,此时自定义Header等尚未生效。

-
- -
-

准备发送请求

-

在准备执行请求或者转发请求之前调用,此时自定义Header、源站等已准备好。

-
- -
-
-
` -}) - // 显示WAF规则的标签 Vue.component("http-firewall-rule-label", { props: ["v-rule"], @@ -5333,7 +5334,7 @@ Vue.component("http-cache-ref-box", { -

选中后,当响应的Header中有Set-Cookie时不缓存响应内容。

+

选中后,当响应的报头中有Set-Cookie时不缓存响应内容,防止动态内容被缓存。

@@ -5343,7 +5344,7 @@ Vue.component("http-cache-ref-box", { -

选中后,当请求的Header中含有Pragma: no-cache或Cache-Control: no-cache时,会跳过缓存直接读取源内容。

+

选中后,当请求的报头中含有Pragma: no-cache或Cache-Control: no-cache时,会跳过缓存直接读取源内容,一般仅用于调试。

@@ -8614,11 +8615,15 @@ Vue.component("http-firewall-actions-box", { } var defaultPageBody = ` - + 403 Forbidden +\t

403 Forbidden

-
Request ID: \${requestId}.
+
Connection: \${remoteAddr} (Client) -> \${serverAddr} (Server)
+
Request ID: \${requestId}
` @@ -10178,17 +10183,21 @@ Vue.component("http-pages-and-shutdown-box", { }, addShutdownHTMLTemplate: function () { this.shutdownConfig.body = ` - + \t升级中 \t +\t

网站升级中

为了给您提供更好的服务,我们正在升级网站,请稍后重新访问。

-
Request ID: \${requestId}.
+
Connection: \${remoteAddr} (Client) -> \${serverAddr} (Server)
+
Request ID: \${requestId}
` @@ -11560,23 +11569,6 @@ Vue.component("http-access-log-config-box", { ` }) -// 显示流量限制说明 -Vue.component("traffic-limit-view", { - props: ["v-traffic-limit"], - data: function () { - return { - config: this.vTrafficLimit - } - }, - template: `
-
- 日流量限制:{{config.dailySize.count}}{{config.dailySize.unit.toUpperCase()}}
- 月流量限制:{{config.monthlySize.count}}{{config.monthlySize.unit.toUpperCase()}}
-
- 没有限制。 -
` -}) - // 基本认证用户配置 Vue.component("http-auth-basic-auth-user-box", { props: ["v-users"], @@ -12041,7 +12033,8 @@ Vue.component("reverse-proxy-box", { idleTimeout: {count: 0, unit: "second"}, maxConns: 0, maxIdleConns: 0, - followRedirects: false + followRedirects: false, + retry50X: true } } if (reverseProxyConfig.addHeaders == null) { @@ -12181,6 +12174,7 @@ Vue.component("reverse-proxy-box", { +

选中后,所有源站设置才会生效。

@@ -12192,7 +12186,7 @@ Vue.component("reverse-proxy-box", {
-

请求源站时的Host,用于修改源站接收到的域名 +

请求源站时的主机名(Host),用于修改源站接收到的域名 ,"跟随CDN域名"是指源站接收到的域名和当前CDN访问域名保持一致 ,"跟随源站"是指源站接收到的域名仍然是填写的源站地址中的信息,不随代理服务域名改变而改变 ,自定义Host内容中支持请求变量

@@ -12215,7 +12209,7 @@ Vue.component("reverse-proxy-box", { - 自动添加的Header + 自动添加报头
@@ -12223,7 +12217,7 @@ Vue.component("reverse-proxy-box", {
-

选中后,会自动向源站请求添加这些Header。

+

选中后,会自动向源站请求添加这些报头,以便于源站获取客户端信息。

@@ -12314,6 +12308,13 @@ Vue.component("reverse-proxy-box", {

源站保持等待的空闲超时时间,0表示使用默认时间。

+ + 自动重试50X + + +

选中后,表示当源站返回状态码为50X(比如502、504)时,自动重试。

+ + PROXY Protocol @@ -12428,13 +12429,35 @@ Vue.component("http-remote-addr-config-box", { isPrior: false, isOn: false, value: "${rawRemoteAddr}", - isCustomized: false + type: "default", + + requestHeaderName: "" } } - let optionValue = "" - if (!config.isCustomized && (config.value == "${remoteAddr}" || config.value == "${rawRemoteAddr}")) { - optionValue = config.value + // type + if (config.type == null || config.type.length == 0) { + config.type = "default" + switch (config.value) { + case "${rawRemoteAddr}": + config.type = "default" + break + case "${remoteAddrValue}": + config.type = "default" + break + case "${remoteAddr}": + config.type = "proxy" + break + default: + if (config.value != null && config.value.length > 0) { + config.type = "variable" + } + } + } + + // value + if (config.value == null || config.value.length == 0) { + config.value = "${rawRemoteAddr}" } return { @@ -12442,33 +12465,70 @@ Vue.component("http-remote-addr-config-box", { options: [ { name: "直接获取", - description: "用户直接访问边缘节点,即 \"用户 --> 边缘节点\" 模式,这时候可以直接从连接中读取到真实的IP地址。", - value: "${rawRemoteAddr}" + description: "用户直接访问边缘节点,即 \"用户 --> 边缘节点\" 模式,这时候系统会试图从直接的连接中读取到客户端IP地址。", + value: "${rawRemoteAddr}", + type: "default" }, { name: "从上级代理中获取", - description: "用户和边缘节点之间有别的代理服务转发,即 \"用户 --> [第三方代理服务] --> 边缘节点\",这时候只能从上级代理中获取传递的IP地址。", - value: "${remoteAddr}" + description: "用户和边缘节点之间有别的代理服务转发,即 \"用户 --> [第三方代理服务] --> 边缘节点\",这时候只能从上级代理中获取传递的IP地址;上级代理传递的请求报头中必须包含 X-Forwarded-For 或 X-Real-IP 信息。", + value: "${remoteAddr}", + type: "proxy" }, { - name: "[自定义]", + name: "从请求报头中读取", + description: "从自定义请求报头读取客户端IP。", + value: "", + type: "requestHeader" + }, + { + name: "[自定义变量]", description: "通过自定义变量来获取客户端真实的IP地址。", - value: "" + value: "", + type: "variable" } - ], - optionValue: optionValue + ] + } + }, + watch: { + "config.requestHeaderName": function (value) { + if (this.config.type == "requestHeader"){ + this.config.value = "${header." + value.trim() + "}" + } } }, methods: { isOn: function () { return ((!this.vIsLocation && !this.vIsGroup) || this.config.isPrior) && this.config.isOn }, - changeOptionValue: function () { - if (this.optionValue.length > 0) { - this.config.value = this.optionValue - this.config.isCustomized = false - } else { - this.config.isCustomized = true + changeOptionType: function () { + let that = this + + switch(this.config.type) { + case "default": + this.config.value = "${rawRemoteAddr}" + break + case "proxy": + this.config.value = "${remoteAddr}" + break + case "requestHeader": + this.config.value = "" + if (this.requestHeaderName != null && this.requestHeaderName.length > 0) { + this.config.value = "${header." + this.requestHeaderName + "}" + } + + setTimeout(function () { + that.$refs.requestHeaderInput.focus() + }) + break + case "variable": + this.config.value = "${rawRemoteAddr}" + + setTimeout(function () { + that.$refs.variableInput.focus() + }) + + break } } }, @@ -12484,7 +12544,7 @@ Vue.component("http-remote-addr-config-box", { -

选中后表示使用自定义的请求变量获取客户端IP。

+

选中后,表示使用自定义的请求变量获取客户端IP。

@@ -12492,20 +12552,28 @@ Vue.component("http-remote-addr-config-box", { 获取IP方式 * - + -

{{option.description}}

+

{{option.description}}

- + + + + 请求报头 * + + +

请输入包含有客户端IP的请求报头,需要注意大小写,常见的有X-Forwarded-ForX-Real-IPX-Client-IP等。

+ + + + + 读取IP变量值 * - -
- -

通过此变量获取用户的IP地址。具体可用的请求变量列表可参考官方网站文档。

-
+ +

通过此变量获取用户的IP地址。具体可用的请求变量列表可参考官方网站文档;比如通过报头传递IP的情形,可以使用\${header.你的自定义报头}(类似于\${header.X-Forwarded-For},需要注意大小写规范)。

@@ -12996,7 +13064,7 @@ Vue.component("http-webp-config-box", { quality: 50, minLength: {count: 0, "unit": "kb"}, maxLength: {count: 0, "unit": "kb"}, - mimeTypes: ["image/png", "image/jpeg", "image/bmp", "image/x-ico", "image/gif"], + mimeTypes: ["image/png", "image/jpeg", "image/bmp", "image/x-ico"], extensions: [".png", ".jpeg", ".jpg", ".bmp", ".ico"], conds: null } @@ -13062,7 +13130,7 @@ Vue.component("http-webp-config-box", { -

选中后表示开启自动WebP压缩;只有满足缓存条件的图片内容才会被转换

+

选中后表示开启自动WebP压缩;图片的宽和高均不能超过16383像素;只有满足缓存条件的图片内容才会被转换

@@ -13296,6 +13364,44 @@ Vue.component("http-oss-bucket-params", { ` }) +Vue.component("http-request-scripts-config-box", { + props: ["vRequestScriptsConfig", "v-is-location"], + data: function () { + let config = this.vRequestScriptsConfig + if (config == null) { + config = {} + } + return { + config: config + } + }, + methods: { + changeInitGroup: function (group) { + this.config.initGroup = group + this.$forceUpdate() + }, + changeRequestGroup: function (group) { + this.config.requestGroup = group + this.$forceUpdate() + } + }, + template: `
+ +
+

请求初始化

+

在请求刚初始化时调用,此时自定义报头等尚未生效。

+
+ +
+

准备发送请求

+

在准备执行请求或者转发请求之前调用,此时自定义报头、源站等已准备好。

+
+ +
+
+
` +}) + Vue.component("http-request-cond-view", { props: ["v-cond"], data: function () { @@ -14923,7 +15029,8 @@ Vue.component("http-firewall-captcha-options", { return { options: options, isEditing: false, - summary: "" + summary: "", + uiBodyWarning: "" } }, watch: { @@ -14967,6 +15074,13 @@ Vue.component("http-firewall-captcha-options", { }, "options.uiIsOn": function (v) { this.updateSummary() + }, + "options.uiBody": function (v) { + if (/|\s).+\$\{body}.*<\/form>/s.test(v)) { + this.uiBodyWarning = "页面模板中不能使用
标签包裹\${body}变量,否则将导致验证码表单无法提交。" + } else { + this.uiBodyWarning = "" + } } }, methods: { @@ -15101,7 +15215,7 @@ Vue.component("http-firewall-captcha-options", { 页面模板 -

模板中必须包含\${body}表示验证码表单!整个页面的模板,支持HTML,其中必须使用\${body}变量代表验证码表单,否则将无法正常显示验证码。

+

警告:{{uiBodyWarning}}模板中必须包含\${body}表示验证码表单!整个页面的模板,支持HTML,其中必须使用\${body}变量代表验证码表单,否则将无法正常显示验证码。

@@ -15677,10 +15791,13 @@ Vue.component("ip-list-table", { {{item.ipFrom}}  New   - {{item.ipTo}} * +
{{item.region}} | {{item.isp}}
+
{{item.isp}}
+
添加于 {{item.createdTime}} @@ -18209,7 +18326,7 @@ Vue.component("digit-input", { } } }, - template: `` + template: `` }) Vue.component("keyword", { @@ -20534,6 +20651,9 @@ Vue.component("dns-route-selector", { this.routes.$removeIf(function (k, v) { return v.code + "@" + v.domainId == route.code + "@" + route.domainId }) + }, + clearKeyword: function () { + this.keyword = "" } }, watch: { @@ -20567,16 +20687,22 @@ Vue.component("dns-route-selector", { 所有线路 - + 没有和关键词“{{keyword}}”匹配的线路 + + + - 搜索 + 搜索线路 - +
+ + +