move to go-http-tunnel

This commit is contained in:
mmatczuk 2017-02-15 21:26:21 +01:00
parent efe21afce5
commit dc15ba0a54
22 changed files with 35 additions and 35 deletions

View file

@ -1,4 +1,4 @@
# Tunnel [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/mmatczuk/tunnel) [![Go Report Card](https://goreportcard.com/badge/github.com/mmatczuk/tunnel)](https://goreportcard.com/report/github.com/mmatczuk/tunnel) [![Build Status](http://img.shields.io/travis/mmatczuk/tunnel.svg?style=flat-square)](https://travis-ci.org/mmatczuk/tunnel) # Tunnel [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/mmatczuk/go-http-tunnel) [![Go Report Card](https://goreportcard.com/badge/github.com/mmatczuk/go-http-tunnel)](https://goreportcard.com/report/github.com/mmatczuk/go-http-tunnel) [![Build Status](http://img.shields.io/travis/mmatczuk/go-http-tunnel.svg?style=flat-square)](https://travis-ci.org/mmatczuk/go-http-tunnel)
Tunnel is fast and secure server/client package that enables proxying public connections to your local machine over a tunnel connection from the local machine to the public server. In other words you can share your localhost even if it doesn't have a public IP or if it's not reachable from outside. Tunnel is fast and secure server/client package that enables proxying public connections to your local machine over a tunnel connection from the local machine to the public server. In other words you can share your localhost even if it doesn't have a public IP or if it's not reachable from outside.

View file

