elisescu / tty-proxy

The proxy used by the tty-share command for public facing sessions
https://tty-share.com/
MIT License
48 stars 14 forks source link

forwardfor header in logs #9

Open WladyX opened 2 years ago

WladyX commented 2 years ago

I have a haproxy in front of tty-proxy, would it be possible to see the real ip in the tty-proxy logs? I get this now:

New tty-share session somehash4x4Bs from for 172.17.0.1:35912

Multumesc!

/Later edit: Think this is not going via haproxy, as this is a connection to 3456 port, you have any ideea how i could get the real ip instead of the docker host ip 172.17.0.1. I realize now this is unrelated to tty-proxy, more related to docker networking, I should probably use host network or macvlan. If you have any suggestions I would appreciate it, if not feel free to close the issue.

elisescu commented 2 years ago

Hey!

Unfortunately I don't know how you could configure that. Imi pare rau.. But indeed it sounds like it's that level/area that you need to look into. I'll leave the issue open, as I think I should add at some point support for printing the real IP for the "front" connection, where the reverse proxy adds the "X-Forwarded-For" header.