mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/snapserver: use the correct bind address arguments
Snapserver expects the arguments `--tcp.bind_to_address` and `--http.bind_to_address` instead of the `--tcp.address` (and http equivalent) versions. This caused the process to listen on `0.0.0.0` (for TCP and HTTP sockets) regardless of the configuration value. It also never listend on the IPv6 address `::` as our module system made the user believe. This commit fixes the above issue and ensures that (at least for the TCP socket) that our default `::` does indeed allow connections via IPv6 (to localhost aka ::1).
This commit is contained in:
parent
a2e281f577
commit
c9c93b0add
2 changed files with 10 additions and 2 deletions
|
@ -54,12 +54,12 @@ let
|
|||
# tcp json rpc
|
||||
++ [ "--tcp.enabled ${toString cfg.tcp.enable}" ]
|
||||
++ optionals cfg.tcp.enable [
|
||||
"--tcp.address ${cfg.tcp.listenAddress}"
|
||||
"--tcp.bind_to_address ${cfg.tcp.listenAddress}"
|
||||
"--tcp.port ${toString cfg.tcp.port}" ]
|
||||
# http json rpc
|
||||
++ [ "--http.enabled ${toString cfg.http.enable}" ]
|
||||
++ optionals cfg.http.enable [
|
||||
"--http.address ${cfg.http.listenAddress}"
|
||||
"--http.bind_to_address ${cfg.http.listenAddress}"
|
||||
"--http.port ${toString cfg.http.port}"
|
||||
] ++ optional (cfg.http.docRoot != null) "--http.doc_root \"${toString cfg.http.docRoot}\"");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue