Skip to content
Moses Narrow edited this page Jun 13, 2024 · 46 revisions

Welcome to the Skywire wiki!

Organization


Setup

Software

Hypervisor

VPN

Socks Proxy

Skyfwding

Dmsg

Deployment Services

Skyminer

Android

Other

Old Documentation


Quick Start

Install the latest release of skywire for MacOS or Windows from the release section

For MacOS, select the darwin .pkg for your system architecture

For Windows, select the windows .msi for your architecture

For Linux, it is recommended to install via package ; refer to the Skywire Package Installation guide

Check that skywire has been installed correctly by accessing the help menu

$ skywire --help

	┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐
	└─┐├┴┐└┬┘││││├┬┘├┤
	└─┘┴ ┴ ┴ └┴┘┴┴└─└─┘

Available Commands:
  visor        Skywire Visor
  cli          Command Line Interface for skywire
  svc          Skywire services
  dmsg         Dmsg services & utilities
  app          skywire native applications
  tree         subcommand tree
  doc          generate markdown docs

Flags:
  -v, --version   version for skywire

image

Skywire Overview

Skywire is a Software Defined Network. It separates the Data Plane from the Control Plane of the network. Skywire currently functions as an overlay network that allows nodes to establish routes to each other by PubKey via transports. It can as well establish local networks that function independently of the Internet. There are several prototype applications built that use the Skywire network such as:

The VPN and SOCKS5 proxy servers have their own service discovery type

https://sd.skycoin.com/api/services?type=vpn https://sd.skycoin.com/api/services?type=proxy

In addition to those two service discoveries, there is another service discovery for so-called 'Public Visors'

https://sd.skycoin.com/api/services?type=visor

Skywire Network Architecture - Transports

By default, visors on the skywire network will attempt to connect to public visors. public visors are those which, in addition to running in that mode, have the necessary port exposed to the internet in order for other visors to make a stcp transport to public visors.

When a public visor is run, it should receive many transports without any action taken on the part of the user to manually establish transports

A typical transport tree which can be generated with skywire cli tree is as follows

