↩ in reply to Dayman
Hi @Dayman,
I’m going to break my answer into two sections - the node as a server and the node as a client. The client role is when the node is trying to establish connection to a provided relay. A server node is a relay listening to an incoming request(s).
As a node client, the node can be configured to connect to an endpoint; an endpoint contains a host name or IP address, followed by an optional port number.
for example algod -d <data dir> -p example.com:1234 would connect to example.com at point 1234.
As for the node server, it’s slightly more complicated. A node server listen on it’s NetAddress ( as specified in the config.json ), while having the following configuration limits:
-
MaxConnectionsPerIP
Limit the number of TCP connection would be allowed from a single remote endpoint.
-
UseXForwardedForAddressField
Instruct the node server to ignore the remote endpoint IP address, and use the X-Forwarded-For when presents. A server configured as such should have all its incoming traffic have the above http header, coming from the reverse proxy.
The interaction between #1 and #2 above are critical for a successful deployment of a node server, since the originating connection to the server would always be the reverse proxy, and therefore would not contain ( by default ) the originating IP address.
The node server would always listen at the “root” of the URI. It does not support listening for a “sub-URI”. If this configuration is needed, then the reverse proxy should perform these conversion and rewrite the URL as needed.