diff --git a/go/client/main.go b/go/client/main.go index 1faa2dd..081c6ef 100644 --- a/go/client/main.go +++ b/go/client/main.go @@ -13,6 +13,10 @@ import ( func main() { socketPath := flag.String("socket", "/tmp/pilot.sock", "daemon socket path") + // NOTE: On Linux, prefer os.UserHomeDir() or XDG_RUNTIME_DIR for the socket + // path (e.g. filepath.Join(os.UserHomeDir(), ".pilot", "daemon.sock")). + // The hardcoded /tmp default is fine for quick testing but may conflict + // with the per-user daemon socket on multi-user systems. target := flag.String("target", "", "target address (e.g. 0:0000.0000.0002:80)") message := flag.String("msg", "hello from pilot client", "message to send") flag.Parse() diff --git a/go/echo/main.go b/go/echo/main.go index 531b930..762e27b 100644 --- a/go/echo/main.go +++ b/go/echo/main.go @@ -11,6 +11,10 @@ import ( func main() { socketPath := flag.String("socket", "/tmp/pilot.sock", "daemon socket path") + // NOTE: On Linux, prefer os.UserHomeDir() or XDG_RUNTIME_DIR for the socket + // path (e.g. filepath.Join(os.UserHomeDir(), ".pilot", "daemon.sock")). + // The hardcoded /tmp default is fine for quick testing but may conflict + // with the per-user daemon socket on multi-user systems. port := flag.Uint("port", 7, "pilot port to listen on") raw := flag.Bool("raw", true, "raw echo (no prefix)") flag.Parse() diff --git a/go/httpclient/main.go b/go/httpclient/main.go index 08ae96c..632bce3 100644 --- a/go/httpclient/main.go +++ b/go/httpclient/main.go @@ -14,6 +14,10 @@ import ( func main() { socketPath := flag.String("socket", "/tmp/pilot.sock", "daemon socket path") + // NOTE: On Linux, prefer os.UserHomeDir() or XDG_RUNTIME_DIR for the socket + // path (e.g. filepath.Join(os.UserHomeDir(), ".pilot", "daemon.sock")). + // The hardcoded /tmp default is fine for quick testing but may conflict + // with the per-user daemon socket on multi-user systems. target := flag.String("target", "", "target address (e.g. 0:0000.0000.0002)") port := flag.Uint("port", 80, "target port") path := flag.String("path", "/status", "HTTP path to request") diff --git a/go/secure/main.go b/go/secure/main.go index d0552d3..8fdf1cb 100644 --- a/go/secure/main.go +++ b/go/secure/main.go @@ -15,6 +15,10 @@ import ( func main() { socketPath := flag.String("socket", "/tmp/pilot.sock", "daemon socket path") + // NOTE: On Linux, prefer os.UserHomeDir() or XDG_RUNTIME_DIR for the socket + // path (e.g. filepath.Join(os.UserHomeDir(), ".pilot", "daemon.sock")). + // The hardcoded /tmp default is fine for quick testing but may conflict + // with the per-user daemon socket on multi-user systems. mode := flag.String("mode", "server", "server or client") target := flag.String("target", "", "target address for client mode") msg := flag.String("msg", "hello secure channel", "message to send in client mode") diff --git a/go/webserver/main.go b/go/webserver/main.go index de67962..dacf56c 100644 --- a/go/webserver/main.go +++ b/go/webserver/main.go @@ -13,6 +13,10 @@ import ( func main() { socketPath := flag.String("socket", "/tmp/pilot.sock", "daemon socket path") + // NOTE: On Linux, prefer os.UserHomeDir() or XDG_RUNTIME_DIR for the socket + // path (e.g. filepath.Join(os.UserHomeDir(), ".pilot", "daemon.sock")). + // The hardcoded /tmp default is fine for quick testing but may conflict + // with the per-user daemon socket on multi-user systems. port := flag.Uint("port", 80, "pilot port to listen on") flag.Parse()