From 7f9112c8efa25a8ccfe6974e22532458d93261a2 Mon Sep 17 00:00:00 2001 From: Mehdikhody Date: Sat, 10 Feb 2024 05:22:35 +0330 Subject: [PATCH] Add xray stdout listener --- xray/process.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 {