Added support for miners using Proxy V1 #208
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Doc: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
The proxy support not only enables miners behind a proxy-v1 to mine in the pool, it also enables the use of a local proxy; for example, to provide a TLS.
The TLS layer can be provided for example by hitch, by setting a local proxy:
$ hitch --daemon --backend=[127.0.0.1]:5555 --frontend=[*]:5566 pool.pem --write-proxy-v1
If the
--write-proxy-v1
parameter is not used, the pool service will assume the miner is located in 127.0.0.1, which will break the ip-based ban system and will open the system to atacks.If the
--write-proxy-v1
parameter was used, the miner failed to connect to the pool because the pool was incapable of parsing the proxy header.This commit enables the the pool to parse the proxy v1 header and thus to use hitch or a similar process to provide a TLS layer to the pool.
This code has been tested and is being used in https://www.moneropool.us