└─┬02597618444a88fde8f4f25a94aadf38ac0a5f23162665311d9bed55817d800a5d
  ├──02454c5759a63dc8af487bdbe5f0af50a342277ebd0e864183dfe8cfdc80458a3e          e63cfab9-fdec-0b37-b814-f85aab3b56aa stcpr
  ├──03a3a7677ba5301e5fb6b88b1bac520b25c414c1125c78aec46999b1b47a7cc997          17727050-6054-077a-a061-8671fb629e34 stcpr
  ├──0248faddd0bb29a551a7c9b765305cb12788f77bd662e06e44f2e291126e3ddce6          bb058f43-0c88-073d-8f7f-b3f009205c4b stcpr
  ├──0215969f14735698d6129116844c870206839b0a44af8fb87b57d0705c8a57c906          d5f712ac-16d8-06b8-8d59-acf281d54c7a stcpr
  ├──03b2b77e1a6e98aad69dc597101a23999cf1e7b6269de120c05d29f1187bf2e505          77387357-df31-0024-8d41-3a31b42a7592 stcpr
  ├──037f79097d005bf8e538b2d230d581f8ce26e7b9996fbbf1d90556bc8d2020b7c0          e02d79ee-f1b7-01de-8185-e2ad1006e34d stcpr
  ├──0381638c8d5843c88bec253ce0152ccbc8bbc31cf539235b0b85ada813d2323976          ac27e59e-e5eb-0a50-82ee-000eacf1b2d0 stcpr
  ├──03395b52f3ef28ef6b270c40ddd0e0afbfd5b96f253884465304f69989c1a70779          7de44e95-e4f7-070d-9a03-010a5449e768 stcpr
  ├──02a02b3e6689e57b93a04b1964073801f6822d321065638ccb2294d651582089b0          d367c41a-2d45-0d54-883d-f38e60becce8 stcpr
  ├─┬03a62aeb98b39e0fef4db87c8a0ad096bd69affe83b371af0f8d6b381e41ca7a64          e37fd810-eaa6-0d13-9004-5d8a73b3ca4c stcpr
  │ └─┬02c2ac178046c6e7cbc0bb2736ac7039d12da4b07cfda4c5448afbfe633c7fff4d        1b66e579-7cf8-042c-bdd3-070b31945e8f dmsg
  │   ├──03f61e0450775174f81e520ad266357ec81057671a5b1259e56941e136e93dc99a      fe05bf63-acd9-0809-8b37-42a4b6dd58a1 dmsg
  │   ├──02aa8d40b27fbace839ae57b291edbe91bab1c66da7958234d866b4453ca385fee      e85c1f88-9a81-03e2-a6c6-3c94656f012f dmsg
  │   ├──02b6a178ef8ea639eb395fa0ea90b1a0adb6d5ccdb4e9b9725e6cab38eae6e76fc      a41a5910-ff14-037f-a250-bf54cd592518 dmsg
  │   ├──02d050197deb1a691bc76dbf6bd9b129131b560d93d4b3c07be6c0eaadabcee1e2      5978d1e1-d3f1-0486-804c-2e74f825ebdb dmsg
  │   ├──031a9965e76698797db16d7e98d509eb6048687ebce31b4f689532e0aff89a5283      0d2d4be6-5239-0703-bce4-4206b5dc54c3 dmsg
  │   └──0393c1e1604f9ff4c96bdb2efee9bd0b20c3a01d55c8cbf8935bdbc7ef55ed0efb      01f5ffbf-af73-04d1-8a43-a0bccfd257d9 dmsg
  ├──03a55cf16fe05eb7806476e1df1ab5e379c1248704c8bf704702e1a81df90427c6          175c3765-9abf-06f0-a16f-410ccc503950 stcpr
  ├──0363deb8beb0765f7b42fdf34ddb9f0d7b572286879f90699f83ed3abb42d384ce          66cc1acb-41f7-0811-84d2-00cee06dbef5 stcpr
  ├──037b7afce8292388c4aa815178b7fda2e15f5786bef2e9efdf320df044275fcfff          9a2b822d-e86a-0d9c-887c-9853dd110636 stcpr
  ├──033192ca729e755417e00dc74f970da14014b9f68341c39b84cf098c0ee44a4f5c          30365622-6a6f-0657-bf72-5d5e13546b1c stcpr
  ├──0312bdd376afab26b5bb91733d967317335bed6a5122f76733480562c50f267fe0          fe3986dc-fad2-0fb4-9ee0-ad1b5803f382 stcpr
  ├──03385193db672b00f243f8a786a9bc0c86ec5daa40e6e7956292faec9b39c0e4a4          b16734ba-9a51-02d9-bc80-a63768766555 stcpr
  ├──03816e897427cebfcee607e5075c2b634daa4cb8ca1879ada28cff951e0f3158b4          48009932-0aa0-0c9e-ad1f-a17f21138bf4 stcpr
  ├──030b894741fbe4e38e3940ff527b3a4a2fed1558e272cf751ca1af194567a53a3c          e319eec9-2c5d-005b-b178-9fec22c77011 stcpr
  ├──03efa49714bde9f59e79d43ba442407509f46e944c554fb7935740ceedb6240837          ad2807fb-ca93-0f7e-a3df-a17209c0a5a7 stcpr
  └──027db16df6622c8ac07bbc3d9f5c447ada07bff58ff9d8049debd11813eb7acd28          4ffded11-1f5e-0ef6-869b-c7618a450919 stcpr


Here is an example output of skywire debug logging which shows the route creation happening automatically when the proxy client is started

