diff --git a/web/public/js/components.js b/web/public/js/components.js
index 6ec94f99..d4a03be6 100644
--- a/web/public/js/components.js
+++ b/web/public/js/components.js
@@ -1721,7 +1721,12 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
-`}),Vue.component("domains-box",{props:["v-domains"],data:function(){let e=this.vDomains;return{domains:e=null==e?[]:e,isAdding:!1,addingDomain:""}},methods:{add:function(){this.isAdding=!0;let e=this;setTimeout(function(){e.$refs.addingDomain.focus()},100)},confirm:function(){let t=this;if(this.addingDomain=this.addingDomain.replace(/\s/g,""),0==this.addingDomain.length)teaweb.warn("请输入要添加的域名",function(){t.$refs.addingDomain.focus()});else{if("~"==this.addingDomain[0]){var e=this.addingDomain.substring(1);try{new RegExp(e)}catch(e){return void teaweb.warn("正则表达式错误:"+e.message,function(){t.$refs.addingDomain.focus()})}}this.domains.push(this.addingDomain),this.cancel()}},remove:function(e){this.domains.$remove(e)},cancel:function(){this.isAdding=!1,this.addingDomain=""}},template:`
+`}),Vue.component("firewall-syn-flood-config-viewer",{props:["v-syn-flood-config"],data:function(){let e=this.vSynFloodConfig;return{config:e=null==e?{isOn:!1,minAttempts:10,timeoutSeconds:600,ignoreLocal:!0}:e}},template:`
+
+ 已启用 / 空连接次数:{{config.minAttempts}}次/分钟 / 封禁时间:{{config.timeoutSeconds}}秒 / 忽略局域网访问
+
+ 未启用
+
`}),Vue.component("domains-box",{props:["v-domains"],data:function(){let e=this.vDomains;return{domains:e=null==e?[]:e,isAdding:!1,addingDomain:""}},methods:{add:function(){this.isAdding=!0;let e=this;setTimeout(function(){e.$refs.addingDomain.focus()},100)},confirm:function(){let t=this;if(this.addingDomain=this.addingDomain.replace(/\s/g,""),0==this.addingDomain.length)teaweb.warn("请输入要添加的域名",function(){t.$refs.addingDomain.focus()});else{if("~"==this.addingDomain[0]){var e=this.addingDomain.substring(1);try{new RegExp(e)}catch(e){return void teaweb.warn("正则表达式错误:"+e.message,function(){t.$refs.addingDomain.focus()})}}this.domains.push(this.addingDomain),this.cancel()}},remove:function(e){this.domains.$remove(e)},cancel:function(){this.isAdding=!1,this.addingDomain=""}},template:`
@@ -1942,7 +1947,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
秒
-
+
@@ -1952,7 +1957,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
次
-
+
@@ -1962,7 +1967,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
秒
-
+
@@ -2601,8 +2606,11 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
- 耗时:{{formatCost(accessLog.requestTime)}} ms ({{accessLog.humanTime}})
-
`}),Vue.component("http-firewall-block-options-viewer",{props:["v-block-options"],data:function(){return{blockOptions:this.vBlockOptions,statusCode:this.vBlockOptions.statusCode,timeout:this.vBlockOptions.timeout}},watch:{statusCode:function(e){e=parseInt(e);isNaN(e)?this.blockOptions.statusCode=403:this.blockOptions.statusCode=e},timeout:function(e){e=parseInt(e);isNaN(e)?this.blockOptions.timeout=0:this.blockOptions.timeout=e}},methods:{edit:function(){this.isEditing=!this.isEditing}},template:`
- 状态码:{{statusCode}} / 提示内容:[{{blockOptions.body.length}}字符][无] / 超时时间:{{timeout}}秒
+
`}),Vue.component("http-firewall-block-options-viewer",{props:["v-block-options"],data:function(){return{options:this.vBlockOptions}},template:`
+
默认设置
+
+ 状态码:{{options.statusCode}} / 提示内容:[{{options.body.length}}字符][无] / 超时时间:{{options.timeout}}秒
+
`}),Vue.component("http-access-log-config-box",{props:["v-access-log-config","v-fields","v-default-field-codes","v-is-location","v-is-group"],data:function(){let t=this,i=(setTimeout(function(){t.changeFields()},100),{isPrior:!1,isOn:!1,fields:[1,2,6,7],status1:!0,status2:!0,status3:!0,status4:!0,status5:!0,firewallOnly:!1,enableClientClosed:!1});return null!=this.vAccessLogConfig&&(i=this.vAccessLogConfig),this.vFields.forEach(function(e){null==t.vAccessLogConfig?e.isChecked=t.vDefaultFieldCodes.$contains(e.code):e.isChecked=i.fields.$contains(e.code)}),{accessLog:i,hasRequestBodyField:this.vFields.$contains(8)}},methods:{changeFields:function(){this.accessLog.fields=this.vFields.filter(function(e){return e.isChecked}).map(function(e){return e.code}),this.hasRequestBodyField=this.accessLog.fields.$contains(8)}},template:`
@@ -3740,7 +3748,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
-
`}),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:!1,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:""}},watch:{"options.countLetters":function(e){let t=parseInt(e,10);isNaN(t)||t<0?t=0:10
{{summary}}
@@ -3763,7 +3771,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
次
-
+
diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js
index 5d718e2b..75941881 100755
--- a/web/public/js/components.src.js
+++ b/web/public/js/components.src.js
@@ -5432,6 +5432,30 @@ Vue.component("http-cache-stale-config", {
`
})
+Vue.component("firewall-syn-flood-config-viewer", {
+ props: ["v-syn-flood-config"],
+ data: function () {
+ let config = this.vSynFloodConfig
+ if (config == null) {
+ config = {
+ isOn: false,
+ minAttempts: 10,
+ timeoutSeconds: 600,
+ ignoreLocal: true
+ }
+ }
+ return {
+ config: config
+ }
+ },
+ template: `
+
+ 已启用 / 空连接次数:{{config.minAttempts}}次/分钟 / 封禁时间:{{config.timeoutSeconds}}秒 / 忽略局域网访问
+
+ 未启用
+
`
+})
+
// 域名列表
Vue.component("domains-box", {
props: ["v-domains"],
@@ -6300,7 +6324,7 @@ Vue.component("http-firewall-actions-box", {
秒
-
+
@@ -6310,7 +6334,7 @@ Vue.component("http-firewall-actions-box", {
次
-
+
@@ -6320,7 +6344,7 @@ Vue.component("http-firewall-actions-box", {
秒
-
+
@@ -7657,36 +7681,14 @@ Vue.component("http-firewall-block-options-viewer", {
props: ["v-block-options"],
data: function () {
return {
- blockOptions: this.vBlockOptions,
- statusCode: this.vBlockOptions.statusCode,
- timeout: this.vBlockOptions.timeout
- }
- },
- watch: {
- statusCode: function (v) {
- let statusCode = parseInt(v)
- if (isNaN(statusCode)) {
- this.blockOptions.statusCode = 403
- } else {
- this.blockOptions.statusCode = statusCode
- }
- },
- timeout: function (v) {
- let timeout = parseInt(v)
- if (isNaN(timeout)) {
- this.blockOptions.timeout = 0
- } else {
- this.blockOptions.timeout = timeout
- }
- }
- },
- methods: {
- edit: function () {
- this.isEditing = !this.isEditing
+ options: this.vBlockOptions
}
},
template: `
- 状态码:{{statusCode}} / 提示内容:
[{{blockOptions.body.length}}字符][无] / 超时时间:{{timeout}}秒
+
默认设置
+
+ 状态码:{{options.statusCode}} / 提示内容:[{{options.body.length}}字符][无] / 超时时间:{{options.timeout}}秒
+
`
})
@@ -10801,7 +10803,7 @@ Vue.component("http-firewall-captcha-options", {
uiTitle: "",
uiPrompt: "",
uiButtonTitle: "",
- uiShowRequestId: false,
+ uiShowRequestId: true,
uiCss: "",
uiFooter: "",
uiBody: "",
@@ -10915,7 +10917,7 @@ Vue.component("http-firewall-captcha-options", {
次
-
+
diff --git a/web/public/js/components/server/firewall-syn-flood-config-viewer.js b/web/public/js/components/server/firewall-syn-flood-config-viewer.js
new file mode 100644
index 00000000..a7e64075
--- /dev/null
+++ b/web/public/js/components/server/firewall-syn-flood-config-viewer.js
@@ -0,0 +1,23 @@
+Vue.component("firewall-syn-flood-config-viewer", {
+ props: ["v-syn-flood-config"],
+ data: function () {
+ let config = this.vSynFloodConfig
+ if (config == null) {
+ config = {
+ isOn: false,
+ minAttempts: 10,
+ timeoutSeconds: 600,
+ ignoreLocal: true
+ }
+ }
+ return {
+ config: config
+ }
+ },
+ template: `
+
+ 已启用 / 空连接次数:{{config.minAttempts}}次/分钟 / 封禁时间:{{config.timeoutSeconds}}秒 / 忽略局域网访问
+
+ 未启用
+
`
+})
\ No newline at end of file
diff --git a/web/public/js/components/server/http-firewall-actions-box.js b/web/public/js/components/server/http-firewall-actions-box.js
index 879663cf..e1066c24 100644
--- a/web/public/js/components/server/http-firewall-actions-box.js
+++ b/web/public/js/components/server/http-firewall-actions-box.js
@@ -614,7 +614,7 @@ Vue.component("http-firewall-actions-box", {
秒
-
+
@@ -624,7 +624,7 @@ Vue.component("http-firewall-actions-box", {
次
-
+
@@ -634,7 +634,7 @@ Vue.component("http-firewall-actions-box", {
秒
-
+
diff --git a/web/public/js/components/server/http-firewall-block-options-viewer.js b/web/public/js/components/server/http-firewall-block-options-viewer.js
index 6ce56cd8..6832068d 100644
--- a/web/public/js/components/server/http-firewall-block-options-viewer.js
+++ b/web/public/js/components/server/http-firewall-block-options-viewer.js
@@ -2,36 +2,14 @@ Vue.component("http-firewall-block-options-viewer", {
props: ["v-block-options"],
data: function () {
return {
- blockOptions: this.vBlockOptions,
- statusCode: this.vBlockOptions.statusCode,
- timeout: this.vBlockOptions.timeout
- }
- },
- watch: {
- statusCode: function (v) {
- let statusCode = parseInt(v)
- if (isNaN(statusCode)) {
- this.blockOptions.statusCode = 403
- } else {
- this.blockOptions.statusCode = statusCode
- }
- },
- timeout: function (v) {
- let timeout = parseInt(v)
- if (isNaN(timeout)) {
- this.blockOptions.timeout = 0
- } else {
- this.blockOptions.timeout = timeout
- }
- }
- },
- methods: {
- edit: function () {
- this.isEditing = !this.isEditing
+ options: this.vBlockOptions
}
},
template: `
- 状态码:{{statusCode}} / 提示内容:
[{{blockOptions.body.length}}字符][无] / 超时时间:{{timeout}}秒
+
默认设置
+
+ 状态码:{{options.statusCode}} / 提示内容:[{{options.body.length}}字符][无] / 超时时间:{{options.timeout}}秒
+
`
})
\ No newline at end of file
diff --git a/web/public/js/components/server/http-firewall-captcha-options.js b/web/public/js/components/server/http-firewall-captcha-options.js
index 703af040..a38b499e 100644
--- a/web/public/js/components/server/http-firewall-captcha-options.js
+++ b/web/public/js/components/server/http-firewall-captcha-options.js
@@ -16,7 +16,7 @@ Vue.component("http-firewall-captcha-options", {
uiTitle: "",
uiPrompt: "",
uiButtonTitle: "",
- uiShowRequestId: false,
+ uiShowRequestId: true,
uiCss: "",
uiFooter: "",
uiBody: "",
@@ -130,7 +130,7 @@ Vue.component("http-firewall-captcha-options", {
次
-
+
diff --git a/web/views/@default/servers/components/waf/policy.html b/web/views/@default/servers/components/waf/policy.html
index a4bdf45a..9e622dbe 100644
--- a/web/views/@default/servers/components/waf/policy.html
+++ b/web/views/@default/servers/components/waf/policy.html
@@ -50,33 +50,7 @@
| SYN Flood防御 |
未启用
-
-
- | 是否启用 |
-
- 启用
- |
-
-
- | 空连接次数 |
-
- {{firewallPolicy.synFlood.minAttempts}}次/分钟
- |
-
-
- | 封禁时间 |
-
- {{firewallPolicy.synFlood.timeoutSeconds}}秒
- |
-
-
- | 忽略局域网访问 |
-
- Y
- N
- |
-
-
+
|
diff --git a/web/views/@default/servers/components/waf/update.html b/web/views/@default/servers/components/waf/update.html
index e4f12582..8c091ff6 100644
--- a/web/views/@default/servers/components/waf/update.html
+++ b/web/views/@default/servers/components/waf/update.html
@@ -31,43 +31,43 @@
-
- | 阻止动作配置 |
-
-
- |
-
-
- | 验证码动作配置 |
-
-
- |
-
-
- | 使用系统防火墙 |
-
-
-
- |
-
-
- | SYN Flood防御 |
-
-
- |
-
-
- | 记录访问日志 |
-
-
-
-
- |
-
|
+
+ | 阻止动作配置 |
+
+
+ |
+
+
+ | 验证码动作配置 |
+
+
+ |
+
+
+ | 使用系统防火墙 |
+
+
+
+ |
+
+
+ | SYN Flood防御 |
+
+
+ |
+
+
+ | 记录访问日志 |
+
+
+
+
+ |
+
| 描述 |
|