mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-25 05:46:18 +00:00
fix(outbounds): support proxyProtocol on freedom outbound
Xray's freedom outbound accepts a numeric proxyProtocol (0 disabled, 1 or 2 for the PROXY protocol version), but the panel had no field for it and the typed form adapter dropped the key on save — so a value set via the JSON editor disappeared the moment the outbound was saved. Model proxyProtocol through the freedom wire schema, the form schema, and both adapter directions (clamped to 0/1/2, omitted from the wire when 0), and add a Select (none / v1 / v2) to the freedom section of the outbound form. Add round-trip test coverage and the proxyProtocol label across all locales. Closes #4486
This commit is contained in:
@@ -166,6 +166,7 @@ export type FreedomFinalRuleForm = z.infer<typeof FreedomFinalRuleFormSchema>;
|
||||
export const FreedomOutboundFormSettingsSchema = z.object({
|
||||
domainStrategy: z.union([OutboundDomainStrategySchema, z.literal('')]).default(''),
|
||||
redirect: z.string().default(''),
|
||||
proxyProtocol: z.number().int().min(0).max(2).default(0),
|
||||
fragment: FreedomFragmentSchema.default({
|
||||
packets: '1-3',
|
||||
length: '',
|
||||
|
||||
Reference in New Issue
Block a user