SMB touchups on macOS
This commit is contained in:
parent
fb6b1ae25e
commit
779401cc45
2 changed files with 5 additions and 3 deletions
|
|
@ -67,12 +67,12 @@ func (b *SMBBackend) Apply(ctx context.Context, sharePWD string, vc *VMShareCont
|
|||
|
||||
var shareURL string
|
||||
if b.sharePort != nil {
|
||||
shareURL = "smb://" + net.JoinHostPort(b.listenIP.String(), fmt.Sprint(*b.sharePort))
|
||||
shareURL = "smb://" + net.JoinHostPort(b.listenIP.String(), fmt.Sprint(*b.sharePort)) + "/linsk"
|
||||
} else if vc.NetTapCtx != nil {
|
||||
if runtime.GOOS == "windows" {
|
||||
shareURL = `\\` + strings.ReplaceAll(vc.NetTapCtx.Net.GuestIP.String(), ":", "-") + ".ipv6-literal.net" + `\linsk`
|
||||
} else {
|
||||
shareURL = "smb://" + net.JoinHostPort(vc.NetTapCtx.Net.GuestIP.String(), fmt.Sprint(smbPort))
|
||||
shareURL = "smb://" + net.JoinHostPort(vc.NetTapCtx.Net.GuestIP.String(), fmt.Sprint(smbPort)) + "/linsk"
|
||||
}
|
||||
} else {
|
||||
return "", fmt.Errorf("no port forwarding and net tap configured")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue