{"id":50214092,"url":"https://github.com/hugobatista/tailhoogram","last_synced_at":"2026-05-26T07:04:18.646Z","repository":{"id":338780371,"uuid":"1159128558","full_name":"hugobatista/tailhoogram","owner":"hugobatista","description":"Send Tailscale webhook events to Telegram using Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2026-05-25T18:40:56.000Z","size":61,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T20:29:55.941Z","etag":null,"topics":["audit","cloudflare","cloudflare-workers","events","security","tailnet","tailscale","telegram","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","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/hugobatista.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"hugobatista"}},"created_at":"2026-02-16T10:56:38.000Z","updated_at":"2026-05-25T18:40:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hugobatista/tailhoogram","commit_stats":null,"previous_names":["hugobatista/tailhoogram"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hugobatista/tailhoogram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugobatista%2Ftailhoogram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugobatista%2Ftailhoogram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugobatista%2Ftailhoogram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugobatista%2Ftailhoogram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugobatista","download_url":"https://codeload.github.com/hugobatista/tailhoogram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugobatista%2Ftailhoogram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33508321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"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":["audit","cloudflare","cloudflare-workers","events","security","tailnet","tailscale","telegram","webhook"],"created_at":"2026-05-26T07:04:16.123Z","updated_at":"2026-05-26T07:04:18.640Z","avatar_url":"https://github.com/hugobatista.png","language":"Python","funding_links":["https://github.com/sponsors/hugobatista"],"categories":[],"sub_categories":[],"readme":"[![GitHub Tag](https://img.shields.io/github/v/tag/hugobatista/tailhoogram?logo=github\u0026label=latest)](https://go.hugobatista.com/gh/tailhoogram/releases)\n[![Test](https://go.hugobatista.com/gh/tailhoogram/actions/workflows/test.yml/badge.svg)](https://go.hugobatista.com/gh/tailhoogram/actions/workflows/test.yml)\n[![Lint](https://go.hugobatista.com/gh/tailhoogram/actions/workflows/lint.yml/badge.svg)](https://go.hugobatista.com/gh/tailhoogram/actions/workflows/lint.yml)\n\n[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/hugobatista/tailhoogram)\n# TailHoogram\n\n**Sends Tailscale events to Telegram using Cloudflare Workers**\n\nTailscale natively supports Slack, Discord, Google Chat, and Mattermost—but not Telegram. \n\n**TailHoogram bridges that gap with secure webhook processing**, sending the event to Telegram.\nCan be deployed on Cloudflare Workers, even with the free tier.\n\n\n## Quick Start\n\n**Prerequisites:** Python 3.12+, `uv`, Tailscale account, Telegram bot token\n\n```bash\n# Install\nuv sync --extra dev\n\n# Configure (.env file)\nTAILSCALE_WEBHOOK_SECRET=your-secret\nTELEGRAM_BOT_TOKEN=your-bot-token\nTELEGRAM_CHAT_ID=your-chat-id\n\n# Run locally with pywrangler\nuv run pywrangler dev\n\n# Deploy to Cloudflare Workers\nuv run pywrangler secret put TAILSCALE_WEBHOOK_SECRET\nuv run pywrangler secret put TELEGRAM_BOT_TOKEN\nuv run pywrangler secret put TELEGRAM_CHAT_ID\nuv run pywrangler deploy\n```\n\nNote: If you use a system keyring, you can skip the `.env` file step and use [kleys](https://go.hugobatista.com/gh/kleys) to automatically load secrets from your vault.\n\n```bash\n# Run with secrets from vault\nkleys uv run pywrangler dev\n```\n\n\n**Tailscale Setup:**\n1. Go to Tailscale admin → Webhooks\n2. Create webhook pointing to `https://your-domain/events`\n3. Copy the secret and set as `TAILSCALE_WEBHOOK_SECRET`\n4. Hit \"Test\" to verify\n\n## Testing locally  \n\nTest your webhook endpoint locally using the included test script:\n\n```bash\n# Test default endpoint (localhost:8000)\npython test-endpoint.py\n\n# Test custom endpoint\npython test-endpoint.py --endpoint example.com:8080\n```\n\nThe script automatically loads `TAILSCALE_WEBHOOK_SECRET` from your `.env` file and sends a properly signed test webhook.\n\n## Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `TAILSCALE_WEBHOOK_SECRET` | Secret from Tailscale webhook setup | Yes |\n| `TELEGRAM_BOT_TOKEN` | Bot token from @BotFather | Yes |\n| `TELEGRAM_CHAT_ID` | Target chat ID | Yes |\n\n## Security\n\n- **HMAC-SHA256 signature verification** on every webhook\n- **Replay protection** (5-minute timestamp window)\n- **Firewall recommendation:** Restrict to Tailscale IP ranges ([docs](https://tailscale.com/docs/reference/faq/firewall-ports))\n\n## Example Notification\n\n```\n🔔 Tailscale Event\n\nType: policyUpdate\nTailnet: hugo-tailscale\nMessage: Tailnet policy file updated\nTime: 2026-02-15T09:33:14.089607+00:00\n\nDetails:\n  url: https://login.tailscale.com/admin/acls\n  actor: hugobatista\n```\n\n## Using VSCode Dev Containers\nThis project includes a VSCode Dev Container configuration for easy local development. It sets up a consistent environment with all dependencies installed.\n\n### SELinux Users (ex: Fedora, RHEL, CentOS)\nIf you encounter permission issues with the dev container, you may need to adjust your SELinux policies, by relabeling the project directory with s0 and container_file_t contexts:\n\n```bash\nsudo chcon -Rt container_file_t -l s0 ./tailhoogram\n# this command recursively changes the context of all files in the project directory to be accessible by the container\n```\nTo restore the original context after development, you can use:\n\n```bash\nsudo restorecon -RvF ./tailhoogram\n# this command recursively restores the default SELinux context for all files in the project directory\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugobatista%2Ftailhoogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugobatista%2Ftailhoogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugobatista%2Ftailhoogram/lists"}