Add tun platform options

This commit is contained in:
世界
2023-02-28 19:02:27 +08:00
parent ed50257735
commit 7834d6bca7
12 changed files with 213 additions and 26 deletions

View File

@@ -31,7 +31,7 @@ func check() error {
return err
}
ctx, cancel := context.WithCancel(context.Background())
_, err = box.New(ctx, options)
_, err = box.New(ctx, options, nil)
cancel()
return err
}

View File

@@ -64,7 +64,7 @@ func create() (*box.Box, context.CancelFunc, error) {
options.Log.DisableColor = true
}
ctx, cancel := context.WithCancel(context.Background())
instance, err := box.New(ctx, options)
instance, err := box.New(ctx, options, nil)
if err != nil {
cancel()
return nil, nil, E.Cause(err, "create service")