abstract peer channel (#101)

* abstract peer channel

* remove wip code

* refactor NewServer with Peer updates channel

* add PeersUpdateManager tests

* adding documentation

* using older version of linter

* verbose lint

* skip cache

* setup go version

* extra output

* configure fetch-depth

* exit 0

* skip-build-cache: true

* disabling failure for lint for now

* fix: darwin issue

* enable lint failure

* remove sock file for macOS

* refactor: remove tests interdependence

* fixed linux native iface

Co-authored-by: braginini <bangvalo@gmail.com>
This commit is contained in:
Maycon Santos
2021-08-29 17:48:31 +02:00
committed by GitHub
parent 4f4edf8442
commit a31cbb1f5b
12 changed files with 329 additions and 97 deletions

View File

@@ -31,7 +31,7 @@ func CreateWithKernel(iface string, address string) error {
}
// check if interface exists
l, err := netlink.LinkByName(WgInterfaceDefault)
l, err := netlink.LinkByName(iface)
if err != nil {
switch err.(type) {
case netlink.LinkNotFoundError:
@@ -148,6 +148,7 @@ func Close() error {
return err
}
for _, wgDev := range devList {
// todo check after move the WgPort constant to the client
if wgDev.ListenPort == WgPort {
iface = wgDev.Name
break