@ -2400,6 +2400,7 @@ func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) {
ep := & endpoint {
ep := & endpoint {
c : c ,
c : c ,
publicKey : n . Key ,
publicKey : n . Key ,
publicKeyHex : n . Key . UntypedHexString ( ) ,
sentPing : map [ stun . TxID ] sentPing { } ,
sentPing : map [ stun . TxID ] sentPing { } ,
endpointState : map [ netip . AddrPort ] * endpointState { } ,
endpointState : map [ netip . AddrPort ] * endpointState { } ,
heartbeatDisabled : heartbeatDisabled ,
heartbeatDisabled : heartbeatDisabled ,
@ -3314,6 +3315,7 @@ type endpoint struct {
// These fields are initialized once and never modified.
// These fields are initialized once and never modified.
c * Conn
c * Conn
publicKey key . NodePublic // peer public key (for WireGuard + DERP)
publicKey key . NodePublic // peer public key (for WireGuard + DERP)
publicKeyHex string // cached output of publicKey.UntypedHexString
fakeWGAddr netip . AddrPort // the UDP address we tell wireguard-go we're using
fakeWGAddr netip . AddrPort // the UDP address we tell wireguard-go we're using
// mu protects all following fields.
// mu protects all following fields.
@ -3496,7 +3498,7 @@ func (de *endpoint) String() string {
func ( de * endpoint ) ClearSrc ( ) { }
func ( de * endpoint ) ClearSrc ( ) { }
func ( de * endpoint ) SrcToString ( ) string { panic ( "unused" ) } // unused by wireguard-go
func ( de * endpoint ) SrcToString ( ) string { panic ( "unused" ) } // unused by wireguard-go
func ( de * endpoint ) SrcIP ( ) netip . Addr { panic ( "unused" ) } // unused by wireguard-go
func ( de * endpoint ) SrcIP ( ) netip . Addr { panic ( "unused" ) } // unused by wireguard-go
func ( de * endpoint ) DstToString ( ) string { return de . publicKey . Untyped HexString( ) }
func ( de * endpoint ) DstToString ( ) string { return de . publicKey Hex }
func ( de * endpoint ) DstIP ( ) netip . Addr { panic ( "unused" ) }
func ( de * endpoint ) DstIP ( ) netip . Addr { panic ( "unused" ) }
func ( de * endpoint ) DstToBytes ( ) [ ] byte { return packIPPort ( de . fakeWGAddr ) }
func ( de * endpoint ) DstToBytes ( ) [ ] byte { return packIPPort ( de . fakeWGAddr ) }