mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-10 21:30:59 +00:00
inbounds: allow custom monthly traffic reset days (#6071)
This commit is contained in:
@@ -450,6 +450,7 @@ export const EXAMPLES: Record<string, unknown> = {
|
||||
"tag": "in-443-tcp",
|
||||
"total": 0,
|
||||
"trafficReset": "never",
|
||||
"trafficResetDay": 1,
|
||||
"up": 0
|
||||
},
|
||||
"InboundClientIps": {
|
||||
|
||||
@@ -1842,6 +1842,13 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"trafficResetDay": {
|
||||
"description": "Day of month for monthly traffic resets",
|
||||
"example": 1,
|
||||
"maximum": 31,
|
||||
"minimum": 1,
|
||||
"type": "integer"
|
||||
},
|
||||
"up": {
|
||||
"description": "Upload traffic in bytes",
|
||||
"format": "int64",
|
||||
@@ -1868,6 +1875,7 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"tag",
|
||||
"total",
|
||||
"trafficReset",
|
||||
"trafficResetDay",
|
||||
"up"
|
||||
],
|
||||
"type": "object"
|
||||
|
||||
@@ -428,6 +428,7 @@ export interface Inbound {
|
||||
tag: string;
|
||||
total: number;
|
||||
trafficReset: string;
|
||||
trafficResetDay: number;
|
||||
up: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -453,6 +453,7 @@ export const InboundSchema = z.object({
|
||||
tag: z.string(),
|
||||
total: z.number().int(),
|
||||
trafficReset: z.enum(['never', 'hourly', 'daily', 'weekly', 'monthly']),
|
||||
trafficResetDay: z.number().int().min(1).max(31),
|
||||
up: z.number().int(),
|
||||
});
|
||||
export type Inbound = z.infer<typeof InboundSchema>;
|
||||
|
||||
Reference in New Issue
Block a user