Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTara Rostami <132676256+TaraRostami@users.noreply.github.com>2024-04-20 21:45:36 +0300
committerGitHub <noreply@github.com>2024-04-20 21:45:36 +0300
commitdb24d216210e0038f92e634de1ab8a46fbce4632 (patch)
tree3648326a1e359543febd865747822bc6f8f72781 /web/html/xui/form/tls_settings.html
parent3d5c06bf08f0ede7206e0ef39966d6be2106a225 (diff)
UI Improvements (#2228)
* UI Improvements Better Table Update QR Code Modal Better Info Modal Compression HTML files Better Dropdown Menu Better Calendar and more .. Remove files Minor Fixes
Diffstat (limited to 'web/html/xui/form/tls_settings.html')
-rw-r--r--web/html/xui/form/tls_settings.html337
1 files changed, 163 insertions, 174 deletions
diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html
index a2d9bd77..cfbda0f2 100644
--- a/web/html/xui/form/tls_settings.html
+++ b/web/html/xui/form/tls_settings.html
@@ -1,194 +1,183 @@
{{define "form/tlsSettings"}}
<!-- tls enable -->
<a-form v-if="inbound.canEnableTls()" :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
- <a-divider style="margin:3px 0;"></a-divider>
- <a-form-item label='{{ i18n "security" }}'>
- <a-radio-group v-model="inbound.stream.security" button-style="solid">
- <a-radio-button value="none">{{ i18n "none" }}</a-radio-button>
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.inbounds.xtlsDesc" }}</span>
- </template>
- <a-radio-button v-if="inbound.canEnableXtls()" value="xtls">XTLS</a-radio-button>
- </a-tooltip>
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.inbounds.realityDesc" }}</span>
- </template>
- <a-radio-button v-if="inbound.canEnableReality()" value="reality">REALITY</a-radio-button>
- </a-tooltip>
- <a-radio-button value="tls">TLS</a-radio-button>
- </a-radio-group>
- </a-form-item>
+ <a-divider style="margin:3px 0;"></a-divider>
+ <a-form-item label='{{ i18n "security" }}'>
+ <a-radio-group v-model="inbound.stream.security" button-style="solid">
+ <a-radio-button value="none">{{ i18n "none" }}</a-radio-button>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.xtlsDesc" }}</span>
+ </template>
+ <a-radio-button v-if="inbound.canEnableXtls()" value="xtls">XTLS</a-radio-button>
+ </a-tooltip>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.realityDesc" }}</span>
+ </template>
+ <a-radio-button v-if="inbound.canEnableReality()" value="reality">REALITY</a-radio-button>
+ </a-tooltip>
+ <a-radio-button value="tls">TLS</a-radio-button>
+ </a-radio-group>
+ </a-form-item>
- <!-- tls settings -->
- <template v-if="inbound.stream.isTls">
- <a-form-item label="SNI" placeholder="Server Name Indication">
- <a-input v-model.trim="inbound.stream.tls.sni"></a-input>
- </a-form-item>
- <a-form-item label="Cipher Suites">
- <a-select v-model="inbound.stream.tls.cipherSuites" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option value="">Auto</a-select-option>
- <a-select-option v-for="key,value in TLS_CIPHER_OPTION" :value="key">[[ value ]]</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label="Min/Max Version">
- <a-input-group compact>
- <a-select v-model="inbound.stream.tls.minVersion" style="width: 50%" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="key in TLS_VERSION_OPTION" :value="key">[[ key ]]</a-select-option>
- </a-select>
- <a-select v-model="inbound.stream.tls.maxVersion" style="width: 50%" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="key in TLS_VERSION_OPTION" :value="key">[[ key ]]</a-select-option>
- </a-select>
- </a-input-group>
+ <!-- tls settings -->
+ <template v-if="inbound.stream.isTls">
+ <a-form-item label="SNI" placeholder="Server Name Indication">
+ <a-input v-model.trim="inbound.stream.tls.sni"></a-input>
+ </a-form-item>
+ <a-form-item label="Cipher Suites">
+ <a-select v-model="inbound.stream.tls.cipherSuites" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="">Auto</a-select-option>
+ <a-select-option v-for="key,value in TLS_CIPHER_OPTION" :value="key">[[ value ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label="Min/Max Version">
+ <a-input-group compact>
+ <a-select v-model="inbound.stream.tls.minVersion" style="width: 50%" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option v-for="key in TLS_VERSION_OPTION" :value="key">[[ key ]]</a-select-option>
+ </a-select>
+ <a-select v-model="inbound.stream.tls.maxVersion" style="width: 50%" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option v-for="key in TLS_VERSION_OPTION" :value="key">[[ key ]]</a-select-option>
+ </a-select>
+ </a-input-group>
+ </a-form-item>
+ <a-form-item label="uTLS">
+ <a-select v-model="inbound.stream.tls.settings.fingerprint" style="width: 50%" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value=''>None</a-select-option>
+ <a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label="ALPN">
+ <a-select mode="multiple" :dropdown-class-name="themeSwitcher.currentTheme" v-model="inbound.stream.tls.alpn">
+ <a-select-option v-for="alpn in ALPN_OPTION" :value="alpn">[[ alpn ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label="Allow Insecure">
+ <a-switch v-model="inbound.stream.tls.settings.allowInsecure"></a-switch>
+ </a-form-item>
+ <a-form-item label="Reject Unknown SNI">
+ <a-switch v-model="inbound.stream.tls.rejectUnknownSni"></a-switch>
+ </a-form-item>
+ <template v-for="cert,index in inbound.stream.tls.certs">
+ <a-form-item label='{{ i18n "certificate" }}'>
+ <a-radio-group v-model="cert.useFile" button-style="solid">
+ <a-radio-button :value="true">{{ i18n "pages.inbounds.certificatePath" }}</a-radio-button>
+ <a-radio-button :value="false">{{ i18n "pages.inbounds.certificateContent" }}</a-radio-button>
+ </a-radio-group>
+ <a-button icon="plus" v-if="index === 0" type="primary" size="small" @click="inbound.stream.tls.addCert()" style="margin-left: 10px"></a-button>
+ <a-button icon="minus" v-if="inbound.stream.tls.certs.length>1" type="primary" size="small" @click="inbound.stream.tls.removeCert(index)" style="margin-left: 10px"></a-button>
+ </a-form-item>
+ <template v-if="cert.useFile">
+ <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
+ <a-input v-model.trim="cert.certFile"></a-input>
</a-form-item>
- <a-form-item label="uTLS">
- <a-select v-model="inbound.stream.tls.settings.fingerprint" style="width: 50%"
- :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option value=''>None</a-select-option>
- <a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
- </a-select>
+ <a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
+ <a-input v-model.trim="cert.keyFile"></a-input>
</a-form-item>
- <a-form-item label="ALPN">
- <a-select mode="multiple" :dropdown-class-name="themeSwitcher.currentTheme"
- v-model="inbound.stream.tls.alpn">
- <a-select-option v-for="alpn in ALPN_OPTION" :value="alpn">[[ alpn ]]</a-select-option>
- </a-select>
+ <a-form-item label=" ">
+ <a-button type="primary" icon="import" @click="setDefaultCertData(index)">{{ i18n "pages.inbounds.setDefaultCert" }}</a-button>
</a-form-item>
- <a-form-item label="Allow Insecure">
- <a-switch v-model="inbound.stream.tls.settings.allowInsecure"></a-switch>
+ </template>
+ <template v-else>
+ <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
+ <a-input type="textarea" :rows="3" v-model="cert.cert"></a-input>
</a-form-item>
- <a-form-item label="Reject Unknown SNI">
- <a-switch v-model="inbound.stream.tls.rejectUnknownSni"></a-switch>
+ <a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
+ <a-input type="textarea" :rows="3" v-model="cert.key"></a-input>
</a-form-item>
- <template v-for="cert,index in inbound.stream.tls.certs">
- <a-form-item label='{{ i18n "certificate" }}'>
- <a-radio-group v-model="cert.useFile" button-style="solid">
- <a-radio-button :value="true">{{ i18n "pages.inbounds.certificatePath" }}</a-radio-button>
- <a-radio-button :value="false">{{ i18n "pages.inbounds.certificateContent" }}</a-radio-button>
- </a-radio-group>
- <a-button v-if="index === 0" type="primary" size="small" @click="inbound.stream.tls.addCert()"
- style="margin-left: 10px">+</a-button>
- <a-button v-if="inbound.stream.tls.certs.length>1" type="primary" size="small"
- @click="inbound.stream.tls.removeCert(index)" style="margin-left: 10px">-</a-button>
- </a-form-item>
- <template v-if="cert.useFile">
- <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
- <a-input v-model.trim="cert.certFile"></a-input>
- </a-form-item>
- <a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
- <a-input v-model.trim="cert.keyFile"></a-input>
- </a-form-item>
- <a-form-item label=" ">
- <a-button type="primary" icon="import" @click="setDefaultCertData(index)">{{ i18n
- "pages.inbounds.setDefaultCert" }}</a-button>
- </a-form-item>
- </template>
- <template v-else>
- <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
- <a-input type="textarea" :rows="3" v-model="cert.cert"></a-input>
- </a-form-item>
- <a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
- <a-input type="textarea" :rows="3" v-model="cert.key"></a-input>
- </a-form-item>
- </template>
- <a-form-item label='OCSP stapling'>
- <a-input-number v-model.number="cert.ocspStapling" :min="0"></a-input-number>
- </a-form-item>
- </template>
+ </template>
+ <a-form-item label='OCSP stapling'>
+ <a-input-number v-model.number="cert.ocspStapling" :min="0"></a-input-number>
+ </a-form-item>
</template>
+ </template>
- <!-- xtls settings -->
- <template v-else-if="inbound.xtls">
- <a-form-item label="SNI" placeholder="Server Name Indication">
- <a-input v-model.trim="inbound.stream.xtls.sni"></a-input>
- </a-form-item>
- <a-form-item label="ALPN">
- <a-select mode="multiple" :dropdown-class-name="themeSwitcher.currentTheme"
- v-model="inbound.stream.xtls.alpn">
- <a-select-option v-for="alpn in ALPN_OPTION" :value="alpn">[[ alpn ]]</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label="Allow Insecure">
- <a-switch v-model="inbound.stream.xtls.settings.allowInsecure"></a-switch>
- </a-form-item>
- <template v-for="cert,index in inbound.stream.xtls.certs">
- <a-form-item label='{{ i18n "certificate" }}'>
- <a-radio-group v-model="cert.useFile" button-style="solid">
- <a-radio-button :value="true">{{ i18n "pages.inbounds.certificatePath" }}</a-radio-button>
- <a-radio-button :value="false">{{ i18n "pages.inbounds.certificateContent" }}</a-radio-button>
- </a-radio-group>
- <a-button v-if="index === 0" type="primary" size="small" @click="inbound.stream.xtls.addCert()"
- style="margin-left: 10px">+</a-button>
- <a-button v-if="inbound.stream.xtls.certs.length>1" type="primary" size="small"
- @click="inbound.stream.xtls.removeCert(index)" style="margin-left: 10px">-</a-button>
- </a-form-item>
- <template v-if="cert.useFile">
- <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
- <a-input v-model.trim="cert.certFile"></a-input>
- </a-form-item>
- <a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
- <a-input v-model.trim="cert.keyFile"></a-input>
- </a-form-item>
- <a-form-item label=" ">
- <a-button type="primary" icon="import" @click="setDefaultCertXtls(index)">{{ i18n
- "pages.inbounds.setDefaultCert" }}</a-button>
- </a-form-item>
- </template>
- <template v-else>
- <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
- <a-input type="textarea" :rows="3" v-model="cert.cert"></a-input>
- </a-form-item>
- <a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
- <a-input type="textarea" :rows="3" v-model="cert.key"></a-input>
- </a-form-item>
- </template>
- </template>
- </template>
- <!-- reality settings -->
- <template v-if="inbound.stream.isReality">
- <a-form-item label='Show'>
- <a-switch v-model="inbound.stream.reality.show"></a-switch>
- </a-form-item>
- <a-form-item label='Xver'>
- <a-input-number v-model.number="inbound.stream.reality.xver" :min="0"></a-input-number>
- </a-form-item>
- <a-form-item label='uTLS'>
- <a-select v-model="inbound.stream.reality.settings.fingerprint" style="width: 50%"
- :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label='Dest'>
- <a-input v-model.trim="inbound.stream.reality.dest"></a-input>
- </a-form-item>
- <a-form-item label='SNI'>
- <a-input v-model.trim="inbound.stream.reality.serverNames"></a-input>
- </a-form-item>
- <a-form-item>
- <template slot="label">
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "reset" }}</span>
- </template>
- Short ID
- <a-icon @click="inbound.stream.reality.shortIds = RandomUtil.randomShortId()" type="sync"> </a-icon>
- </a-icon>
- </template>
- <a-input v-model.trim="inbound.stream.reality.shortIds"></a-input>
- </a-form-item>
- <a-form-item label='SpiderX'>
- <a-input v-model.trim="inbound.stream.reality.settings.spiderX"></a-input>
+ <!-- xtls settings -->
+ <template v-else-if="inbound.xtls">
+ <a-form-item label="SNI" placeholder="Server Name Indication">
+ <a-input v-model.trim="inbound.stream.xtls.sni"></a-input>
+ </a-form-item>
+ <a-form-item label="ALPN">
+ <a-select mode="multiple" :dropdown-class-name="themeSwitcher.currentTheme" v-model="inbound.stream.xtls.alpn">
+ <a-select-option v-for="alpn in ALPN_OPTION" :value="alpn">[[ alpn ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label="Allow Insecure">
+ <a-switch v-model="inbound.stream.xtls.settings.allowInsecure"></a-switch>
+ </a-form-item>
+ <template v-for="cert,index in inbound.stream.xtls.certs">
+ <a-form-item label='{{ i18n "certificate" }}'>
+ <a-radio-group v-model="cert.useFile" button-style="solid">
+ <a-radio-button :value="true">{{ i18n "pages.inbounds.certificatePath" }}</a-radio-button>
+ <a-radio-button :value="false">{{ i18n "pages.inbounds.certificateContent" }}</a-radio-button>
+ </a-radio-group>
+ <a-button icon="plus" v-if="index === 0" type="primary" size="small" @click="inbound.stream.xtls.addCert()" style="margin-left: 10px"></a-button>
+ <a-button icon="minus" v-if="inbound.stream.xtls.certs.length>1" type="primary" size="small" @click="inbound.stream.xtls.removeCert(index)" style="margin-left: 10px"></a-button>
+ </a-form-item>
+ <template v-if="cert.useFile">
+ <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
+ <a-input v-model.trim="cert.certFile"></a-input>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
- <a-input v-model.trim="inbound.stream.reality.privateKey"></a-input>
+ <a-input v-model.trim="cert.keyFile"></a-input>
</a-form-item>
+ <a-form-item label=" ">
+ <a-button type="primary" icon="import" @click="setDefaultCertXtls(index)">{{ i18n "pages.inbounds.setDefaultCert" }}</a-button>
+ </a-form-item>
+ </template>
+ <template v-else>
<a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
- <a-input v-model.trim="inbound.stream.reality.settings.publicKey"></a-input>
+ <a-input type="textarea" :rows="3" v-model="cert.cert"></a-input>
</a-form-item>
- <a-form-item label=" ">
- <a-button type="primary" icon="import" @click="getNewX25519Cert">Get New Cert</a-button>
+ <a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
+ <a-input type="textarea" :rows="3" v-model="cert.key"></a-input>
</a-form-item>
+ </template>
</template>
+ </template>
+
+ <!-- reality settings -->
+ <template v-if="inbound.stream.isReality">
+ <a-form-item label='Show'>
+ <a-switch v-model="inbound.stream.reality.show"></a-switch>
+ </a-form-item>
+ <a-form-item label='Xver'>
+ <a-input-number v-model.number="inbound.stream.reality.xver" :min="0"></a-input-number>
+ </a-form-item>
+ <a-form-item label='uTLS'>
+ <a-select v-model="inbound.stream.reality.settings.fingerprint" style="width: 50%" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label='Dest'>
+ <a-input v-model.trim="inbound.stream.reality.dest"></a-input>
+ </a-form-item>
+ <a-form-item label='SNI'>
+ <a-input v-model.trim="inbound.stream.reality.serverNames"></a-input>
+ </a-form-item>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "reset" }}</span>
+ </template> Short ID <a-icon @click="inbound.stream.reality.shortIds = RandomUtil.randomShortId()" type="sync"></a-icon>
+ </a-tooltip>
+ </template>
+ <a-input v-model.trim="inbound.stream.reality.shortIds"></a-input>
+ </a-form-item>
+ <a-form-item label='SpiderX'>
+ <a-input v-model.trim="inbound.stream.reality.settings.spiderX"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.inbounds.privatekey" }}'>
+ <a-input v-model.trim="inbound.stream.reality.privateKey"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'>
+ <a-input v-model.trim="inbound.stream.reality.settings.publicKey"></a-input>
+ </a-form-item>
+ <a-form-item label=" ">
+ <a-button type="primary" icon="import" @click="getNewX25519Cert">Get New Cert</a-button>
+ </a-form-item>
+ </template>
</a-form>
{{end}}