0

I have an application called Server on localhost which binds to port 1000. I have another application also on localhost called Client which connects to 1000 in order to communicate with Server.

I am unable to change the source code for Server or Client.

I wish to write an application called Middle and I want Client to connect to this application instead of to Server. Middle shall forward the data it receives from Client on to Server and also forward the replies from Server to Client.

I wish for Middle to also reside on localhost.

Is this possible?

I had though that iptables could be used by port forwarding data on 1000 to another port but this will also effect Middle stopping it from sending to Server. So the forwarding needs to be application specific.

2

No, it isn't possible.

The only workaround I can suggest is to run a small copy of Linux under the likes of Virtualbox, to act as one half of the system.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.