Additional options for FTP server configuration (ports, timeout, dupe IPs)
This commit is contained in:
parent
ea9cf4cbde
commit
707c0799b7
|
@ -388,7 +388,7 @@ Begin
|
|||
FTPServer := TServerManager.Create(bbsConfig, bbsConfig.InetFTPPort, bbsConfig.inetFTPMax, NodeData, @CreateFTP);
|
||||
|
||||
FTPServer.Server.FTelnetServer := False;
|
||||
FTPServer.ClientMaxIPs := 2;
|
||||
FTPServer.ClientMaxIPs := bbsConfig.inetFTPDupes;
|
||||
// FTPServer.TextPath := bbsConfig.DataPath;
|
||||
|
||||
Started := True;
|
||||
|
@ -518,4 +518,4 @@ Begin
|
|||
Console.Free;
|
||||
|
||||
Halt(255);
|
||||
End.
|
||||
End.
|
||||
|
|
|
@ -76,7 +76,6 @@ Type
|
|||
Implementation
|
||||
|
||||
Const
|
||||
FTPTimeOut = 120; // Make this configurabe in MCFG?
|
||||
FileBufSize = 8 * 1024;
|
||||
|
||||
re_DataOpen = '125 Data connection already open';
|
||||
|
@ -418,7 +417,7 @@ Var
|
|||
WaitSock : TSocketClass;
|
||||
Begin
|
||||
If LoggedIn Then Begin
|
||||
DataPort := Random(65535-60000) + 60000; // make configurable?!
|
||||
DataPort := Random(bbsConfig.inetFTPPortMax - bbsConfig.inetFTPPortMin) + bbsConfig.inetFTPPortMin;
|
||||
|
||||
Client.WriteLine(re_PassiveOK + '(' + strReplace(Client.HostIP, '.', ',') + ',' + strI2S(WordRec(DataPort).Hi) + ',' + strI2S(WordRec(DataPort).Lo) + ').');
|
||||
|
||||
|
@ -712,7 +711,7 @@ Var
|
|||
Begin
|
||||
If LoggedIn Then Begin
|
||||
If Data = '' Then Begin
|
||||
DataPort := Random(65535 - 60000) + 60000; // make configuratable
|
||||
DataPort := Random(bbsConfig.inetFTPPortMax - bbsConfig.inetFTPPortMin) + bbsConfig.inetFTPPortMin;
|
||||
IsPassive := True;
|
||||
|
||||
Client.WriteLine('229 Entering Extended Passive Mode (|||' + strI2S(DataPort) + '|)');
|
||||
|
@ -752,15 +751,12 @@ Begin
|
|||
cmdREIN;
|
||||
|
||||
Repeat
|
||||
If Client.WaitForData(FTPTimeOut * 1000) = 0 Then Break;
|
||||
If Client.WaitForData(bbsConfig.inetFTPTimeout * 1000) = 0 Then Break;
|
||||
|
||||
If Terminated Then Exit;
|
||||
|
||||
If Client.ReadLine(Str) = -1 Then Exit;
|
||||
|
||||
// dlog(Str);
|
||||
//server.server.status(str);
|
||||
|
||||
Cmd := strUpper(strWordGet(1, Str, ' '));
|
||||
|
||||
If Pos(' ', Str) > 0 Then
|
||||
|
|
Loading…
Reference in New Issue