Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create a "TCP/IP relay" server?
#5
Remy, thanks for the clarifications!
I thought as much too but when I saw the reference by @kudzu to TIdMappedPortTCP I just had to ask so I would not re-invent the wheel.
About 4-5 years back I used this component but that was for a different purpose, to connect to a wifi network available on the remote RPi4 but running through VPN all the way from Sweden to Texas. That was elegantly solved by this class (and some advice from you!). That solution was hand-in-glove what the class was created for.
The Rpi4 where the server runs has a DHCP generated address, but it could easily be set as a fixed address either by reservation in the router or otherwise. In fact the port forward idea would necessitate that if that was the solution.

So now I have 2 options:
1) Create the relaying application on the intermediate server by using two server sockets, one for the RPi4 to connect to and the other for the config client to connect to. There are some hairy details I need to handle to make that work, for instance the configuration needs to be done such that the individual RPi4 device can be identified and channeled to as needed (if it is connected). I also need to modify the server to run in this way by connecting to the relaying server etc.
And it needs to handle multiple connection pairs.

2) Or else, as has been suggested, set up an OpenVPN server to which a daemon on the Rpi4 would connect and likewise the client computer needs to connect to and then when both are on the VPN communications should be possible from the client by using the server's VPN tunnel address. I can set up the VPN such that each connecting RPi4 gets a unique tunnel address so the client can select which RPi4 to connect to based on this IP.

Right now I am leaning towards the second solution which looks like a lot less work to implement.
I don't have to modify existing code just add the openvpn client to the two endpoint systems and configure the OpenVPN server in the middle...

Thanks for your enlightenment!
(As always)
Reply


Messages In This Thread
RE: How to create a "TCP/IP relay" server? - by BosseB - 04-27-2021, 09:47 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)