https://github.com/threecommaio/tailscale-cloudrun-reverseproxy
Example of how to write reverse proxy in Go that runs on Cloud Run with Tailscale
https://github.com/threecommaio/tailscale-cloudrun-reverseproxy
cloudrun go tailscale
Last synced: 10 months ago
JSON representation
Example of how to write reverse proxy in Go that runs on Cloud Run with Tailscale
- Host: GitHub
- URL: https://github.com/threecommaio/tailscale-cloudrun-reverseproxy
- Owner: threecommaio
- Created: 2021-09-04T03:28:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T02:16:03.000Z (almost 3 years ago)
- Last Synced: 2025-03-26T05:33:22.361Z (11 months ago)
- Topics: cloudrun, go, tailscale
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 19
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloudrun Tailscale Reverse Proxy
## Setup
1. Create a ephemeral key in Tailscale
2. Set `TAILSCALE_AUTHKEY` in your Cloud Run environment variables
3. Set `TARGET_URL` in your Cloud Run environment variables to the your device on your network.
Due to how ephemeral keys work, they do not allocate an IPv4, so you must hit the IPv6 address of the device. Thankfully Magic DNS makes this easy with the AAAA record. So you can set the `TARGET_URL` to something like: `http://[device].[namespace].io.beta.tailscale.net:8080`
## Usage
```bash
$ mage -l
Targets:
build* handles building the app
clean handles cleaning the project up
deploy handles deploying to cloud run
push handles pushing the image
* default target
```