Cleaner forwarding
This commit is contained in:
@@ -51,25 +51,15 @@ let
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
forward = {
|
||||
inInterface = mkOption {
|
||||
type = types.str;
|
||||
default = "ens3";
|
||||
description = "Incoming interface for forwarding";
|
||||
};
|
||||
|
||||
toAddr = mkOption {
|
||||
type = types.str;
|
||||
description = "Destination address (IPv4 or IPv6)";
|
||||
example = "10.10.1.2";
|
||||
};
|
||||
|
||||
ports = mkOption {
|
||||
type = types.listOf (types.listOf types.port);
|
||||
default = [];
|
||||
description = "Port mappings: [ [srcPort dstPort] ... ]";
|
||||
example = [ [ 22 22 ] [ 80 80 ] [ 443 443 ] ];
|
||||
};
|
||||
forward = mkOption {
|
||||
type = types.listOf (types.listOf (types.oneOf [ types.str types.int ]));
|
||||
default = [];
|
||||
description = "Forwarding rules: [ [srcInterface dstAddr srcPort dstPort] ... ]";
|
||||
example = [
|
||||
[ "ens3" "10.10.1.2" 22 2222 ]
|
||||
[ "ens3" "10.10.1.2" 80 80 ]
|
||||
[ "ens3" "10.10.1.2" 443 443 ]
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user