dsnet/report.go

20 lines
305 B
Go
Raw Normal View History

2020-03-04 23:23:32 +01:00
package dsnet
import (
"net"
"github.com/vishvananda/netlink"
"golang.zx2c4.com/wireguard/wgctrl"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
func Up() {
conf := MustLoadDsnetConfig()
dev, err := wgctrl.Device(conf.InterfaceName)
check(err)
report := Report(dev, conf)
report.MustSave()
}