diff options
| author | Mikhail Osipov <mike.osipov@gmail.com> | 2022-03-07 11:37:18 +0300 |
|---|---|---|
| committer | Mikhail Osipov <mike.osipov@gmail.com> | 2022-03-07 11:37:18 +0300 |
| commit | 58e7593e2a187b798eaf8852859e0a1b730ffbfd (patch) | |
| tree | 8dbc8aa105abd312a2d6b95a77a1d80d4b628241 /pkg/server | |
| parent | d53690edff5bca081ccc6ceb675c05c24692dafc (diff) | |
add proxy dial logs
Diffstat (limited to 'pkg/server')
| -rw-r--r-- | pkg/server/socket/proxy.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/server/socket/proxy.go b/pkg/server/socket/proxy.go index f6c4f72..3b40fd2 100644 --- a/pkg/server/socket/proxy.go +++ b/pkg/server/socket/proxy.go @@ -6,6 +6,7 @@ import ( "context" "errors" "fmt" + "log" "tunnel/pkg/http" "tunnel/pkg/server/env" @@ -114,10 +115,13 @@ func (s *proxyServer) Recv(rq queue.Q) error { } if err := s.dial(req.URI); err != nil { + log.Printf("proxy %s failed: %s", req.URI, err) s.wait <- status{500, "Unable to connect"} return err } + log.Printf("proxy %s ok", req.URI) + s.wait <- status{200, "Connection established"} return queue.IoCopy(r, s.conn) |
