rfc959_stream v0.2.1
RFC 959 stream
Pure Streaming FTP. Command and control funnel inherits from Stream Readable. Socket responses parsed and routed in Stream Transform.
Readable -> Duplex (Net) -> Analyze/Transform --->|
^ |
| |
|<--------------------------------------------v (More Pipeline)
Funnel -> Network Stream Socket -> pipe cap
Install
yarn install --flat
Requirements
This requires colorlogjs, which is still pending distribution channel.
Usage during Development
export ENV_NAME=dev; node --inspect js-ftp --intelligence ../../some/folder/ai_brain.js --config ../../../another/folder/config.js
Usage Production
export ENV_NAME=prod; node . --intelligence ftp_ai_brain.js
Incompleteness
The streaming framework allows any command to be sent and received. It only handles special case insofar as actions for listing directory contents and downloading files by enabling PASV data connection via a secondary network socket.
The framework itself is generically useful enough to allow the programmer and supporting scripts to directly manage return codes using the streaming interfaces of the network duplex socket.
TODO, of Interest
In semi important order.
- Implement FTPS: RFC 2246, RFC 2228, RFC 4217
- Implement all extensions: RFC 2228, RFC 5797, RFC 7151, RFC 2389, RFC 1123, RFC 1545, RFC 1639
FTPS -> FTP over TLS. Distinct from SFTP. Previously FTPS included SSL, but SSL is considered insecure / inferior than other cryptographic protocols. In this library TLS, FTP (RFC 959) + TLS
Reference for TLS over HTTP https://tools.ietf.org/html/rfc2817
- FXP transfers
- Anonymous user
- Active data connection
####### References, Resources
- https://www.rfc-editor.org/rfc/rfc959.txt
- https://en.wikipedia.org/wiki/FTPS
- https://tools.ietf.org/html/rfc2228
- https://tools.ietf.org/html/rfc4217
- https://tools.ietf.org/html/rfc2246
- https://tools.ietf.org/html/rfc2817
- https://tools.ietf.org/html/rfc2389
- https://tools.ietf.org/html/rfc5797
- https://tools.ietf.org/html/rfc7151
- https://tools.ietf.org/html/rfc1639
- https://tools.ietf.org/html/rfc1545
- https://tools.ietf.org/html/rfc1123
- https://tools.ietf.org/html/rfc2389
Errors
- FTP CODE 530 - unless the ai brain has logic to handle this causes a dead connection.