modules/nginx-port-forward: Resolve upstream hostnames as IPv6 only
This commit is contained in:
@@ -9,6 +9,8 @@ let
|
|||||||
|
|
||||||
mkServerBlock = isUDP: port: forward: ''
|
mkServerBlock = isUDP: port: forward: ''
|
||||||
server {
|
server {
|
||||||
|
resolver 127.0.0.53 ipv4=off;
|
||||||
|
|
||||||
listen ${port}${optionalString isUDP " udp"}${optionalString (forward.certName != null) " ssl"};
|
listen ${port}${optionalString isUDP " udp"}${optionalString (forward.certName != null) " ssl"};
|
||||||
listen [::]:${port}${optionalString isUDP " udp"}${optionalString (forward.certName != null) " ssl"};
|
listen [::]:${port}${optionalString isUDP " udp"}${optionalString (forward.certName != null) " ssl"};
|
||||||
|
|
||||||
@@ -24,8 +26,6 @@ let
|
|||||||
|
|
||||||
portForwardConf = ''
|
portForwardConf = ''
|
||||||
stream {
|
stream {
|
||||||
resolver 127.0.0.53;
|
|
||||||
|
|
||||||
${ concatStringsSep "\n" (mapAttrsToList (mkServerBlock false) cfg.tcpPorts) }
|
${ concatStringsSep "\n" (mapAttrsToList (mkServerBlock false) cfg.tcpPorts) }
|
||||||
${ concatStringsSep "\n" (mapAttrsToList (mkServerBlock true) cfg.udpPorts) }
|
${ concatStringsSep "\n" (mapAttrsToList (mkServerBlock true) cfg.udpPorts) }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user