mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-13 14:50:59 +00:00
fix(inbounds): allow port 0 for UDS inbounds (#4783)
Unix Domain Socket inbounds (listen path starting with /) use port 0, which xray-core ignores. Validation was hard-locked to a minimum of 1 in three places: the shared Zod PortSchema, the AntD InputNumber, and the Go Inbound model tag. Adds an InboundPortSchema (min 0) for the inbound form/API schemas, makes the port InputNumber min UDS-aware, and relaxes the Inbound model validate tag to gte=0. PortSchema and the Node model stay min 1.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
import { PortSchema, SniffingSchema } from '@/schemas/primitives';
|
||||
import { InboundPortSchema, SniffingSchema } from '@/schemas/primitives';
|
||||
import { InboundSettingsSchema } from '@/schemas/protocols/inbound';
|
||||
import { SecuritySettingsSchema } from '@/schemas/protocols/security';
|
||||
import { NetworkSettingsSchema, StreamExtrasSchema } from '@/schemas/protocols/stream';
|
||||
@@ -32,7 +32,7 @@ export const InboundCoreSchema = z.object({
|
||||
enable: z.boolean().default(true),
|
||||
expiryTime: z.number().int().default(0),
|
||||
listen: z.string().default(''),
|
||||
port: PortSchema,
|
||||
port: InboundPortSchema,
|
||||
tag: z.string().default(''),
|
||||
sniffing: SniffingSchema.default({
|
||||
enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user