climdisc

package
v1.3.108 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package climdisc cmd/skywire-cli/commands/mdisc/check.go c4-vis-cli

`skywire cli mdisc check` — deployment health probe for the dmsg-server wss fronts. A browser/wasm visor can ONLY bootstrap over wss (the seed entry carries just AddressWS; WebTransport is a phase-2 trade-up whose ~2-week self-signed cert can't be pinned in advance), so every server that advertises an AddressWS must actually terminate it: correct DNS, valid TLS certificate, and the WebSocket endpoint answering 426 Upgrade Required to a plain HTTP/1.1 GET.

This is the check that would have auto-caught the 2026-07-30 breakage where three servers advertised wss fronts that didn't serve: two with stale DNS pointing at a decommissioned shared proxy (dead :443) and one with a failed cert issuance — all masked, before the carrier-capability fix, as futile `dial tcp` errors on the client. Runs anywhere with clearnet https (CI included): the server list comes from the discovery's /all_servers endpoint and each probe is a plain HTTPS request.

Package climdisc cmd/skywire-cli/commands/mdisc/root.go c4-vis-cli

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "mdisc",
	Short: "Query DMSG Discovery",
	Long: `Query DMSG Discovery.

The bare command lists the dmsg clients registered in discovery (add
--stats for just a count). Subcommands:
  entry <pk>   fetch one registered entry (client or server)
  servers      list dmsg servers by load (connected~ / avail-sess)
  check        probe every server's advertised wss front (DNS/TLS/426)

--url points at an alternative discovery and applies to every subcommand.`,
	Run: func(cmd *cobra.Command, _ []string) {

		dmsgFullURL := mdURL + "/dmsg-discovery/entries"

		dmsgclientkeys := clirpc.FetchCachedServiceURL(cmd.Flags(), cacheFile(cacheDirDMSGD, dmsgFullURL), dmsgFullURL, cacheFilesAge)
		if isStats {
			stats, _ := script.Echo(dmsgclientkeys).JQ(".[]").CountLines()
			internal.PrintOutput(cmd.Flags(), fmt.Sprintf("%d dmsg clients\n", stats), fmt.Sprintf("%d dmsg clients\n", stats))
			return
		}
		internal.PrintPipe(cmd.Flags(), script.Echo(dmsgclientkeys).JQ(".[]").Replace("\"", "").Freq().Column(2))
	},
}

RootCmd is the command that contains sub-commands which interacts with DMSG services.

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