-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forwarding client_ip with proxy and logs config #246
Comments
There's no such thing as access logs for l4 right now.
You can use PROXY procotol to do that. |
Well, this module does log connections (it shows you how many bytes are read/written), but they're not like HTTP access logs where you can see the decoded request. We can improve logging for sure though. |
The issue is I don't even see those connections log you mentioned. Are they emitted at a lower level of info? |
Oh, they might be at DEBUG level come to think of it. You don't need to enable them (because they're at a more verbose level.) We can rework this I suppose, I just whipped up the logging quickly. |
Ok cool. Yea the 'logic' would be to have some trace logged (at INFO level so) whenever some bytes hit the tls handler. So that we're able to see the activities at least. |
@francislavoie thx for the suggestion. But I'm still failing to get this working. I tried to change the handler to this but without success
|
Your upstream would need to be ready to handle PROXY protocol as well. Basically it prepends some bytes to the start of the connection which includes the original client IP. Looks like it doesn't support it yet 0xERR0R/blocky#320 |
Thank you! I'm trying to get at least some logs as well - to troubleshoot my config. Could you please, advice how to enable logging / debugging? My current Caddyfile looks like that:
I've tried all kinds of |
Put the word |
Hi, not a bug but rather I have a few questions. First off, this is my caddy config:
tls
matcher (:8054)? Right now I don't get any logs but in the other side of the proxy (service:1234
), I can see the requests received as expected.client_ip
to the proxied service in layer4?The text was updated successfully, but these errors were encountered: