{"id":18895765,"url":"https://github.com/loft-sh/tunnel","last_synced_at":"2025-04-15T01:31:25.300Z","repository":{"id":256436453,"uuid":"701327825","full_name":"loft-sh/tunnel","owner":"loft-sh","description":"This is a library that simplifies the implementation and integration of a Tailscale control server into your Go application.","archived":true,"fork":false,"pushed_at":"2025-02-03T00:43:08.000Z","size":6724,"stargazers_count":8,"open_issues_count":5,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-02-23T03:31:42.886Z","etag":null,"topics":["loft","tailscale","tailscale-control-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loft-sh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-06T12:10:57.000Z","updated_at":"2025-02-12T16:38:02.000Z","dependencies_parsed_at":"2024-09-10T18:46:47.454Z","dependency_job_id":"5aa947f8-5671-45c1-a099-7884e081a86b","html_url":"https://github.com/loft-sh/tunnel","commit_stats":null,"previous_names":["loft-sh/tunnel"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loft-sh%2Ftunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loft-sh%2Ftunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loft-sh%2Ftunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loft-sh%2Ftunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loft-sh","download_url":"https://codeload.github.com/loft-sh/tunnel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248989166,"owners_count":21194544,"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":["loft","tailscale","tailscale-control-server"],"created_at":"2024-11-08T08:29:52.008Z","updated_at":"2025-04-15T01:31:22.907Z","avatar_url":"https://github.com/loft-sh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tailscale Coordinator Library\n\nThis is a library that simplifies the implementation and integration of a control\nserver for Tailscale into your Go application.\n\n## Disclaimer\n\nThis project is not affiliated with Tailscale or Tailscale Inc., and it is not an\nofficial Tailscale or Tailscale Inc. project.\n\n## Installation\n\nYou can install the library using the `go get` command:\n\n```bash\ngo get github.com/loft-sh/tunnel\n```\n\n## Usage\n\nThere are two main ways to use this library: as a standalone library in your Go\ncode, or as an in-memory coordinator for end-to-end testing.\n\n### Using the Library in Your Go Code\n\nTo use the library in your Go code, you'll need to import it and implement the\nTailscale coordinator interface.\n\n```go\npackage main\n\nimport (\n  \"net/http\"\n\n  \"github.com/loft-sh/tunnel\"\n  \"github.com/loft-sh/tunnel/handlers\"\n)\n\nfunc main() {\n  coordinator := NewCoordinator()\n\n  router := http.NewServeMux()\n  router.Handle(\"/\", handlers.CoordinatorHandler(coordinator))\n\n  if err := http.ListenAndServe(\":3000\", router); err != nil {\n    panic(err)\n  }\n}\n\nfunc NewCoordinator() tunnel.Coordinator {\n  // Your coordinator implementation gets instantiated here\n  // ...\n}\n```\n\n### Using the In-Memory Coordinator\n\nWe also provide an in-memory control server, which is useful for running end-to-end\ntests in a continuous integration or test environment. This server comes with\npre-configured profiles and nodes.\n\nYou can find an example of this server in the [examples/coordinator/](./examples/coordinator/)\ndirectory.\n\nTo configure the server, edit the [config file](./examples/coordinator/config.json).\nThen, run the server with the following commands:\n\n```bash\ncd examples/coordinator\ngo run server.go\n```\n\n## Inspiration\n\nThis project was inspired by open-source Tailscale control server implementations\nsuch as [Headscale](https://headscale.net) and [Ionscale](https://jsiebens.github.io/ionscale/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floft-sh%2Ftunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floft-sh%2Ftunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floft-sh%2Ftunnel/lists"}