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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@ export interface ServerConstraints {
 | 
			
		||||
  disk_size: LenConstraint;
 | 
			
		||||
  net_name_size: LenConstraint;
 | 
			
		||||
  net_title_size: LenConstraint;
 | 
			
		||||
  net_nat_comment_size: LenConstraint;
 | 
			
		||||
  dhcp_reservation_host_name: LenConstraint;
 | 
			
		||||
  nwfilter_name_size: LenConstraint;
 | 
			
		||||
  nwfilter_comment_size: LenConstraint;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user