Files
devvm/internal/msg/docs.go
T
w3cjandClaude Opus 5.5 6f597d7e1f feat(docker): ssh, ports and agent forwarding over docker exec
Docker VMs get ssh for editors, listed ports, every port, agent
forwarding and agent toggling, all over one transport: devvm's ssh
config reaches a VM through `devvm _docker-connect`, which runs
`sshd -i` in the labelled container by ID with docker exec. The
container publishes nothing and runs no listening sshd.

- internal/backend/vmssh: VM keys, host-key parsing, the port
  forwarder and its processes, shared by smolvm and docker
- `devvm _docker-ports`: every port, or the listed ones; ports a host
  program has are skipped (ports_taken)
- the agent goes only to ssh sessions (ForwardAgent, IdentityAgent);
  no socket is mounted
- --clone on Docker, its clone in a per-VM volume
- platform.ListenExclusive keeps SO_REUSEADDR on Linux; UsedPorts
  leaves out the VM's own listed ports
- messages: vm_no_ssh, vm_no_sshd, ports_no_ssh, ports_forward_failed,
  forwarder_failed, docker_ssh_path, docker_connect_failed
- reviewed: design notes and threat check in design.md; e2e checks for
  a hostile sshd config, host ports kept on every address family, and
  ports not forwarded off loopback or listed by another VM

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 10:33:41 -06:00

202 lines
11 KiB
Go

