Skywire is a node implementation tool designed to provide privacy-focused networking solutions. It enables users to participate in a decentralized network that supports VPNs, SOCKS5 proxies, and hidden website access. The software is built on a robust architecture that emphasizes anonymity and security.
Key Features:
Service Discovery: Automatically finds and connects to VPN and proxy servers across the network.
Multi-Hop Routing: Uses encrypted, anonymous routing to ensure data privacy and avoid traffic analysis.
Encrypted Transports: Establishes secure connections using public key infrastructure for both TCP and UDP protocols.
Daily Rewards: Eligible users earn Skycoin ($SKY) tokens as compensation for contributing to the network.
Audience & Benefit:
Ideal for privacy-conscious individuals, developers testing decentralized applications, and those interested in earning cryptocurrency. Skywire provides a way to enhance online privacy while offering opportunities for passive income through its reward system. It can be installed via winget.
README
Compiling Skywire requires a Golang version of at least 1.16.
Binary Releases for many platforms and architectures are provided if none of the other installation methods are preferred.
Dependencies
Build Deps
golang
golang or go can be installed with your system package manager on most linux distributions. Alternatively, follow the procedure at go.dev/doc/install to install golang.
Basic setup of the go environment is further described here.
git (optional)
musl and kernel-headers-musl or equivalent - for static compilation
goimports-reviser from github.com/incu6us/goimports-reviser/v2
goimports from golang.org/x/tools/cmd/goimports
Testing
Before pushing commits to a pull request, its customary in case of edits to any of the golang source code to run the following:
make format check
make check will run make test as well. To explicitly run tests, use make test.
Compiling
To compile skywire directly from cloned git sources:
git clone https://github.com/skycoin/skywire
cd skywire
#for the latest commits, check out the develop branch
git checkout develop
make build
To compile skywire directly from source archive, first download the latest source archive from the release section with your browser or another utility. Extract it with an archiving utility, enter the directory where the sources were extracted, and run make build-merged or make build-merged-windows.
make build-merged and make build-merged-windows builds a single binary containing all utilities and apps with go build
the skywire binary will populate in the current directory.
Build output:
└──skywire
For more options, run make help.
Config Gen
To run skywire from this point, first generate a config.
./skywire cli config gen -birx
-b --bestproto use the best protocol (dmsg | direct) to connect to the skywire production deployment
-i --ishv create a local hypervisor configuration
-r --regen regenerate a config which may already exist, retaining the keys
-x --retainhv retain any remote hypervisors which are set in the config
More options for configuration are displayed with ./skywire cli config gen -all.
In order to expose the hypervisor UI, generate a config file with --is-hypervisor or -i flag:
skywire cli config gen -i
Docker container will create config automatically for you. To run it manually:
docker run --rm -v :/opt/skywire \
skycoin/skywire:test skywire cli config gen -i
After starting up the visor, the UI will be exposed by default on localhost:8000.
Add remote hypervisor
Every visor can be controlled by one or more hypervisors. To allow a hypervisor to access a visor, the PubKey of the
hypervisor needs to be specified in the configuration file. You can add a remote hypervisor to the config with:
skywire visor hosts apps and is an applications gateway to the Skywire network.
skywire visor requires a valid configuration to be provided.
Note: root permissions are currently required for vpn client and server applications!
Run the visor:
sudo skywire visor -c skywire-config.json
If the default skywire-config.json exists in the current dir, this can be shortened to:
sudo skywire visor
Or from docker image:
# with custom config mounted on docker volume
docker run --rm -p 8000:8000 -v :/opt/skywire --name=skywire skycoin/skywire:test skywire visor -c /opt/skywire/.json
# without custom config (config is automatically generated)
docker run --rm -p 8000:8000 --name=skywire skycoin/skywire:test skywire visor
skywire visor can be run on Windows. The setup requires additional setup steps that are specified
in the docs if not using the windows .msi.
Run from source
Running from source as outlined in this section does not write the config to disk or explicitly compile any binaries. The config is piped from skywire cli stdout to the visor stdin, and all are executed via go run.
git clone https://github.com/skycoin/skywire.git
cd skywire
#for the latest commits, check out the develop branch
git checkout develop
make run-source-merged
Port forwarding over skywire
skywire cli fwd is used to register and connect to http servers over the skywire connection
For example, if the local application you wish to forward is running on port 8080:
skywire cli fwd -p 8080
List forwarded ports:
skywire cli fwd -l
Deregister a port / turn off forwarding:
skywire cli fwd -d 8080
To consume the skyfwd connection (i.e. reverse proxy back to localhost) use skywire cli rev
A different port can be specified to proxy the remote port to:
skywire cli rev -p 8080 -r 8080 -k
List existing connections:
skywire cli rev -l
Remove a configured connection:
skywire cli rev -d
Note: skyfwd is a new feature and could work more robustly. Issues are welcome.
Transport setup
Note: transports should be set up automatically in most cases. The user should not need to do this manually.
A Transport represents a bidirectional line of communication between two Skywire Visors:
Transports are automatically established when a client application connects to a server application.
Their creation is attempted in the following order:
stcpr
sudph
dmsg
Transports can be manually created. Existing suitable transports will be automatically used by client applications when they are started.
To create a transport, first copy the public key of an online visor from the uptime tracker (or service discovery endpoints):
https://ut.skywire.skycoin.com/uptimes
skywire cli visor tp add -t
View established transports:
skywire cli visor tp ls
Remove a transport:
skywire cli visor tp rm
Routing Rules
In the current era of internet connectivity, certain direct connections between servers in different countries are throttled or may drop intermittently. It is advantageous, in these instances, to establish an indirect or multi-hop route.
Establishing skywire routing rules brings the advantage of an anonymizing overlay to the connection. The intermediate visor handling a certain packet only knows the previous and next hop of that packet. All packets through skywire are of uniform size, stripped of their headers and fuzzed to appear no differently from noise.
disclaimer: this process is pending improvements & revisions!
To create a route, first copy the public key of an online visor from the uptime tracker (or service discovery endpoints):
https://ut.skywire.skycoin.com/uptimes
The main difference between the vpn and the socks5 proxy is that the proxy is configured per application while the vpn wraps the connections for the whole machine.
The socks client usage (from skywire cli) is similar to the vpn, though the skywire cli subcommands and flags do not currently match from the one application to the other. This will be rectified.
031a924f5fb38d26fd8d795a498ae53f14782bc9f036f8ff283c479ac41af95ebd:3 | ID
024fdf44c126e122f09d591c8071a7355d4be9c561f85ea584e8ffe4e1ae8717f7:3 | ID
03ae05142dcf5aad70d1b58ea142476bac49874bfaa67a1369f601e0eb2f5842df:3 | US
0313a76e2c331669a0cb1a3b749930881f9881cca89b59ee52365d1c15141d9d83:3 | AU
03022fa8a0c38d20fae9335ef6aa780f5d762e1e161e607882923dc0d5a890f094:3 | SG
03e4b6326f9df0cff1372f52906a6d1ee03cf972338d532e17470e759362e45c87:3 | ID
0230689d26e5450e8c44faaba91813b7c2b00c1add3ad251e2d62ecca8041a849d:3 | MY
036ae558d5e6c5fc73cb6a329cb0006b4f659ecf9ae69c9e38996dfb65b1fb1c45:3 | ID
03a35c742ed17506834235b2256bb2b0a687de992e5ded52ca4d54fba3b00b8dbe:3 | SG
0259721a9e79e91ce8bc94bad52a6a381d50fcb05aaadc2c99201fd137fb71dfde:3 | CN
...
Select a key and start the proxy with:
skywire cli proxy start --pk
View the status of the proxy:
skywire cli proxy status
Check the ip address of the connection; for example, using curl via the socks5 proxy connection:
The connection may be consumed in a web browser via direct proxy configuration in browsers which support it, or using such extensions as foxyproxy.
The connection may also be consumed in the terminal by setting ALL_PROXY environmental variable, or via the specific method used by a certain application.
Running skywire on eligible hardware can earn rewards in skycoin. Currently, only package-based linux installations are supported for rewards.
Review the mainnet rules article for the details.
Set a reward address:
skywire cli reward
Visors meeting uptime and eligability requirements will recieve daily skycoin rewards for up to 8 visors per location / ip address.
Linux Packages
Built Debian packages are maintained for skywire, as well as several build variants for archlinux. All packages provide a virtually identical installation, regardless of the distro.
Consider the PKGBUILD as a reference for building and installing skywire on any linux distribution.
Installing skywire-bin from the AUR will install the release binaries provided by the release section of this repository:
yay -S skywire-bin
To build the debian packages using the release binaries:
yay --mflags " -p cc.deb.PKGBUILD " -S skywire-bin
Installing skywire from the AUR will compile binaries using the source archive for the latest version release:
Checkout to a commit you would like to create a release against.
Run go mod vendor and go mod tidy.
Make sure that git status is in clean state. Commit all vendor changes and source code changes.
Uncomment draft: true in .goreleaser.yml if this is a test release.
Create a git tag with desired release version and release name: git tag -a 0.1.0 -m "First release",
where 0.1.0 is release version and First release is release name.
Push the created tag to the repository: git push origin 0.1.0, where 0.1.0 is release version.