Audit changes
This commit is contained in:
@@ -21,12 +21,13 @@ func (a *App) onTick() {
|
|||||||
a.devRemove(&Peer{wgPeer: wgPeer})
|
a.devRemove(&Peer{wgPeer: wgPeer})
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
p.wgPeer = wgPeer
|
p.wgPeer = wgPeer
|
||||||
if a.isPublic && !p.IsPublic {
|
|
||||||
if ep := p.WGEndpoint(); ep != p.EndpointV4 {
|
// Log endpoint changes.
|
||||||
log.Printf("Client %s %s endpoint: %s -> %s", p.Name, p.VPNIP, p.EndpointV4, ep)
|
if ep := p.WGEndpoint(); ep != p.EndpointWG {
|
||||||
p.EndpointV4 = ep
|
log.Printf("Client %s %s endpoint: %s -> %s", p.Name, p.VPNIP, p.EndpointWG, ep)
|
||||||
}
|
p.EndpointWG = ep
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send pings to peers where we're the client.
|
// Send pings to peers where we're the client.
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ type Peer struct {
|
|||||||
EndpointV4 netip.AddrPort // Reported IPv4 endpoint.
|
EndpointV4 netip.AddrPort // Reported IPv4 endpoint.
|
||||||
EndpointV6 netip.AddrPort // Reported IPv6 endpoint.
|
EndpointV6 netip.AddrPort // Reported IPv6 endpoint.
|
||||||
EndpointLAN netip.AddrPort // Discovered via multicast.
|
EndpointLAN netip.AddrPort // Discovered via multicast.
|
||||||
|
EndpointWG netip.AddrPort // Current wireguard port.
|
||||||
RTT time.Duration // Round-trip time.
|
RTT time.Duration // Round-trip time.
|
||||||
State PeerState // Current routing state; updated on each devXxx call.
|
State PeerState // Current routing state; updated on each devXxx call.
|
||||||
Role control.Role // Role in relation to the local application.
|
Role control.Role // Role in relation to the local application.
|
||||||
|
|||||||
Reference in New Issue
Block a user