# cloudDriveV2.0 **Repository Path**: calmsy/cloud-drive-v2.0 ## Basic Information - **Project Name**: cloudDriveV2.0 - **Description**: nothing to do! - **Primary Language**: C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-19 - **Last Updated**: 2025-10-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cloudDriveV2.0 #### Description Hi,Guys, Very Happy Understanding Everyone,it's my honour.Now let's give it our best shot! ## Software Architecture ### 1. Client - **Login System** 1. **Registration** - Check that the username is not NULL ```c char user_name[20] = "NULL"; if(user_name != "NULL") ``` - Username - Obtain salt, generate ciphertext - Store in a text file with the format: `username:salt` ```c user_name:$zkxfjiaeqw$ ``` - Send to the server 2. **Login** - Enter username - Enter plaintext password, generate ciphertext using salt - Send username and ciphertext to the server in the format: ```c user_name:cryptograph ``` 3. **Account Deactivation** - Send `username:ciphertext` to the server 4. **Logout** - Send a logout tag to exit the user session - **Resume from Breakpoint** - **Upload/Download** - **Command Parsing** - **TLV (Tag-Length-Value)** ### 2. Server - **Protocol** - **String Parsing** - **Authentication System** 1. **Registration** - Generate salt for the username - Return the salt to the client - Receive and store the ciphertext - Save user data to MySQL - Return registration success/failure 2. **Login** - Receive user information and parse the string ```c Username Ciphertext ``` - Check if the username exists in MySQL: 1. **Exists**: - Verify password: 1. **Correct**: Return login success 2. **Incorrect**: Return password error 2. **Does not exist**: - Return username does not exist - Return success or failure 3. **Account Deactivation** - Check if the provided data matches the MySQL record: 1. **Match**: - Update status from 0 to 1 - Return deactivation success 2. **Mismatch**: - Return deactivation failure 4. **Exit** - Receive exit signal - Exit the loop - Return `fucking fucked` - **Framework** 1. **Directory Handling** - All users are under the same root directory - Usernames are stored as hash values 2. **Thread Pool** 3. **Parsing** - Basic commands - Login - Registration - Account deactivation - Exit - Upload - Download 4. **Response** 5. **Resume from Breakpoint** - **Logging** - **Database** ```c mysqldump -u [username] -p[password] [database_name] > [output_filename].sql ``` [Note]: After creating the database, be sure to use the above command to export the table creation operations for backup. 1. **User Table** - Table Columns [User Table]: 1. id_auto (Primary Key) 2. user_name (Unique Key) 3. salt 4. crypt 5. is_del 2. **Virtual File Table** - Table Columns [File System Table]: 1. id_auto (Primary Key) 2. file_name 3. user_name (Unique Key) 4. parent_id 5. file_virtual_path (Unique Key) 6. type 7. md5 3. **Table Structure** - Tree structure - **TLV (Tag-Length-Value)** ### 3. Business Logic - **Resume from Breakpoint** - **Basic Commands** 1. ls 2. cd 3. pwd 4. mkdir 5. rmdir 6. insert_into 7. update - **File Transfer** 1. Upload/Download 2. Resume from Breakpoint ### 4. Logging ## Installation 1. Run "./cmake_make" ## Instructions 1. This is merely rubbish. 1. It might be useful to you, but I'm sure that most of it is of no use to you. ## Contribution 1. Have a great time!