Skip to content
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

log real client ip behind a HTTPS gateway #38

Merged
merged 4 commits into from Mar 15, 2019

Conversation

Projects
None yet
2 participants
@qyb
Copy link
Contributor

commented Mar 14, 2019

pull again, with better compatible for apache/nginx log default format

@qyb

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2019

Should we add a log-realip option in doh-server.conf ?

@m13253

This comment has been minimized.

Copy link
Owner

commented Mar 14, 2019

Thank you for the update.

Just to mention that X-Forwarded-For can be forged.
It is okay for doh-server to receive a forged X-Forwarded-For for ECS purpose.

But I am afraid it is better that we can log the full IP chain? (RemoteIP + X-Real-IP + X-Forwarded, separated with comma)

@qyb

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2019

RemoteIP + X-Real-IP + X-Forwarded .. is unuseable.

My suggestion is setting a doh-server.conf option. This feature default is off. Then system administrator will config their nginx/apache to remove forge http header and enable it..

@m13253

This comment has been minimized.

Copy link
Owner

commented Mar 14, 2019

My suggestion is setting a doh-server.conf option. This feature default is off. Then system administrator will config their nginx/apache to remove forge http header and enable it..

That's a good idea!

I want to name it as "log_guessed_client_ip" in doh-server.conf. The word "guess" indicates that it is not always accurate.
What's your opinion?

Would you like to implement it, or wait a few days until I have time to implement it?

@qyb

This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2019

done!

@m13253 m13253 merged commit 2df81db into m13253:master Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.