[2024-03-04T18:59:21.310422762-06:00] WARN [router]: pk not found in the transports pk="030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197"
[2024-03-04T18:59:21.310529476-06:00] DEBUG [transport_manager]: Initializing TP with ID 4f67c051-5fc9-0b28-a050-2c8a3faff585
[2024-03-04T18:59:21.310711565-06:00] DEBUG [transport_manager]: Dialing transport to 030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197 via dmsg
[2024-03-04T18:59:23.556904291-06:00] DEBUG [tp:030018]: Sent signal to 'mt.transportCh'.
[2024-03-04T18:59:23.557016256-06:00] DEBUG [transport_manager]: saved transport: remote(030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197) type(dmsg) tpID(4f67c051-5fc9-0b28-a050-2c8a3faff585)
[2024-03-04T18:59:23.557069707-06:00] DEBUG [router]: Requesting new routes from 0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c to 030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197
[2024-03-04T18:59:23.557160933-06:00] DEBUG [tp:030018]: Serving. remote_pk=030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197 tp_id=4f67c051-5fc9-0b28-a050-2c8a3faff585 tp_index=1
[2024-03-04T18:59:24.066786893-06:00] DEBUG [router]: Found routes Forward: [[0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c -> 030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197 @ 4f67c051-5fc9-0b28-a050-2c8a3faff585]]. Reverse [[030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197 -> 0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c @ 4f67c051-5fc9-0b28-a050-2c8a3faff585]]
[2024-03-04T18:59:44.533702237-06:00] DEBUG ClientSession.DialStream [dmsgC]: Stream closed on failure. close_error=<nil> dst_addr=0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557:36 error="i/o deadline reached" session=0371ab4bcff7b121f4b91f6856d6740c6f9dc1fe716977850aeb5d84378b300a13
[2024-03-04T18:59:44.533846445-06:00] WARN [router]: failed to dial to setup node: setupPK(0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557) error="i/o deadline reached"
[2024-03-04T18:59:46.039695529-06:00] DEBUG [router]: handling setup request: setupPK(024fbd3997d4260f731b01abcfce60b8967a6d4c6a11d1008812810ea1437ce438)
[2024-03-04T18:59:47.212659767-06:00] DEBUG [router]: ROUTING TABLE CONTENTS: map[1:FWD(keyRtID:1, nxtRtID:1, nxtTpID:4f67c051-5fc9-0b28-a050-2c8a3faff585, rAddr:030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197:3, lAddr:0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c:49153)]
[2024-03-04T18:59:47.212750677-06:00] DEBUG [router]: Save new Routing Rule with ID 1 FWD(keyRtID:1, nxtRtID:1, nxtTpID:4f67c051-5fc9-0b28-a050-2c8a3faff585, rAddr:030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197:3, lAddr:0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c:49153)
[2024-03-04T18:59:47.212801246-06:00] DEBUG [router]: ROUTING TABLE CONTENTS: map[1:FWD(keyRtID:1, nxtRtID:1, nxtTpID:4f67c051-5fc9-0b28-a050-2c8a3faff585, rAddr:030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197:3, lAddr:0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c:49153) 2:REV(keyRtID:2, rAddr:0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c:49153, lAddr:030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197:3)]
[2024-03-04T18:59:47.212840008-06:00] DEBUG [router]: Save new Routing Rule with ID 2 REV(keyRtID:2, rAddr:0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c:49153, lAddr:030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197:3)
[2024-03-04T18:59:47.212883993-06:00] DEBUG [router]: Saving route group rules with desc: rAddr:0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c:49153, lAddr:030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197:3
[2024-03-04T18:59:47.213051855-06:00] DEBUG [RouteGroup rAddr:0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c:49153, lAddr:030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197:3]: Sent handshake via transport 4f67c051-5fc9-0b28-a050-2c8a3faff585
[2024-03-04T18:59:47.999100402-06:00] DEBUG [router]: Created new routes to 030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197 on port 49153
[2024-03-04T18:59:47.999538583-06:00] DEBUG (STDOUT) [proc:skysocks-client:85c26bcd5d604603ba816761eabc12da]: Connected to 030018e835650041bff7827811ffce8c7f8ca58f33d0a21ddfb376f8817923b197
[2024-03-04T18:59:48.000869788-06:00] DEBUG (STDOUT) [proc:skysocks-client:85c26bcd5d604603ba816761eabc12da]: Serving proxy client :1080

as should be apparent, routes are able to make use of transports that might already exist to connect from A to B.

In addition to the public autoconnect, a user may create a transport to any other given visor. The type of transport which may be created depends on if the visor is public, if it is, then stcp transports are an option. If it is connected to the address resolver and UDP is not blocked, a sudph transport is created. In all other instances, a dmsg transport is created.

In addition to the user created transports and the transports created by the autoconnect, there are also transport-setup keys which should present in the default visor config. The keys presented there are given access to request that the visor make a give transport type to another visor, or delete transports. Note: this feature had not at this time been tested.

Skywire routing

Requests for route setup rely on the 'route setup node' which is more or less a visor with a special function. The keys in the setup nodes array in the visor's config are both whitelisted by the visor for incoming route setup requests; as well as being dialed to for outgoing route setup requests. The setup-node is critical to the network, as routes will not work without it.

Skywire Data Plane

The main software module making up the Skywire network is called the skywire-visor.

  • A visor is identified by a unique PubKey.

Data or connections may be encrypted to the visor's public key, which can then be decrypted with the secret key.

The public key of the visor represents a dmsg client. Dmsg clients can connect to each other over the dmsg network, and as such the visor is able to connect to the services directly over dmsghttp when using a dmsghttp-config.

  • A visor acts as a gateway to the Skywire network

Visors can establish transports to other visors and request or provide routes to remote visors over the Skywire network.

  • A visor can host apps and exposes an API for applications to use the network.

Current applications include:

  • vpn server
  • vpn client
  • proxy server
  • proxy client
  • skychat

Skywire Control Plane

The Skywire Control Plane is responsible for establishing routes between Skywire visors. It consists of separate services. The deployment is currently documented in skywire-deployment:

The visors requests routes from the control plane ; the control plane is responsible for:

  • Determining efficient paths through the network and establishing a route by delivering routing rules to the visors along a route.

The control plane, specifically the transport discovery, maintains an overview over the network topology by storing the transports between visors that currently exist in a given network. The record of these transports is not persisted, except locally in transport logs, which are used for reward calculations.

Clone this wiki locally