I'm trying to make a HTTP/S proxy server work without having to manually port forward.
- Machine A has installed a proxy server
- Machine A is behind a NAT (or a router with firewall).
- Machine B tries to browse internet through Machine A proxy.
- Machine B isn't behind a NAT.
- Both machines know each other before any connection is made.
- In a full scale, there would be multiple Machine A but only one Machine B.
Machine A shouldn't need to configure anything on the router.
I have thought about using uPnP, as per this answer, but as the title of this question, I wanted to know if it would be possible to invert the roles of the machines.
Instead of Machine B initiating a connection, Machine A will do it. So Machine A would be the client and Machine B would be the server. Remember Machine A knows the IP address of Machine B beforehand.
In this scenario, Machine A would still function as a proxy, but having the role of the client in a standard TCP connection.
I understand this would need a custom-made proxy server, which is no problem since the proxy server is implemented in python
and I have access to the source, and can modify it.
- Will this be compatible with normal HTTP/S proxy? Specifically I will be using
python
requests
on Machine B. - Does this method have a name? Researching for inverse or reverse lands me on reverse proxy which AFAIK doesn't have anything to do with what I'm trying to accomplish.
- Is there something I'm missing? Or an alternative solution? (besides uPnP)