Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi connect trought firewall, port detection (https://www.delphipraxis.net/6775-connect-trought-firewall-port-detection.html)

marconi8 22. Jul 2003 09:26


connect trought firewall, port detection
 
for example i must to connect to the remote server, but i am under firewal, that means that some ports are disabled by my lan administrator, but i know that some ports can be opened

on remote pc is installed server (tIdHttpserver), this server binds on any port


and now client try to connect to the http server with default port 80, but this port (for example) is closed on the my lan proxy

then client click button "try to connect trought any available port"

and my program in repeat or in for statements try to connect with each listed in loop port

for example
for i = 1 to 65535 do
try
connect to remote server with port[i]

this will be normal solution or very stupid, can anybody something advice to me about this ...


thanks

flomei 22. Jul 2003 13:53

Re: connect trought firewall, port detection
 
I think that is quite good. You should perhaps stop the loop when the client has found an open port because that would require lot of ressources which can be used better.

Greetings Florian :hi:

P.S.: Please excuse my "School English" :roll:

Chewie 22. Jul 2003 17:59

Re: connect trought firewall, port detection
 
Sorry, but I don't think that's a good idea. Let's say you need 100 ms to check whether a port is open or not. In the worct case, you need about 6500s, which makes nearly 2 hours.
I find it very strange that a firewall blocks port 80 (well, maybe to prevent surfing at work :wink: ), but, however, there must be a way to find out which ports are open. Ask your admin about it.

If there's no possibility to find out which ports are opened, then your proposal is the only possibility. By using several threads, you can drastically reduce the amount of needed time, but it's still very slow.


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:00 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz