Files
tun2socks/engine/tun.go
xjasonlyu b1700c62f4 Feature: windows tun more params support
Supported params:

- Name
- MTU
- ComponentID
- Network
2021-02-06 16:20:45 +08:00

16 lines
281 B
Go

// +build !windows
package engine
import (
"net/url"
"github.com/xjasonlyu/tun2socks/device"
"github.com/xjasonlyu/tun2socks/device/tun"
)
func openTUN(u *url.URL, mtu uint32) (device.Device, error) {
name := u.Host
return tun.Open(tun.WithName(name), tun.WithMTU(mtu))
}