mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-25 01:07:52 +00:00
Minor logging corrections
This commit is contained in:
parent
f599bea216
commit
5cf9eedf42
2
noise.go
2
noise.go
@ -58,7 +58,7 @@ func (h *Headscale) NoiseUpgradeHandler(
|
|||||||
server.Handler = h2c.NewHandler(h.noiseMux, &http2.Server{})
|
server.Handler = h2c.NewHandler(h.noiseMux, &http2.Server{})
|
||||||
err = server.Serve(netutil.NewOneConnListener(noiseConn, nil))
|
err = server.Serve(netutil.NewOneConnListener(noiseConn, nil))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("noise server launch failed")
|
log.Info().Err(err).Msg("The HTTP2 server was closed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ type contextKey string
|
|||||||
|
|
||||||
const machineNameContextKey = contextKey("machineName")
|
const machineNameContextKey = contextKey("machineName")
|
||||||
|
|
||||||
|
// handlePollCommon is the common code for the legacy and Noise protocols to
|
||||||
|
// managed the poll loop.
|
||||||
func (h *Headscale) handlePollCommon(
|
func (h *Headscale) handlePollCommon(
|
||||||
writer http.ResponseWriter,
|
writer http.ResponseWriter,
|
||||||
req *http.Request,
|
req *http.Request,
|
||||||
@ -37,7 +39,6 @@ func (h *Headscale) handlePollCommon(
|
|||||||
log.Error().
|
log.Error().
|
||||||
Caller().
|
Caller().
|
||||||
Bool("noise", isNoise).
|
Bool("noise", isNoise).
|
||||||
Str("func", "handleAuthKey").
|
|
||||||
Str("machine", machine.Hostname).
|
Str("machine", machine.Hostname).
|
||||||
Err(err)
|
Err(err)
|
||||||
}
|
}
|
||||||
@ -246,13 +247,13 @@ func (h *Headscale) pollNetMapStream(
|
|||||||
)
|
)
|
||||||
|
|
||||||
log.Trace().
|
log.Trace().
|
||||||
Str("handler", "PollNetMapStream").
|
Str("handler", "pollNetMapStream").
|
||||||
Bool("noise", isNoise).
|
Bool("noise", isNoise).
|
||||||
Str("machine", machine.Hostname).
|
Str("machine", machine.Hostname).
|
||||||
Msg("Waiting for data to stream...")
|
Msg("Waiting for data to stream...")
|
||||||
|
|
||||||
log.Trace().
|
log.Trace().
|
||||||
Str("handler", "PollNetMapStream").
|
Str("handler", "pollNetMapStream").
|
||||||
Bool("noise", isNoise).
|
Bool("noise", isNoise).
|
||||||
Str("machine", machine.Hostname).
|
Str("machine", machine.Hostname).
|
||||||
Msgf("pollData is %#v, keepAliveChan is %#v, updateChan is %#v", pollDataChan, keepAliveChan, updateChan)
|
Msgf("pollData is %#v, keepAliveChan is %#v, updateChan is %#v", pollDataChan, keepAliveChan, updateChan)
|
||||||
|
5
utils.go
5
utils.go
@ -118,7 +118,10 @@ func decode(
|
|||||||
pubKey *key.MachinePublic,
|
pubKey *key.MachinePublic,
|
||||||
privKey *key.MachinePrivate,
|
privKey *key.MachinePrivate,
|
||||||
) error {
|
) error {
|
||||||
log.Trace().Int("length", len(msg)).Msg("Trying to decrypt")
|
log.Trace().
|
||||||
|
Str("pubkey", pubKey.ShortString()).
|
||||||
|
Int("length", len(msg)).
|
||||||
|
Msg("Trying to decrypt")
|
||||||
|
|
||||||
decrypted, ok := privKey.OpenFrom(*pubKey, msg)
|
decrypted, ok := privKey.OpenFrom(*pubKey, msg)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user