{"id":13581981,"url":"https://github.com/markpash/tailscale-sidecar","last_synced_at":"2025-04-06T10:33:10.298Z","repository":{"id":42206504,"uuid":"376176827","full_name":"markpash/tailscale-sidecar","owner":"markpash","description":"A TCP proxy used to expose services onto a tailscale network without root. Ideal for container environments.","archived":true,"fork":false,"pushed_at":"2022-04-10T13:11:19.000Z","size":255,"stargazers_count":141,"open_issues_count":6,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T11:52:09.499Z","etag":null,"topics":["sidecar","tailscale","tailscale-network"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markpash.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}},"created_at":"2021-06-12T01:21:28.000Z","updated_at":"2025-02-18T15:09:27.000Z","dependencies_parsed_at":"2022-07-25T03:30:08.049Z","dependency_job_id":null,"html_url":"https://github.com/markpash/tailscale-sidecar","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markpash%2Ftailscale-sidecar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markpash%2Ftailscale-sidecar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markpash%2Ftailscale-sidecar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markpash%2Ftailscale-sidecar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markpash","download_url":"https://codeload.github.com/markpash/tailscale-sidecar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247470564,"owners_count":20944146,"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":["sidecar","tailscale","tailscale-network"],"created_at":"2024-08-01T15:02:21.845Z","updated_at":"2025-04-06T10:33:08.327Z","avatar_url":"https://github.com/markpash.png","language":"Go","funding_links":[],"categories":["Go","others"],"sub_categories":[],"readme":"# tailscale-sidecar\n\n[![checks](https://github.com/markpash/tailscale-sidecar/actions/workflows/checks.yml/badge.svg)](https://github.com/markpash/tailscale-sidecar/actions/workflows/checks.yml)\n\nThis program is designed to expose services onto a tailscale network without needing root. Using the `tsnet` package provided by tailscale, we can listen on a port on a tailscale IP and then proxy the stream to a destination. The use-case for me was running this as a sidecar container in nomad to expose services onto my tailscale network, without needing root or routing.\n\nCurrently this only supports tcp because right now because that's all I care about. I may try to make UDP work in the future.\n\nDocker image available:\n\n```bash\ndocker pull ghcr.io/markpash/tailscale-sidecar:latest\n```\n\nVersions of this software track the versions of upstream tailscale. Any features added to this software will be released when the next version of tailscale is released.\n\n## Usage\n\nTo use this program, it needs to be executed with a few environment variables. They are as follows:\n\n```bash\nTS_AUTHKEY\nTS_SIDECAR_STATEDIR\nTS_SIDECAR_NAME\nTS_SIDECAR_BINDINGS\n```\n\n`TS_AUTHKEY` is now enabled for this project. You can provide this variable with a key, consult the tailscale documentation to determine the appropriate key to use. The old `TS_LOGIN` method still works, but it's not advised and it's not very convenient either.\n\n`TS_SIDECAR_STATEDIR` is the location where the persistent data for the sidecar will be stored. This is used to not need to re-authorise the instance. In a container setup, you'll want to have this persisted. The default is `./tsstate`, which will result in Tailscale using `home/nonroot/tsstate` in the Docker container.\n\n⚠ Tailscale will not use the specified state directory to store the TLS certificates. When using the Docker container, you should mount `home/nonroot/.local/share/tailscale`.\n\n`TS_SIDECAR_NAME` is the name that you wish this program to use to present itself to the tailscale servers, this is what you will see in your panel.\n\n`TS_SIDECAR_BINDINGS` is the path to the bindings file, which should be a JSON file which has contents much like what's below.\nThe default path for bindings is `/etc/ts-sidecar/bindings.json`.\n\n## Configuration\n\nConfiguration should look like this:\n\n```json\n[\n    {\n        \"from\": 443,\n        \"to\": \"127.0.0.1:8000\",\n        \"tls\": true\n    }\n]\n```\n\n## Disclaimer\n\nTHIS IS NOT OFFICIALLY ENDORSED BY TAILSCALE.\n\nI thought I should put that there just in case someone thought it may be a tailscale product.\nI'm also not responsible for any of the bad things that might happen as a result of using this software. It works for me but maybe not for you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkpash%2Ftailscale-sidecar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkpash%2Ftailscale-sidecar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkpash%2Ftailscale-sidecar/lists"}