mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 01:33:15 +08:00
Feature: windows tun more params support
Supported params: - Name - MTU - ComponentID - Network
This commit is contained in:
15
engine/tun.go
Normal file
15
engine/tun.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// +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))
|
||||
}
|
Reference in New Issue
Block a user