{"id":13600738,"url":"https://github.com/kataras/tunnel","last_synced_at":"2025-03-17T04:31:40.650Z","repository":{"id":57532298,"uuid":"278562364","full_name":"kataras/tunnel","owner":"kataras","description":"Public URLs for exposing your local web server","archived":false,"fork":false,"pushed_at":"2022-12-24T06:22:47.000Z","size":23,"stargazers_count":26,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T17:45:58.978Z","etag":null,"topics":["go","golang","http","iris","ngrok","tunneling"],"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/kataras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"kataras"}},"created_at":"2020-07-10T06:58:24.000Z","updated_at":"2023-08-06T01:23:39.000Z","dependencies_parsed_at":"2023-01-30T20:10:17.684Z","dependency_job_id":null,"html_url":"https://github.com/kataras/tunnel","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Ftunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Ftunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Ftunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Ftunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kataras","download_url":"https://codeload.github.com/kataras/tunnel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841223,"owners_count":20356446,"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":["go","golang","http","iris","ngrok","tunneling"],"created_at":"2024-08-01T18:00:47.608Z","updated_at":"2025-03-17T04:31:40.331Z","avatar_url":"https://github.com/kataras.png","language":"Go","funding_links":["https://github.com/sponsors/kataras"],"categories":["Go"],"sub_categories":[],"readme":"# Tunnel\r\n\r\n[![build status](https://img.shields.io/github/actions/workflow/status/kataras/tunnel/ci.yml?style=for-the-badge)](https://github.com/kataras/tunnel/actions) [![report card](https://img.shields.io/badge/report%20card-a%2B-ff3333.svg?style=for-the-badge)](https://goreportcard.com/report/github.com/kataras/tunnel) [![godocs](https://img.shields.io/badge/go-%20docs-488AC7.svg?style=for-the-badge)](https://godoc.org/github.com/kataras/tunnel)\r\n\r\nPublic URLs for exposing your local web server using [ngrok's API](https://ngrok.com/).\r\n\r\n## Installation\r\n\r\nThe only requirement is the [Go Programming Language](https://golang.org/dl).\r\n\r\n```sh\r\n$ go get github.com/kataras/tunnel@latest\r\n```\r\n\r\n## Getting Started\r\n\r\nFirst of all, navigate to \u003chttps://ngrok.com/\u003e, create an [account](https://dashboard.ngrok.com/signup) and [download](https://dashboard.ngrok.com/get-started/setup) ngrok. Extract the downloaded zip file anywhere you like and _optionally_ add it to your _PATH_ or _NGROK_ system environment variable. Test if installation successfully completed by running the following command:\r\n\r\n```sh\r\n$ ngrok version\r\n```\r\n\r\nImport the package:\r\n\r\n```go\r\npackage main\r\n\r\nimport \"github.com/kataras/tunnel\"\r\n```\r\n\r\nStart a new local http Server and expose it to the internet using **just a single new line of code**:\r\n\r\n```go\r\nfunc main() {\r\n    // [...http.HandleFunc]\r\n\r\n    srv := \u0026http.Server{Addr: \":8080\"}\r\n    // 1 LOC:\r\n    go fmt.Printf(\"• Public Address: %s\\n\", tunnel.MustStart(tunnel.WithServers(srv)))\r\n    //\r\n    srv.ListenAndServe()\r\n}\r\n```\r\n\r\nOR\r\n\r\n```go\r\nconfig := tunnel.Configuration{\r\n    // AuthToken: \"\u003cYOUR_AUTHTOKEN\u003e\",\r\n    // Bin: \"C:/ngrok.exe\",\r\n    // WebInterface: \"http://127.0.0.1:4040\",\r\n    // Region: \"eu\",\r\n    Tunnels: []tunnel.Tunnel{\r\n        {Name: \"my-app\", Addr: \":8080\"},\r\n    },\r\n}\r\npublicAddrs := tunnel.MustStart(config)\r\nfmt.Printf(\"• Public Address: %s\\n\", publicAddrs)\r\n```\r\n\r\nExample output:\r\n\r\n```sh\r\n• Public Address: https://ef02b1377b65.ngrok.io\r\n```\r\n\r\n\u003e The [Web Interface](https://ngrok.com/docs#inspect) is also available.\r\n\r\nPlease navigate through [_examples](_examples) directory for more.\r\n\r\n## License\r\n\r\nThis software is licensed under the [MIT License](LICENSE).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkataras%2Ftunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkataras%2Ftunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkataras%2Ftunnel/lists"}