Merge pull request #32186 from jbboehr/patch-1
nixos/i2pd: tunnel configuration fixes
This commit is contained in:
commit
58e4f8a14b
@ -126,6 +126,7 @@ let
|
|||||||
[${tun.name}]
|
[${tun.name}]
|
||||||
type = client
|
type = client
|
||||||
destination = ${tun.destination}
|
destination = ${tun.destination}
|
||||||
|
destinationport = ${toString tun.destinationPort}
|
||||||
keys = ${tun.keys}
|
keys = ${tun.keys}
|
||||||
address = ${tun.address}
|
address = ${tun.address}
|
||||||
port = ${toString tun.port}
|
port = ${toString tun.port}
|
||||||
@ -137,15 +138,15 @@ let
|
|||||||
'')
|
'')
|
||||||
}
|
}
|
||||||
${flip concatMapStrings
|
${flip concatMapStrings
|
||||||
(collect (tun: tun ? port && tun ? host) cfg.inTunnels)
|
(collect (tun: tun ? port && tun ? address) cfg.inTunnels)
|
||||||
(tun: let portStr = toString tun.port; in ''
|
(tun: ''
|
||||||
[${tun.name}]
|
[${tun.name}]
|
||||||
type = server
|
type = server
|
||||||
destination = ${tun.destination}
|
destination = ${tun.destination}
|
||||||
keys = ${tun.keys}
|
keys = ${tun.keys}
|
||||||
host = ${tun.address}
|
host = ${tun.address}
|
||||||
port = ${tun.port}
|
port = ${toString tun.port}
|
||||||
inport = ${tun.inPort}
|
inport = ${toString tun.inPort}
|
||||||
accesslist = ${builtins.concatStringsSep "," tun.accessList}
|
accesslist = ${builtins.concatStringsSep "," tun.accessList}
|
||||||
'')
|
'')
|
||||||
}
|
}
|
||||||
@ -405,7 +406,13 @@ in
|
|||||||
default = {};
|
default = {};
|
||||||
type = with types; loaOf (submodule (
|
type = with types; loaOf (submodule (
|
||||||
{ name, config, ... }: {
|
{ name, config, ... }: {
|
||||||
options = commonTunOpts name;
|
options = {
|
||||||
|
destinationPort = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 0;
|
||||||
|
description = "Connect to particular port at destination.";
|
||||||
|
};
|
||||||
|
} // commonTunOpts name;
|
||||||
config = {
|
config = {
|
||||||
name = mkDefault name;
|
name = mkDefault name;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user