将全局设置的TCP相关设置移到“集群设置--网站设置”中

This commit is contained in:
GoEdgeLab
2023-09-18 16:55:40 +08:00
parent b62476b899
commit 76ab9cc7ae
9 changed files with 67 additions and 231 deletions

View File

@@ -207,6 +207,34 @@
</table>
</div>
<h4>TCP/UDP相关</h4>
<table class="ui table definition selectable">
<tr>
<td class="title">允许的端口范围</td>
<td>
<div class="ui fields inline">
<div class="ui field">
<input type="text" name="tcpAllPortRangeMin" maxlength="5" size="6" v-model="tcpAllPortRangeMin"/>
</div>
<div class="ui field">
-
</div>
<div class="ui field">
<input type="text" name="tcpAllPortRangeMax" maxlength="5" size="6" v-model="tcpAllPortRangeMax"/>
</div>
</div>
<p class="comment">用户创建TCP/TLS负载均衡服务时可以随机选择的端口范围最小不能小于1024最大不能大于65534。</p>
</td>
</tr>
<tr>
<td>排除的端口</td>
<td>
<values-box placeholder="端口" size="6" name="tcpAllDenyPorts" :values="tcpAllDenyPorts"></values-box>
<p class="comment">当为用户随机分配端口时要排除的端口。</p>
</td>
</tr>
</table>
<h4>其他</h4>
<table class="ui table definition selectable">
<tr>

View File

@@ -1,3 +1,20 @@
Tea.context(function () {
this.success = NotifyReloadSuccess("保存成功")
/**
* TCP端口
*/
this.tcpAllPortRangeMin = 10000
this.tcpAllPortRangeMax = 40000
if (this.config.tcpAll.portRangeMin > 0) {
this.tcpAllPortRangeMin = this.config.tcpAll.portRangeMin
}
if (this.config.tcpAll.portRangeMax > 0) {
this.tcpAllPortRangeMax = this.config.tcpAll.portRangeMax
}
this.tcpAllDenyPorts = []
if (this.config.tcpAll.denyPorts != null) {
this.tcpAllDenyPorts = this.config.tcpAll.denyPorts
}
})