suggestion for FTP
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 66
- Joined: 2003-02-07, 23:44 UTC
suggestion for FTP
For user behind firewalls, corporate as well as private, a great option would be to be able to set a port range for local connections, as in FlashFXP "Limit local port range to [xxx - xxx]"
I know one possibility is to set the connection in Passive mode, but it's not what I mean, cuz then FXP transfert are unavailable (if both connections are in passive mode...)
I know one possibility is to set the connection in Passive mode, but it's not what I mean, cuz then FXP transfert are unavailable (if both connections are in passive mode...)
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Good idea! However, does anyone know how to do this? Currently TC just requests a random port from Windows, and Windows itself determines which port to use. Any idea how to request a random port within a range?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 66
- Joined: 2003-02-07, 23:44 UTC
Can't you choose a port by yourself, instead of getting it from Windows ? That way you wouldn't have to request a port from within a range as TCmd itself would choose it...
How do the server apps run on a specified port if they can't choose it by themselves ? I suppose this is possible for Tcmd... at least I hope so
How do the server apps run on a specified port if they can't choose it by themselves ? I suppose this is possible for Tcmd... at least I hope so

- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes I can, but the port may already be in use - or may be in a term-wait state, which means that it can be opened, but connections will not work...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 66
- Joined: 2003-02-07, 23:44 UTC
and... is there no way for Tcmd to get the state of a specified port before using it ?
A way to get the results of a "netstat -an" and prevent Tcmd from using anyone that the command returned ?
I don't know... I'm not programmer but I guess there should be a possibility (as FlashFXP does it...)
Any programmer out of there who's got an idea ?
A way to get the results of a "netstat -an" and prevent Tcmd from using anyone that the command returned ?
I don't know... I'm not programmer but I guess there should be a possibility (as FlashFXP does it...)
Any programmer out of there who's got an idea ?

>Can't you choose a port by yourself, instead of getting it from Windows ?
>>However, does anyone know how to do this?
This thread may help:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_10332325.html
EntryFrom - EntryTo
if empty -> random
BTW
How about an extra-check "Use plugin" i.e. SFTP plugin
HTH
Jochen
>>However, does anyone know how to do this?
This thread may help:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_10332325.html
EntryFrom - EntryTo
if empty -> random
BTW
How about an extra-check "Use plugin" i.e. SFTP plugin

HTH
Jochen
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2jofer
Unfortunately the code presented there doesn't help - as some users have pointed out, as soon as a connection is made, the server can again listen on the same port - which is normally a bad idea with FTP. Perhaps I should just increment the port after using it, and check if noone is listening?
Unfortunately the code presented there doesn't help - as some users have pointed out, as soon as a connection is made, the server can again listen on the same port - which is normally a bad idea with FTP. Perhaps I should just increment the port after using it, and check if noone is listening?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com