Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/localtunnel/go-localtunnel
golang client library for localtunnel.me
https://github.com/localtunnel/go-localtunnel
golang localtunnel
Last synced: about 1 month ago
JSON representation
golang client library for localtunnel.me
- Host: GitHub
- URL: https://github.com/localtunnel/go-localtunnel
- Owner: localtunnel
- License: mpl-2.0
- Created: 2017-03-19T05:42:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-23T10:16:55.000Z (almost 2 years ago)
- Last Synced: 2024-08-05T09:14:49.642Z (4 months ago)
- Topics: golang, localtunnel
- Language: Go
- Homepage: https://godoc.org/github.com/jonasfj/go-localtunnel
- Size: 20.5 KB
- Stars: 102
- Watchers: 9
- Forks: 31
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-network-stuff - **32**星
README
LocalTunnel Client Library for Go [![Build Status](https://travis-ci.org/jonasfj/go-localtunnel.svg?branch=master)](https://travis-ci.org/jonasfj/go-localtunnel)
=================================A [localtunnel.me](https://localtunnel.me) client library exposing localtunnel
connections through a `net.Listener` implementation. While localtunnel only
supports forwarding HTTP(S) connections, this is useful as you can hook it up
to `http.Server` directly. Neat, if writing test-suites or command-line
utilities exposing web-hooks of localtunnel.```go
// Setup a listener for localtunnel
listener, err := localtunnel.Listen(localtunnel.Options{})// Create your server...
server := http.Server{
Handler: http.HandleFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(200)
...
})
}// Handle request from localtunnel
server.Serve(listener)
```See [documentation](https://godoc.org/github.com/jonasfj/go-localtunnel) for
more details.License
-------
This package is released under [MPLv2](https://www.mozilla.org/en-US/MPL/2.0/).