forked from WireGuard/wireguard-go
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tun: add tun support (experimental) (#79)
* tun: add tun support (linux) * tun: windows support (experimental) Signed-off-by: Mark Pashmfouroush <[email protected]>
- Loading branch information
Showing
11 changed files
with
452 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//go:build !windows | ||
|
||
package app | ||
|
||
import ( | ||
"github.com/bepass-org/warp-plus/wireguard/device" | ||
wgtun "github.com/bepass-org/warp-plus/wireguard/tun" | ||
) | ||
|
||
func newNormalTun() (wgtun.Device, error) { | ||
tunDev, err := wgtun.CreateTUN("warp0", 1280) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return tunDev, nil | ||
|
||
} | ||
|
||
func bindToIface(_ *device.Device) error { | ||
return nil | ||
} |
Oops, something went wrong.