Forum > Networking and Web Programming

backconnect sock proxy ? how to ?


Can someone give me idea, some examples or maybe some sources and help how to code backconnect sock proxy in lazarus? basically it is proxy sock server that works behind NAT with the help of my VPS server with public IP, client connect back to server, and then I can connect and send request to client using my server.

I would recommend reading up on Hole Punching and use the UDP version, not the TCP version.
This can be done in pure pascal, since e.g. the original Skype used it in Delphi code and Telegram uses it.
The most important bits are to send keepalive messages and to allow redirects. Note that it does NOT work on some corporate networks: symmetric traffic may not always be allowed.
The technique is rather intricate and apart from commercial implementations* I have not seen proper open source Object Pascal code for it.

* We implemented and used it at my employer Alex, later BinckBank, later Saxbank but by then I had already left, code is closed source. Sorry.( But we just used a version of synapse for it, maybe even just UDPSocket, nothing more). I gave enough pointers on how to do it. It is not for beginners, not even intermediates. You have to have a thorough understanding about network protocols and sockets.


--- Quote from: ZainPeck on May 18, 2022, 05:50:54 pm ---Dude, the reverse proxy identifies itself in services using its certificate.

--- End quote ---
A - reverse - proxy does not need a certificate. That is completely unrelated how it is implemented in cloud solutions.
Proper cloud solutions always use a certificate based solution, that part is true, but that is for other reasons unrelated to proxying.


[0] Message Index

Go to full version