mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 09:16:58 +08:00
16 lines
281 B
Go
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))
|
|
}
|