Author Topic: backconnect sock proxy ? how to ?  (Read 2018 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: 11518
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 »
Путин преступник. Россияне дезинформированы.


  • Newbie
  • Posts: 1
Re: backconnect sock proxy ? how to ?
« Reply #2 on: May 18, 2022, 05:50:54 pm »
Dude, the reverse proxy identifies itself in services using its certificate. For Azure clusters, the certificate is specified using Microsoft.ServiceFabric/clusters resource property in the Resource Types section of the Resource Manager template. Services can implement logic to validate the certificate represented by the reverse proxy.


TinyPortal © 2005-2018