mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-10-19 08:07:58 +02:00
Support "tart run"'s --net-softnet-allow and --net-softnet-block (#361)
* Support "tart run"'s --net-softnet-allow and --net-softnet-block * Use ghcr.io/cirruslabs/macos-tahoe-base:latest by default
This commit is contained in:
@@ -336,9 +336,15 @@ func (vm *VM) cloneAndConfigure(ctx context.Context) error {
|
||||
func (vm *VM) run(ctx context.Context) error {
|
||||
var runArgs = []string{"run"}
|
||||
|
||||
if vm.Resource.NetSoftnet {
|
||||
if vm.Resource.NetSoftnetDeprecated || vm.Resource.NetSoftnet {
|
||||
runArgs = append(runArgs, "--net-softnet")
|
||||
}
|
||||
if len(vm.Resource.NetSoftnetAllow) != 0 {
|
||||
runArgs = append(runArgs, "--net-softnet-allow", strings.Join(vm.Resource.NetSoftnetAllow, ","))
|
||||
}
|
||||
if len(vm.Resource.NetSoftnetBlock) != 0 {
|
||||
runArgs = append(runArgs, "--net-softnet-block", strings.Join(vm.Resource.NetSoftnetBlock, ","))
|
||||
}
|
||||
if vm.Resource.NetBridged != "" {
|
||||
runArgs = append(runArgs, fmt.Sprintf("--net-bridged=%s", vm.Resource.NetBridged))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user