Skip to content

Commit

Permalink
Update dependencies and Bump version
Browse files Browse the repository at this point in the history
Signed-off-by: Sherlock Holo <[email protected]>
  • Loading branch information
Sherlock-Holo committed Feb 27, 2019
1 parent c858fa1 commit 17a7281
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Client struct {
config *client.Config
wsURL string
wsDialer websocket.Dialer
manager *link.Manager
manager link.Manager
managerLock sync.RWMutex
}

Expand Down Expand Up @@ -110,7 +110,7 @@ func (c *Client) reconnect() error {
if err != nil {
return errors.WithStack(err)
}
c.manager = link.NewManager(wsWrapper.NewWrapper(conn), link.KeepaliveConfig())
c.manager = link.NewManager(wsWrapper.NewWrapper(conn), link.KeepaliveConfig(link.ClientMode))
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package cmd

const version = "0.6.5"
const version = "0.7.0"
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module github.com/Sherlock-Holo/camouflage

require (
github.com/BurntSushi/toml v0.3.1
github.com/Sherlock-Holo/goutils v0.0.0-20180828013039-2447c3761d0f
github.com/Sherlock-Holo/goutils/websocket v0.0.0-20190227124339-861fac9fe37b
github.com/Sherlock-Holo/libsocks v0.0.0-20190226021943-514fdf27483e
github.com/Sherlock-Holo/link v0.3.0
github.com/Sherlock-Holo/link v0.4.0
github.com/gorilla/websocket v1.4.0
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/pkg/errors v0.8.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Sherlock-Holo/goutils v0.0.0-20180828013039-2447c3761d0f h1:1iThzSags3+tEJly03ufRdIJKXDmsWJGC2G0j75Z+dI=
github.com/Sherlock-Holo/goutils v0.0.0-20180828013039-2447c3761d0f/go.mod h1:XIQ0d16kdYVZLHtOrtDlgcYFDy337n4cmcfYTPIMrK4=
github.com/Sherlock-Holo/goutils/websocket v0.0.0-20190227124339-861fac9fe37b h1:WO/XNu6V1jzqAUnUyyf5inaoNA6fWvb1ueU5b5VXCnk=
github.com/Sherlock-Holo/goutils/websocket v0.0.0-20190227124339-861fac9fe37b/go.mod h1:tHfa/dGMMz9AiAMpdH9U+nATBqt3gimPiEx3xZde/TI=
github.com/Sherlock-Holo/libsocks v0.0.0-20190226021943-514fdf27483e h1:DQ4XhFLwVusmV9PGpKlNAtPa2lDyk/JrhE8VR/kptVM=
github.com/Sherlock-Holo/libsocks v0.0.0-20190226021943-514fdf27483e/go.mod h1:jaHescOvrHhc0rUymZyZPMUa8LUmJ7uXSR9og50YG0U=
github.com/Sherlock-Holo/link v0.3.0 h1:bVV3W1o1grYvFJcxEQYoaTAuFttyr+rhse/kMK8ZAzQ=
github.com/Sherlock-Holo/link v0.3.0/go.mod h1:TRqtw2S/5okbpl6JJQt4o/a+ypUk8WxapgevtOizuOc=
github.com/Sherlock-Holo/link v0.4.0 h1:xf9bKoqV46cYXnOxR4g35fVq1ztD5j/YgqCIrK4C8NU=
github.com/Sherlock-Holo/link v0.4.0/go.mod h1:9mi9XskP8AAoWgGijvPYwOirhC5raP8JYHpnXusNnzs=
github.com/akutz/memconn v0.1.0 h1:NawI0TORU4hcOMsMr11g7vwlCdkYeLKXBcxWu2W/P8A=
github.com/akutz/memconn v0.1.0/go.mod h1:Jo8rI7m0NieZyLI5e2CDlRdRqRRB4S7Xp77ukDjH+Fw=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
Expand Down
4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (s *Server) checkRequest(w http.ResponseWriter, r *http.Request) {
return
}

manager := link.NewManager(wsWrapper.NewWrapper(conn), link.KeepaliveConfig())
manager := link.NewManager(wsWrapper.NewWrapper(conn), link.KeepaliveConfig(link.ServerMode))
for {
l, err := manager.Accept()
if err != nil {
Expand All @@ -70,7 +70,7 @@ func (s *Server) webHandle(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, s.config.WebRoot)
}

func handle(l *link.Link) {
func handle(l link.Link) {
address, err := libsocks.DecodeFrom(l)
if err != nil {
log.Printf("decode socks failed: %+v", errors.WithStack(err))
Expand Down

0 comments on commit 17a7281

Please sign in to comment.