{"id":18561885,"url":"https://github.com/sir-go/tls-reject","last_synced_at":"2025-10-10T19:37:39.907Z","repository":{"id":144671955,"uuid":"545410353","full_name":"sir-go/tls-reject","owner":"sir-go","description":"sniff and reject TLS connections to denied hosts","archived":false,"fork":false,"pushed_at":"2022-11-03T20:28:41.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T19:37:38.459Z","etag":null,"topics":["dpi","network","packet-sniffer","python","sni","tcp-ip","tls","traffic-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/sir-go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-10-04T10:16:03.000Z","updated_at":"2022-11-15T08:42:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"8a1752e6-2c3d-4612-bd0d-8c36f1a876bd","html_url":"https://github.com/sir-go/tls-reject","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sir-go/tls-reject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Ftls-reject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Ftls-reject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Ftls-reject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Ftls-reject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sir-go","download_url":"https://codeload.github.com/sir-go/tls-reject/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Ftls-reject/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005033,"owners_count":26083827,"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-10-10T02:00:06.843Z","response_time":62,"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":["dpi","network","packet-sniffer","python","sni","tcp-ip","tls","traffic-analysis"],"created_at":"2024-11-06T22:08:10.494Z","updated_at":"2025-10-10T19:37:39.891Z","avatar_url":"https://github.com/sir-go.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/sir-go/tls-reject/actions/workflows/python-app.yml/badge.svg)](https://github.com/sir-go/tls-reject/actions/workflows/python-app.yml)\n\n## Traffic reject by TLS SNI\n\nThis is a part of the parental control system. \n\nScript sniffs mirrored users traffic, gets values of TLS SNI extension in each packet, \nand sends reset packets to the source IP if SNI contains a denied hostname.\n\nDenied hostnames keep in the periodically updated MySQL database.\n\n### Configure\n\nEnvironment variables:\n\n| variable           | description                        |\n|--------------------|------------------------------------|\n| BLOCK_DB_HOST      | mysql host                         |\n| BLOCK_DB_USERNAME  | db username                        |\n| BLOCK_DB_PASSWORD  | db password                        |\n| BLOCK_DB_NAME      | db name                            |\n| BLOCK_UPD_INTERVAL | update list from db interval (sec) |\n| BLOCK_IN_IF        | input interface name               |\n| BLOCK_OUT_IF       | output interface name              |\n\n\n### Install -\u003e Test -\u003e Run\n```bash\nvirtualenv venv\nsource ./venv/bin/activate\npip install -r requirements.txt\npython -m pytest \u0026\u0026 python reject.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsir-go%2Ftls-reject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsir-go%2Ftls-reject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsir-go%2Ftls-reject/lists"}