Author Topic: backconnect sock proxy ? how to ?  (Read 1914 times)


  • New Member
  • *
  • Posts: 20
backconnect sock proxy ? how to ?
« on: October 29, 2020, 07:38:07 pm »
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.


  • Hero Member
  • *****
  • Posts: 11516
Re: backconnect sock proxy ? how to ?
« Reply #1 on: January 26, 2022, 06:34:13 pm »
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.
« Last Edit: January 26, 2022, 07:10:14 pm by Thaddy »
Путин преступник. Россияне дезинформированы.


TinyPortal © 2005-2018