nhthai2005/go-localtunnel


License: MPL-2.0

Language: Go


LocalTunnel Client Library for Go Build Status

A 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.

// 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 for more details.

License

This package is released under MPLv2.

Project Statistics

Sourcerank 3
Repository Size 0 Bytes
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 0
Contributors 1
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Jonas Finnemann Jensen

Something wrong with this page? Make a suggestion

Last synced: 2020-09-25 16:35:58 UTC

Login to resync this repository