mirror of
https://github.com/mmatczuk/go-http-tunnel.git
synced 2026-05-15 14:16:17 -06:00
directory move
This commit is contained in:
parent
5707fa120c
commit
0406b7d2a7
10 changed files with 19 additions and 19 deletions
|
|
@ -5,10 +5,10 @@ import (
|
|||
"crypto/x509"
|
||||
|
||||
"github.com/andrew-d/id"
|
||||
"github.com/koding/h2tun"
|
||||
"github.com/koding/h2tun/h2tuntest"
|
||||
"github.com/koding/logging"
|
||||
"github.com/koding/multiconfig"
|
||||
"github.com/mmatczuk/h2tun"
|
||||
"github.com/mmatczuk/h2tun/h2tuntest"
|
||||
)
|
||||
|
||||
type config struct {
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import (
|
|||
"net/http"
|
||||
|
||||
"github.com/andrew-d/id"
|
||||
"github.com/koding/h2tun"
|
||||
"github.com/koding/h2tun/h2tuntest"
|
||||
"github.com/koding/logging"
|
||||
"github.com/koding/multiconfig"
|
||||
"github.com/mmatczuk/h2tun"
|
||||
"github.com/mmatczuk/h2tun/h2tuntest"
|
||||
"golang.org/x/net/http2"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ import (
|
|||
"net"
|
||||
"net/http"
|
||||
|
||||
"github.com/koding/h2tun/h2tuntest"
|
||||
h2tunproto "github.com/koding/h2tun/proto"
|
||||
"github.com/koding/logging"
|
||||
"github.com/koding/multiconfig"
|
||||
"github.com/koding/tunnel"
|
||||
"github.com/koding/tunnel/proto"
|
||||
"github.com/mmatczuk/h2tun/h2tuntest"
|
||||
h2tunproto "github.com/mmatczuk/h2tun/proto"
|
||||
)
|
||||
|
||||
type config struct {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
"net"
|
||||
"net/http"
|
||||
|
||||
"github.com/koding/h2tun/h2tuntest"
|
||||
"github.com/koding/logging"
|
||||
"github.com/koding/multiconfig"
|
||||
"github.com/koding/tunnel"
|
||||
"github.com/mmatczuk/h2tun/h2tuntest"
|
||||
"golang.org/x/net/http2"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/koding/h2tun/proto"
|
||||
"github.com/koding/logging"
|
||||
"github.com/mmatczuk/h2tun/proto"
|
||||
"golang.org/x/net/http2"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/andrew-d/id"
|
||||
"github.com/koding/h2tun"
|
||||
"github.com/koding/h2tun/h2tuntest"
|
||||
"github.com/mmatczuk/h2tun"
|
||||
"github.com/mmatczuk/h2tun/h2tuntest"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ import (
|
|||
"path"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/koding/h2tun"
|
||||
"github.com/koding/h2tun/proto"
|
||||
"github.com/koding/logging"
|
||||
"github.com/mmatczuk/h2tun"
|
||||
"github.com/mmatczuk/h2tun/proto"
|
||||
)
|
||||
|
||||
// EchoProxyFunc pipes reader with writer.
|
||||
|
|
|
|||
2
pool.go
2
pool.go
|
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
errNoClientConn = errors.New("no connection")
|
||||
errNoClientConn = errors.New("no connection")
|
||||
errClientAlreadyConnected = errors.New("client already connected")
|
||||
)
|
||||
|
||||
|
|
|
|||
2
proxy.go
2
proxy.go
|
|
@ -3,7 +3,7 @@ package h2tun
|
|||
import (
|
||||
"io"
|
||||
|
||||
"github.com/koding/h2tun/proto"
|
||||
"github.com/mmatczuk/h2tun/proto"
|
||||
)
|
||||
|
||||
// ProxyFunc is responsible for forwarding a remote connection to local server
|
||||
|
|
|
|||
10
server.go
10
server.go
|
|
@ -11,17 +11,17 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/andrew-d/id"
|
||||
"github.com/koding/h2tun/proto"
|
||||
"github.com/koding/logging"
|
||||
"github.com/mmatczuk/h2tun/proto"
|
||||
"golang.org/x/net/http2"
|
||||
)
|
||||
|
||||
// AllowedClient specifies client entry points on server.
|
||||
type AllowedClient struct {
|
||||
// ID is client TLS certificate ID.
|
||||
ID id.ID
|
||||
ID id.ID
|
||||
// Host is URL host name, http requests to that host will be routed to the client.
|
||||
Host string
|
||||
Host string
|
||||
// Listeners is a list of listeners, connections the listeners accept
|
||||
// will be routed to the client.
|
||||
Listeners []net.Listener
|
||||
|
|
@ -45,11 +45,11 @@ type ServerConfig struct {
|
|||
// Server is responsible for proxying public connections to the client over a
|
||||
// tunnel connection.
|
||||
type Server struct {
|
||||
config *ServerConfig
|
||||
config *ServerConfig
|
||||
listener net.Listener
|
||||
connPool *connPool
|
||||
httpClient *http.Client
|
||||
log logging.Logger
|
||||
log logging.Logger
|
||||
}
|
||||
|
||||
// NewServer creates a new Server.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue