localtunnel/go-localtunnel

Name: go-localtunnel

Owner: localtunnel

Description: golang client library for localtunnel.me

Created: 2017-03-19 05:42:59.0

Updated: 2018-03-30 14:46:54.0

Pushed: 2017-03-26 22:31:23.0

Homepage: https://godoc.org/github.com/jonasfj/go-localtunnel

Size: 21

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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.

etup a listener for localtunnel
ener, err := localtunnel.Listen(localtunnel.Options{})

reate your server...
er := http.Server{
Handler: http.HandleFunc(func(w http.ResponseWriter, r *http.Request) {
    w.WriteHeader(200)
    ...
})


andle request from localtunnel
er.Serve(listener)

See documentation for more details.

License

This package is released under MPLv2.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.