Help us shape the future of Go! Take the 2026 Go Developer Survey

cliptyfs

package
v1.3.102 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Package cliptyfs cmd/skywire-cli/commands/ptyfs/identity_linux.go c4-vis-cli destination parsing + identity loading helpers used by the linux mount path. Gated to linux because the only consumer is mount_linux.go; non-linux builds get stub subcommands that don't need this surface, so leaving these here unguarded would flag as unused on darwin/windows.

Package cliptyfs cmd/skywire-cli/commands/ptyfs/mount_linux.go c4-vis-cli FUSE mount + unmount for the ptyfs subsystem. Maps each FUSE op onto the matching github.com/pkg/sftp call.

Layering: dmsgpty-tcp noise stream → sftp.Client → sftpNode (fs.InodeEmbedder) → hanwen/go-fuse server → kernel.

Scope for v1: rw mount of the remote process's filesystem view as seen by the host's user (no chroot, no per-mount allowlist) — same gating model as the interactive pty subsystem. Symlinks are followed via Readlink; xattrs / fifos / sockets / devices are not exposed (the standard ptyfs feature set; we can extend in a follow-up if a use case shows up).

Package cliptyfs cmd/skywire-cli/commands/ptyfs/ptyfs.go c4-vis-cli `skywire cli pty fs`: mount a peer visor's filesystem over the skywire pty subsystem. Like the sshfs tool, but there is no SSH — the transport is a noise-XK connection keyed to public keys.

Rides the same direct-TCP pty-host entry point as `skywire cli pty shell` (XK noise handshake pinning the server PK, dmsgpty_whitelist gating the client PK), but instead of dispatching the pty subsystem it dispatches the sftp subsystem (SftpURI). The resulting noise- protected stream feeds github.com/pkg/sftp's client, which in turn backs a FUSE mount via github.com/hanwen/go-fuse/v2.

Platform note: FUSE is Linux-only here. On other platforms the `mount` subcommand is registered as a stub that prints a clear "Linux only" error rather than failing to compile; the rest of the command surface (help text, PK parsing) is shared. Helpers that only the linux mount path uses live in identity_linux.go.

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "fs",
	Short: "Mount a peer visor's filesystem over the pty subsystem (sftp + FUSE)",
	Long: `skywire cli pty fs — mount a peer visor's filesystem over the skywire
pty subsystem's sftp channel. Like the sshfs tool, but the transport
is a noise-XK connection keyed to public keys (no SSH).

Same trust model as 'skywire cli pty shell':

  host-key check  -> noise XK pins the server PK from the
                     destination URL
  authorized keys -> dmsgpty whitelist on the server side
  client auth     -> client PK alone, derived from the local visor's
                     SK by default (override with --sk or
                     --visor-key=false)

Linux-only — FUSE is required, and the host process must be allowed
to mount via FUSE (typically by group membership or a passwordless
fusermount).

Examples:
  # Mount a peer's root over its direct-TCP pty-host endpoint
  skywire cli pty fs mount 0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c@1.2.3.4:2022 ~/mnt/peer

  # Unmount (calls fusermount -u internally)
  skywire cli pty fs umount ~/mnt/peer`,
	SilenceErrors:         true,
	SilenceUsage:          true,
	DisableSuggestions:    true,
	DisableFlagsInUseLine: true,
}

RootCmd is `skywire cli pty fs`. Subcommands are registered per platform: mount + umount on Linux, stubs elsewhere (see mount_linux.go / mount_other.go).

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL