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

cliresolver

package
v1.3.104-alpha1 Latest Latest
Warning

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

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

Documentation

Overview

Package cliresolver cmd/skywire-cli/commands/resolver/ca.go c4-vis-cli

`skywire cli resolver ca {gen|install|uninstall|path|fingerprint}` — local certificate authority lifecycle for the resolver's optional TLS MITM mode.

The CA is a one-per-visitor on-disk keypair, name-constrained to .skynet and .dmsg, used to sign per-host leaf certs the resolver presents to the browser. See pkg/skynetca for the trust model and docs/skynet-tls.md for the install procedure.

`gen`, `path`, and `fingerprint` are pure filesystem operations the visitor can run without root. `install` and `uninstall` touch the system trust store and typically require sudo.

Package cliresolver cmd/skywire-cli/commands/resolver/resolver.go c4-vis-cli

`skywire cli resolver` — surface for the embedded `.dmsg` and `.skynet` resolving SOCKS5 proxies that live inside the visor. Replaces the older `skywire cli visor proxies` tree:

visor proxies set dmsg on        →  resolver up      (or: resolver up --dmsg-only)
visor proxies set skynet off     →  resolver down --skynet-only
visor proxies upstream <k> <a>   →  resolver up --upstream <a>
visor proxies                    →  resolver

Behavior conventions:

  • bare `resolver` prints status (same table as before).
  • `up` and `down` are subcommands, not "on/off" arguments.
  • by default both .dmsg and .skynet are toggled together; the auto-chain (dmsgweb → skynetweb → upstream) is wired up client-side from the single `--upstream` flag.
  • --dmsg-only / --skynet-only narrow the scope when needed.

Package cliresolver cmd/skywire-cli/commands/resolver/route.go c4-vis-cli

`skywire cli resolver route` — per-domain upstreams for the resolving proxies. Both primaries get the same rules, so the answer does not depend on which layer of the dmsgweb → skynetweb chain a request leaves from.

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "resolver",
	Short: "Embedded .dmsg / .skynet resolving SOCKS5 proxies",
	Long: `Status, enable, and disable the visor's embedded resolving
SOCKS5 proxies. Point a browser at 127.0.0.1:4445 (dmsgweb) and the
.dmsg / .skynet domain suffixes are tunneled directly through the
visor; everything else hits the optional upstream SOCKS5.

Without arguments, prints the current state of both resolvers.

Examples:
  skywire cli resolver                                  # status
  skywire cli resolver up                               # both, no upstream
  skywire cli resolver up --upstream 127.0.0.1:1080     # both, chained → skysocks
  skywire cli resolver up --dmsg-only                   # only .dmsg
  skywire cli resolver down                             # both off
`,
	Run: func(cmd *cobra.Command, _ []string) {
		rpcClient, err := clirpc.Client(cmd.Flags())
		if err != nil {
			internal.PrintFatalError(cmd.Flags(), err)
		}
		status, err := rpcClient.EmbeddedProxies()
		if err != nil {
			internal.PrintFatalError(cmd.Flags(), fmt.Errorf("EmbeddedProxies RPC failed: %w", err))
		}
		internal.PrintOutput(cmd.Flags(), status, renderResolverStatus(status))
	},
}

RootCmd is the resolver command tree.

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