diff options
| author | lolka1333 <xtrafcyz@gmail.com> | 2026-01-03 07:26:00 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-03 07:26:00 +0300 |
| commit | 313a2acbf66125feb4b145a5636351ed03e666da (patch) | |
| tree | 6be6fac0ced2d0dce60ba55e2feaa83c257ed720 /web/html/form | |
| parent | b7477302112b43a2ae037b63994c59e85f9c0687 (diff) | |
feat: Add WebSocket support for real-time updates and enhance VLESS settings (#3605)
* feat: add support for trusted X-Forwarded-For and testseed parameters in VLESS settings
* chore: update Xray Core version to 25.12.8 in release workflow
* chore: update Xray Core version to 25.12.8 in Docker initialization script
* chore: bump version to 2.8.6 and add watcher for security changes in inbound modal
* refactor: remove default and random seed buttons from outbound form
* refactor: update VLESS form to rename 'Test Seed' to 'Vision Seed' and change button functionality for seed generation
* refactor: enhance TLS settings form layout with improved button styling and spacing
* feat: integrate WebSocket support for real-time updates on inbounds and Xray service status
* chore: downgrade version to 2.8.5
* refactor: translate comments to English
* fix: ensure testseed is initialized correctly for VLESS protocol and improve client handling in inbound modal
* refactor: simplify VLESS divider condition by removing unnecessary flow checks
* fix: add fallback date formatting for cases when IntlUtil is not available
* refactor: simplify WebSocket message handling by removing batching and ensuring individual message delivery
* refactor: disable WebSocket notifications in inbound and index HTML files
* refactor: enhance VLESS testseed initialization and button functionality in inbound modal
* fix:
* refactor: ensure proper WebSocket URL construction by normalizing basePath
* fix:
* fix:
* fix:
* refactor: update testseed methods for improved reactivity and binding in VLESS form
* logger info to debug
---------
Co-authored-by: lolka1333 <test123@gmail.com>
Diffstat (limited to 'web/html/form')
| -rw-r--r-- | web/html/form/outbound.html | 31 | ||||
| -rw-r--r-- | web/html/form/protocol/vless.html | 30 | ||||
| -rw-r--r-- | web/html/form/stream/stream_sockopt.html | 9 | ||||
| -rw-r--r-- | web/html/form/tls_settings.html | 18 |
4 files changed, 81 insertions, 7 deletions
diff --git a/web/html/form/outbound.html b/web/html/form/outbound.html index aa6aa323..1926c30e 100644 --- a/web/html/form/outbound.html +++ b/web/html/form/outbound.html @@ -239,6 +239,28 @@ </a-select> </a-form-item> </template> + <!-- XTLS Vision Advanced Settings --> + <template v-if="outbound.protocol === Protocols.VLESS && (outbound.settings.flow === 'xtls-rprx-vision' || outbound.settings.flow === 'xtls-rprx-vision-udp443')"> + <a-form-item label="Vision Pre-Connect"> + <a-input-number v-model.number="outbound.settings.testpre" :min="0" :max="10" :style="{ width: '100%' }" placeholder="0"></a-input-number> + </a-form-item> + <a-form-item label="Vision Seed"> + <a-row :gutter="8"> + <a-col :span="6"> + <a-input-number v-model.number="outbound.settings.testseed[0]" :min="0" :max="9999" :style="{ width: '100%' }" placeholder="900" addon-before="[0]"></a-input-number> + </a-col> + <a-col :span="6"> + <a-input-number v-model.number="outbound.settings.testseed[1]" :min="0" :max="9999" :style="{ width: '100%' }" placeholder="500" addon-before="[1]"></a-input-number> + </a-col> + <a-col :span="6"> + <a-input-number v-model.number="outbound.settings.testseed[2]" :min="0" :max="9999" :style="{ width: '100%' }" placeholder="900" addon-before="[2]"></a-input-number> + </a-col> + <a-col :span="6"> + <a-input-number v-model.number="outbound.settings.testseed[3]" :min="0" :max="9999" :style="{ width: '100%' }" placeholder="256" addon-before="[3]"></a-input-number> + </a-col> + </a-row> + </a-form-item> + </template> </template> <!-- Servers (trojan/shadowsocks/socks/http) settings --> @@ -501,6 +523,15 @@ <a-form-item label="Penetrate"> <a-switch v-model="outbound.stream.sockopt.penetrate"></a-switch> </a-form-item> + <a-form-item label="Trusted X-Forwarded-For"> + <a-select mode="tags" v-model="outbound.stream.sockopt.trustedXForwardedFor" :style="{ width: '100%' }" + :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option value="CF-Connecting-IP">CF-Connecting-IP</a-select-option> + <a-select-option value="X-Real-IP">X-Real-IP</a-select-option> + <a-select-option value="True-Client-IP">True-Client-IP</a-select-option> + <a-select-option value="X-Client-IP">X-Client-IP</a-select-option> + </a-select> + </a-form-item> </template> <!-- mux settings --> diff --git a/web/html/form/protocol/vless.html b/web/html/form/protocol/vless.html index 140b9c1a..ad5b4265 100644 --- a/web/html/form/protocol/vless.html +++ b/web/html/form/protocol/vless.html @@ -39,6 +39,7 @@ </a-space> </a-form-item> </a-form> + <a-divider v-if="inbound.settings.selectedAuth" :style="{ margin: '5px 0' }"></a-divider> </template> <template v-if="inbound.isTcp && !inbound.settings.selectedAuth"> <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"> @@ -69,4 +70,33 @@ </a-form> <a-divider :style="{ margin: '5px 0' }"></a-divider> </template> +<template v-if="inbound.settings.vlesses.some(c => c.flow === 'xtls-rprx-vision' || c.flow === 'xtls-rprx-vision-udp443')"> + <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"> + <a-form-item label="Vision Seed"> + <a-row :gutter="8"> + <a-col :span="6"> + <a-input-number :value="(inbound.settings.testseed && inbound.settings.testseed[0] !== undefined) ? inbound.settings.testseed[0] : 900" @change="(val) => updateTestseed(0, val)" :min="0" :max="9999" :style="{ width: '100%' }" placeholder="900" addon-before="[0]"></a-input-number> + </a-col> + <a-col :span="6"> + <a-input-number :value="(inbound.settings.testseed && inbound.settings.testseed[1] !== undefined) ? inbound.settings.testseed[1] : 500" @change="(val) => updateTestseed(1, val)" :min="0" :max="9999" :style="{ width: '100%' }" placeholder="500" addon-before="[1]"></a-input-number> + </a-col> + <a-col :span="6"> + <a-input-number :value="(inbound.settings.testseed && inbound.settings.testseed[2] !== undefined) ? inbound.settings.testseed[2] : 900" @change="(val) => updateTestseed(2, val)" :min="0" :max="9999" :style="{ width: '100%' }" placeholder="900" addon-before="[2]"></a-input-number> + </a-col> + <a-col :span="6"> + <a-input-number :value="(inbound.settings.testseed && inbound.settings.testseed[3] !== undefined) ? inbound.settings.testseed[3] : 256" @change="(val) => updateTestseed(3, val)" :min="0" :max="9999" :style="{ width: '100%' }" placeholder="256" addon-before="[3]"></a-input-number> + </a-col> + </a-row> + <a-space :size="8" :style="{ marginTop: '8px' }"> + <a-button type="primary" @click="setRandomTestseed"> + Rand + </a-button> + <a-button @click="resetTestseed"> + Reset + </a-button> + </a-space> + </a-form-item> + </a-form> + <a-divider :style="{ margin: '5px 0' }"></a-divider> +</template> {{end}} diff --git a/web/html/form/stream/stream_sockopt.html b/web/html/form/stream/stream_sockopt.html index 4480594a..062b83df 100644 --- a/web/html/form/stream/stream_sockopt.html +++ b/web/html/form/stream/stream_sockopt.html @@ -61,6 +61,15 @@ <a-form-item label="Interface Name"> <a-input v-model="inbound.stream.sockopt.interfaceName"></a-input> </a-form-item> + <a-form-item label="Trusted X-Forwarded-For"> + <a-select mode="tags" v-model="inbound.stream.sockopt.trustedXForwardedFor" :style="{ width: '100%' }" + :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option value="CF-Connecting-IP">CF-Connecting-IP</a-select-option> + <a-select-option value="X-Real-IP">X-Real-IP</a-select-option> + <a-select-option value="True-Client-IP">True-Client-IP</a-select-option> + <a-select-option value="X-Client-IP">X-Client-IP</a-select-option> + </a-select> + </a-form-item> </template> </a-form> {{end}} diff --git a/web/html/form/tls_settings.html b/web/html/form/tls_settings.html index c3844a7f..3723130e 100644 --- a/web/html/form/tls_settings.html +++ b/web/html/form/tls_settings.html @@ -60,16 +60,20 @@ <a-form-item label="VerifyPeerCertInNames"> <a-input v-model.trim="inbound.stream.tls.verifyPeerCertInNames"></a-input> </a-form-item> + <a-divider :style="{ margin: '3px 0' }"></a-divider> <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 v-model="cert.useFile" button-style="solid" :style="{ display: 'inline-flex', whiteSpace: 'nowrap', maxWidth: '100%' }"> + <a-radio-button :value="true" :style="{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }">{{ i18n "pages.inbounds.certificatePath" }}</a-radio-button> + <a-radio-button :value="false" :style="{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }">{{ 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="{ marginLeft: '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="{ marginLeft: '10px' }"></a-button> + </a-form-item> + <a-form-item label=" "> + <a-space> + <a-button icon="plus" v-if="index === 0" type="primary" size="small" @click="inbound.stream.tls.addCert()"></a-button> + <a-button icon="minus" v-if="inbound.stream.tls.certs.length>1" type="primary" size="small" + @click="inbound.stream.tls.removeCert(index)"></a-button> + </a-space> </a-form-item> <template v-if="cert.useFile"> <a-form-item label='{{ i18n "pages.inbounds.publicKey" }}'> |
