conn: make binds replacable
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
c69481f1b3
commit
a4f8e83d5d
16 changed files with 160 additions and 149 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"golang.zx2c4.com/wireguard/conn"
|
||||
"golang.zx2c4.com/wireguard/device"
|
||||
"golang.zx2c4.com/wireguard/ipc"
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ func main() {
|
|||
os.Exit(ExitSetupFailed)
|
||||
}
|
||||
|
||||
device := device.NewDevice(tun, logger)
|
||||
device := device.NewDevice(tun, conn.NewDefaultBind(), logger)
|
||||
err = device.Up()
|
||||
if err != nil {
|
||||
logger.Errorf("Failed to bring up device: %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue