mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-09 11:46:18 +00:00
Add xray stdout listener
This commit is contained in:
parent
3e4fda0913
commit
7f9112c8ef
1 changed files with 6 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue