Refactor: make inbound request contextual
This commit is contained in:
@ -9,7 +9,7 @@ import (
|
||||
|
||||
C "github.com/Dreamacro/clash/constant"
|
||||
"github.com/Dreamacro/clash/log"
|
||||
T "github.com/Dreamacro/clash/tunnel"
|
||||
"github.com/Dreamacro/clash/tunnel/statistic"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/go-chi/cors"
|
||||
@ -143,7 +143,7 @@ func traffic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
tick := time.NewTicker(time.Second)
|
||||
defer tick.Stop()
|
||||
t := T.DefaultManager
|
||||
t := statistic.DefaultManager
|
||||
buf := &bytes.Buffer{}
|
||||
var err error
|
||||
for range tick.C {
|
||||
|
Reference in New Issue
Block a user