Add OpenBSD tun driver support
This commit is contained in:
parent
794e494802
commit
d6b694e161
6 changed files with 411 additions and 36 deletions
|
|
@ -154,7 +154,7 @@ func CreateTUN(name string) (TUNDevice, error) {
|
|||
tun, err := CreateTUNFromFile(os.NewFile(uintptr(fd), ""))
|
||||
|
||||
if err == nil && name == "utun" {
|
||||
fname := os.Getenv("WG_DARWIN_UTUN_NAME_FILE")
|
||||
fname := os.Getenv("WG_TUN_NAME_FILE")
|
||||
if fname != "" {
|
||||
ioutil.WriteFile(fname, []byte(tun.(*NativeTun).name+"\n"), 0400)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue