summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/main.go b/main.go
index 6d02a2b..dbfbb90 100644
--- a/main.go
+++ b/main.go
@@ -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