Commit 4921d64e by anun

auto assign port

parent 2dd96a4b
...@@ -5,7 +5,7 @@ ADD . /src ...@@ -5,7 +5,7 @@ ADD . /src
WORKDIR /src WORKDIR /src
ENV CGO_ENABLED 0 ENV CGO_ENABLED 0
RUN go build \ RUN go build \
-ldflags "-X github.com/jpillora/chisel/share.BuildVersion=$(git describe --abbrev=0 --tags)" \ -ldflags "-X dev.nexpie.com/anun/chisel/share.BuildVersion=$(git describe --abbrev=0 --tags)" \
-o /tmp/bin -o /tmp/bin
# run stage # run stage
FROM scratch FROM scratch
......
...@@ -3,7 +3,7 @@ BUILD=$(shell git rev-parse HEAD) ...@@ -3,7 +3,7 @@ BUILD=$(shell git rev-parse HEAD)
DIRBASE=./build DIRBASE=./build
DIR=${DIRBASE}/${VERSION}/${BUILD}/bin DIR=${DIRBASE}/${VERSION}/${BUILD}/bin
LDFLAGS=-ldflags "-s -w ${XBUILD} -buildid=${BUILD} -X github.com/jpillora/chisel/share.BuildVersion=${VERSION}" LDFLAGS=-ldflags "-s -w ${XBUILD} -buildid=${BUILD} -X dev.nexpie.com/anun/chisel/share.BuildVersion=${VERSION}"
GOFILES=`go list ./...` GOFILES=`go list ./...`
GOFILESNOTEST=`go list ./... | grep -v test` GOFILESNOTEST=`go list ./... | grep -v test`
......
# Chisel # Chisel
[![GoDoc](https://godoc.org/github.com/jpillora/chisel?status.svg)](https://godoc.org/github.com/jpillora/chisel) [![CI](https://github.com/jpillora/chisel/workflows/CI/badge.svg)](https://github.com/jpillora/chisel/actions?workflow=CI) [![GoDoc](https://godoc.org/dev.nexpie.com/anun/chisel?status.svg)](https://godoc.org/dev.nexpie.com/anun/chisel) [![CI](https://dev.nexpie.com/anun/chisel/workflows/CI/badge.svg)](https://dev.nexpie.com/anun/chisel/actions?workflow=CI)
Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single executable including both client and server. Written in Go (golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network. Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single executable including both client and server. Written in Go (golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network.
...@@ -35,9 +35,9 @@ Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single ...@@ -35,9 +35,9 @@ Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single
### Binaries ### Binaries
[![Releases](https://img.shields.io/github/release/jpillora/chisel.svg)](https://github.com/jpillora/chisel/releases) [![Releases](https://img.shields.io/github/downloads/jpillora/chisel/total.svg)](https://github.com/jpillora/chisel/releases) [![Releases](https://img.shields.io/github/release/jpillora/chisel.svg)](https://dev.nexpie.com/anun/chisel/releases) [![Releases](https://img.shields.io/github/downloads/jpillora/chisel/total.svg)](https://dev.nexpie.com/anun/chisel/releases)
See [the latest release](https://github.com/jpillora/chisel/releases/latest) or download and install it now with `curl https://i.jpillora.com/chisel! | bash` See [the latest release](https://dev.nexpie.com/anun/chisel/releases/latest) or download and install it now with `curl https://i.jpillora.com/chisel! | bash`
### Docker ### Docker
...@@ -58,7 +58,7 @@ sudo dnf -y install chisel ...@@ -58,7 +58,7 @@ sudo dnf -y install chisel
### Source ### Source
```sh ```sh
$ go install github.com/jpillora/chisel@latest $ go install dev.nexpie.com/anun/chisel@latest
``` ```
## Demo ## Demo
...@@ -99,7 +99,7 @@ $ chisel --help ...@@ -99,7 +99,7 @@ $ chisel --help
client - runs chisel in client mode client - runs chisel in client mode
Read more: Read more:
https://github.com/jpillora/chisel https://dev.nexpie.com/anun/chisel
``` ```
<!--/tmpl--> <!--/tmpl-->
...@@ -205,7 +205,7 @@ $ chisel server --help ...@@ -205,7 +205,7 @@ $ chisel server --help
X.Y.Z X.Y.Z
Read more: Read more:
https://github.com/jpillora/chisel https://dev.nexpie.com/anun/chisel
``` ```
<!--/tmpl--> <!--/tmpl-->
...@@ -348,7 +348,7 @@ $ chisel client --help ...@@ -348,7 +348,7 @@ $ chisel client --help
X.Y.Z X.Y.Z
Read more: Read more:
https://github.com/jpillora/chisel https://dev.nexpie.com/anun/chisel
``` ```
<!--/tmpl--> <!--/tmpl-->
...@@ -407,9 +407,9 @@ Since WebSockets support is required: ...@@ -407,9 +407,9 @@ Since WebSockets support is required:
- http://golang.org/doc/code.html - http://golang.org/doc/code.html
- http://golang.org/doc/effective_go.html - http://golang.org/doc/effective_go.html
- `github.com/jpillora/chisel/share` contains the shared package - `dev.nexpie.com/anun/chisel/share` contains the shared package
- `github.com/jpillora/chisel/server` contains the server package - `dev.nexpie.com/anun/chisel/server` contains the server package
- `github.com/jpillora/chisel/client` contains the client package - `dev.nexpie.com/anun/chisel/client` contains the client package
## Changelog ## Changelog
...@@ -426,4 +426,4 @@ Since WebSockets support is required: ...@@ -426,4 +426,4 @@ Since WebSockets support is required:
## License ## License
[MIT](https://github.com/jpillora/chisel/blob/master/LICENSE) © Jaime Pillora [MIT](https://dev.nexpie.com/anun/chisel/blob/master/LICENSE) © Jaime Pillora
...@@ -15,14 +15,15 @@ import ( ...@@ -15,14 +15,15 @@ import (
"regexp" "regexp"
"strings" "strings"
"time" "time"
"io"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
chshare "github.com/jpillora/chisel/share" chshare "dev.nexpie.com/anun/chisel/share"
"github.com/jpillora/chisel/share/ccrypto" "dev.nexpie.com/anun/chisel/share/ccrypto"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/chisel/share/cnet" "dev.nexpie.com/anun/chisel/share/cnet"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"github.com/jpillora/chisel/share/tunnel" "dev.nexpie.com/anun/chisel/share/tunnel"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
"golang.org/x/net/proxy" "golang.org/x/net/proxy"
...@@ -69,6 +70,16 @@ type Client struct { ...@@ -69,6 +70,16 @@ type Client struct {
tunnel *tunnel.Tunnel tunnel *tunnel.Tunnel
} }
func getPort(s string) (response []byte, error error) {
resp, err := http.Get(s)
if err != nil {
return nil, err
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
return body, err
}
// NewClient creates a new client instance // NewClient creates a new client instance
func NewClient(c *Config) (*Client, error) { func NewClient(c *Config) (*Client, error) {
//apply default scheme //apply default scheme
...@@ -104,8 +115,16 @@ func NewClient(c *Config) (*Client, error) { ...@@ -104,8 +115,16 @@ func NewClient(c *Config) (*Client, error) {
server: u.String(), server: u.String(),
tlsConfig: nil, tlsConfig: nil,
} }
//set default log level //set default log level
client.Logger.Info = true client.Logger.Info = true
p, e := getPort(c.Server+"/register")
client.Debugf("p = %s", p)
if e != nil {
client.Errorf("request %s/register : %s", c.Server, e)
}
//configure tls //configure tls
if u.Scheme == "wss" { if u.Scheme == "wss" {
tc := &tls.Config{} tc := &tls.Config{}
...@@ -140,8 +159,12 @@ func NewClient(c *Config) (*Client, error) { ...@@ -140,8 +159,12 @@ func NewClient(c *Config) (*Client, error) {
client.tlsConfig = tc client.tlsConfig = tc
} }
//validate remotes //validate remotes
client.Debugf("c.Remotes = %s", c.Remotes)
for _, s := range c.Remotes { for _, s := range c.Remotes {
s = "R:"+string(p)+":"+s
client.Debugf("s = %s", s)
r, err := settings.DecodeRemote(s) r, err := settings.DecodeRemote(s)
client.Debugf("r = %s", r)
if err != nil { if err != nil {
return nil, fmt.Errorf("Failed to decode remote '%s': %s", s, err) return nil, fmt.Errorf("Failed to decode remote '%s': %s", s, err)
} }
...@@ -163,12 +186,14 @@ func NewClient(c *Config) (*Client, error) { ...@@ -163,12 +186,14 @@ func NewClient(c *Config) (*Client, error) {
} }
client.computed.Remotes = append(client.computed.Remotes, r) client.computed.Remotes = append(client.computed.Remotes, r)
} }
client.Infof("Remotes# %s", client.computed.Remotes)
//outbound proxy //outbound proxy
if p := c.Proxy; p != "" { if p := c.Proxy; p != "" {
client.proxyURL, err = url.Parse(p) client.proxyURL, err = url.Parse(p)
if err != nil { if err != nil {
return nil, fmt.Errorf("Invalid proxy URL (%s)", err) return nil, fmt.Errorf("Invalid proxy URL (%s)", err)
} }
client.Debugf("client.proxyURL = %s", client.proxyURL)
} }
//ssh auth and config //ssh auth and config
user, pass := settings.ParseAuth(c.Auth) user, pass := settings.ParseAuth(c.Auth)
......
...@@ -10,10 +10,10 @@ import ( ...@@ -10,10 +10,10 @@ import (
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"github.com/jpillora/backoff" "github.com/jpillora/backoff"
chshare "github.com/jpillora/chisel/share" chshare "dev.nexpie.com/anun/chisel/share"
"github.com/jpillora/chisel/share/cnet" "dev.nexpie.com/anun/chisel/share/cnet"
"github.com/jpillora/chisel/share/cos" "dev.nexpie.com/anun/chisel/share/cos"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
) )
...@@ -90,11 +90,14 @@ func (c *Client) connectionOnce(ctx context.Context) (connected bool, err error) ...@@ -90,11 +90,14 @@ func (c *Client) connectionOnce(ctx context.Context) (connected bool, err error)
return false, err return false, err
} }
} }
//c.Infof("c.server = %s", c.server)
//c.Infof("c = %s", c)
wsConn, _, err := d.DialContext(ctx, c.server, c.config.Headers) wsConn, _, err := d.DialContext(ctx, c.server, c.config.Headers)
if err != nil { if err != nil {
return false, err return false, err
} }
conn := cnet.NewWebSocketConn(wsConn) conn := cnet.NewWebSocketConn(wsConn)
// perform SSH handshake on net.Conn // perform SSH handshake on net.Conn
c.Debugf("Handshaking...") c.Debugf("Handshaking...")
sshConn, chans, reqs, err := ssh.NewClientConn(conn, "", c.sshConfig) sshConn, chans, reqs, err := ssh.NewClientConn(conn, "", c.sshConfig)
...@@ -125,6 +128,7 @@ func (c *Client) connectionOnce(ctx context.Context) (connected bool, err error) ...@@ -125,6 +128,7 @@ func (c *Client) connectionOnce(ctx context.Context) (connected bool, err error)
if len(configerr) > 0 { if len(configerr) > 0 {
return false, errors.New(string(configerr)) return false, errors.New(string(configerr))
} }
//c.Infof("settings.EncodeConfig = %s", settings.EncodeConfig(c.computed))
c.Infof("Connected (Latency %s)", time.Since(t0)) c.Infof("Connected (Latency %s)", time.Since(t0))
//connected, handover ssh connection for tunnel to use, and block //connected, handover ssh connection for tunnel to use, and block
err = c.tunnel.BindSSH(ctx, sshConn, reqs, chans) err = c.tunnel.BindSSH(ctx, sshConn, reqs, chans)
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/jpillora/chisel/share/ccrypto" "dev.nexpie.com/anun/chisel/share/ccrypto"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
) )
......
module github.com/jpillora/chisel module dev.nexpie.com/anun/chisel
go 1.21 go 1.19
require ( require (
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
......
...@@ -10,6 +10,8 @@ github.com/jpillora/ansi v1.0.3 h1:nn4Jzti0EmRfDxm7JtEs5LzCbNwd5sv+0aE+LdS9/ZQ= ...@@ -10,6 +10,8 @@ github.com/jpillora/ansi v1.0.3 h1:nn4Jzti0EmRfDxm7JtEs5LzCbNwd5sv+0aE+LdS9/ZQ=
github.com/jpillora/ansi v1.0.3/go.mod h1:D2tT+6uzJvN1nBVQILYWkIdq7zG+b5gcFN5WI/VyjMY= github.com/jpillora/ansi v1.0.3/go.mod h1:D2tT+6uzJvN1nBVQILYWkIdq7zG+b5gcFN5WI/VyjMY=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
dev.nexpie.com/anun/chisel v1.9.1 h1:nGOF58+45WHlvDcq6AZu7En8nWOBCZHqj9boo5rB4qU=
dev.nexpie.com/anun/chisel v1.9.1/go.mod h1:qvgGfFR9ZhiDoYJM4IM1omX1HLbQSkZag8miP9u4SsQ=
github.com/jpillora/requestlog v1.0.0 h1:bg++eJ74T7DYL3DlIpiwknrtfdUA9oP/M4fL+PpqnyA= github.com/jpillora/requestlog v1.0.0 h1:bg++eJ74T7DYL3DlIpiwknrtfdUA9oP/M4fL+PpqnyA=
github.com/jpillora/requestlog v1.0.0/go.mod h1:HTWQb7QfDc2jtHnWe2XEIEeJB7gJPnVdpNn52HXPvy8= github.com/jpillora/requestlog v1.0.0/go.mod h1:HTWQb7QfDc2jtHnWe2XEIEeJB7gJPnVdpNn52HXPvy8=
github.com/jpillora/sizestr v1.0.0 h1:4tr0FLxs1Mtq3TnsLDV+GYUWG7Q26a6s+tV5Zfw2ygw= github.com/jpillora/sizestr v1.0.0 h1:4tr0FLxs1Mtq3TnsLDV+GYUWG7Q26a6s+tV5Zfw2ygw=
...@@ -26,6 +28,5 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc ...@@ -26,6 +28,5 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0=
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
...@@ -12,12 +12,12 @@ import ( ...@@ -12,12 +12,12 @@ import (
"strings" "strings"
"time" "time"
chclient "github.com/jpillora/chisel/client" chclient "dev.nexpie.com/anun/chisel/client"
chserver "github.com/jpillora/chisel/server" chserver "dev.nexpie.com/anun/chisel/server"
chshare "github.com/jpillora/chisel/share" chshare "dev.nexpie.com/anun/chisel/share"
"github.com/jpillora/chisel/share/ccrypto" "dev.nexpie.com/anun/chisel/share/ccrypto"
"github.com/jpillora/chisel/share/cos" "dev.nexpie.com/anun/chisel/share/cos"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
) )
var help = ` var help = `
...@@ -30,7 +30,7 @@ var help = ` ...@@ -30,7 +30,7 @@ var help = `
client - runs chisel in client mode client - runs chisel in client mode
Read more: Read more:
https://github.com/jpillora/chisel https://dev.nexpie.com/anun/chisel
` `
...@@ -83,7 +83,7 @@ var commonHelp = ` ...@@ -83,7 +83,7 @@ var commonHelp = `
` + chshare.BuildVersion + ` (` + runtime.Version() + `) ` + chshare.BuildVersion + ` (` + runtime.Version() + `)
Read more: Read more:
https://github.com/jpillora/chisel https://dev.nexpie.com/anun/chisel
` `
......
...@@ -12,11 +12,11 @@ import ( ...@@ -12,11 +12,11 @@ import (
"time" "time"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
chshare "github.com/jpillora/chisel/share" chshare "dev.nexpie.com/anun/chisel/share"
"github.com/jpillora/chisel/share/ccrypto" "dev.nexpie.com/anun/chisel/share/ccrypto"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/chisel/share/cnet" "dev.nexpie.com/anun/chisel/share/cnet"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"github.com/jpillora/requestlog" "github.com/jpillora/requestlog"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
) )
......
...@@ -5,15 +5,39 @@ import ( ...@@ -5,15 +5,39 @@ import (
"strings" "strings"
"sync/atomic" "sync/atomic"
"time" "time"
"net"
"strconv"
chshare "github.com/jpillora/chisel/share" chshare "dev.nexpie.com/anun/chisel/share"
"github.com/jpillora/chisel/share/cnet" "dev.nexpie.com/anun/chisel/share/cnet"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"github.com/jpillora/chisel/share/tunnel" "dev.nexpie.com/anun/chisel/share/tunnel"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
) )
func getTCPPort() (port int, err error) {
var a *net.TCPAddr
if a, err = net.ResolveTCPAddr("tcp", "localhost:0"); err == nil {
var l *net.TCPListener
if l, err = net.ListenTCP("tcp", a); err == nil {
defer l.Close()
return l.Addr().(*net.TCPAddr).Port, nil
}
}
return
}
func createListener(protocol string) (l net.Listener, close func()) {
l, err := net.Listen(protocol, ":0")
if err != nil {
panic(err)
}
return l, func() {
_ = l.Close()
}
}
// handleClientHandler is the main http websocket handler for the chisel server // handleClientHandler is the main http websocket handler for the chisel server
func (s *Server) handleClientHandler(w http.ResponseWriter, r *http.Request) { func (s *Server) handleClientHandler(w http.ResponseWriter, r *http.Request) {
//websockets upgrade AND has chisel prefix //websockets upgrade AND has chisel prefix
...@@ -41,6 +65,14 @@ func (s *Server) handleClientHandler(w http.ResponseWriter, r *http.Request) { ...@@ -41,6 +65,14 @@ func (s *Server) handleClientHandler(w http.ResponseWriter, r *http.Request) {
case "/version": case "/version":
w.Write([]byte(chshare.BuildVersion)) w.Write([]byte(chshare.BuildVersion))
return return
case "/register":
ltn, err := getTCPPort()
if err != nil {
w.WriteHeader(500)
w.Write([]byte("Err"))
}
w.Write([]byte(strconv.Itoa(ltn)))
return
} }
//missing :O //missing :O
w.WriteHeader(404) w.WriteHeader(404)
......
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
"os/user" "os/user"
"path/filepath" "path/filepath"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"golang.org/x/crypto/acme/autocert" "golang.org/x/crypto/acme/autocert"
) )
......
...@@ -6,7 +6,7 @@ import ( ...@@ -6,7 +6,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/sizestr" "github.com/jpillora/sizestr"
) )
......
...@@ -3,12 +3,12 @@ package chshare ...@@ -3,12 +3,12 @@ package chshare
//this file exists to maintain backwards compatibility //this file exists to maintain backwards compatibility
import ( import (
"github.com/jpillora/chisel/share/ccrypto" "dev.nexpie.com/anun/chisel/share/ccrypto"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/chisel/share/cnet" "dev.nexpie.com/anun/chisel/share/cnet"
"github.com/jpillora/chisel/share/cos" "dev.nexpie.com/anun/chisel/share/cos"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"github.com/jpillora/chisel/share/tunnel" "dev.nexpie.com/anun/chisel/share/tunnel"
) )
const ( const (
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"sync" "sync"
"github.com/fsnotify/fsnotify" "github.com/fsnotify/fsnotify"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
) )
type Users struct { type Users struct {
......
...@@ -11,9 +11,9 @@ import ( ...@@ -11,9 +11,9 @@ import (
"time" "time"
"github.com/armon/go-socks5" "github.com/armon/go-socks5"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/chisel/share/cnet" "dev.nexpie.com/anun/chisel/share/cnet"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
) )
......
...@@ -6,8 +6,8 @@ import ( ...@@ -6,8 +6,8 @@ import (
"net" "net"
"sync" "sync"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"github.com/jpillora/sizestr" "github.com/jpillora/sizestr"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
) )
......
...@@ -11,8 +11,8 @@ import ( ...@@ -11,8 +11,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"github.com/jpillora/sizestr" "github.com/jpillora/sizestr"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
......
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"net" "net"
"strings" "strings"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/chisel/share/cnet" "dev.nexpie.com/anun/chisel/share/cnet"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
"github.com/jpillora/sizestr" "github.com/jpillora/sizestr"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
) )
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/jpillora/chisel/share/cio" "dev.nexpie.com/anun/chisel/share/cio"
"github.com/jpillora/chisel/share/settings" "dev.nexpie.com/anun/chisel/share/settings"
) )
func (t *Tunnel) handleUDP(l *cio.Logger, rwc io.ReadWriteCloser, hostPort string) error { func (t *Tunnel) handleUDP(l *cio.Logger, rwc io.ReadWriteCloser, hostPort string) error {
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
"path" "path"
"strconv" "strconv"
"github.com/jpillora/chisel/share/cnet" "dev.nexpie.com/anun/chisel/share/cnet"
"time" "time"
) )
......
...@@ -3,8 +3,8 @@ package e2e_test ...@@ -3,8 +3,8 @@ package e2e_test
import ( import (
"testing" "testing"
chclient "github.com/jpillora/chisel/client" chclient "dev.nexpie.com/anun/chisel/client"
chserver "github.com/jpillora/chisel/server" chserver "dev.nexpie.com/anun/chisel/server"
) )
//TODO tests for: //TODO tests for:
......
...@@ -3,8 +3,8 @@ package e2e_test ...@@ -3,8 +3,8 @@ package e2e_test
import ( import (
"testing" "testing"
chclient "github.com/jpillora/chisel/client" chclient "dev.nexpie.com/anun/chisel/client"
chserver "github.com/jpillora/chisel/server" chserver "dev.nexpie.com/anun/chisel/server"
) )
func TestBase(t *testing.T) { func TestBase(t *testing.T) {
......
...@@ -18,8 +18,8 @@ import ( ...@@ -18,8 +18,8 @@ import (
"path" "path"
"time" "time"
chclient "github.com/jpillora/chisel/client" chclient "dev.nexpie.com/anun/chisel/client"
chserver "github.com/jpillora/chisel/server" chserver "dev.nexpie.com/anun/chisel/server"
) )
type tlsConfig struct { type tlsConfig struct {
......
...@@ -10,8 +10,8 @@ import ( ...@@ -10,8 +10,8 @@ import (
"testing" "testing"
"time" "time"
chclient "github.com/jpillora/chisel/client" chclient "dev.nexpie.com/anun/chisel/client"
chserver "github.com/jpillora/chisel/server" chserver "dev.nexpie.com/anun/chisel/server"
) )
const debug = true const debug = true
......
...@@ -4,8 +4,8 @@ import ( ...@@ -4,8 +4,8 @@ import (
"path" "path"
"testing" "testing"
chclient "github.com/jpillora/chisel/client" chclient "dev.nexpie.com/anun/chisel/client"
chserver "github.com/jpillora/chisel/server" chserver "dev.nexpie.com/anun/chisel/server"
) )
func TestTLS(t *testing.T) { func TestTLS(t *testing.T) {
......
...@@ -6,8 +6,8 @@ import ( ...@@ -6,8 +6,8 @@ import (
"testing" "testing"
"time" "time"
chclient "github.com/jpillora/chisel/client" chclient "dev.nexpie.com/anun/chisel/client"
chserver "github.com/jpillora/chisel/server" chserver "dev.nexpie.com/anun/chisel/server"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment