tailscale/wgengine/wgcfg
Josh Bleecher Snyder aacb2107ae all: add extra information to serialized endpoints
magicsock.Conn.ParseEndpoint requires a peer's public key,
disco key, and legacy ip/ports in order to do its job.
We currently accomplish that by:

* adding the public key in our wireguard-go fork
* encoding the disco key as magic hostname
* using a bespoke comma-separated encoding

It's a bit messy.

Instead, switch to something simpler: use a json-encoded struct
containing exactly the information we need, in the form we use it.

Our wireguard-go fork still adds the public key to the
address when it passes it to ParseEndpoint, but now the code
compensating for that is just a couple of simple, well-commented lines.
Once this commit is in, we can remove that part of the fork
and remove the compensating code.

Signed-off-by: Josh Bleecher Snyder <josharian@gmail.com>
2021-05-11 15:13:42 -07:00
..
nmcfg all: add extra information to serialized endpoints 2021-05-11 15:13:42 -07:00
clone.go all: add extra information to serialized endpoints 2021-05-11 15:13:42 -07:00
config.go all: add extra information to serialized endpoints 2021-05-11 15:13:42 -07:00
device.go wgengine/wgcfg: return better errors from DeviceConfig, ReconfigDevice 2021-05-06 12:44:22 -07:00
device_test.go all: add extra information to serialized endpoints 2021-05-11 15:13:42 -07:00
parser.go all: add extra information to serialized endpoints 2021-05-11 15:13:42 -07:00
parser_test.go all: add extra information to serialized endpoints 2021-05-11 15:13:42 -07:00
writer.go all: add extra information to serialized endpoints 2021-05-11 15:13:42 -07:00