Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
223 Beiträge
 
#2

AW: Anwendungs Server als Client betreiben mit Indy

  Alt 24. Nov 2023, 13:17
Der Kontext
Ich möchte das eine Mobile App einen Windowserver erreichen kann. Bisher ist das auch möglich mit Freigaben in der Firewall.
Um die Firewall Freigabe zu umgehen möchte ich den Windows Server Dienst und die Mobile App als client betreiben.
Es wird also einen Server in der Cloud geben zu dem sich beide verbinden und der als Relay funktionieren soll.
Wie ich das genau mache weiß ich noch nicht. Es soll so ähnlich funktionieren wie Reverse-Proxy-SSH nur eben ohne SSH und am liebsten ohne tunneln,
weil es schon ein TCP bzw. ein SOAP Protocoll benutzt und man soll TCP ja nicht durch TCP tunneln wegen der ganzen SYN,ACK,&c. Geschichte.

Also die eigentliche Frage:
Kann ich TIDTCPSERVER oder TIdHTTPWebBrokerBridge als Client betreiben?
Sprich ich will, dass sie aktiv eine Adresse und Port Connecten aber dann auf Anfragen warten.
Not sure if i understand the question,
But are you asking how to connect a peer to a server where the server doesn't have public IP (AKA the server in NAT)? if so, then the answer is no, you can't do it as you described above.

One solution is (away from SSH and tunneling which also need a public IP) the use of STUN server, in short STUN is reverse proxy server where peers register and a tunnel can be achieved, so the server side will have a client to connect to the STUN and act as tunnel for the traffic, the Internet full of better and more detailed explanation for STUN protocol.

As for Delphi to my knowledge there is only two libraries implement STUN protocol, which in fact very simple and short protocol :
1) LakeOfSoft VC http://lakeofsoft.com/vc/a_stunsample.html https://github.com/lakeofsoft/vcpub
2) esegece WebSockets https://www.esegece.com/websockets/p2p/stun/stun-server

Also there is many free and open STUN server, like google STUN for WebRTC
https://gist.github.com/sagivo/3a4b2...7c2f1f59ac6c6b
https://gist.github.com/mondain/b0ec1cf5f60ae726202e
  Mit Zitat antworten Zitat