skywire
skywire copied to clipboard
Skywire Node implementation
Skywire requires a Golang version of 1.16 or higher.
Skywire
- Skywire
- Build
- Configure Skywire
- Expose hypervisorUI
- Add remote hypervisor
- Run
skywire-visor- Using the Skywire VPN
- Creating a GitHub release
- How to create a GitHub release
Run from source
$ mkdir -p $HOME/go/src/github.com/skycoin && cd $HOME/go/src/github.com/skycoin
$ git clone https://github.com/skycoin/skywire.git
$ cd skywire
$ make run-source
Build
# Clone.
$ git clone https://github.com/skycoin/skywire.git
$ cd skywire
# Build and Install
$ make build; make install
# OR build docker image
$ ./ci_scripts/docker-push.sh -t $(git rev-parse --abbrev-ref HEAD) -b
Skywire can be statically built. For instructions check the docs.
Configure Skywire
Expose hypervisorUI
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, should you want to run it manually, you can do:
$ docker run --rm -v <YOUR_CONFIG_DIR>:/opt/skywire \
skycoin/skywire:test skywire-cli config gen -i
Docker container will create config automatically for you, should you want to run it manually, you can do:
$ docker run --rm -v <YOUR_CONFIG_DIR>:/opt/skywire \
skycoin/skywire:latest skywire-cli visor gen-config --is-hypervisor
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-cli config update --hypervisor-pks <public-key>
If the rpc server is exposed on the local network, or the config has been generated with the --public-rpc flag, the hypervisor public key can be queried over the network with skywire-cli:
$ skywire-cli --rpc <ip-address> visor pk
The previous two commands can be nested:
$ skywire-cli config update --hypervisor-pks $(skywire-cli --rpc <ip-address> visor pk)
Or from docker image:
$ docker run --rm -v <YOUR_CONFIG_DIR>:/opt/skywire \
skycoin/skywire:test skywire-cli config update hypervisor-pks <public-key>
Or from docker image:
$ docker run --rm -v <YOUR_CONFIG_DIR>:/opt/skywire \
skycoin/skywire:latest skywire-cli update-config hypervisor-pks <public-key>
Run skywire-visor
skywire-visor hosts apps and is an applications gateway to the Skywire network.
skywire-visor requires a valid configuration to be provided. If you want to run a VPN client locally, run the visor
as sudo.
$ sudo skywire-visor -c skywire-config.json
Or from docker image:
# with custom config mounted on docker volume
$ docker run --rm -p 8000:8000 -v <YOUR_CONFIG_DIR>:/opt/skywire --name=skywire skycoin/skywire:test skywire-visor -c /opt/skywire/<YOUR_CONFIG_NAME>.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.
Using the Skywire VPN
If you are interested in running the Skywire VPN as either a client or a server, please refer to the following guides:
Creating a GitHub release
To maintain actual skywire-visor state on users' Skywire nodes we have a mechanism for updating skywire-visor
binaries. Binaries for each version are uploaded to GitHub releases. We
use goreleaser for creating them.
How to create a GitHub release
- Make sure that
gitand goreleaser are installed. - Checkout to a commit you would like to create a release against.
- Run
go mod vendorandgo mod tidy. - Make sure that
git statusis in clean state. Commit all vendor changes and source code changes. - Uncomment
draft: truein.goreleaser.ymlif this is a test release. - Create a
gittag with desired release version and release name:git tag -a 0.1.0 -m "First release", where0.1.0is release version andFirst releaseis release name. - Push the created tag to the repository:
git push origin 0.1.0, where0.1.0is release version. - Issue a personal GitHub access token.
- Run
GITHUB_TOKEN=your_token make github-release - Check the created GitHub release.