这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Sources/tart/Commands/Run.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ struct Run: AsyncParsableCommand {
@Option(help: ArgumentHelp("Comma-separated list of CIDRs to allow the traffic to when using Softnet isolation\n(e.g. --net-softnet-allow=192.168.0.0/24)", valueName: "comma-separated CIDRs"))
var netSoftnetAllow: String?

@Flag(help: ArgumentHelp("Disable network interface isolation to enable communication between VMs when using Softnet isolation"))
var netSoftnetDisableIsolation: Bool = false

@Flag(help: ArgumentHelp("Restrict network access to the host-only network"))
var netHost: Bool = false

Expand Down Expand Up @@ -393,6 +396,10 @@ struct Run: AsyncParsableCommand {
extraArguments += ["--allow", netSoftnetAllow]
}

if netSoftnetDisableIsolation {
extraArguments += ["--disable-isolation"]
}

return try Softnet(vmMACAddress: config.macAddress.string, extraArguments: extraArguments)
}

Expand Down