mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
proxy: move conn to proxy package
This commit is contained in:
1 parent
47e20cf7f4
commit
bd358e4ae6
14 files changed
+33
-42
No files matched your search
@@ -6,7 +6,6 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/nadoo/glider/common/conn"
|
||||
"github.com/nadoo/glider/common/log"
|
||||
"github.com/nadoo/glider/proxy"
|
||||
)
|
||||
@@ -90,7 +89,7 @@ func (s *TCPTun) Serve(c net.Conn) {
|
||||
|
||||
log.F("[tcptun] %s <-> %s via %s", c.RemoteAddr(), s.raddr, dialer.Addr())
|
||||
|
||||
if err = conn.Relay(c, rc); err != nil {
|
||||
if err = proxy.Relay(c, rc); err != nil {
|
||||
log.F("[tcptun] %s <-> %s via %s, relay error: %v", c.RemoteAddr(), s.raddr, dialer.Addr(), err)
|
||||
// record remote conn failure only
|
||||
if !strings.Contains(err.Error(), s.addr) {
|
||||
|
||||
Reference in new issue
Block a user