mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-13 17:35:02 +03:00
fix(inbounds): accept masque in the inbound protocol validator
The inbound add and update handlers bind the body into model.Inbound and
validate Protocol against a oneof list that predates MASQUE, so every
save of a MASQUE inbound from the panel or the API failed validation
even though the rest of the stack (b04039c2) handles the protocol.
Add masque to the list and regenerate the schemas and OpenAPI document
that mirror it.
This commit is contained in:
@@ -3115,7 +3115,8 @@
|
||||
"tun",
|
||||
"mtproto",
|
||||
"amneziawg",
|
||||
"tuic"
|
||||
"tuic",
|
||||
"masque"
|
||||
],
|
||||
"example": "vless",
|
||||
"type": "string"
|
||||
|
||||
@@ -3089,7 +3089,8 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"tun",
|
||||
"mtproto",
|
||||
"amneziawg",
|
||||
"tuic"
|
||||
"tuic",
|
||||
"masque"
|
||||
],
|
||||
"example": "vless",
|
||||
"type": "string"
|
||||
|
||||
@@ -757,7 +757,7 @@ export const InboundSchema = z.object({
|
||||
nodeId: z.number().int().nullable().optional(),
|
||||
originNodeGuid: z.string().optional(),
|
||||
port: z.number().int().min(0).max(65535),
|
||||
protocol: z.enum(['vmess', 'vless', 'trojan', 'shadowsocks', 'wireguard', 'hysteria', 'http', 'mixed', 'tunnel', 'tun', 'mtproto', 'amneziawg', 'tuic']),
|
||||
protocol: z.enum(['vmess', 'vless', 'trojan', 'shadowsocks', 'wireguard', 'hysteria', 'http', 'mixed', 'tunnel', 'tun', 'mtproto', 'amneziawg', 'tuic', 'masque']),
|
||||
remark: z.string(),
|
||||
settings: z.unknown(),
|
||||
shareAddr: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user