mirror of
https://github.com/mmatczuk/go-http-tunnel.git
synced 2026-05-15 06:06:03 -06:00
move to go-http-tunnel
This commit is contained in:
parent
efe21afce5
commit
dc15ba0a54
22 changed files with 35 additions and 35 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Tunnel [](http://godoc.org/github.com/mmatczuk/tunnel) [](https://goreportcard.com/report/github.com/mmatczuk/tunnel) [](https://travis-ci.org/mmatczuk/tunnel)
|
||||
# Tunnel [](http://godoc.org/github.com/mmatczuk/go-http-tunnel) [](https://goreportcard.com/report/github.com/mmatczuk/go-http-tunnel) [](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.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# 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).
|
||||
|
||||
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
|
|
@ -11,8 +11,8 @@ import (
|
|||
|
||||
"golang.org/x/net/http2"
|
||||
|
||||
"github.com/mmatczuk/tunnel/log"
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel/log"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/mmatczuk/tunnel/mock"
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel/mock"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
func TestClient_Dial(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
type BackoffConfig struct {
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import (
|
|||
|
||||
"github.com/cenkalti/backoff"
|
||||
"github.com/google/gops/agent"
|
||||
"github.com/mmatczuk/tunnel"
|
||||
"github.com/mmatczuk/tunnel/cmd/cmd"
|
||||
"github.com/mmatczuk/tunnel/log"
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel"
|
||||
"github.com/mmatczuk/go-http-tunnel/cmd/cmd"
|
||||
"github.com/mmatczuk/go-http-tunnel/log"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/google/gops/agent"
|
||||
"github.com/mmatczuk/tunnel"
|
||||
"github.com/mmatczuk/tunnel/cmd/cmd"
|
||||
"github.com/mmatczuk/tunnel/id"
|
||||
"github.com/mmatczuk/go-http-tunnel"
|
||||
"github.com/mmatczuk/go-http-tunnel/cmd/cmd"
|
||||
"github.com/mmatczuk/go-http-tunnel/id"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"net/url"
|
||||
"path"
|
||||
|
||||
"github.com/mmatczuk/tunnel/log"
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel/log"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
// HTTPProxy forwards HTTP traffic.
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/mmatczuk/tunnel"
|
||||
"github.com/mmatczuk/tunnel/id"
|
||||
"github.com/mmatczuk/tunnel/log"
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel"
|
||||
"github.com/mmatczuk/go-http-tunnel/id"
|
||||
"github.com/mmatczuk/go-http-tunnel/log"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/mmatczuk/tunnel/mock"
|
||||
"github.com/mmatczuk/go-http-tunnel/mock"
|
||||
)
|
||||
|
||||
func TestFilterLogger_Log(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/mmatczuk/tunnel/mock"
|
||||
"github.com/mmatczuk/go-http-tunnel/mock"
|
||||
)
|
||||
|
||||
func TestContext_Log(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// 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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// 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
|
||||
|
||||
|
|
|
|||
2
pool.go
2
pool.go
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"golang.org/x/net/http2"
|
||||
|
||||
"github.com/mmatczuk/tunnel/id"
|
||||
"github.com/mmatczuk/go-http-tunnel/id"
|
||||
)
|
||||
|
||||
type onDisconnectListener func(identifier id.ID)
|
||||
|
|
|
|||
2
proxy.go
2
proxy.go
|
|
@ -3,7 +3,7 @@ package tunnel
|
|||
import (
|
||||
"io"
|
||||
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
// ProxyFunc is responsible for forwarding a remote connection to local server
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"net"
|
||||
"sync"
|
||||
|
||||
"github.com/mmatczuk/tunnel/id"
|
||||
"github.com/mmatczuk/tunnel/log"
|
||||
"github.com/mmatczuk/go-http-tunnel/id"
|
||||
"github.com/mmatczuk/go-http-tunnel/log"
|
||||
)
|
||||
|
||||
// RegistryItem holds information about hosts and listeners associated with a
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import (
|
|||
|
||||
"golang.org/x/net/http2"
|
||||
|
||||
"github.com/mmatczuk/tunnel/id"
|
||||
"github.com/mmatczuk/tunnel/log"
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel/id"
|
||||
"github.com/mmatczuk/go-http-tunnel/log"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
// ServerConfig defines configuration for the Server.
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"io"
|
||||
"net"
|
||||
|
||||
"github.com/mmatczuk/tunnel/log"
|
||||
"github.com/mmatczuk/tunnel/proto"
|
||||
"github.com/mmatczuk/go-http-tunnel/log"
|
||||
"github.com/mmatczuk/go-http-tunnel/proto"
|
||||
)
|
||||
|
||||
// TCPProxy forwards TCP streams.
|
||||
|
|
|
|||
2
utils.go
2
utils.go
|
|
@ -4,7 +4,7 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/mmatczuk/tunnel/log"
|
||||
"github.com/mmatczuk/go-http-tunnel/log"
|
||||
)
|
||||
|
||||
type closeWriter interface {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue