mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
enhance: server and nodes analytics
This commit is contained in:
parent
3e065f0533
commit
2142f2e1cc
8 changed files with 155 additions and 57 deletions
|
@ -75,7 +75,6 @@ func nodeAnalyticRecord(env *model.Environment, ctx context.Context) (err error)
|
|||
mutex.Unlock()
|
||||
|
||||
u, err := env.GetWebSocketURL("/api/analytic/intro")
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -84,7 +83,12 @@ func nodeAnalyticRecord(env *model.Environment, ctx context.Context) (err error)
|
|||
|
||||
header.Set("X-Node-Secret", env.Token)
|
||||
|
||||
c, _, err := websocket.DefaultDialer.Dial(u, header)
|
||||
dial := &websocket.Dialer{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
HandshakeTimeout: 5 * time.Second,
|
||||
}
|
||||
|
||||
c, _, err := dial.Dial(u, header)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue