{"id":21177053,"url":"https://github.com/allenjue/server","last_synced_at":"2025-07-07T11:07:18.208Z","repository":{"id":112863941,"uuid":"579158547","full_name":"AllenJue/Server","owner":"AllenJue","description":"A toy server that I'm working on that connects to my school lab computer. I'm practicing with Java Sockets to better understand how a simple client-server connection is built. ","archived":false,"fork":false,"pushed_at":"2023-01-06T23:34:05.000Z","size":130,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T11:33:56.953Z","etag":null,"topics":["server","socket-programming"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AllenJue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-16T20:12:52.000Z","updated_at":"2022-12-17T07:15:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ddc36c5-c343-46f7-9d32-01460ac7bc86","html_url":"https://github.com/AllenJue/Server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenJue%2FServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenJue%2FServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenJue%2FServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenJue%2FServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllenJue","download_url":"https://codeload.github.com/AllenJue/Server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243624139,"owners_count":20321033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["server","socket-programming"],"created_at":"2024-11-20T17:14:24.780Z","updated_at":"2025-03-14T18:25:17.985Z","avatar_url":"https://github.com/AllenJue.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server and Client Application\n\n## Introduction\nThis is my first networks related project, and I just wished to get a better \nunderstanding of how Java (or any high-level language) would implement a client-server relationship.\nMoreover, I wanted to see how security would play into managing user information and how to protect\ncertain pieces of information.\n\n## Features\nThis project maintains the ability to create multiple client-side connections with the use of threads, \nand returns the input that the user gives to it. A database can be simulated for the user data, and it is\nloaded in when the server is created and written-through when an account is created. This utilizes the \nLinux filesystem to offer data persistency.\n\nA very basic level of protection is offered with the Java Security library. Passwords are given a 8-byte salt.\nThey are then put through a PBKDF2 and SHA1 hash 20,000 times and saved to the datastore. \n\nWhen establishing a connection, a user needs to first 'create' an account by creating a Client and\ncalling authenticate() with the Client object with the 'create' parameter as true. They can later connect to the Server\nwith the correct credentials with the 'create' parameter as false when calling authenticate().\nTo close a connection, enter 'quit'.\n\nA MySQL supporting version is also available. It was implemented with AWS RDS, and can be easily connected to by \nthe endpoint, username, and password for a RDS created with AWS.\n\nCurrently, users can only communicate with the server. If I were to extend this functionality to\nbetween users, I'll need to consider a few things. I'll need to take care of how the server maintains incoming\nrequests and sends out messages it receives to the correct recipients. \n\n## Technologies\n* Java SDK 1.8\n* Java 8\n* MySQL \n* MySQL JDBC Connector\n\n## How to use\n\nClone this repository. \nNavigate to this repository's src/main/java \n\nTo start the server, run:\n\n*javac \\*.java*\n\n*java ServerStarter*\n\nTo create clients, utilize the Client class. You must provide a port and IP address known to you.\n\n## TODO\nI hope to continue exploring how networks are used. Possible network additions are:\n* more complex behavior between clients and servers\n* giving priority to certain clients\n* connecting this type of behavior to a more interactive GUI\n* create new factors for users (followers, friends, message log)\n* add tests for inter-user communication\n\nRegarding Security:\nI understand that SHA256 is more secure, and it is not the best practice to store the passwords\nin an easily accessible location.\n* create a database to hold the passwords (COMPLETED)\n* add a middle layer of authentication before reaching the servers\n* use a different hashing algorithm","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallenjue%2Fserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallenjue%2Fserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallenjue%2Fserver/lists"}