mirror of
https://github.com/fosrl/gerbil.git
synced 2026-02-07 21:46:40 +00:00
Small adjustments
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user