diff --git a/cmd/ck-client/ck-client.go b/cmd/ck-client/ck-client.go index 38bf95d..1a43651 100644 --- a/cmd/ck-client/ck-client.go +++ b/cmd/ck-client/ck-client.go @@ -1,3 +1,4 @@ +//go:build go1.11 // +build go1.11 package main @@ -7,10 +8,11 @@ import ( "encoding/binary" "flag" "fmt" - "github.com/cbeuw/Cloak/internal/common" "net" "os" + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/Cloak/internal/client" mux "github.com/cbeuw/Cloak/internal/multiplex" log "github.com/sirupsen/logrus" diff --git a/cmd/ck-client/log.go b/cmd/ck-client/log.go index 4fc5dec..e44b066 100644 --- a/cmd/ck-client/log.go +++ b/cmd/ck-client/log.go @@ -1,3 +1,4 @@ +//go:build !android // +build !android package main diff --git a/cmd/ck-client/log_android.go b/cmd/ck-client/log_android.go index 7c7b967..301b35e 100644 --- a/cmd/ck-client/log_android.go +++ b/cmd/ck-client/log_android.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build android // +build android package main @@ -28,9 +29,10 @@ import "C" import ( "bufio" - log "github.com/sirupsen/logrus" "os" "unsafe" + + log "github.com/sirupsen/logrus" ) var ( diff --git a/cmd/ck-client/protector.go b/cmd/ck-client/protector.go index 3af0dde..89fbf76 100644 --- a/cmd/ck-client/protector.go +++ b/cmd/ck-client/protector.go @@ -1,3 +1,4 @@ +//go:build !android // +build !android package main diff --git a/cmd/ck-client/protector_android.go b/cmd/ck-client/protector_android.go index fbaea7b..4b6e6d1 100644 --- a/cmd/ck-client/protector_android.go +++ b/cmd/ck-client/protector_android.go @@ -1,3 +1,4 @@ +//go:build android // +build android package main @@ -65,8 +66,9 @@ void set_timeout(int sock) { import "C" import ( - log "github.com/sirupsen/logrus" "syscall" + + log "github.com/sirupsen/logrus" ) // In Android, once an app starts the VpnService, all outgoing traffic are routed by the system diff --git a/cmd/ck-server/ck-server.go b/cmd/ck-server/ck-server.go index b83460c..b1c0bb0 100644 --- a/cmd/ck-server/ck-server.go +++ b/cmd/ck-server/ck-server.go @@ -3,15 +3,16 @@ package main import ( "flag" "fmt" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/Cloak/internal/server" - log "github.com/sirupsen/logrus" "net" "net/http" _ "net/http/pprof" "os" "runtime" "strings" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/Cloak/internal/server" + log "github.com/sirupsen/logrus" ) var version string diff --git a/cmd/ck-server/ck-server_test.go b/cmd/ck-server/ck-server_test.go index 87427ee..1afdc9c 100644 --- a/cmd/ck-server/ck-server_test.go +++ b/cmd/ck-server/ck-server_test.go @@ -1,9 +1,10 @@ package main import ( - "github.com/stretchr/testify/assert" "net" "testing" + + "github.com/stretchr/testify/assert" ) func TestParseBindAddr(t *testing.T) { diff --git a/cmd/ck-server/keygen.go b/cmd/ck-server/keygen.go index 78fffd5..7361e67 100644 --- a/cmd/ck-server/keygen.go +++ b/cmd/ck-server/keygen.go @@ -3,6 +3,7 @@ package main import ( "crypto/rand" "encoding/base64" + "github.com/cbeuw/Cloak/internal/common" "github.com/cbeuw/Cloak/internal/ecdh" ) diff --git a/internal/client/TLS.go b/internal/client/TLS.go index 7e21724..d30c982 100644 --- a/internal/client/TLS.go +++ b/internal/client/TLS.go @@ -2,9 +2,10 @@ package client import ( "encoding/binary" + "net" + "github.com/cbeuw/Cloak/internal/common" log "github.com/sirupsen/logrus" - "net" ) const appDataMaxLength = 16401 diff --git a/internal/client/TLS_test.go b/internal/client/TLS_test.go index bd3b051..4aca82b 100644 --- a/internal/client/TLS_test.go +++ b/internal/client/TLS_test.go @@ -2,8 +2,9 @@ package client import ( "encoding/hex" - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func htob(s string) []byte { diff --git a/internal/client/auth.go b/internal/client/auth.go index 4925541..9053c14 100644 --- a/internal/client/auth.go +++ b/internal/client/auth.go @@ -2,6 +2,7 @@ package client import ( "encoding/binary" + "github.com/cbeuw/Cloak/internal/common" "github.com/cbeuw/Cloak/internal/ecdh" log "github.com/sirupsen/logrus" diff --git a/internal/client/auth_test.go b/internal/client/auth_test.go index 4c7da33..a7a14f5 100644 --- a/internal/client/auth_test.go +++ b/internal/client/auth_test.go @@ -2,11 +2,12 @@ package client import ( "bytes" + "testing" + "time" + "github.com/cbeuw/Cloak/internal/common" "github.com/cbeuw/Cloak/internal/multiplex" "github.com/stretchr/testify/assert" - "testing" - "time" ) func TestMakeAuthenticationPayload(t *testing.T) { diff --git a/internal/client/chrome.go b/internal/client/chrome.go index 067473c..032a4ea 100644 --- a/internal/client/chrome.go +++ b/internal/client/chrome.go @@ -5,6 +5,7 @@ package client import ( "encoding/binary" "encoding/hex" + "github.com/cbeuw/Cloak/internal/common" ) diff --git a/internal/client/connector.go b/internal/client/connector.go index 863f049..660862e 100644 --- a/internal/client/connector.go +++ b/internal/client/connector.go @@ -1,12 +1,13 @@ package client import ( - "github.com/cbeuw/Cloak/internal/common" "net" "sync" "sync/atomic" "time" + "github.com/cbeuw/Cloak/internal/common" + mux "github.com/cbeuw/Cloak/internal/multiplex" log "github.com/sirupsen/logrus" ) diff --git a/internal/client/firefox.go b/internal/client/firefox.go index a7862cc..239dbaf 100644 --- a/internal/client/firefox.go +++ b/internal/client/firefox.go @@ -5,6 +5,7 @@ package client import ( "encoding/binary" "encoding/hex" + "github.com/cbeuw/Cloak/internal/common" ) diff --git a/internal/client/piper.go b/internal/client/piper.go index 4bb9fc0..43186ac 100644 --- a/internal/client/piper.go +++ b/internal/client/piper.go @@ -1,12 +1,13 @@ package client import ( - "github.com/cbeuw/Cloak/internal/common" "io" "net" "sync" "time" + "github.com/cbeuw/Cloak/internal/common" + mux "github.com/cbeuw/Cloak/internal/multiplex" log "github.com/sirupsen/logrus" ) diff --git a/internal/client/state.go b/internal/client/state.go index b9f8125..cdd29a1 100644 --- a/internal/client/state.go +++ b/internal/client/state.go @@ -4,13 +4,14 @@ import ( "crypto" "encoding/json" "fmt" - "github.com/cbeuw/Cloak/internal/common" - log "github.com/sirupsen/logrus" "io/ioutil" "net" "strings" "time" + "github.com/cbeuw/Cloak/internal/common" + log "github.com/sirupsen/logrus" + "github.com/cbeuw/Cloak/internal/ecdh" mux "github.com/cbeuw/Cloak/internal/multiplex" ) diff --git a/internal/client/state_test.go b/internal/client/state_test.go index f473187..f63ff54 100644 --- a/internal/client/state_test.go +++ b/internal/client/state_test.go @@ -1,9 +1,10 @@ package client import ( - "github.com/stretchr/testify/assert" "io/ioutil" "testing" + + "github.com/stretchr/testify/assert" ) func TestParseConfig(t *testing.T) { diff --git a/internal/client/websocket.go b/internal/client/websocket.go index fbb5619..4e3532e 100644 --- a/internal/client/websocket.go +++ b/internal/client/websocket.go @@ -4,12 +4,13 @@ import ( "encoding/base64" "errors" "fmt" - "github.com/cbeuw/Cloak/internal/common" - "github.com/gorilla/websocket" - utls "gitlab.com/yawning/utls.git" "net" "net/http" "net/url" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/gorilla/websocket" + utls "gitlab.com/yawning/utls.git" ) type WSOverTLS struct { diff --git a/internal/common/crypto_test.go b/internal/common/crypto_test.go index 4f8a186..0a72862 100644 --- a/internal/common/crypto_test.go +++ b/internal/common/crypto_test.go @@ -4,10 +4,11 @@ import ( "bytes" "encoding/hex" "errors" - "github.com/stretchr/testify/assert" "io" "math/rand" "testing" + + "github.com/stretchr/testify/assert" ) const gcmTagSize = 16 diff --git a/internal/common/websocket.go b/internal/common/websocket.go index e2a7096..cb5057b 100644 --- a/internal/common/websocket.go +++ b/internal/common/websocket.go @@ -2,10 +2,11 @@ package common import ( "errors" - "github.com/gorilla/websocket" "io" "sync" "time" + + "github.com/gorilla/websocket" ) // WebSocketConn implements io.ReadWriteCloser diff --git a/internal/multiplex/datagramBufferedPipe_test.go b/internal/multiplex/datagramBufferedPipe_test.go index 8d7a07b..6c52460 100644 --- a/internal/multiplex/datagramBufferedPipe_test.go +++ b/internal/multiplex/datagramBufferedPipe_test.go @@ -1,9 +1,10 @@ package multiplex import ( - "github.com/stretchr/testify/assert" "testing" "time" + + "github.com/stretchr/testify/assert" ) func TestDatagramBuffer_RW(t *testing.T) { diff --git a/internal/multiplex/mux_test.go b/internal/multiplex/mux_test.go index 6bb57ed..e4c9f77 100644 --- a/internal/multiplex/mux_test.go +++ b/internal/multiplex/mux_test.go @@ -2,14 +2,15 @@ package multiplex import ( "bytes" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/connutil" - "github.com/stretchr/testify/assert" "io" "math/rand" "net" "sync" "testing" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/connutil" + "github.com/stretchr/testify/assert" ) func serveEcho(l net.Listener) { diff --git a/internal/multiplex/obfs.go b/internal/multiplex/obfs.go index 9fa614d..6821f86 100644 --- a/internal/multiplex/obfs.go +++ b/internal/multiplex/obfs.go @@ -6,6 +6,7 @@ import ( "encoding/binary" "errors" "fmt" + "github.com/cbeuw/Cloak/internal/common" "golang.org/x/crypto/chacha20poly1305" "golang.org/x/crypto/salsa20" diff --git a/internal/multiplex/obfs_test.go b/internal/multiplex/obfs_test.go index 76ba3bc..f07d101 100644 --- a/internal/multiplex/obfs_test.go +++ b/internal/multiplex/obfs_test.go @@ -3,12 +3,13 @@ package multiplex import ( "crypto/aes" "crypto/cipher" - "github.com/stretchr/testify/assert" - "golang.org/x/crypto/chacha20poly1305" "math/rand" "reflect" "testing" "testing/quick" + + "github.com/stretchr/testify/assert" + "golang.org/x/crypto/chacha20poly1305" ) func TestGenerateObfs(t *testing.T) { diff --git a/internal/multiplex/session.go b/internal/multiplex/session.go index f530f19..e176343 100644 --- a/internal/multiplex/session.go +++ b/internal/multiplex/session.go @@ -3,12 +3,13 @@ package multiplex import ( "errors" "fmt" - "github.com/cbeuw/Cloak/internal/common" "net" "sync" "sync/atomic" "time" + "github.com/cbeuw/Cloak/internal/common" + log "github.com/sirupsen/logrus" ) diff --git a/internal/multiplex/session_fuzz.go b/internal/multiplex/session_fuzz.go index 1eb6932..9cdb9a1 100644 --- a/internal/multiplex/session_fuzz.go +++ b/internal/multiplex/session_fuzz.go @@ -1,3 +1,4 @@ +//go:build gofuzz // +build gofuzz package multiplex diff --git a/internal/multiplex/session_test.go b/internal/multiplex/session_test.go index 88572a6..eac7482 100644 --- a/internal/multiplex/session_test.go +++ b/internal/multiplex/session_test.go @@ -2,8 +2,6 @@ package multiplex import ( "bytes" - "github.com/cbeuw/connutil" - "github.com/stretchr/testify/assert" "io" "io/ioutil" "math/rand" @@ -13,6 +11,9 @@ import ( "sync/atomic" "testing" "time" + + "github.com/cbeuw/connutil" + "github.com/stretchr/testify/assert" ) var seshConfigs = map[string]SessionConfig{ diff --git a/internal/multiplex/stream.go b/internal/multiplex/stream.go index 8c2ea15..f7e0376 100644 --- a/internal/multiplex/stream.go +++ b/internal/multiplex/stream.go @@ -6,9 +6,10 @@ import ( "net" "time" - log "github.com/sirupsen/logrus" "sync" "sync/atomic" + + log "github.com/sirupsen/logrus" ) var ErrBrokenStream = errors.New("broken stream") diff --git a/internal/multiplex/streamBuffer_test.go b/internal/multiplex/streamBuffer_test.go index b36bb6a..c390513 100644 --- a/internal/multiplex/streamBuffer_test.go +++ b/internal/multiplex/streamBuffer_test.go @@ -3,6 +3,7 @@ package multiplex import ( "encoding/binary" "io" + //"log" "sort" "testing" diff --git a/internal/multiplex/streamBufferedPipe_test.go b/internal/multiplex/streamBufferedPipe_test.go index 6cdbff1..7e4d168 100644 --- a/internal/multiplex/streamBufferedPipe_test.go +++ b/internal/multiplex/streamBufferedPipe_test.go @@ -1,10 +1,11 @@ package multiplex import ( - "github.com/stretchr/testify/assert" "math/rand" "testing" "time" + + "github.com/stretchr/testify/assert" ) const readBlockTime = 500 * time.Millisecond diff --git a/internal/multiplex/stream_test.go b/internal/multiplex/stream_test.go index eb13bc8..ceb0835 100644 --- a/internal/multiplex/stream_test.go +++ b/internal/multiplex/stream_test.go @@ -2,14 +2,15 @@ package multiplex import ( "bytes" - "github.com/cbeuw/Cloak/internal/common" - "github.com/stretchr/testify/assert" "io" "io/ioutil" "math/rand" "testing" "time" + "github.com/cbeuw/Cloak/internal/common" + "github.com/stretchr/testify/assert" + "github.com/cbeuw/connutil" ) diff --git a/internal/multiplex/switchboard.go b/internal/multiplex/switchboard.go index fa35567..52ee77b 100644 --- a/internal/multiplex/switchboard.go +++ b/internal/multiplex/switchboard.go @@ -2,12 +2,13 @@ package multiplex import ( "errors" - log "github.com/sirupsen/logrus" "math/rand" "net" "sync" "sync/atomic" "time" + + log "github.com/sirupsen/logrus" ) type switchboardStrategy int diff --git a/internal/multiplex/switchboard_test.go b/internal/multiplex/switchboard_test.go index 5e95afe..f8947b6 100644 --- a/internal/multiplex/switchboard_test.go +++ b/internal/multiplex/switchboard_test.go @@ -1,13 +1,14 @@ package multiplex import ( - "github.com/cbeuw/connutil" - "github.com/stretchr/testify/assert" "math/rand" "sync" "sync/atomic" "testing" "time" + + "github.com/cbeuw/connutil" + "github.com/stretchr/testify/assert" ) func TestSwitchboard_Send(t *testing.T) { diff --git a/internal/server/TLS.go b/internal/server/TLS.go index 0e66387..88e8f19 100644 --- a/internal/server/TLS.go +++ b/internal/server/TLS.go @@ -4,12 +4,13 @@ import ( "crypto" "errors" "fmt" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/Cloak/internal/ecdh" "io" "math/rand" "net" + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/Cloak/internal/ecdh" + log "github.com/sirupsen/logrus" ) diff --git a/internal/server/TLSAux.go b/internal/server/TLSAux.go index 33ac3cd..da634d3 100644 --- a/internal/server/TLSAux.go +++ b/internal/server/TLSAux.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "errors" "fmt" + "github.com/cbeuw/Cloak/internal/common" ) diff --git a/internal/server/activeuser.go b/internal/server/activeuser.go index 2bf212c..4be2954 100644 --- a/internal/server/activeuser.go +++ b/internal/server/activeuser.go @@ -1,9 +1,10 @@ package server import ( - "github.com/cbeuw/Cloak/internal/server/usermanager" "sync" + "github.com/cbeuw/Cloak/internal/server/usermanager" + mux "github.com/cbeuw/Cloak/internal/multiplex" ) diff --git a/internal/server/activeuser_test.go b/internal/server/activeuser_test.go index e6aeab4..20f61bf 100644 --- a/internal/server/activeuser_test.go +++ b/internal/server/activeuser_test.go @@ -3,12 +3,13 @@ package server import ( "crypto/rand" "encoding/base64" - "github.com/cbeuw/Cloak/internal/common" - mux "github.com/cbeuw/Cloak/internal/multiplex" - "github.com/cbeuw/Cloak/internal/server/usermanager" "io/ioutil" "os" "testing" + + "github.com/cbeuw/Cloak/internal/common" + mux "github.com/cbeuw/Cloak/internal/multiplex" + "github.com/cbeuw/Cloak/internal/server/usermanager" ) func getSeshConfig(unordered bool) mux.SessionConfig { diff --git a/internal/server/auth.go b/internal/server/auth.go index c7e6d1b..d6941c2 100644 --- a/internal/server/auth.go +++ b/internal/server/auth.go @@ -5,9 +5,10 @@ import ( "encoding/binary" "errors" "fmt" - "github.com/cbeuw/Cloak/internal/common" "time" + "github.com/cbeuw/Cloak/internal/common" + log "github.com/sirupsen/logrus" ) diff --git a/internal/server/auth_test.go b/internal/server/auth_test.go index 9218b82..e353de4 100644 --- a/internal/server/auth_test.go +++ b/internal/server/auth_test.go @@ -4,10 +4,11 @@ import ( "crypto" "encoding/hex" "fmt" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/Cloak/internal/ecdh" "testing" "time" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/Cloak/internal/ecdh" ) func TestDecryptClientInfo(t *testing.T) { diff --git a/internal/server/dispatcher.go b/internal/server/dispatcher.go index 20eae5f..4285ed3 100644 --- a/internal/server/dispatcher.go +++ b/internal/server/dispatcher.go @@ -6,13 +6,14 @@ import ( "encoding/binary" "errors" "fmt" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/Cloak/internal/server/usermanager" "io" "net" "net/http" "time" + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/Cloak/internal/server/usermanager" + mux "github.com/cbeuw/Cloak/internal/multiplex" log "github.com/sirupsen/logrus" ) diff --git a/internal/server/dispatcher_test.go b/internal/server/dispatcher_test.go index c98a81b..7e57184 100644 --- a/internal/server/dispatcher_test.go +++ b/internal/server/dispatcher_test.go @@ -2,12 +2,13 @@ package server import ( "encoding/hex" - "github.com/cbeuw/connutil" - "github.com/stretchr/testify/assert" "io" "net" "testing" "time" + + "github.com/cbeuw/connutil" + "github.com/stretchr/testify/assert" ) type rfpReturnValue struct { diff --git a/internal/server/first_packet_fuzz.go b/internal/server/first_packet_fuzz.go index 2003508..243f5f9 100644 --- a/internal/server/first_packet_fuzz.go +++ b/internal/server/first_packet_fuzz.go @@ -1,13 +1,15 @@ +//go:build gofuzz // +build gofuzz package server import ( "errors" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/connutil" "net" "time" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/connutil" ) type rfpReturnValue_fuzz struct { diff --git a/internal/server/state.go b/internal/server/state.go index 03d9298..457dc96 100644 --- a/internal/server/state.go +++ b/internal/server/state.go @@ -5,13 +5,14 @@ import ( "encoding/json" "errors" "fmt" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/Cloak/internal/server/usermanager" "io/ioutil" "net" "strings" "sync" "time" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/Cloak/internal/server/usermanager" ) type RawConfig struct { diff --git a/internal/server/usermanager/api_router_test.go b/internal/server/usermanager/api_router_test.go index 9f957c8..0e4dbaa 100644 --- a/internal/server/usermanager/api_router_test.go +++ b/internal/server/usermanager/api_router_test.go @@ -4,12 +4,13 @@ import ( "bytes" "encoding/base64" "encoding/json" - "github.com/stretchr/testify/assert" "io/ioutil" "net/http" "net/http/httptest" "os" "testing" + + "github.com/stretchr/testify/assert" ) var mockUIDb64 = base64.URLEncoding.EncodeToString(mockUID) diff --git a/internal/server/usermanager/localmanager.go b/internal/server/usermanager/localmanager.go index 4b3096b..ed466cb 100644 --- a/internal/server/usermanager/localmanager.go +++ b/internal/server/usermanager/localmanager.go @@ -2,6 +2,7 @@ package usermanager import ( "encoding/binary" + "github.com/cbeuw/Cloak/internal/common" log "github.com/sirupsen/logrus" bolt "go.etcd.io/bbolt" diff --git a/internal/server/usermanager/localmanager_test.go b/internal/server/usermanager/localmanager_test.go index 40873cc..6b28e8f 100644 --- a/internal/server/usermanager/localmanager_test.go +++ b/internal/server/usermanager/localmanager_test.go @@ -2,8 +2,6 @@ package usermanager import ( "encoding/binary" - "github.com/cbeuw/Cloak/internal/common" - "github.com/stretchr/testify/assert" "io/ioutil" "math/rand" "os" @@ -12,6 +10,9 @@ import ( "sync" "testing" "time" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/stretchr/testify/assert" ) var mockUID = []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} diff --git a/internal/server/usermanager/voidmanager_test.go b/internal/server/usermanager/voidmanager_test.go index 55ab2b4..ffde3d1 100644 --- a/internal/server/usermanager/voidmanager_test.go +++ b/internal/server/usermanager/voidmanager_test.go @@ -1,8 +1,9 @@ package usermanager import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) var v = &Voidmanager{} diff --git a/internal/server/userpanel.go b/internal/server/userpanel.go index 953179e..0a9ff0f 100644 --- a/internal/server/userpanel.go +++ b/internal/server/userpanel.go @@ -2,11 +2,12 @@ package server import ( "encoding/base64" - "github.com/cbeuw/Cloak/internal/server/usermanager" "sync" "sync/atomic" "time" + "github.com/cbeuw/Cloak/internal/server/usermanager" + mux "github.com/cbeuw/Cloak/internal/multiplex" log "github.com/sirupsen/logrus" ) diff --git a/internal/server/userpanel_test.go b/internal/server/userpanel_test.go index b28744c..bc39b4e 100644 --- a/internal/server/userpanel_test.go +++ b/internal/server/userpanel_test.go @@ -2,12 +2,13 @@ package server import ( "encoding/base64" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/Cloak/internal/server/usermanager" "io/ioutil" "os" "testing" "time" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/Cloak/internal/server/usermanager" ) func TestUserPanel_BypassUser(t *testing.T) { diff --git a/internal/server/websocket.go b/internal/server/websocket.go index 1c9e940..5880240 100644 --- a/internal/server/websocket.go +++ b/internal/server/websocket.go @@ -7,11 +7,12 @@ import ( "encoding/base64" "errors" "fmt" - "github.com/cbeuw/Cloak/internal/common" - "github.com/cbeuw/Cloak/internal/ecdh" "io" "net" "net/http" + + "github.com/cbeuw/Cloak/internal/common" + "github.com/cbeuw/Cloak/internal/ecdh" ) type WebSocket struct{} diff --git a/internal/server/websocketAux.go b/internal/server/websocketAux.go index 345c2a8..e4d949d 100644 --- a/internal/server/websocketAux.go +++ b/internal/server/websocketAux.go @@ -2,11 +2,12 @@ package server import ( "errors" - "github.com/cbeuw/Cloak/internal/common" - "github.com/gorilla/websocket" "net" "net/http" + "github.com/cbeuw/Cloak/internal/common" + "github.com/gorilla/websocket" + log "github.com/sirupsen/logrus" ) diff --git a/internal/server/websocketAux_test.go b/internal/server/websocketAux_test.go index b075ec7..d78a241 100644 --- a/internal/server/websocketAux_test.go +++ b/internal/server/websocketAux_test.go @@ -2,8 +2,9 @@ package server import ( "bytes" - "github.com/cbeuw/connutil" "testing" + + "github.com/cbeuw/connutil" ) func TestFirstBuffedConn_Read(t *testing.T) { diff --git a/internal/test/integration_test.go b/internal/test/integration_test.go index 187507f..04e9099 100644 --- a/internal/test/integration_test.go +++ b/internal/test/integration_test.go @@ -5,12 +5,6 @@ import ( "encoding/base64" "encoding/binary" "fmt" - "github.com/cbeuw/Cloak/internal/client" - "github.com/cbeuw/Cloak/internal/common" - mux "github.com/cbeuw/Cloak/internal/multiplex" - "github.com/cbeuw/Cloak/internal/server" - "github.com/cbeuw/connutil" - "github.com/stretchr/testify/assert" "io" "math/rand" "net" @@ -18,6 +12,13 @@ import ( "testing" "time" + "github.com/cbeuw/Cloak/internal/client" + "github.com/cbeuw/Cloak/internal/common" + mux "github.com/cbeuw/Cloak/internal/multiplex" + "github.com/cbeuw/Cloak/internal/server" + "github.com/cbeuw/connutil" + "github.com/stretchr/testify/assert" + log "github.com/sirupsen/logrus" )