Skip to content

Commit

Permalink
Make max number of connections (global and per ip) configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
colinsmetz authored and jbruggem committed Feb 20, 2020
1 parent 998dbf4 commit 62af99f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ ENV FTP_ROOT /ftp-home
ENV FTP_USER ftp
ENV FTP_PASS ftp
ENV FTP_PORT 21
ENV FTP_MAX_CONNECTIONS 256
ENV FTP_MAX_CONNECTIONS_PER_IP 50

VOLUME /ftp-home

Expand Down
2 changes: 1 addition & 1 deletion image/root/bin/simple-ftp-server
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main():
server = FTPServer(address, handler)

# set a limit for connections
server.max_cons = 256
server.max_cons = int(environ.get('FTP_MAX_CONNECTIONS', '256'))
server.max_cons_per_ip = int(environ.get('FTP_MAX_CONS_PER_IP', '50'))

# start ftp server
Expand Down

0 comments on commit 62af99f

Please sign in to comment.