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
|
var shareURL string
|
||||||
if b.sharePort != nil {
|
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 {
|
} else if vc.NetTapCtx != nil {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
shareURL = `\\` + strings.ReplaceAll(vc.NetTapCtx.Net.GuestIP.String(), ":", "-") + ".ipv6-literal.net" + `\linsk`
|
shareURL = `\\` + strings.ReplaceAll(vc.NetTapCtx.Net.GuestIP.String(), ":", "-") + ".ipv6-literal.net" + `\linsk`
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
return "", fmt.Errorf("no port forwarding and net tap configured")
|
return "", fmt.Errorf("no port forwarding and net tap configured")
|
||||||
|
|
|
||||||
|
|
@ -266,6 +266,8 @@ func (fm *FileManager) StartSMB(pwd string) error {
|
||||||
workgroup = WORKGROUP
|
workgroup = WORKGROUP
|
||||||
dos charset = cp866
|
dos charset = cp866
|
||||||
unix charset = utf-8
|
unix charset = utf-8
|
||||||
|
client min protocol = SMB2
|
||||||
|
client max protocol = SMB3
|
||||||
|
|
||||||
read raw = yes
|
read raw = yes
|
||||||
write raw = yes
|
write raw = yes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue