Giter Site home page Giter Site logo

tailscale-serve-proxy's Introduction

tailscale-serve-proxy

Overview

tailscale-serve-proxy is a Docker image that integrates dockerized web services into Tailscale as separate machines with their own hostnames.

Unlike the apprach of sharing the network interface between the Tailscale image and the service container, it provides a clean separation by implementing a reverse proxy server.

The proxy uses the Tailscale's serve functionality to provide HTTPS termination. Note that HTTPS must be enabled on your Tailnet. Plain HTTP requests are redirected to HTTPS.

Dependencies

Usage

Using docker-compose is recommended.

version: "3"

services:
  proxy:
    image: ghcr.io/awahlig/tailscale-serve-proxy:latest
    volumes:
      # Tailscale state must be preserved.
      - ./tailscale:/var/lib/tailscale
    environment:
      # Name of the machine on the Tailnet.
      - TAILSCALE_HOSTNAME=myapp
      # URL of the web service to proxy.
      - TSPROXY_UPSTREAM=http://app

  # Your web service container.
  app:
    image: ...

See the Tailscale Docker Mod documentation for a full list of supported variables.

After starting, visit the link from the container logs to add the machine to your Tailnet.

Tailscale identity

Using the serve functionality also means that requests sent to the backend conatin Tailscale identity headers. These can be used by the backend to identify Tailscale users visiting the service.

Limitations

Because tailscale is running inside the proxy container, the backend cannot use it to connect to other machines on the Tailnet.

License

This project is using the Apache 2.0 license.

tailscale-serve-proxy's People

Contributors

awahlig avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.