From 8e0649aaa0057c6b1dae56f734b71dbb55d84aa7 Mon Sep 17 00:00:00 2001 From: Johan Garcia Date: Tue, 26 Mar 2019 14:40:14 -0500 Subject: [PATCH] add a passive port range there's no way to know what is the default behavior with the passive ports unless you read the code, and documentation doesn't explain how to set the passive ports string so i think it should be here. --- exampleftpd/exampleftpd.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exampleftpd/exampleftpd.go b/exampleftpd/exampleftpd.go index 9b7400a..5b36cd6 100644 --- a/exampleftpd/exampleftpd.go +++ b/exampleftpd/exampleftpd.go @@ -21,6 +21,7 @@ func main() { pass = flag.String("pass", "123456", "Password for login") port = flag.Int("port", 2121, "Port") host = flag.String("host", "localhost", "Port") + pasv = flat.String("pasv", "3001-3900", "Passive port range") ) flag.Parse() if *root == "" { @@ -36,6 +37,7 @@ func main() { Factory: factory, Port: *port, Hostname: *host, + PassivePorts: *pasv, Auth: &server.SimpleAuth{Name: *user, Password: *pass}, }