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")
|
||||
|
|
|
|||
|
|
@ -266,6 +266,8 @@ func (fm *FileManager) StartSMB(pwd string) error {
|
|||
workgroup = WORKGROUP
|
||||
dos charset = cp866
|
||||
unix charset = utf-8
|
||||
client min protocol = SMB2
|
||||
client max protocol = SMB3
|
||||
|
||||
read raw = yes
|
||||
write raw = yes
|
||||
|
|
@ -275,7 +277,7 @@ use sendfile = true
|
|||
aio read size = 16384
|
||||
aio write size = 16384
|
||||
server signing = no
|
||||
|
||||
|
||||
[linsk]
|
||||
browseable = yes
|
||||
writeable = yes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue