{"id":20296702,"url":"https://github.com/jlu5/webtrace","last_synced_at":"2025-04-11T12:06:12.992Z","repository":{"id":206943451,"uuid":"715912693","full_name":"jlu5/webtrace","owner":"jlu5","description":"webtrace looking glass (web frontend to traceroute / ping / mtr)","archived":false,"fork":false,"pushed_at":"2024-09-05T04:36:13.000Z","size":69,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T08:22:25.529Z","etag":null,"topics":["looking-glass","mtr","traceroute","web"],"latest_commit_sha":null,"homepage":"https://webtrace-demo.highdef.network/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlu5.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":"2023-11-08T04:42:29.000Z","updated_at":"2025-01-03T09:55:32.000Z","dependencies_parsed_at":"2023-11-13T10:31:08.940Z","dependency_job_id":"e6dd12a7-3150-4627-91fe-e358b198002e","html_url":"https://github.com/jlu5/webtrace","commit_stats":null,"previous_names":["jlu5/webtrace"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlu5%2Fwebtrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlu5%2Fwebtrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlu5%2Fwebtrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlu5%2Fwebtrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlu5","download_url":"https://codeload.github.com/jlu5/webtrace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248396158,"owners_count":21096893,"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":["looking-glass","mtr","traceroute","web"],"created_at":"2024-11-14T15:40:28.539Z","updated_at":"2025-04-11T12:06:12.966Z","avatar_url":"https://github.com/jlu5.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webtrace\n\n**webtrace** is a looking glass utility: a web frontend for traceroute, ping, and mtr. It uses [readable streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_streams) to pipe live output straight to the browser.\n\n[Demo](https://webtrace-demo.highdef.network/)\n\n## Configuration\n\nwebtrace accepts some config options via environment variables:\n\n- `WEBTRACE_MTRCOUNT` - number of mtr cycles to run (default 10)\n- `WEBTRACE_PINGCOUNT` - number of pings to send in ping mode (default 4)\n- `WEBTRACE_RATELIMIT` - rate limit of calls per IP, via [Flask-Limiter](https://flask-limiter.readthedocs.io/en/stable/) (default \"10/minute\")\n- `WEBTRACE_SERVERINFO` - optional server description to insert into the site\n- `WEBTRACE_TITLE` - web page title (default \"webtrace\")\n- `WEBTRACE_TIMEOUT` - timeout for requests in seconds (default 30)\n\n## Install\n\nwebtrace is a Flask app, and there are [many ways to deploy](https://flask.palletsprojects.com/en/3.0.x/deploying/) them - below are some examples. **The only requirement is a web server that supports streaming** (i.e. with response buffering disabled).\n\nwebtrace's entrypoint is [`app:app`](app.py).\n\n### Gunicorn (Linux)\n\nTo run webtrace with Gunicorn, you MUST enable asynchronous workers (`gunicorn app:app` **`-k gevent`**). Otherwise, only one request can be served at once, across the whole instance. For the rest, you can follow [Gunicorn's official deployment guide](https://docs.gunicorn.org/en/stable/deploy.html).\n\nThere are some examples of systemd services to start webtrace in the [`deploy-examples/gunicorn`](deploy-examples/gunicorn) folder.\n\n### Waitress (cross-platform)\n\nwebtrace works out of the box with [Waitress](https://flask.palletsprojects.com/en/3.0.x/deploying/waitress/). Although the Flask setup guide suggests that Waitress doesn't support streaming, this worked fine in my testing on both Linux and Windows.\n\nExample: `waitress-serve --host 127.0.0.1 app:app`\n\n### Reverse proxy with nginx\n\nA common recommendation is to run the WSGI server behind a reverse proxy. This works well with nginx: just make sure to set `proxy_buffering off;`\n\n```\nupstream webtrace-backend {\n    server unix:/run/webtrace.sock;\n}\n\nserver {\n    listen 80;\n    listen [::]:80;\n    #listen 443 ssl;\n    #listen [::]:443 ssl;\n\n    server_name your.server.name;\n\n    # Alternatively, \"location /\" if you want webtrace at the root of the domain\n    location /webtrace/ {\n        proxy_pass http://webtrace-backend/;\n        # Important since we use HTTP streaming!\n        proxy_buffering off;\n        access_log /var/log/nginx/webtrace-access.log;\n        error_log /var/log/nginx/webtrace-error.log;\n    }\n}\n```\n\n### IIS + wfastcgi (Windows)\n\n(I ported webtrace to Windows mostly for proof-of-concept; this is not thoroughly supported. Last tested on Server 2019 and Python 3.12)\n\n[Muhammad Tauseeq's \"Deploy a Flask app on Windows Server using FastCGI and IIS\"](https://mtuseeq.medium.com/how-to-deploy-flask-app-on-windows-server-using-fastcgi-and-iis-73d8139d5342) guide covers pretty much everything. There is a sample `web.config` file in the [`deploy-examples/iis-wfastcgi`](deploy-examples/iis-wfastcgi) folder; this should be copied into the folder you clone the webtrace repo into. `responseBufferLimit=\"0\"` is important to turn off response buffering.\n\nIIS has other ways of running CGI apps such as [HttpPlatformHandler](https://www.iis.net/downloads/microsoft/httpplatformhandler) and [ARR Reverse Proxying](https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing), but these do not appear to support unbuffered responses. As a result, webtrace will not work with those setups.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlu5%2Fwebtrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlu5%2Fwebtrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlu5%2Fwebtrace/lists"}