A simple FTP client and server built in Python using the socket
module as the core networking tool. This implementation follows the passive mode FTP approach, where the client initiates all connections. Passive mode is commonly used because it is more firewall and NAT-friendly.
This custom FTP implementation includes several standard FTP commands and functionalities:
- USER and PASS β Authentication with username and password.
- PWD β Print the current working directory.
- LIST β List files and directories in the server.
- RETR β Download files from the server.
- STOR β Upload files to the server.
- QUIT β Close the connection.
This DIY FTP server follows the standard FTP protocol specifications. It establishes two types of connections between the client and server:
- Control Connection β Handles command transmission and responses between the client and server.
- Data Connection β Used for transferring files and directory listings between the client and server.
Since this FTP implementation operates in passive mode, the client is responsible for initiating the data connection, making it more suitable for use behind firewalls and NAT configurations.
demo.mp4
This FTP server was developed and tested on a Windows environment. Cross-platform compatibility is not guaranteed due to potential limitations in Python's networking modules on different operating systems.
Contributions are welcome! Feel free to submit issues, feature requests, or pull requests to improve this project. π