diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7561ad472..9b03a24a3 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.9/" + Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v26.9.30/" if [ "${{ matrix.platform }}" == "amd64" ]; then fetch ${Xray_URL}Xray-linux-64.zip unzip Xray-linux-64.zip @@ -300,7 +300,7 @@ jobs: cd x-ui\bin # Download Xray for Windows - $Xray_URL = "https://github.com/XTLS/Xray-core/releases/download/v26.9.9/" + $Xray_URL = "https://github.com/XTLS/Xray-core/releases/download/v26.9.30/" 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 82a9abb83..d00dc19e6 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.9/Xray-linux-${ARCH}.zip" +curl -sfLRO "https://github.com/XTLS/Xray-core/releases/download/v26.9.30/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 d6ae08f1c..4029e62dd 100644 --- a/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx +++ b/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx @@ -18,6 +18,7 @@ import type { NamePath } from 'antd/es/form/interface'; import { RandomUtil } from '@/utils'; import { activateOnKey } from '@/utils/a11y'; import { OutboundProtocols, UTLS_FINGERPRINT } from '@/schemas/primitives'; +import { upgradeLegacyXdnsMasks, XDNS_LEGACY_EDNS0 } from '@/lib/xray/xdns-mask'; const UTLS_FINGERPRINT_OPTIONS = Object.values(UTLS_FINGERPRINT).map((value) => ({ value, @@ -244,28 +245,34 @@ export default function FinalMaskForm({ }: FinalMaskFormProps) { const base = asPath(name); - // Migrate legacy TCP mask shapes once on mount so configs saved before - // #6334 (fragment ranges) and #6487 (xmc profiles) render in the list UI. + // 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. const migratedRef = useRef(false); useEffect(() => { if (migratedRef.current) return; migratedRef.current = true; const tcp = form.getFieldValue([...base, 'tcp']); - if (!Array.isArray(tcp)) return; - let anyChanged = false; - const next = tcp.map((mask) => { - if (!mask || typeof mask !== 'object') return mask; - const m = mask as Record; - if (m.type !== 'fragment' && m.type !== 'xmc') return mask; - if (!m.settings || typeof m.settings !== 'object') return mask; - const settings = m.settings as Record; - const { next: migrated, changed } = - m.type === 'fragment' ? migrateFragmentSettings(settings) : migrateXmcSettings(settings); - if (!changed) return mask; - anyChanged = true; - return { ...m, settings: migrated }; - }); - if (anyChanged) form.setFieldValue([...base, 'tcp'], next); + if (Array.isArray(tcp)) { + let anyChanged = false; + const next = tcp.map((mask) => { + if (!mask || typeof mask !== 'object') return mask; + const m = mask as Record; + if (m.type !== 'fragment' && m.type !== 'xmc') return mask; + if (!m.settings || typeof m.settings !== 'object') return mask; + const settings = m.settings as Record; + const { next: migrated, changed } = + m.type === 'fragment' ? migrateFragmentSettings(settings) : migrateXmcSettings(settings); + if (!changed) return mask; + anyChanged = true; + return { ...m, settings: migrated }; + }); + if (anyChanged) form.setFieldValue([...base, 'tcp'], next); + } + const udp = form.getFieldValue([...base, 'udp']); + if (Array.isArray(udp)) { + const { next, changed } = upgradeLegacyXdnsMasks(udp); + if (changed) form.setFieldValue([...base, 'udp'], next); + } // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -958,11 +965,7 @@ function UdpMaskItem({ ); } if (type === 'xdns') { - return ( - - + + + + + + + +