diff options
| author | Jeff Carr <[email protected]> | 2025-03-10 03:12:09 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-10 07:59:25 -0500 |
| commit | fba2d24625d844b7f6115a6cb86f7fc6e1f9e3d5 (patch) | |
| tree | f1e787166b7a9f9d54c9551b9bf3db6d89fc1e46 /main.go | |
| parent | dfbb8090acaba51ab29368202e5c97fd18856558 (diff) | |
start making it work in the real world
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -50,9 +50,6 @@ func main() { os.Exit(0) } - // go NewWatchdog() - go startHTTP() - if gui.NoGui() { all := me.portmaps.All() for all.Scan() { @@ -61,10 +58,13 @@ func main() { continue } log.Info("portmap enabled for port", pm.Listen, "to", pm.Connect) - gus3000(int(pm.Listen), pm.Connect) + go gus3000(int(pm.Listen), pm.Connect) } + // startHTTP() os.Exit(0) } + // go NewWatchdog() + go startHTTP() doGui() } @@ -85,10 +85,10 @@ func gus3000(port int, connect string) { log.Printf("Failed to accept client connection: %v", err) continue } - log.Printf("Client connected: %s", clientConn.RemoteAddr()) + // log.Printf("Client connected: %s", clientConn.RemoteAddr()) // Handle the connection in a separate goroutine - go handleConnection(clientConn, s) + go handleConnection(clientConn, connect) } } @@ -103,7 +103,7 @@ func handleConnection(clientConn net.Conn, where string) { return } defer targetConn.Close() - log.Printf("Connected to target server: %s", targetConn.RemoteAddr()) + log.Printf("Connected to target server: %s where = %s\n", targetConn.RemoteAddr(), where) // Bidirectional copy of data go io.Copy(targetConn, clientConn) // Client -> Target |
