Add initial implementation of FTP server with configuration, session handling, and basic commands support

This commit is contained in:
2025-06-24 23:06:33 +08:00
parent 950ecbf580
commit e51829abfa
10 changed files with 1184 additions and 2 deletions
+33
View File
@@ -0,0 +1,33 @@
{
"project": "FTP Server Implementation",
"course": "Computer Networks Design",
"language": "Python",
"features": [
"Multi-threaded server",
"User authentication",
"File transfer (RETR/GET)",
"Directory listing (LIST/DIR)",
"Passive mode support",
"Error handling"
],
"supported_commands": [
"USER",
"PASS",
"PWD",
"CWD",
"LIST",
"NLST",
"RETR",
"PASV",
"PORT",
"TYPE",
"SYST",
"QUIT"
],
"test_users": {
"admin": "admin123",
"user": "password",
"test": "test123",
"guest": "guest"
}
}
+14
View File
@@ -0,0 +1,14 @@
FTP Server Test Document
This document is located in the documents subdirectory.
You can navigate to this directory using the CWD command:
CWD documents
Then list the files using:
LIST
And download this file using:
RETR test_doc.txt
This tests the directory navigation functionality of the FTP server.
+21
View File
@@ -0,0 +1,21 @@
Welcome to the FTP Server!
This is the root directory of the FTP server.
You can download files from here using the GET command.
Available commands:
- USER <username> : Login with username
- PASS <password> : Provide password
- PWD : Show current directory
- CWD <path> : Change directory
- LIST : List files in current directory
- RETR <filename> : Download a file (GET command)
- QUIT : Disconnect from server
Test users:
- admin / admin123
- user / password
- test / test123
- guest / guest
Enjoy testing the FTP server!
+9
View File
@@ -0,0 +1,9 @@
This is a sample text file for testing FTP downloads.
File contents:
- Line 1: Hello World
- Line 2: FTP Server Test
- Line 3: Computer Networks Design Project
- Line 4: Python Implementation
You can download this file using the RETR command.