Transparent proxying - how to pass socket to local server without modification?
- by Luca Farber
Hello,
I have a program that listens on port 443 and then redirects to either an SSH or HTTPS local server depending on the detected protocol.
The program does this by connecting to the local server and proxying all data back and forth through its own process.
However, this causes the originating host on the local servers to be logged as localhost.
Is there any way to pass the socket directly to the local server process (rather than just making a new TCP connection) so that the parameters of sockaddr_in (or sockaddr_in6) will be retained?
Platform for this is Linux.