diff options
| author | Mikhail Osipov <mike.osipov@gmail.com> | 2020-02-23 16:07:22 +0300 |
|---|---|---|
| committer | Mikhail Osipov <mike.osipov@gmail.com> | 2020-02-23 16:07:22 +0300 |
| commit | d3e48b2676c70ef20c33d70220c4a4b22f3a0e5b (patch) | |
| tree | 76abee3f20891c4e1ef2077193e3d2389075ddeb /pkg/server/module/auth.go | |
| parent | 7f71e4fc69e2b27d8ff6375cc6f4be2092721186 (diff) | |
make fmt
Diffstat (limited to 'pkg/server/module/auth.go')
| -rw-r--r-- | pkg/server/module/auth.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pkg/server/module/auth.go b/pkg/server/module/auth.go index 5dbdccb..f167874 100644 --- a/pkg/server/module/auth.go +++ b/pkg/server/module/auth.go @@ -1,16 +1,16 @@ package module import ( - "tunnel/pkg/server/queue" - "tunnel/pkg/server/opts" - "tunnel/pkg/server/env" - "tunnel/pkg/netstring" - "encoding/hex" - "crypto/rand" "crypto/md5" + "crypto/rand" + "encoding/hex" "errors" "fmt" "io" + "tunnel/pkg/netstring" + "tunnel/pkg/server/env" + "tunnel/pkg/server/opts" + "tunnel/pkg/server/queue" ) const ChallengeLen = 16 @@ -26,10 +26,10 @@ type auth struct { hash string recvChallenge chan struct{} - recvHash chan struct{} + recvHash chan struct{} fail chan struct{} - ok chan struct{} + ok chan struct{} } var errDupChallenge = errors.New("peer duplicates challenge") @@ -150,17 +150,17 @@ func getAuthSecret(env env.Env) string { func (m authModule) Open(env env.Env) (Pipe, Pipe) { a := &auth{ - secret: getAuthSecret(env), + secret: getAuthSecret(env), recvChallenge: make(chan struct{}), - recvHash: make(chan struct{}), - fail: make(chan struct{}), - ok: make(chan struct{}), + recvHash: make(chan struct{}), + fail: make(chan struct{}), + ok: make(chan struct{}), } return a.Send, a.Recv } func init() { - register("auth", func (opts.Opts, env.Env) (module, error) { + register("auth", func(opts.Opts, env.Env) (module, error) { return authModule{}, nil }) } |
