{"record":{"id":"e9e8eb63457bec25","repo":"lima-vm/lima","slug":"unknown-tunnel-type-q","errorCode":null,"errorMessage":"unknown tunnel type: %#q","messagePattern":"unknown tunnel type: %#q","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/limactl/tunnel.go","lineNumber":58,"sourceCode":"\t\tGroupID:           advancedCommand,\n\t}\n\n\ttunnelCmd.Flags().SetInterspersed(false)\n\t// TODO: implement l2tp, ikev2, masque, ...\n\ttunnelCmd.Flags().String(\"type\", \"socks\", \"Tunnel type, currently only \\\"socks\\\" is implemented\")\n\ttunnelCmd.Flags().Int(\"socks-port\", 0, \"SOCKS port, defaults to a random port\")\n\treturn tunnelCmd\n}\n\nfunc tunnelAction(cmd *cobra.Command, args []string) error {\n\tctx := cmd.Context()\n\tflags := cmd.Flags()\n\ttunnelType, err := flags.GetString(\"type\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tunnelType != \"socks\" {\n\t\treturn fmt.Errorf(\"unknown tunnel type: %#q\", tunnelType)\n\t}\n\tport, err := flags.GetInt(\"socks-port\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tif port != 0 && (port < 1024 || port > 65535) {\n\t\treturn fmt.Errorf(\"invalid socks port %d\", port)\n\t}\n\tstdout, stderr := cmd.OutOrStdout(), cmd.ErrOrStderr()\n\tinstName := args[0]\n\tinst, err := store.Inspect(ctx, instName)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\treturn fmt.Errorf(\"instance %#q does not exist, run `limactl create %s` to create a new instance\", instName, instName)\n\t\t}\n\t\treturn err\n\t}\n\tif inst.Status == limatype.StatusStopped {","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/cmd/limactl/tunnel.go#L40-L76","documentation":"Error returned by `limactl tunnel` (tunnelAction in cmd/limactl/tunnel.go:58) when the `--type` flag is set to anything other than \"socks\". Only the SOCKS5 tunnel type is currently implemented (other types such as l2tp/ikev2/masque are TODO). Passing e.g. `--type l2tp` produces `unknown tunnel type: \"l2tp\"`. Fix by using `--type socks` (the default) or omitting the flag.","triggerScenarios":"Running `limactl tunnel --type <value> ...` with any value other than `socks` (e.g. `ssh`, `http`, `tcp`, or a typo like `sock`).","commonSituations":"Assuming other tunnel protocols are supported because the flag exists; copying a command from docs for a different tool; typos in the flag value.","solutions":["Use `--type socks` (the only supported value)","Omit `--type` — it defaults to socks","If a different transport is needed, use SSH port forwarding directly instead of `limactl tunnel`","Check `limactl tunnel --help` for supported values"],"exampleFix":"// before\nlimactl tunnel --type ssh instance\n// after\nlimactl tunnel --type socks instance","handlingStrategy":"validation","validationCode":"if t := cmd.Flags().Lookup(\"type\"); t != nil && t.Value.String() != \"socks\" {\n\treturn fmt.Errorf(\"only --type socks is supported, got %q\", t.Value.String())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only pass `--type socks` or omit the flag","Check `limactl tunnel --help` before scripting","Don't assume flag values from other tunneling tools"],"tags":["cli","tunnel","flags"],"backgroundTag":"unsupported-flag-value","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}