#1 2025-05-31 23:58:09

GustavoM
Member
Registered: 2020-07-22
Posts: 8

REST Server in Delphi 5 - Public IP

Hello!

Many years ago, I created a small REST server with Delphi 5. I did it using SynCrtSock and referring to the example "09 - HttpApi Web Server".

It works fine on a local network. To use it, you just use a URL like http://192.168.0.25/MyRESTserver.

Now I want to use it from outside the local network. Therefore, I need to use the server's public IP, something like http://186.132.45.22/MyRESTserver. But it doesn't work. I always get an error like "Socket error #10060: Connection timed out."

I tried disabling my firewall and antivirus, but that didn't fix the problem.

Does anyone know what I should do?

Offline

#2 2025-06-01 10:13:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,035
Website

Re: REST Server in Delphi 5 - Public IP

Weird to see Delphi 5 sill used. wink So this is a mORMot 1 question. wink

You need the server to bind to this IP address using '0.0.0.0' for all IPs or explicitly '183.132.45.22'.

Offline

#3 2025-06-01 15:55:58

GustavoM
Member
Registered: 2020-07-22
Posts: 8

Re: REST Server in Delphi 5 - Public IP

Thank you for your answer!

How can I make this binding? Could you please tell me which is the instruction for doing it or may be tell me where can I see an example?

Offline

#4 2025-06-03 21:24:18

GustavoM
Member
Registered: 2020-07-22
Posts: 8

Re: REST Server in Delphi 5 - Public IP

Please, can you (or anybody) tell me how can I do the binding you said? Or where can I see an example? Thanks in advance!

Offline

Board footer

Powered by FluxBB