package msg
// docs links messages to the docs page that says more: message ID to
// "page#anchor", a page in docs/content/docs and a heading on it. devvm
// prints the page's address on the line after the message's text.
// TestDocLinks checks every entry.
var docs = map[string]string{ //nolint:gosec // message IDs and pages, not credentials
"backend_lacks": "backends#missing-and-unreviewed-features",
"backend_unreviewed": "backends#missing-and-unreviewed-features",
"backend_unreviewed_used": "testing#unreviewed-emulations",
"backend_unknown": "backends#choosing-a-backend",
"backend_unknown_default": "backends#choosing-a-backend",
"backend_unknown_vm": "backends#choosing-a-backend",
"smolvm_missing": "smolvm#requirements",
"smolvm_missing_fix": "smolvm#requirements",
"smolvm_broken": "smolvm#requirements",
"smolvm_broken_fix": "smolvm#requirements",
"smolvm_old": "smolvm#requirements",
"smolvm_old_fix": "smolvm#requirements",
"smolvm_host_unsupported": "smolvm#requirements",
"smolvm_machine_foreign": "smolvm#its-machines",
"smolvm_from_registry_only": "smolvm#building-images",
"smolvm_mount_colon": "smolvm#what-devvm-sets-on-a-vm",
"smolvm_too_many_ports": "smolvm#what-devvm-sets-on-a-vm",
"smolvm_no_agent": "smolvm#ssh-agent-forwarding",
"agent_fixed": "smolvm#ssh-agent-forwarding",
"agent_unchosen_stop": "smolvm#ssh-agent-forwarding",
"ports_no_ssh": "images#ports",
"ports_forward_failed": "images#ports",
"smolvm_port_ssh": "smolvm#ssh-for-editors",
"vm_no_ssh": "ssh#ssh-access-by-name",
"vm_no_sshd": "ssh#ssh-access-by-name",
"smolvm_ssh_port_forwarded": "smolvm#ssh-for-editors",
"smolvm_script_failed": "smolvm#looking-inside",
"docker_host_unsupported": "docker#requirements",
"docker_not_installed": "docker#requirements",
"docker_down": "docker#requirements",
"docker_access": "docker#requirements",
"docker_old": "docker#requirements",
"docker_not_linux": "docker#requirements",
"docker_arch": "docker#requirements",
"docker_engine_other": "docker#building-images",
"docker_not_shared": "docker#what-devvm-sets-on-a-vm",
"docker_mount_path": "docker#what-devvm-sets-on-a-vm",
"docker_ssh_path": "docker#ssh-for-editors",
"docker_connect_failed": "docker#ssh-for-editors",
"docker_container_foreign": "docker#whats-devvms-in-docker",
"docker_volume_foreign": "docker#whats-devvms-in-docker",
"docker_script_failed": "docker#building-images",
"docker_remaking": "docker#changing-what-docker-fixes",
"docker_tools_failed": "docker#shared-tools",
"disk_over": "docker#what-devvm-sets-on-a-vm",
"size_disk_default_unused": "docker#what-it-has",
"lima_missing": "lima#requirements",
"lima_broken": "lima#requirements",
"lima_old": "lima#requirements",
"lima_host_unsupported": "lima#requirements",
"qemu_missing": "lima#requirements",
"lima_missing_fix": "lima#requirements",
"lima_broken_fix": "lima#requirements",
"lima_old_fix": "lima#requirements",
"qemu_missing_fix": "lima#requirements",
"lima_arch_unsupported": "lima#requirements",
"macos_old": "lima#requirements",
"no_kvm": "lima#requirements",
"kvm_access": "lima#requirements", "lima_global_config": "lima#a-lima-home-of-its-own",
"vm_has_networks": "lima#a-lima-home-of-its-own",
"lima_home_too_long": "lima#limits",
"mount_comma": "lima#limits",
"disk_shrink": "lima#limits",
"image_in_use": "lima#clones-and-overlays",
"qemu_refused": "lima#confinement",
"start_no_ssh": "lima#limits",
"no_ubuntu_image": "images#ubuntus-cloud-image",
"ubuntu_bad_signature": "images#ubuntus-cloud-image",
"ubuntu_unsigned": "images#ubuntus-cloud-image",
"unknown_layer": "images#layers",
"layer_name_invalid": "customizing#your-own-layers",
"layer_name_reserved": "customizing#your-own-layers",
"layer_created": "customizing#your-own-layers",
"base_features": "customizing#choosing-features",
"base_features_none": "customizing#choosing-features",
"unknown_feature": "customizing#choosing-features", "feature_shadowed": "customizing#your-own-features",
"script_failed": "images#build-logs-and-interrupts",
"rebuild_replaces": "images#rebuilding",
"vm_outdated": "images#outdated-vms",
"bad_path": "lima#limits",
"vm_name_no_room": "backends#vm-names",
"vm_other_folder": "commands#a-folder-made-again",
"vm_other_folder_rm": "commands#a-folder-made-again",
"vm_other_folder_adopt": "commands#a-folder-made-again",
"vm_unfinished": "commands#an-existing-vm",
"no_terminal_confirm": "commands#adding-to-a-vm",
"add_layer_failed": "commands#adding-to-a-vm",
"size_next_start": "commands#an-existing-vm",
"ports_next_start": "commands#an-existing-vm",
"rm_export_failed": "coding-agents#history",
"history_not_exported": "coding-agents#history",
"git_replaced": "git-protection#on-each-launch",
"git_appeared": "git-protection#on-each-launch",
"git_embedded_new": "git-protection#on-each-launch",
"git_hooks_unlocked": "git-protection#on-each-launch",
"unsafe_folder": "security#only-the-project-folder",
"unsafe_folder_inside": "security#only-the-project-folder",
"cpus_not_number": "commands#size-and-ports",
"size_not_gib": "commands#size-and-ports",
"too_many_cpus": "commands#size-and-ports",
"too_much_memory": "commands#size-and-ports",
"port_invalid": "commands#size-and-ports",
"ports_list_needed": "images#ports",
"ports_rm_all": "images#ports",
"ports_taken": "images#ports",
"no_image_for": "images#which-image-a-new-vm-gets",
"net_direct_route": "network#the-self-check",
"net_unenforced_stop": "network#the-self-check",
"net_unenforced": "network#the-self-check",
"net_off_log": "network#turning-it-on-or-off",
"net_off_policy": "network#turning-it-on-or-off",
"net_flag_ignored": "network#turning-it-on-or-off",
"net_on_old_tokens": "network#turning-it-on-or-off",
"net_off_next_start": "network#turning-it-on-or-off",
"not_a_rule": "network#rules",
"proxy_start_failed": "network#the-proxy",
"proxy_port_taken": "network#the-proxy",
"net_proxy_down_stopped": "network#the-proxy",
"no_secret": "network#secrets",
"codex_login_kept": "network#agents-logins-and-settings",
"opencode_login_kept": "network#agents-logins-and-settings",
"setid_files": "security#what-it-doesnt-protect",
"git_protect_needs_macos_new": "git-protection#linux-hosts",
"git_protect_on_needs_macos": "git-protection#linux-hosts",
"git_protect_running": "git-protection#turning-it-on-or-off",
"git_unlocked": "git-protection#turning-it-on-or-off",
"git_protect_flag_ignored": "git-protection#turning-it-on-or-off",
"git_locked_strict": "git-protection#strict",
"git_config_failed": "git-protection#strict",
"git_commondir": "git-protection#what-a-lock-cant-stop",
"git_worktree_stray": "git-protection#what-a-lock-cant-stop",
"git_not_locked": "git-protection#whats-locked",
"git_lock_raced": "git-protection#whats-locked",
"git_hooks_path": "git-protection#not-covered",
"git_include_inside": "git-protection#not-covered",
"git_hook_link_inside": "git-protection#not-covered",
"git_gitdir_outside": "git-protection#not-covered",
"ssh_remote_hint": "ssh#agent-forwarding",
"agent_on_risk": "ssh#agent-forwarding",
"agent_devvm_risk": "ssh#devvms-own-agent",
"agent_no_keys": "ssh#devvms-own-agent",
"agent_key_changed": "ssh#devvms-own-agent",
"agent_key_unpinned": "ssh#devvms-own-agent",
"agent_key_no_fingerprint": "ssh#devvms-own-agent",
"agent_key_mounted": "ssh#devvms-own-agent",
"agent_lifetime_invalid": "ssh#devvms-own-agent",
"agent_confirm_needs_askpass": "ssh#devvms-own-agent",
"ssh_include_yourself": "ssh#ssh-access-by-name",
"no_code_command": "ssh#devvm-ssh-and-devvm-code",
"clone_not_top": "clone#requirements",
"clone_no_commits": "clone#requirements",
"clone_detached": "clone#requirements",
"clone_needs_new_vm": "clone#requirements",
"remotes_taken": "clone#the-remote",
"fetch_until": "clone#the-remote",
"no_terminal_fetch": "clone#deleting-the-vm",
"saved_names_taken": "clone#deleting-the-vm",
"remote_kept": "clone#deleting-the-vm",
"no_terminal_delete": "clone#deleting-the-vm",
"tools_need_resolve": "images#versions",
"mise_checksum": "images#versions",
"tool_stepped_back": "images#versions",
"tool_no_download": "images#versions",
"tools_check_failed": "images#versions",
"newer_tools": "images#versions",
"tool_unbuilt": "images#building-tools",
"tool_bad_output": "images#building-tools",
"share_lock_held": "images#building-tools",
"tools_not_images": "images#building-tools",
"custom_layer_remove": "images#adding-and-removing-tools",
"agent_dir_comma": "lima#limits",
"agent_dirs_added": "coding-agents#mounts",
"agent_dirs_removed": "coding-agents#mounts",
"no_claude_token": "coding-agents#claude-code-login",
"claude_token_invalid": "coding-agents#claude-code-login",
"no_github_token": "network#secrets",
"not_setup_token": "coding-agents#claude-code-login",
"secret_unuse_copied": "network#secrets",
"keychain_save_failed": "network#secrets",
"login_copy_failed": "network#agents-logins-and-settings",
"config_redacted": "coding-agents#keys-in-settings-files",
"config_not_copied": "coding-agents#keys-in-settings-files",
"claude_mcp_secrets_copied": "coding-agents#mcp-servers",
"bad_from": "from#digests",
"from_unreachable": "from#digests",
"from_cached_unreachable": "from#digests",
"from_not_found": "from#images-only-docker-has",
"from_cached_not_found": "from#images-only-docker-has",
"docker_only": "from#images-only-docker-has",
"docker_image_changed": "from#images-only-docker-has",
"convert_failed": "from#supported-images",
"convert_bad_output": "from#the-image-is-untrusted",
"from_ignored": "from",
}