From 6fed9dd0dd62718f78eca11e30a71c2712636fbd Mon Sep 17 00:00:00 2001 From: Mikhail Osipov Date: Wed, 16 Dec 2020 15:27:48 +0300 Subject: hook and socket args check fix, tests --- pkg/server/hook/info-http.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'pkg/server/hook/info-http.go') diff --git a/pkg/server/hook/info-http.go b/pkg/server/hook/info-http.go index 73480ff..ec56f87 100644 --- a/pkg/server/hook/info-http.go +++ b/pkg/server/hook/info-http.go @@ -2,9 +2,9 @@ package hook import ( "bufio" + "tunnel/pkg/http" "tunnel/pkg/server/env" - "tunnel/pkg/server/opts" "tunnel/pkg/server/queue" ) @@ -42,14 +42,10 @@ func (info *infoHttp) Recv(rq, wq queue.Q) error { return queue.Copy(rq, wq) } -func (infoHttpHook) Open(env env.Env) (interface{}, error) { +func (infoHttpHook) New(env env.Env) (interface{}, error) { return &infoHttp{env: env}, nil } -func newInfoHttpHook(opts.Opts) (hook, error) { - return infoHttpHook{}, nil -} - func init() { - register("info-http", newInfoHttpHook) + register("info-http", infoHttpHook{}) } -- cgit v1.2.3-70-g09d2