{"id":19090137,"url":"https://github.com/destrangis/testserver","last_synced_at":"2026-05-24T15:30:18.021Z","repository":{"id":137496508,"uuid":"213754531","full_name":"destrangis/testserver","owner":"destrangis","description":"Sample test server using SNI","archived":false,"fork":false,"pushed_at":"2019-10-08T21:21:04.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T22:18:35.194Z","etag":null,"topics":["example-code","python","server","ssl"],"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/destrangis.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-10-08T21:06:30.000Z","updated_at":"2019-10-10T22:36:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"c057e122-205e-43ae-b161-3f7505bbb2aa","html_url":"https://github.com/destrangis/testserver","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/destrangis%2Ftestserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destrangis%2Ftestserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destrangis%2Ftestserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/destrangis%2Ftestserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/destrangis","download_url":"https://codeload.github.com/destrangis/testserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240136995,"owners_count":19753650,"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":["example-code","python","server","ssl"],"created_at":"2024-11-09T03:02:10.785Z","updated_at":"2026-05-24T15:30:15.932Z","avatar_url":"https://github.com/destrangis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is just an example of using Server Name Indication (SNI) on a HTTP server that chooses a certificate based on the hostname that the client wants to connect to. I wrote it just for illustration.\n\nIn order to use it, just generate certificates for hosts 'pantagruel' and 'badabec':\n\n    $ . create_certificates\n\nAdd the hosts to your /etc/hosts file, so that they can be resolved by a web browser:\n\n    127.0.0.1   badabec pantagruel\n\nAnd then run the program:\n\n    $ python3 server.py\n    Listening on 0.0.0.0:8080\n\nAnd launch the browser to http://pantagruel:8080 or http://badabec:8080, mind that the browser will complain about the self-signed certificates. Just create an exception for them.\n\nYou can also use the 'requests' module:\n\n    \u003e\u003e\u003e import requests\n    \u003e\u003e\u003e resp = requests.get(\"https://badabec:8080/\", verify=False)\n    \u003e\u003e\u003e resp.text\n    'All fine\\r\\n'\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdestrangis%2Ftestserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdestrangis%2Ftestserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdestrangis%2Ftestserver/lists"}