{"id":29961885,"url":"https://github.com/konijima/rust-socket-network","last_synced_at":"2025-08-03T23:43:49.844Z","repository":{"id":295918351,"uuid":"991684147","full_name":"Konijima/rust-socket-network","owner":"Konijima","description":"A unified Rust monorepo providing both a secure WebSocket server and client, using RSA PKCS#1 challenge-response authentication. Easily develop, test, and update both components together for authenticated messaging between clients and server.","archived":false,"fork":false,"pushed_at":"2025-05-28T02:23:25.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-28T03:28:50.442Z","etag":null,"topics":["network","rust","socket"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Konijima.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,"zenodo":null}},"created_at":"2025-05-28T02:16:17.000Z","updated_at":"2025-05-28T02:25:46.000Z","dependencies_parsed_at":"2025-05-28T03:29:06.586Z","dependency_job_id":"873b9cfa-c6b9-4a39-a29b-d41cab018f4b","html_url":"https://github.com/Konijima/rust-socket-network","commit_stats":null,"previous_names":["konijima/rust-socket-network"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Konijima/rust-socket-network","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Frust-socket-network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Frust-socket-network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Frust-socket-network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Frust-socket-network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Konijima","download_url":"https://codeload.github.com/Konijima/rust-socket-network/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Frust-socket-network/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268629851,"owners_count":24281172,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["network","rust","socket"],"created_at":"2025-08-03T23:43:33.536Z","updated_at":"2025-08-03T23:43:49.781Z","avatar_url":"https://github.com/Konijima.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Socket Network Monorepo\n\nThis repository is a **monorepo** containing both the Rust WebSocket server and client for secure communication with RSA authentication.\n\n## Repository Structure\n\n```\n\n/\n├── client/   # Rust WebSocket client with RSA authentication\n├── server/   # Rust WebSocket server with RSA client auth\n└── README.md\n\n````\n\n- `client/`: Connects to a WebSocket server, authenticates via RSA private key, and broadcasts messages.\n- `server/`: Accepts authenticated clients, verifies RSA signatures, and relays messages.\n\n## Quick Start\n\n### 1. Requirements\n\n- [Rust (stable toolchain)](https://www.rust-lang.org/tools/install)\n- [OpenSSL](https://www.openssl.org/)\n\n### 2. Generate Keys\n\nBoth projects rely on PKCS#1-format RSA keypairs for authentication.\n\nGenerate a private key for each client:\n```sh\nmkdir -p keys\nopenssl genrsa -traditional -out keys/device123.pem 2048\n````\n\nExtract the matching public key (for the server):\n\n```sh\nopenssl rsa -in keys/device123.pem -pubout -RSAPublicKey_out -out keys/device123.pub.pem\n```\n\n### 3. Project-Specific Setup\n\n#### Server\n\n1. Copy all allowed client public keys (`*.pub.pem`) into `server/keys/`.\n2. From the monorepo root:\n\n   ```sh\n   cd server\n   cargo build --release\n   cargo run\n   ```\n\n   The server listens on `ws://0.0.0.0:8081`.\n\n#### Client\n\n1. Place the private key (`device123.pem`) into `client/keys/`.\n2. From the monorepo root:\n\n   ```sh\n   cd client\n   cargo build --release\n   cargo run\n   ```\n\n   The client will connect to the server at `ws://localhost:8081` by default.\n\n## Project Documentation\n\nFor full details, see the individual READMEs in each project:\n\n* [`client/README.md`](./client/readme.md)\n* [`server/README.md`](./server/readme.md)\n\n## Development Workflow\n\n* You can make changes to both projects in a single commit.\n* Each project can be built and tested independently from its own subdirectory.\n* Key generation instructions are duplicated for clarity—ensure both server and client use matching PKCS#1 key formats.\n* **No submodules:** All code is directly present in the monorepo.\n\n## Security Notes\n\n* Communication is unencrypted unless you run the server behind a TLS reverse proxy.\n* Anyone with access to the client’s private key can impersonate that client.\n* Only public keys present on the server can authenticate.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonijima%2Frust-socket-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonijima%2Frust-socket-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonijima%2Frust-socket-network/lists"}