From 73a028f52dd60b6666bd61712cf0dabdda395198 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 11 Oct 2026 07:55:12 +0200 Subject: [PATCH] feat(xray): update xray-core to v26.10.10 and adapt panel Move the three Xray binary pins (DockerInit.sh, both release.yml fetches) to v26.10.10, in lockstep with the xtls/xray-core module that 82c77111 already bumped to 701af60772cd. xdns finalmask (#7090): a domain now takes a "names" list instead of a single "name", and a resolver is an "addrs" list of udp:// or tcp:// URLs instead of {type, settings:{addr}}. The loader ignores the old keys rather than failing, so every mask the 26.9.30 seeder wrote would load with no domain and no resolver and the tunnel would carry nothing. maskcompat.UpgradeLegacyXdns now lifts both the pre-26.9.30 string lists and the 26.9.30 objects straight to names/addrs, dropping entries the old loader refused. A new seeder (XdnsFinalmaskNamesAddrsFix) reruns it over every stored finalmask, and the save path, GetXrayConfig, both link importers and the mask editor's mount lift go through it. Template outbounds now get the build-time heal too: a 26.9.30 template pasted after the seeder passes the save check, since the core loads that shape without error. The editor edits names and addrs as tag lists and no longer requires record types, which the core now defaults (TXT on a client, A/CNAME/TXT/AAAA on a server). The wire format did not change, but clients on an older core cannot read the new config shape. Lua scripts (#6823): dns.script, routing.script and dns servers[].id are new. The xray page parsed the dns block with a strict schema, so loading it dropped script and id and the next save deleted them; the schema now keeps both and the DNS server modal carries the id through an edit. The hot routing apply built routing in-process, and that build now resolves the script file from the panel's working directory, so a script beside the xray binary failed every rule change into a full restart and broke the node bridge. RoutingService cannot change the script anyway, so the panel no longer resolves it there. TLS client roots (#7105): the core now verifies against its bundled Mozilla roots instead of the OS store unless tlsSettings.useSystemCA is set. The outbound TLS form gets a switch for it, so an outbound to a server signed by a privately installed CA can opt back in. --- .github/workflows/release.yml | 4 +- DockerInit.sh | 2 +- .../xray/forms/transport/FinalMaskForm.tsx | 41 +++--- frontend/src/lib/xray/xdns-mask.ts | 67 +++++++--- .../src/pages/xray/dns/DnsServerModal.tsx | 5 + .../src/pages/xray/outbounds/security/tls.tsx | 9 +- frontend/src/schemas/dns.ts | 2 + .../test/__snapshots__/finalmask.test.ts.snap | 15 ++- frontend/src/test/dns-server-modal.test.tsx | 30 +++++ .../golden/fixtures/finalmask/udp-mask.json | 6 +- .../src/test/outbound-form-modal.test.tsx | 92 ++++++++++++-- .../src/test/outbound-link-parser.test.ts | 25 ++-- frontend/src/test/use-xray-setting.test.tsx | 26 ++++ internal/database/db.go | 14 +- .../database/xdns_finalmask_migration_test.go | 22 ++-- internal/util/link/outbound_test.go | 8 +- internal/util/maskcompat/xdns.go | 120 +++++++++++++----- internal/util/maskcompat/xdns_test.go | 98 +++++++++----- internal/web/service/inbound.go | 4 +- .../service/inbound_finalmask_xdns_test.go | 72 +++++++---- internal/web/service/xray.go | 28 ++-- .../web/service/xray_xhttp_session_test.go | 6 +- internal/web/translation/ar-EG.json | 1 + internal/web/translation/en-US.json | 1 + internal/web/translation/es-ES.json | 1 + internal/web/translation/fa-IR.json | 1 + internal/web/translation/id-ID.json | 1 + internal/web/translation/ja-JP.json | 1 + internal/web/translation/pt-BR.json | 1 + internal/web/translation/ru-RU.json | 1 + internal/web/translation/tr-TR.json | 1 + internal/web/translation/uk-UA.json | 1 + internal/web/translation/vi-VN.json | 1 + internal/web/translation/zh-CN.json | 1 + internal/web/translation/zh-TW.json | 1 + internal/xray/api.go | 27 ++-- internal/xray/api_routing_test.go | 22 ++++ 37 files changed, 553 insertions(+), 205 deletions(-) create mode 100644 frontend/src/test/dns-server-modal.test.tsx create mode 100644 internal/xray/api_routing_test.go diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3afb3ef9d..2e277f000 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: cd x-ui/bin # Download dependencies - Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v26.9.30/" + Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v26.10.10/" if [ "${{ matrix.platform }}" == "amd64" ]; then fetch ${Xray_URL}Xray-linux-64.zip unzip Xray-linux-64.zip @@ -278,7 +278,7 @@ jobs: cd x-ui\bin # Download Xray for Windows - $Xray_URL = "https://github.com/XTLS/Xray-core/releases/download/v26.9.30/" + $Xray_URL = "https://github.com/XTLS/Xray-core/releases/download/v26.10.10/" Invoke-WebRequest @retry -Uri "${Xray_URL}Xray-windows-64.zip" -OutFile "Xray-windows-64.zip" Expand-Archive -Path "Xray-windows-64.zip" -DestinationPath . Remove-Item "Xray-windows-64.zip" diff --git a/DockerInit.sh b/DockerInit.sh index f488635a2..18fccad21 100755 --- a/DockerInit.sh +++ b/DockerInit.sh @@ -33,7 +33,7 @@ if [ -z "$MTG_MULTI_VER" ]; then fi mkdir -p build/bin cd build/bin -curl -sfLRO "https://github.com/XTLS/Xray-core/releases/download/v26.9.30/Xray-linux-${ARCH}.zip" +curl -sfLRO "https://github.com/XTLS/Xray-core/releases/download/v26.10.10/Xray-linux-${ARCH}.zip" unzip "Xray-linux-${ARCH}.zip" rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat mv xray "xray-linux-${FNAME}" diff --git a/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx b/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx index 4029e62dd..6efffd7f6 100644 --- a/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx +++ b/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx @@ -246,7 +246,7 @@ export default function FinalMaskForm({ const base = asPath(name); // Migrate legacy mask shapes once on mount so configs saved before #6334 (fragment - // ranges), #6487 (xmc profiles) and #6718 (xdns objects) render in the list UI. + // ranges), #6487 (xmc profiles) and #7090 (xdns names/addrs) render in the list UI. const migratedRef = useRef(false); useEffect(() => { if (migratedRef.current) return; @@ -1280,7 +1280,7 @@ function XdnsSettings({ udpFieldName }: { udpFieldName: number }) { size="small" icon={} aria-label={t('add')} - onClick={() => add({ name: '', types: [16], edns0: XDNS_LEGACY_EDNS0 })} + onClick={() => add({ names: [], edns0: XDNS_LEGACY_EDNS0 })} /> {domains.map((domain, di) => ( @@ -1296,15 +1296,20 @@ function XdnsSettings({ udpFieldName }: { udpFieldName: number }) { onKeyDown={activateOnKey(() => remove(domain.name))} /> - - + + + + - - -