167 lines
5.4 KiB
HTML
167 lines
5.4 KiB
HTML
{{define "form/inbound"}}
|
||
<!-- base -->
|
||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||
<!-- 开关:启用/禁用 -->
|
||
<a-form-item label='{{ i18n "enable" }}'>
|
||
<a-switch v-model="dbInbound.enable"></a-switch>
|
||
</a-form-item>
|
||
|
||
<!-- 备注 -->
|
||
<a-form-item label='{{ i18n "remark" }}'>
|
||
<a-input v-model.trim="dbInbound.remark"></a-input>
|
||
</a-form-item>
|
||
|
||
<!-- 协议选择 -->
|
||
<a-form-item label='{{ i18n "protocol" }}'>
|
||
<a-select v-model="inbound.protocol" :disabled="isEdit" :dropdown-class-name="themeSwitcher.currentTheme">
|
||
<a-select-option v-for="p in Protocols" :key="p" :value="p">[[ p ]]</a-select-option>
|
||
</a-select>
|
||
</a-form-item>
|
||
|
||
<!-- 监听地址 -->
|
||
<a-form-item>
|
||
<template slot="label">
|
||
<a-tooltip>
|
||
<template slot="title">
|
||
<span>{{ i18n "pages.inbounds.monitorDesc" }}</span>
|
||
</template>
|
||
{{ i18n "monitor" }}
|
||
<a-icon type="question-circle"></a-icon>
|
||
</a-tooltip>
|
||
</template>
|
||
<a-input v-model.trim="inbound.listen"></a-input>
|
||
</a-form-item>
|
||
|
||
<!-- 端口 + 总流量 在同一行 -->
|
||
<a-row :gutter="16">
|
||
<!-- 左侧:端口 -->
|
||
<a-col :span="12">
|
||
<a-form-item>
|
||
<template slot="label">
|
||
<a-tooltip>
|
||
<template slot="title">
|
||
端口范围:1 - 65531(请尽量使用高位端口)
|
||
</template>
|
||
{{ i18n "pages.inbounds.port" }}
|
||
<a-icon type="question-circle"></a-icon>
|
||
</a-tooltip>
|
||
</template>
|
||
<a-input-number v-model.number="inbound.port" :min="1" :max="65531" style="width: 100%" />
|
||
</a-form-item>
|
||
</a-col>
|
||
|
||
<!-- 右侧:总流量 -->
|
||
<a-col :span="12">
|
||
<a-form-item>
|
||
<template slot="label">
|
||
<a-tooltip>
|
||
<template slot="title">
|
||
0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
|
||
</template>
|
||
{{ i18n "pages.inbounds.totalFlow" }}
|
||
<a-icon type="question-circle"></a-icon>
|
||
</a-tooltip>
|
||
</template>
|
||
<a-input-number v-model.number="dbInbound.totalGB" :min="0" style="width: 100%" />
|
||
</a-form-item>
|
||
</a-col>
|
||
</a-row>
|
||
|
||
<!-- 设备限制 单独占一行 -->
|
||
<a-form-item>
|
||
<template slot="label">
|
||
<a-tooltip>
|
||
<template slot="title">
|
||
{{ i18n "pages.inbounds.deviceLimitDesc" }}
|
||
</template>
|
||
{{ i18n "pages.inbounds.deviceLimit" }}
|
||
<a-icon type="question-circle"></a-icon>
|
||
</a-tooltip>
|
||
</template>
|
||
<a-input-number
|
||
v-model.number="dbInbound.deviceLimit"
|
||
:min="0"
|
||
style="width: 100%"
|
||
placeholder="0 = 不限制" />
|
||
</a-form-item>
|
||
|
||
<!-- 到期时间 -->
|
||
<a-form-item>
|
||
<template slot="label">
|
||
<a-tooltip>
|
||
<template slot="title">
|
||
<span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
|
||
</template>
|
||
{{ i18n "pages.inbounds.expireDate" }}
|
||
<a-icon type="question-circle"></a-icon>
|
||
</a-tooltip>
|
||
</template>
|
||
<a-date-picker :style="{ width: '100%' }" v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }"
|
||
format="YYYY-MM-DD HH:mm:ss" :dropdown-class-name="themeSwitcher.currentTheme"
|
||
v-model="dbInbound._expiryTime"></a-date-picker>
|
||
<a-persian-datepicker v-else placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}'
|
||
value="dbInbound._expiryTime" v-model="dbInbound._expiryTime">
|
||
</a-persian-datepicker>
|
||
</a-form-item>
|
||
</a-form>
|
||
|
||
<!-- vmess settings -->
|
||
<template v-if="inbound.protocol === Protocols.VMESS">
|
||
{{template "form/vmess"}}
|
||
</template>
|
||
|
||
<!-- vless settings -->
|
||
<template v-if="inbound.protocol === Protocols.VLESS">
|
||
{{template "form/vless"}}
|
||
</template>
|
||
|
||
<!-- trojan settings -->
|
||
<template v-if="inbound.protocol === Protocols.TROJAN">
|
||
{{template "form/trojan"}}
|
||
</template>
|
||
|
||
<!-- shadowsocks -->
|
||
<template v-if="inbound.protocol === Protocols.SHADOWSOCKS">
|
||
{{template "form/shadowsocks"}}
|
||
</template>
|
||
|
||
<!-- tunnel -->
|
||
<template v-if="inbound.protocol === Protocols.TUNNEL">
|
||
{{template "form/tunnel"}}
|
||
</template>
|
||
|
||
<!-- socks -->
|
||
<template v-if="inbound.protocol === Protocols.SOCKS">
|
||
{{template "form/socks"}}
|
||
</template>
|
||
|
||
<!-- http -->
|
||
<template v-if="inbound.protocol === Protocols.HTTP">
|
||
{{template "form/http"}}
|
||
</template>
|
||
|
||
<!-- wireguard -->
|
||
<template v-if="inbound.protocol === Protocols.WIREGUARD">
|
||
{{template "form/wireguard"}}
|
||
</template>
|
||
|
||
<!-- stream settings -->
|
||
<template v-if="inbound.canEnableStream()">
|
||
{{template "form/streamSettings"}}
|
||
{{template "form/externalProxy" }}
|
||
</template>
|
||
|
||
<!-- tls settings -->
|
||
<template v-if="inbound.canEnableTls()">
|
||
{{template "form/tlsSettings"}}
|
||
</template>
|
||
|
||
<!-- sniffing -->
|
||
<a-collapse>
|
||
<a-collapse-panel header='Sniffing'>
|
||
{{template "form/sniffing"}}
|
||
</a-collapse-panel>
|
||
</a-collapse>
|
||
|
||
{{end}}
|