Initial AFP support implementation
This commit is contained in:
parent
73a7d2cd18
commit
7ba79ff803
7 changed files with 100 additions and 15 deletions
|
|
@ -7,16 +7,12 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
|
||||
"log/slog"
|
||||
|
||||
"github.com/AlexSSD7/linsk/vm"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const smbPort = 445
|
||||
|
||||
// TODO: Test SMB backend on macOS.
|
||||
|
||||
type SMBBackend struct {
|
||||
listenIP net.IP
|
||||
sharePort *uint16
|
||||
|
|
@ -63,8 +59,6 @@ func (b *SMBBackend) Apply(ctx context.Context, sharePWD string, vc *VMShareCont
|
|||
return "", errors.Wrap(err, "start smb server")
|
||||
}
|
||||
|
||||
slog.Info("Started the network share successfully", "type", "smb", "ext", vc.NetTapCtx != nil)
|
||||
|
||||
var shareURL string
|
||||
if b.sharePort != nil {
|
||||
shareURL = "smb://" + net.JoinHostPort(b.listenIP.String(), fmt.Sprint(*b.sharePort)) + "/linsk"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue