{"id":25965145,"url":"https://github.com/dentordev/tor-launcher","last_synced_at":"2026-04-28T16:36:11.666Z","repository":{"id":250355487,"uuid":"834221225","full_name":"Dentordev/Tor-Launcher","owner":"Dentordev","description":"A Small Python Library for helping to host tor hidden services without the bullshit.","archived":false,"fork":false,"pushed_at":"2024-07-27T18:28:00.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T21:39:10.560Z","etag":null,"topics":["aiohttp-server","fastapi","flask","flask-application","hosting","onion-site","python3","stem","tor","tor-hidden-services"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dentordev.png","metadata":{"files":{"readme":"Readme.md","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":"2024-07-26T17:28:13.000Z","updated_at":"2024-07-27T18:28:02.000Z","dependencies_parsed_at":"2025-03-04T21:37:11.475Z","dependency_job_id":"d2c20f01-c45f-4b98-ad69-dadd7de5043a","html_url":"https://github.com/Dentordev/Tor-Launcher","commit_stats":null,"previous_names":["dentordev/tor-launcher-server-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Dentordev/Tor-Launcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentordev%2FTor-Launcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentordev%2FTor-Launcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentordev%2FTor-Launcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentordev%2FTor-Launcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dentordev","download_url":"https://codeload.github.com/Dentordev/Tor-Launcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentordev%2FTor-Launcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aiohttp-server","fastapi","flask","flask-application","hosting","onion-site","python3","stem","tor","tor-hidden-services"],"created_at":"2025-03-04T21:37:06.863Z","updated_at":"2026-04-28T16:36:11.629Z","avatar_url":"https://github.com/Dentordev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tor Launcher\nA Small Python Script to help and aid in Launching a tor hidden service all in one script without the bs involved. You are free to copy and paste this code as you wish. \nstem is the only python package that is required. I have handled all the annoyances involved with hosting that had my head bashing against my own keyboard.\n\n# Examples\nThis will work with aiohttp, flask, fastapi and starlette easily and pretty much any python server application under the sun as the process is being launched before the server is to be ran \nas so the process closes after the server closes which allows for propper cleanup.\n\n```python\n# An example with aiohttp inspired by https://stem.torproject.org/tutorials/over_the_river.html\n\nfrom onionHost import on_launch\nfrom aiohttp import web \nimport sys \n\n\nroute = web.RouteTableDef()\n\n# Allow me to bring in stem's classic example on how to do this\n@route.get(\"/\")\nasync def hiGrandma(request:web.Request):\n    return web.Response(body=b\"\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eHi Grandma\u003c/h1\u003e\u003c/body\u003e\u003c/html\u003e\", content_type=\"text/html\")\n\n\n# NOTE: on_launch assumes you have tor.exe setup as an enviornment variable. This is not hard to setup \n# You just need to install tor or the tor-expert-bundle beforehand on either linux , Apple or Windows and then\n# setup the enviornment variable to your tor.exe file, from there, let the small and extremely useful on_launch()\n# decorator handle the rest...\n\n\n# NOTE: Remeber that your ports need to match in order to sucessfully host your tor hidden services\n@on_launch(port=2000)\ndef main():\n    app = web.Application()\n    app.add_routes(route)\n    web.run_app(app, port=2000)\n\n\n\nif __name__ == \"__main__\":\n    # if you need to use uvloop, install it beforehand otherwise use winloop \n    # it will incease the speed of your server especially on tor.\n    if sys.platform != \"win32\":\n        import uvloop; uvloop.install()\n    else:\n        import winloop; winloop.install()\n    \n    main()\n```\n\n\n## Hosting Multiple onionsites \n Hosting Multiple onionsites on a single Python Script Made easy because believe me it's annoying and don't get me started with fixing windows Paths. \n \n```python\nfrom onionHost import Tor\ndef launch_multiple_onionsites():\n    with Tor() as tor:\n        tor.host_hidden_service(port=6069, hs_dir=\"/dir-1\")\n        tor.host_hidden_service(port=8000, hs_dir=\"/dir-2\")\n        # run what you need to below this line remember that when the tor context manager exits so does it's process...\n        ...\n```\n\n\n ## Requirements\n- python 3 (I think 3.6 or higher is required here)\n- install stem\n- install either  [Tor Browser](https://www.torproject.org/download/) or [Tor Expert Bundle](https://dist.torproject.org/torbrowser)\n- set up `tor` as an eviornment varaible so that it can be invoked as a command\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdentordev%2Ftor-launcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdentordev%2Ftor-launcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdentordev%2Ftor-launcher/lists"}