@ -1,6 +1,6 @@
# Benchmark report # Benchmark report
The benchmark compares [tunnel](https://github.com/mmatczuk/tunnel) to [koding tunnel](https://github.com/koding/tunnel) on serving 184 midsized files that were gathered by saving `amazon.com` for offline view. The data set consists of images and text data (js, css, html). On start client loads the files into memory and act as a file server. The benchmark compares [tunnel](https://github.com/mmatczuk/go-http-tunnel) to [koding tunnel](https://github.com/koding/tunnel) on serving 184 midsized files that were gathered by saving `amazon.com` for offline view. The data set consists of images and text data (js, css, html). On start client loads the files into memory and act as a file server.
The diagrams were rendered using [hdrhistogram](http://hdrhistogram.github.io/HdrHistogram/plotFiles.html) and the input files were generated with help of [github.com/codahale/hdrhistogram](https://github.com/codahale/hdrhistogram) library. The vegeta raw results were corrected for stalls using [hdr correction method](https://godoc.org/github.com/codahale/hdrhistogram#Histogram.RecordCorrectedValue). The diagrams were rendered using [hdrhistogram](http://hdrhistogram.github.io/HdrHistogram/plotFiles.html) and the input files were generated with help of [github.com/codahale/hdrhistogram](https://github.com/codahale/hdrhistogram) library. The vegeta raw results were corrected for stalls using [hdr correction method](https://godoc.org/github.com/codahale/hdrhistogram#Histogram.RecordCorrectedValue).

View file

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Before After
Before After

View file

@ -11,8 +11,8 @@ import (
"golang.org/x/net/http2" "golang.org/x/net/http2"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
var ( var (

View file

@ -9,8 +9,8 @@ import (
"time" "time"
"github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/mmatczuk/tunnel/mock" "github.com/mmatczuk/go-http-tunnel/mock"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
func TestClient_Dial(t *testing.T) { func TestClient_Dial(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"time" "time"
kitlog "github.com/go-kit/kit/log" kitlog "github.com/go-kit/kit/log"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
) )
// NewLogger returns logfmt based logger, printing messages up to log level // NewLogger returns logfmt based logger, printing messages up to log level

View file

@ -8,7 +8,7 @@ import (
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
type BackoffConfig struct { type BackoffConfig struct {

View file

@ -11,10 +11,10 @@ import (
"github.com/cenkalti/backoff" "github.com/cenkalti/backoff"
"github.com/google/gops/agent" "github.com/google/gops/agent"
"github.com/mmatczuk/tunnel" "github.com/mmatczuk/go-http-tunnel"
"github.com/mmatczuk/tunnel/cmd/cmd" "github.com/mmatczuk/go-http-tunnel/cmd/cmd"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
func main() { func main() {

View file

@ -8,9 +8,9 @@ import (
"strings" "strings"
"github.com/google/gops/agent" "github.com/google/gops/agent"
"github.com/mmatczuk/tunnel" "github.com/mmatczuk/go-http-tunnel"
"github.com/mmatczuk/tunnel/cmd/cmd" "github.com/mmatczuk/go-http-tunnel/cmd/cmd"
"github.com/mmatczuk/tunnel/id" "github.com/mmatczuk/go-http-tunnel/id"
) )
func main() { func main() {

View file

@ -11,8 +11,8 @@ import (
"net/url" "net/url"
"path" "path"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
// HTTPProxy forwards HTTP traffic. // HTTPProxy forwards HTTP traffic.

View file

@ -12,10 +12,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/mmatczuk/tunnel" "github.com/mmatczuk/go-http-tunnel"
"github.com/mmatczuk/tunnel/id" "github.com/mmatczuk/go-http-tunnel/id"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
const ( const (

View file

@ -4,7 +4,7 @@ import (
"testing" "testing"
"github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/mmatczuk/tunnel/mock" "github.com/mmatczuk/go-http-tunnel/mock"
) )
func TestFilterLogger_Log(t *testing.T) { func TestFilterLogger_Log(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"testing" "testing"
"github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/mmatczuk/tunnel/mock" "github.com/mmatczuk/go-http-tunnel/mock"
) )
func TestContext_Log(t *testing.T) { func TestContext_Log(t *testing.T) {

View file

@ -1,5 +1,5 @@
// Automatically generated by MockGen. DO NOT EDIT! // Automatically generated by MockGen. DO NOT EDIT!
// Source: github.com/mmatczuk/tunnel (interfaces: Backoff) // Source: github.com/mmatczuk/go-http-tunnel (interfaces: Backoff)
package mock package mock

View file

@ -1,5 +1,5 @@
// Automatically generated by MockGen. DO NOT EDIT! // Automatically generated by MockGen. DO NOT EDIT!
// Source: github.com/mmatczuk/tunnel/log (interfaces: Logger) // Source: github.com/mmatczuk/go-http-tunnel/log (interfaces: Logger)
package mock package mock

View file

@ -8,7 +8,7 @@ import (
"golang.org/x/net/http2" "golang.org/x/net/http2"
"github.com/mmatczuk/tunnel/id" "github.com/mmatczuk/go-http-tunnel/id"
) )
type onDisconnectListener func(identifier id.ID) type onDisconnectListener func(identifier id.ID)

View file

@ -3,7 +3,7 @@ package tunnel
import ( import (
"io" "io"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
// ProxyFunc is responsible for forwarding a remote connection to local server // ProxyFunc is responsible for forwarding a remote connection to local server

View file

@ -5,8 +5,8 @@ import (
"net" "net"
"sync" "sync"
"github.com/mmatczuk/tunnel/id" "github.com/mmatczuk/go-http-tunnel/id"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
) )
// RegistryItem holds information about hosts and listeners associated with a // RegistryItem holds information about hosts and listeners associated with a

View file

@ -13,9 +13,9 @@ import (
"golang.org/x/net/http2" "golang.org/x/net/http2"
"github.com/mmatczuk/tunnel/id" "github.com/mmatczuk/go-http-tunnel/id"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
// ServerConfig defines configuration for the Server. // ServerConfig defines configuration for the Server.

View file

@ -5,8 +5,8 @@ import (
"io" "io"
"net" "net"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
"github.com/mmatczuk/tunnel/proto" "github.com/mmatczuk/go-http-tunnel/proto"
) )
// TCPProxy forwards TCP streams. // TCPProxy forwards TCP streams.

View file

@ -4,7 +4,7 @@ import (
"io" "io"
"net/http" "net/http"
"github.com/mmatczuk/tunnel/log" "github.com/mmatczuk/go-http-tunnel/log"
) )
type closeWriter interface { type closeWriter interface {