mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-15 21:20:25 +08:00
可以设置是否自动安装nftables
This commit is contained in:
@@ -88,6 +88,7 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
"autoOpenPorts": cluster.AutoOpenPorts,
|
"autoOpenPorts": cluster.AutoOpenPorts,
|
||||||
"clock": clockConfig,
|
"clock": clockConfig,
|
||||||
"autoRemoteStart": cluster.AutoRemoteStart,
|
"autoRemoteStart": cluster.AutoRemoteStart,
|
||||||
|
"autoInstallNftables": cluster.AutoInstallNftables,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 默认值
|
// 默认值
|
||||||
@@ -110,6 +111,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
ClockAutoSync bool
|
ClockAutoSync bool
|
||||||
ClockServer string
|
ClockServer string
|
||||||
AutoRemoteStart bool
|
AutoRemoteStart bool
|
||||||
|
AutoInstallNftables bool
|
||||||
|
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
}) {
|
}) {
|
||||||
@@ -152,6 +154,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
AutoOpenPorts: params.AutoOpenPorts,
|
AutoOpenPorts: params.AutoOpenPorts,
|
||||||
ClockJSON: clockConfigJSON,
|
ClockJSON: clockConfigJSON,
|
||||||
AutoRemoteStart: params.AutoRemoteStart,
|
AutoRemoteStart: params.AutoRemoteStart,
|
||||||
|
AutoInstallNftables: params.AutoInstallNftables,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ func (this *CreateAction) RunPost(params struct {
|
|||||||
GrantId int64
|
GrantId int64
|
||||||
InstallDir string
|
InstallDir string
|
||||||
SystemdServiceIsOn bool
|
SystemdServiceIsOn bool
|
||||||
|
AutoInstallNftables bool
|
||||||
|
|
||||||
// DNS相关
|
// DNS相关
|
||||||
DnsDomainId int64
|
DnsDomainId int64
|
||||||
@@ -130,6 +131,7 @@ func (this *CreateAction) RunPost(params struct {
|
|||||||
HttpFirewallPolicyId: params.HttpFirewallPolicyId,
|
HttpFirewallPolicyId: params.HttpFirewallPolicyId,
|
||||||
SystemServicesJSON: systemServicesJSON,
|
SystemServicesJSON: systemServicesJSON,
|
||||||
GlobalServerConfigJSON: globalServerConfigJSON,
|
GlobalServerConfigJSON: globalServerConfigJSON,
|
||||||
|
AutoInstallNftables: params.AutoInstallNftables,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
|
|||||||
@@ -85,6 +85,13 @@
|
|||||||
<p class="comment">当检测到节点离线时,自动尝试远程启动(前提是节点已经设置了SSH登录认证)。</p>
|
<p class="comment">当检测到节点离线时,自动尝试远程启动(前提是节点已经设置了SSH登录认证)。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>自动安装nftables</td>
|
||||||
|
<td>
|
||||||
|
<checkbox name="autoInstallNftables" v-model="cluster.autoInstallNftables"></checkbox>
|
||||||
|
<p class="comment">在Linux系统中自动尝试安装<code-label>nftables</code-label>用于安全防御;此功能需要联网从Ubuntu、CentOS等软件库中下载安装包。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<submit-btn></submit-btn>
|
<submit-btn></submit-btn>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<td>节点安装目录</td>
|
<td>节点安装目录</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="installDir" maxlength="100"/>
|
<input type="text" name="installDir" maxlength="100"/>
|
||||||
<p class="comment">当节点没有单独设置安装目录时,默认使用此设置。如果集群和节点都没有设置安装目录,则使用<span class="ui label tiny">$登录用户HOME路径/edge-node</span>
|
<p class="comment">当节点没有单独设置安装目录时,默认使用此设置。如果集群和节点都没有设置安装目录,则使用<code-label>$登录用户HOME路径/edge-node</code-label>
|
||||||
目录。</p>
|
目录。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -56,6 +56,13 @@
|
|||||||
<p class="comment">加入后可以利用systemd对节点进程进行管理,并可自动随开机启动。</p>
|
<p class="comment">加入后可以利用systemd对节点进程进行管理,并可自动随开机启动。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>自动安装nftables</td>
|
||||||
|
<td>
|
||||||
|
<checkbox name="autoInstallNftables" value="1"></checkbox>
|
||||||
|
<p class="comment">在Linux系统中自动尝试安装<code-label>nftables</code-label>用于安全防御;此功能需要联网从Ubuntu、CentOS等软件库中下载安装包。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h4>DNS设置选项 <span class="grey small">(可选)</span></h4>
|
<h4>DNS设置选项 <span class="grey small">(可选)</span></h4>
|
||||||
|
|||||||
Reference in New Issue
Block a user