Volver al ranking

almeidapaulopt/tsdproxy

Goalmeidapaulopt.github.io/tsdproxy/

Automatic Tailscale reverse proxy for Docker containers. Zero sidecars. Label-based config. Automatic HTTPS.

dockergoself-hostedtailscaleproxyvpncontainersdocker-composehomelabhttpsnetworkingreverse-proxy
Crecimiento de estrellas
Estrellas
1.7k
Forks
77
Crecimiento semanal
Issues
6
1k1.5k
nov 2024may 2025dic 2025jul 2026
ArtefactosGo Modulesgo get github.com/almeidapaulopt/tsdproxy
README

TSDProxy - Tailscale Docker Proxy

The easiest way to expose Docker containers on your Tailscale network. One label. Zero sidecars.

GitHub Stars GitHub Issues Docker Pulls License Go Version Release

TSDProxy Demo

Quick Start

Get running in under a minute. One compose file, one label.

Step 1: Create docker-compose.yml

services:
  tsdproxy:
    image: almeidapaulopt/tsdproxy:2
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - tsdproxy-data:/data
      - ./config:/config
    ports:
      - "8080:8080"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped

  myapp:
    image: nginx:alpine
    labels:
      tsdproxy.enable: "true"
      tsdproxy.name: "myapp"

volumes:
  tsdproxy-data:

Step 2: Start it up

docker compose up -d

TSDProxy creates a default config at /config/tsdproxy.yaml on first run. Open the dashboard at http://localhost:8080, click the proxy card, and authenticate with Tailscale.

Your container is now available at https://myapp.<tailnet-name>.ts.net with automatic HTTPS.

For automated (headless) setup, configure an AuthKey or OAuth before adding services.

Key Features

Feature Description
Zero sidecars No Tailscale container needed per service. One proxy handles everything.
Label-based config Add tsdproxy.enable=true to any container. Done.
Automatic HTTPS Tailscale provisions Let's Encrypt certs for every machine.
Multi-port support Expose multiple ports per container with granular protocol control.
TCP & UDP proxying Proxy TCP (SSH, databases) and UDP traffic alongside HTTP/HTTPS services.
Port ranges Define ranges of ports in a single label — e.g. 2222-2230/tcp.
Funnel support Expose services to the public internet with tailscale_funnel option.
Health monitoring Automatic backend health probes with recovery and target re-resolution.
Webhook notifications Push proxy events to ntfy, Discord, Slack, Gotify, or generic webhooks.
REST API Programmatic control over proxies — pause, resume, and manage via API.
Role-based access Admin and viewer roles with optional admin allowlist.
Dynamic lifecycle Containers start and stop. Tailscale machines appear and disappear.
Live config reload Change settings without restarting TSDProxy.
Dashboard Real-time web UI with SSE streaming, access logs, and status timeline.
List provider Expose non-Docker services via a simple YAML file.

How It Works

graph LR
    A[Docker Containers] -->|tsdproxy.enable label| B[TSDProxy]
    B -->|creates tsnet.Server| C[Tailscale Network]
    C -->|automatic HTTPS| D[Secure URLs]
    D -->|reverse proxy| A

Under the hood:

  1. Container Scanning - TSDProxy watches your Docker daemon for containers tagged with tsdproxy.enable=true.
  2. Machine Creation - When a tagged container appears, TSDProxy spins up a Tailscale machine via tsnet.
  3. Hostname Assignment - The machine gets a hostname from the tsdproxy.name label or the container name.
  4. Port Mapping - TSDProxy maps the container's internal port to the Tailscale machine.
  5. Traffic Routing - Incoming requests to https://myapp.<tailnet>.ts.net are reverse-proxied to the container.
  6. Dynamic Cleanup - When a container stops, its Tailscale machine and routes are removed automatically.

Port Configuration

Expose multiple ports with per-port protocol and options:

labels:
  tsdproxy.enable: "true"
  tsdproxy.name: "myservice"

  # HTTPS on 443 -> container port 80
  tsdproxy.port.1: "443/https:80/http"

  # HTTP on 80 -> container port 8080
  tsdproxy.port.2: "80/http:8080/http"

  # HTTP redirect to HTTPS
  tsdproxy.port.3: "81/http->https://myservice.tailnet.ts.net"

  # TCP proxy for SSH
  tsdproxy.port.4: "22/tcp:22/tcp"

  # UDP proxy (e.g. game server, VoIP)
  tsdproxy.port.5: "5060/udp:5060/udp"

  # Port range (TCP ports 2222 through 2230)
  tsdproxy.port.6: "2222-2230/tcp:2222-2230/tcp"

Docker Images

Tag Description
almeidapaulopt/tsdproxy:2 Latest v2 release
almeidapaulopt/tsdproxy:latest Latest stable release
almeidapaulopt/tsdproxy:dev Latest development build
almeidapaulopt/tsdproxy:vx.x.x Specific version

Documentation

Full setup guides, configuration reference, and advanced usage:

almeidapaulopt.github.io/tsdproxy

Key docs: Getting Started | Docker Labels | Port Configuration | List Provider | TCP Proxy | Funnel | REST API | Health Checks | Webhooks | Admin Allowlist | Upgrading from v1

Contributing

Bug reports, feature requests, documentation improvements, and pull requests are all welcome. See CONTRIBUTING.md for guidelines.

If you'd rather support the project financially, sponsorships help keep development going.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Star History Chart

Repositorios relacionados
louislam/uptime-kuma

A fancy self-hosted monitoring tool

JavaScriptnpmMIT Licenseuptimemonitoring
uptime.kuma.pet
89.4k8.1k
Stirling-Tools/Stirling-PDF

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

JavaMavenOtherdockerjava
stirling.com
87.7k7.8k
macrozheng/mall

mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于Spring Boot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。

JavaMavenApache License 2.0spring-bootspring-security
macrozheng.com/admin/
84.3k29.8k
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

PythonPyPIOtherdevopsaws
83.3k19.8k
netdata/netdata

The fastest path to AI-powered full stack observability, even for lean teams.

GoGo ModulesGNU General Public License v3.0monitoringdocker
netdata.cloud
79.8k6.5k
moby/moby

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

GoGo ModulesApache License 2.0dockercontainers
mobyproject.org
71.9k19k
traefik/traefik

The Cloud Native Application Proxy

GoGo ModulesMIT Licensemicroservicedocker
traefik.io
64.1k6.1k
dani-garcia/vaultwarden

Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs

Rustcrates.ioGNU Affero General Public License v3.0vaultwardenbitwarden
64k3k
usememos/memos

Open-source, self-hosted note-taking tool built for quick capture. Markdown-native, lightweight, and fully yours.

GoGo ModulesMIT Licensereactgo
usememos.com
61.7k4.6k
sansan0/TrendRadar

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

PythonPyPIGNU General Public License v3.0data-analysispython
trendradar.sandev.cc
60.8k24.8k
coollabsio/coolify

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 280+ one-click services on your own servers.

PHPPackagistApache License 2.0nodejsmysql
coolify.io
59.2k5.1k
appwrite/appwrite

Appwrite® - complete cloud infrastructure for your web, mobile and AI apps. Including Auth, Databases, Storage, Functions, Messaging, Hosting, Realtime and more

TypeScriptnpmBSD 3-Clause "New" or "Revised" Licenseappwritedocker
appwrite.io
56.6k5.6k