Can configure network NAT settings from UI

This commit is contained in:
2024-01-09 21:57:18 +01:00
parent 71e22bc328
commit f82925dbcb
11 changed files with 446 additions and 11 deletions

View File

@ -13,10 +13,28 @@ export interface DHCPConfig {
hosts: DHCPHost[];
}
export type NatSource =
| { type: "interface"; name: string }
| { type: "ip"; ip: string };
export type NatHostPort =
| { type: "single"; port: number }
| { type: "range"; start: number; end: number };
export interface NatEntry {
protocol: "TCP" | "UDP" | "Both";
host_addr: NatSource;
host_port: NatHostPort;
guest_addr: string;
guest_port: number;
comment?: string;
}
export interface IpConfig {
bridge_address: string;
prefix: number;
dhcp?: DHCPConfig;
nat?: NatEntry[];
}
export interface NetworkInfo {