1
0
mirror of https://github.com/fumiama/water.git synced 2026-06-09 04:30:26 +08:00

macOS: Allow to specify a name for the TUN interface (#79)

* macOS: Allow to specify a name for the TUN interface

* Update syscalls_darwin.go

Co-Authored-By: Song Gao <song@gao.io>

* Add missing imports

* Update syscalls_darwin.go

Co-authored-by: Song Gao <song@gao.io>
This commit is contained in:
eycorsican
2020-03-18 04:31:38 +08:00
committed by GitHub
parent fd331bda3f
commit 2b4b6d7c09
2 changed files with 20 additions and 3 deletions

View File

@@ -17,9 +17,11 @@ const (
// Currently it is not possible to set the interface name in macOS.
type PlatformSpecificParams struct {
// Name is the name for the interface to be used.
// e.g. "tap0"
// Only valid if using TunTapOSXDriver.
//
// For TunTapOSXDriver, it should be something like "tap0".
// For SystemDriver, the name should match `utun[0-9]+`, e.g. utun233
Name string
// Driver should be set if an alternative driver is desired
// e.g. TunTapOSXDriver
Driver MacOSDriverProvider