diff --git a/cmd/localrelay/ipcServer.go b/cmd/localrelay/ipcServer.go index 94f25ad..5b020f5 100644 --- a/cmd/localrelay/ipcServer.go +++ b/cmd/localrelay/ipcServer.go @@ -182,7 +182,6 @@ func ipcRouteConns(ctx *fasthttp.RequestCtx) { relays := runningRelaysCopy() for _, r := range relays { for _, conn := range r.GetConns() { - relayConns = append(relayConns, api.Connection{ LocalAddr: conn.Conn.LocalAddr().String(), RemoteAddr: conn.Conn.RemoteAddr().String(), diff --git a/v2/relay.go b/v2/relay.go index e5f4182..82d646c 100644 --- a/v2/relay.go +++ b/v2/relay.go @@ -313,7 +313,7 @@ func (r *Relay) storeConn(conn net.Conn) { r.m.Lock() defer r.m.Unlock() - r.connPool = append(r.connPool, &PooledConn{conn, "", time.Now()}) + r.connPool = append(r.connPool, &PooledConn{conn, "\x1b[92mdialing\x1b[0m", time.Now()}) } // popConn removes the provided connection from the conn pool diff --git a/v2/relayfailovertcp.go b/v2/relayfailovertcp.go index bd45958..ee95f0a 100644 --- a/v2/relayfailovertcp.go +++ b/v2/relayfailovertcp.go @@ -24,8 +24,7 @@ func dial(r *Relay, conn net.Conn, remoteAddress string, i int, network string, return ErrFailConnect } - // TODO: validate setConnRemote( is used correctly - r.setConnRemote(c, c.RemoteAddr()) + r.setConnRemote(conn, c.RemoteAddr()) r.Metrics.dial(1, 0, start) diff --git a/v2/relaytcp.go b/v2/relaytcp.go index 4d822c6..6a925f7 100644 --- a/v2/relaytcp.go +++ b/v2/relaytcp.go @@ -109,8 +109,7 @@ func handleConn(r *Relay, conn net.Conn, network string) { continue } - // TODO: test validate - r.setConnRemote(c, c.RemoteAddr()) + r.setConnRemote(conn, c.RemoteAddr()) r.Metrics.dial(1, 0, start)