NodeJS FTP Proxy
NodeJS ftp proxy prepared for active and passive connections with transfer stats plugin and logging module.
Stats plugin already has a solution for using rabbitMQ as stats' message publisher.
For more details, go to our Wiki page
$ npm install ftp-proxy
Usage example
{ var ftpd = ; var _config = ; var _p = 'server': null { _pftpProxy; return self; } 'ftpProxy': { var proxy = _config; proxy; proxy; } { console; } ; var self = {}; return _p;};
config.js file example
moduleexports = serverData: host: '127.0.0.1' port: 21 proxyData: id: 'Proxy test local machine' ip: '127.0.0.1' port: 2121 machineName: 'Test Machine' logging: useConsole: true useFile: true filePath: 'FTPProxy-Logging(%DATE%).log' level: 'DEBUG' statsPlugin: usePlugin: true activeStatusInterval: 10 * 1000 //10 seconds in milliseconds inactiveStatusInterval: 1 * 60 * 60 * 1000 //1 hour in milliseconds timeToIgnoreIdleTransfer: 10 * 60 * 1000 //10 minutes in milliseconds messagePublisher: connectionString: 'your rabbit connection string' exchange: name: 'FtpProxy.Notifications' options: type: 'topic' RK: snapshot: name : 'FtpProxy.Notifications.Snapshot' options: type: 'FtpProxy.FtpStatus' contentType: 'application/json' contentEncoding: 'utf-8' immediate: true onTransferStarted: name : 'FtpProxy.Notifications.OnTransferStarted' options: type: 'FtpProxy.FtpTransferInfo' contentType: 'application/json' contentEncoding: 'utf-8' immediate: true onTransferEnded: name : 'FtpProxy.Notifications.OnTransferEnded' options: type: 'FtpProxy.FtpTransferInfo' contentType: 'application/json' contentEncoding: 'utf-8' immediate: true onTransferAborted: name : 'FtpProxy.Notifications.OnTransferAborted' options: type: 'FtpProxy.FtpTransferInfo' contentType: 'application/json' contentEncoding: 'utf-8' immediate: true