Vue.component("firewall-syn-flood-config-box", { 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, isEditing: false, minAttempts: config.minAttempts, timeoutSeconds: config.timeoutSeconds } }, methods: { edit: function () { this.isEditing = !this.isEditing } }, watch: { minAttempts: function (v) { let count = parseInt(v) if (isNaN(count)) { count = 10 } if (count < 5) { count = 5 } this.config.minAttempts = count }, timeoutSeconds: function (v) { let seconds = parseInt(v) if (isNaN(seconds)) { seconds = 10 } if (seconds < 60) { seconds = 60 } this.config.timeoutSeconds = seconds } }, template: `
| 启用 | 
				 启用后,WAF将会尝试自动检测并阻止SYN Flood攻击。此功能需要节点已安装并启用nftables或Firewalld。  | 
		
| 空连接次数 | 
				 
					
					次/分钟
				 
				超过此数字的"空连接"将被视为SYN Flood攻击,为了防止误判,此数值默认不小于5。  | 
		
| 封禁时长 | 
				 
					
					秒
				 
			 | 
		
| 忽略局域网访问 | 
				 |