config: add peer, rpc, and rest listener options

This commit removes the `peerport` and `rpcport` config options and
adds `listen`, `rpclisten`, and `restlisten` options to allow setting
one or multiple interfaces to listen on for incoming connections.

It also adds a `nolisten` option to allow disabling the listener for
incoming peer connections.
This commit is contained in:
Matt Drollette authored and Olaoluwa Osuntokun committed 2018-01-21 17:35:03 -08:00
1 parent 8cce2ad630
commit 86133e559b
4 files changed
+187 -103

No files matched your search

+27 -14
View File
@@ -36,11 +36,33 @@
; readonlymacaroonpath=~/.lnd/readonly.macaroon
; Specify the interfaces to listen on. One listen address per line.
; All interfaces on default port (this is the default):
; listen=
; Only ipv4 localhost on port 999:
; listen=127.0.0.1:999
; Specify the interfaces to listen on for p2p connections. One listen
; address per line.
; All ipv4 on port 9735:
; listen=0.0.0.0:9735
; On all ipv4 interfaces on port 9735 and ipv6 localhost port 9736:
; listen=0.0.0.0:9735
; listen=[::1]:9736
; Disable listening for incoming p2p connections. This will override all
; listeners.
; nolisten=1
; Specify the interfaces to listen on for gRPC connections. One listen
; address per line.
; Only ipv4 localhost on port 10009:
; rpclisten=localhost:10009
; On ipv4 localhost port 10009 and ipv6 port 10010:
; rpclisten=localhost:10009
; rpclisten=[::1]:10010
; Specify the interfaces to listen on for REST connections. One listen
; address per line.
; All ipv4 interfaces on port 8080:
; restlisten=0.0.0.0:8080
; On ipv4 localhost port 80 and 443:
; restlisten=localhost:80
; restlisten=localhost:443
; Adding an external IP will advertise your node to the network. This signals
@@ -63,15 +85,6 @@
; 65536. The profile can be access at: http://localhost:<PORT>/debug/pprof/.
;profile=
; The port to listen on for incoming p2p connections. The default port is 9735.
; peerport=9735
; The port that the gRPC server will listen on.
; rpcport=10009
; The port that the HTTP REST proxy to the gRPC server will listen on.
; restport=8080
; The maximum number of incoming pending channels permitted per peer.
; maxpendingchannels=1