Skip to content

Commit

Permalink
ipn/wg: new Info logs, mv sensitive logs to Verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Aug 9, 2023
1 parent 4e1299f commit 60c76a1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions intra/ipn/wgproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ func (w *wgproxy) Close() error {
}

// Stop implements ipn.Proxy
func (h *wgproxy) Stop() error {
h.status = END
log.I("proxy: wg: stopped %s", h.id)
return h.Close()
func (w *wgproxy) Stop() error {
log.I("proxy: wg(%s): stopping; status(%s)", w.id, w.status)
return w.Close()
}

type WgProxy interface {
Expand Down Expand Up @@ -226,7 +225,8 @@ func NewWgProxy(id string, ctl protect.Controller, cfg string) (w WgProxy, err e

err = wgdev.IpcSet(uapicfg)
if err != nil {
log.E("proxy: wg: failed to ipc-set config %s, %v", uapicfg, err)
log.E("proxy: wg: failed to ipc-set %v", err)
log.V("proxy: wg: failed config %s", uapicfg) // prints private-key
return nil, err
}

Expand All @@ -248,7 +248,8 @@ func NewWgProxy(id string, ctl protect.Controller, cfg string) (w WgProxy, err e
wgdev,
}

log.D("proxy: wg: new %s for cfg %s / bound? %t", id, cfg, bindok)
log.D("proxy: wg: new %s / bound? %t", id, bindok)
log.V("proxy: wg: cfg %s", cfg) // prints private-key

return
}
Expand Down Expand Up @@ -404,6 +405,7 @@ func (tun *wgtun) Close() error {
close(tun.incomingPacket)
}

log.I("proxy: wg: tun: closed")
return nil
}

Expand Down

1 comment on commit 60c76a1

@ignoramous
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.