From 993f5f86c5e432ce41a0c97bb7f26c8c6d615155 Mon Sep 17 00:00:00 2001 From: Owen Date: Sun, 23 Feb 2025 20:17:16 -0500 Subject: [PATCH] Small adjustments --- relay/relay.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/relay/relay.go b/relay/relay.go index 1635e52..396c196 100644 --- a/relay/relay.go +++ b/relay/relay.go @@ -7,6 +7,7 @@ import ( "io" "net" "net/http" + "strconv" "sync" "time" @@ -97,7 +98,7 @@ func (s *UDPProxyServer) Start() error { logger.Info("UDP server listening on %s", s.addr) // Start a fixed number of worker goroutines. - workerCount := 10 + workerCount := 10 // TODO: Make this configurable or pick it better! for i := 0; i < workerCount; i++ { go s.packetWorker() } @@ -313,7 +314,7 @@ func (s *UDPProxyServer) notifyServer(endpoint ClientEndpoint) { func (s *UDPProxyServer) UpdateProxyMapping(sourceIP string, sourcePort int, destinationIP string, destinationPort int) { - key := net.JoinHostPort(sourceIP, string(sourcePort)) + key := net.JoinHostPort(sourceIP, strconv.Itoa(sourcePort)) mapping := ProxyMapping{ DestinationIP: destinationIP, DestinationPort: destinationPort,