Can configure network NAT settings from UI
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user