diff --git a/xray/process.go b/xray/process.go index ca91f5855..a9963bc38 100644 --- a/xray/process.go +++ b/xray/process.go @@ -252,6 +252,9 @@ func (p *process) GetTraffic(reset bool) ([]*Traffic, error) { traffics := make([]*Traffic, 0) for _, stat := range resp.GetStat() { matchs := trafficRegex.FindStringSubmatch(stat.Name) + if len(matchs) < 4 { + continue + } isInbound := matchs[1] == "inbound" tag := matchs[2] isDown := matchs[3] == "downlink"