default tun name for windows
This commit is contained in:
@ -10,12 +10,19 @@ import (
|
||||
tun_util "github.com/go-gost/x/internal/util/tun"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultTunName = "wintun"
|
||||
)
|
||||
|
||||
func (l *tunListener) createTun() (ifce io.ReadWriteCloser, name string, ip net.IP, err error) {
|
||||
ip, ipNet, err := net.ParseCIDR(l.md.config.Net)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if l.md.config.Name == "" {
|
||||
l.md.config.Name = defaultTunName
|
||||
}
|
||||
ifce, name, err = l.createTunDevice()
|
||||
if err != nil {
|
||||
return
|
||||
|
Reference in New Issue
Block a user