{"id":18448743,"url":"https://github.com/locksec/simple-https-server","last_synced_at":"2025-04-15T11:25:49.413Z","repository":{"id":200579429,"uuid":"705842401","full_name":"locksec/simple-https-server","owner":"locksec","description":"Simple HTTPS server with mTLS support","archived":false,"fork":false,"pushed_at":"2023-10-18T13:07:50.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T13:30:47.568Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/locksec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-16T19:49:26.000Z","updated_at":"2023-10-16T21:26:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"7271f12a-cd96-42e6-8ddc-a238f7492e65","html_url":"https://github.com/locksec/simple-https-server","commit_stats":null,"previous_names":["rayheffer/simple-https-server","locksec/simple-https-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locksec%2Fsimple-https-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locksec%2Fsimple-https-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locksec%2Fsimple-https-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locksec%2Fsimple-https-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locksec","download_url":"https://codeload.github.com/locksec/simple-https-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249059778,"owners_count":21206208,"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":[],"created_at":"2024-11-06T07:16:57.260Z","updated_at":"2025-04-15T11:25:49.393Z","avatar_url":"https://github.com/locksec.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple HTTPS Server with mTLS\r\nA Python-based HTTPS server that supports Mutual TLS (mTLS). This simple server can be used for a variety of applications, such as Vault PKI demonstrations, running a secure internal web service, or for ethical hacking practices for certifications like OSCP or CEH.\r\n\r\n## Prerequisites\r\n- Python 3.x\r\n- OpenSSL (For generating certificates and keys)\r\n\r\n## Features\r\n- Supports HTTPS using TLS\r\n- Supports mTLS for client verification\r\n- Customizable IP and port\r\n- Utilizes Python's `http.server` and `ssl` modules\r\n\r\n## Usage\r\nTo run the server, execute the following command:\r\n\r\n**Simple HTTPS Server listening on 127.0.0.1:8443**\r\n```bash\r\npython3 server.py -p 8443 -c server.crt -k server.key -a ca.crt\r\n```\r\n\r\n**Simple HTTPS Server listening on 0.0.0.0:8443 with mTLS enabled**\r\n```bash\r\npython3 server.py -p 8443 -l 0.0.0.0 -c server.crt -k server.key -a ca.crt -m\r\n```\r\n\r\nTo test the server using curl, execute the following command:\r\n``` bash\r\ncurl -k --cert client.crt --key client.key https://127.0.0.1:8443\r\n```\r\n## Switches\r\n* `-p`, `--port`: The port to listen on. E.g. 8443\r\n* `-l`, `--listen`: The IP address to listen on (defaults to 127.0.0.1 if this is omitted). E.g. 0.0.0.0\r\n* `-c`, `--certfile`: The server certificate file. This is the public certificate that the server presents during the handshake.\r\n* `-k`, `--keyfile`: The server private key file. This private key corresponds to the public certificate specified in `--certfile`.\r\n* `-a`, `--cafile`: The CA certificate file for client verification. This is the CA that signed the client's certificate.\r\n* `-m`, `--mtls`: Enables mTLS, which will require the client to provide a valid certificate.\r\n\r\n## Examples of Use Cases\r\n* Vault PKI Demo: You can use this server to demonstrate how Vault can issue certificates. Use the CA certificate from Vault as `ca.crt`, and Vault-issued certificates as `server.crt` and `server.key`.\r\n* Ethical Hacking: This setup can be used to practice mTLS and SSL exploitation techniques in a controlled environment. Useful for certifications like OSCP or CEH.\r\n* Secure Internal Web Services: Use this as a simple HTTPS server with client verification for running secure internal web services.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocksec%2Fsimple-https-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocksec%2Fsimple-https-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocksec%2Fsimple-https-server/lists"}