添加管理员端路由管理功能,查看当前系统剩余的NAT4或者V6地址剩余情况

This commit is contained in:
MengMengCode
2026-06-06 10:30:48 +08:00
parent 8dd01fe714
commit 8b402fcfa1
8 changed files with 518 additions and 1 deletions
+39
View File
@@ -283,6 +283,45 @@ export const getIPv6Status = () =>
export const assignIPv6 = (id: ContainerIdentifier) =>
api.post<APIResponse<Container>>(`/containers/${id}/ipv6`)
export interface RouteCapacity {
used: number
remaining: string
total: string
}
export interface NAT4Route {
container_id: number
container_name: string
lxc_name: string
status: string
ip: string
host_port: number
container_port: number
protocol: string
description: string
}
export interface IPv6Route {
container_id: number
container_name: string
lxc_name: string
status: string
address: string
prefix_len: number
interface: string
}
export interface RoutingInfo {
nat4: RouteCapacity
ipv6: RouteCapacity
nat4_mappings: NAT4Route[]
ipv6_assignments: IPv6Route[]
ipv6_prefixes: IPv6PrefixInfo[]
}
export const getRoutingInfo = () =>
api.get<APIResponse<RoutingInfo>>('/routing')
// Templates
export const getTemplates = () =>
api.get<APIResponse<Template[]>>('/templates')