Help on a Golang TCP Forward Proxy

I am messing around with creating a TCP Forward Proxy for my PS4 and as I began programming I came across an issue. I wondered how the proxy knew the IP of the server the client originally wished to connect to. How could the server find out the destination that the data was originally meant for?I created an empty function to return the address of the target and the message intended for it.
Here’s my code so far,

The function getTargetInfo is the function I want to use to get the address of the target.
All help is appreciated thanks!

I guess you must define a routing table to make your server able to know where to forward your clients. You can know the ip of the client from his request but you must already have a predefined destination.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.