You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We call ip route get 1.1.1.1 and then parse the returned output to extract interface name and IP1.
This has all sorts of funny edge cases and brittleness, so instead we should see if we can use a library2 for this.
We call
ip route get 1.1.1.1
and then parse the returned output to extract interface name and IP1.This has all sorts of funny edge cases and brittleness, so instead we should see if we can use a library2 for this.
Found a blogpost for this exact case:
https://engineering.qubecinema.com/2019/05/13/go-routing-package.html
Footnotes
https://github.com/nais/device/blob/master/pkg/wireguard/iptables.go#L11 ↩
https://pkg.go.dev/github.com/google/gopacket/routing?utm_source=godoc ↩
The text was updated successfully, but these errors were encountered: