diff --git a/xray/process.go b/xray/process.go index 093cf69d..95658de2 100644 --- a/xray/process.go +++ b/xray/process.go @@ -218,6 +218,12 @@ func (p *process) Start() (err error) { cmd.Stdout = p.logWriter cmd.Stderr = p.logWriter + // Listen to client connections from the stdout of xray + // It is better this way than reading the log file + // because reading a file causes a lot of IO operations + // and system calls which is not efficient + NewClientIPListener(p).Start() + go func() { err := cmd.Run() if err != nil {