radixdlt / olympia-node

Radix monorepo
Other
142 stars 35 forks source link

Feature/proxy protocol #484

Closed LukasGasior1 closed 3 years ago

LukasGasior1 commented 3 years ago

Adds support for the nginx proxy protocol, which allows the node to know peer's real ip address. The protocol needs to be enabled both in nginx:

proxy_pass core:30000;
proxy_protocol on;

and in core with the RADIXDLT_NETWORK_USE_PROXY_PROTOCOL config. Both configs MUST match and with RADIXDLT_NETWORK_USE_PROXY_PROTOCOL enabled, only the proxied connections can be handled (for example: connecting directly to node skipping nginx would fail).

With the flag set to false (default) there's no change in server's behavior.

sonarcloud[bot] commented 3 years ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

16.2% 16.2% Coverage
0.0% 0.0% Duplication