Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

log real client ip address #33

Open
vmalaga opened this issue Nov 6, 2017 · 2 comments
Open

log real client ip address #33

vmalaga opened this issue Nov 6, 2017 · 2 comments

Comments

@vmalaga
Copy link

vmalaga commented Nov 6, 2017

Hi
we are using planb behind a haproxy on tcp mode for handling ssl certificates with planb. We have more than 15000 domains with its certificates on redis and works fine.

Now we receive the x-forwarder-proto correctly, but at the planb logs only get the haproxy ipaddress, this may be caused because you do not receive the header, being haproxy on tcpmode.

Do you support the proxy-protocol from haproxy ?

http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt

planb log line

:ffff:172.16.70.41 - - [05/Nov/2017:20:53:39 +0000] "GET /es/ HTTP/1.1" 200 -1 "https://www.deltacartarragona.es/es/" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 BingPreview/1.0b" "Swplanb:77adf0d5-0489-4d4a-7887-a3f9ea06f798" "www.deltacartarragona.es" "" 0.325 0.325

@cezarsa
Copy link
Member

cezarsa commented Nov 6, 2017

We do not support proxy-protocol yet, however, after a quick look I think adding support to it should not be too difficult. It's probably possible to track new connections using http.Server.ConnState and read the PROXY protocol line from it before freeing the connection to be read by the http.Server. I may give this a try later.

@vmalaga
Copy link
Author

vmalaga commented Jul 9, 2018

Hi @cezarsa

Do you have plans to merge the proxy-protocol support into planb master tree ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants