Chore(tun): remove with options

This commit is contained in:
xjasonlyu
2021-10-17 14:12:54 +08:00
parent dc8e4f1ba1
commit bf3f4599cc
4 changed files with 9 additions and 32 deletions

View File

@@ -27,7 +27,7 @@ func parseDevice(s string, mtu uint32) (device.Device, error) {
switch driver {
case tun.Driver:
return tun.Open(tun.WithName(name), tun.WithMTU(mtu))
return tun.Open(name, mtu)
default:
return nil, fmt.Errorf("unsupported driver: %s", driver)
}