diff --git a/frontend/src/lib/xray/outbound-form-adapter.ts b/frontend/src/lib/xray/outbound-form-adapter.ts index 86c69697..5ecc41b6 100644 --- a/frontend/src/lib/xray/outbound-form-adapter.ts +++ b/frontend/src/lib/xray/outbound-form-adapter.ts @@ -265,6 +265,10 @@ function freedomFromWire(raw: Raw): FreedomOutboundFormSettings { return (allowed.includes(s) ? s : '') as FreedomOutboundFormSettings['domainStrategy']; })(), redirect: asString(raw.redirect), + proxyProtocol: ((): FreedomOutboundFormSettings['proxyProtocol'] => { + const n = asNumber(raw.proxyProtocol, 0); + return (n === 1 || n === 2) ? n : 0; + })(), fragment: wireHasFragment ? { packets: asString(fragment.packets, '1-3'), @@ -489,6 +493,7 @@ function freedomToWire(s: FreedomOutboundFormSettings) { return { domainStrategy: s.domainStrategy || undefined, redirect: s.redirect || undefined, + proxyProtocol: s.proxyProtocol || undefined, fragment: fragmentEnabled ? Object.fromEntries(fragmentEntries) : undefined, noises: s.noises.length > 0 ? s.noises : undefined, finalRules: s.finalRules.length > 0 diff --git a/frontend/src/pages/xray/OutboundFormModal.tsx b/frontend/src/pages/xray/OutboundFormModal.tsx index 8bd90bc6..29f2f2bc 100644 --- a/frontend/src/pages/xray/OutboundFormModal.tsx +++ b/frontend/src/pages/xray/OutboundFormModal.tsx @@ -664,6 +664,15 @@ export default function OutboundFormModal({ + +