diff --git a/cmd/http/main.go b/cmd/http/main.go index 8fd135f..fcb6399 100644 --- a/cmd/http/main.go +++ b/cmd/http/main.go @@ -23,7 +23,7 @@ func main() { log.Fatal(err) } - log.Printf("lilproxy initialized") + log.Printf("lilproxy initialized on port: (%s) target address: (%s)", port, target) log.Fatal(c.ListenAndServe()) } diff --git a/pkg/udpproxy/session.go b/pkg/udpproxy/session.go index 2c50e5e..423f55f 100644 --- a/pkg/udpproxy/session.go +++ b/pkg/udpproxy/session.go @@ -40,7 +40,7 @@ func (s *Session) listen() error { continue } - s.proxyFrom(buf[:n]) + go s.proxyFrom(buf[:n]) } } diff --git a/pkg/udpproxy/udpproxy.go b/pkg/udpproxy/udpproxy.go index 4365711..03dc739 100644 --- a/pkg/udpproxy/udpproxy.go +++ b/pkg/udpproxy/udpproxy.go @@ -63,7 +63,7 @@ func (c *Client) ListenAndServe() error { c.sessions[caddr.String()] = session } - session.proxyTo(buf[:n]) + go session.proxyTo(buf[:n]) } }