From e13ffd27bc5a622c6cc895054ea62f402c37aa13 Mon Sep 17 00:00:00 2001 From: Mohammed <79150699+mrpalide@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:07:55 +0330 Subject: [PATCH] Move to merged binary (#1776) * update skywire-services@develop * improve config and app logic for official apps read from merged binary file * replace skywire-deployment with skywire * initial changes on Makefile * add build-merged-windows to Makefile * add clean stage to build-merged-windows * add .exe extension to merged binary build * update goreleaser configs for one merged binary * remove archlinux goreleaser, useless * update mac_installer * update win installer script --- .goreleaser-archlinux.yml | 344 -- .goreleaser-darwin.yml | 65 +- .goreleaser-linux.yml | 558 +--- .goreleaser-windows.yml | 50 +- Makefile | 20 +- cmd/skywire-cli/commands/config/gen.go | 63 +- cmd/skywire-deployment/README.md | 2974 ----------------- cmd/skywire-deployment/skywire.go | 407 --- cmd/skywire/README.md | 2973 +++++++++++++++- cmd/skywire/skywire.go | 312 +- go.mod | 2 +- go.sum | 2 + pkg/app/launcher/launcher.go | 7 +- pkg/visor/visorconfig/config.go | 18 +- scripts/mac_installer/Distribution.xml | 2 +- scripts/mac_installer/create_installer.sh | 9 +- .../desktop-deinstaller/deinstaller.go | 3 +- .../mac_installer/install_scripts/postinstall | 6 +- .../mac_installer/remove_scripts/postinstall | 1 - .../mac_installer/update_scripts/postinstall | 6 +- .../mac_installer/update_scripts/preinstall | 2 +- scripts/win_installer/Product.wxs | 6 +- scripts/win_installer/script.ps1 | 6 +- scripts/win_installer/skywire.bat | 6 +- .../internal/vpn/tun_device_windows.go | 50 + vendor/modules.txt | 2 +- 26 files changed, 3352 insertions(+), 4542 deletions(-) delete mode 100644 .goreleaser-archlinux.yml delete mode 100644 cmd/skywire-deployment/README.md delete mode 100644 cmd/skywire-deployment/skywire.go create mode 100644 vendor/github.com/skycoin/skywire-services/internal/vpn/tun_device_windows.go diff --git a/.goreleaser-archlinux.yml b/.goreleaser-archlinux.yml deleted file mode 100644 index 189701c1af..0000000000 --- a/.goreleaser-archlinux.yml +++ /dev/null @@ -1,344 +0,0 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com - -release: - # Repo in which the release will be created. - # Default is extracted from the origin remote URL or empty if its private hosted. - # Note: it can only be one: either github or gitlab or gitea - github: - owner: skycoin - name: skywire - - #prerelease: true - -before: - hooks: - - go mod tidy - - sed -i '/go conn.handleCall(msg)/c\conn.handleCall(msg)' ./vendor/github.com/godbus/dbus/v5/conn.go -builds: - - - id: skywire-visor-amd64 - binary: skywire-visor - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=musl-gcc - main: ./cmd/skywire-visor/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-visor-arm64 - binary: skywire-visor - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=aarch64-linux-musl-gcc - main: ./cmd/skywire-visor/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-visor-arm - binary: skywire-visor - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=arm-linux-gnueabihf-musl-gcc - main: ./cmd/skywire-visor/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-cli-amd64 - binary: skywire-cli - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=musl-gcc - main: ./cmd/skywire-cli/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-cli-arm64 - binary: skywire-cli - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=aarch64-linux-musl-gcc - main: ./cmd/skywire-cli/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-cli-arm - binary: skywire-cli - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=arm-linux-gnueabihf-musl-gcc - main: ./cmd/skywire-cli/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skychat-amd64 - binary: apps/skychat - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=musl-gcc - main: ./cmd/apps/skychat/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skychat-arm64 - binary: apps/skychat - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=aarch64-linux-musl-gcc - main: ./cmd/apps/skychat/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skychat-arm - binary: apps/skychat - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=arm-linux-gnueabihf-musl-gcc - main: ./cmd/apps/skychat/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skysocks-amd64 - binary: apps/skysocks - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=musl-gcc - main: ./cmd/apps/skysocks/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-arm64 - binary: apps/skysocks - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=aarch64-linux-musl-gcc - main: ./cmd/apps/skysocks/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skysocks-arm - binary: apps/skysocks - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=arm-linux-gnueabihf-musl-gcc - main: ./cmd/apps/skysocks/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skysocks-client-amd64 - binary: apps/skysocks-client - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=musl-gcc - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-client-arm64 - binary: apps/skysocks-client - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=aarch64-linux-musl-gcc - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skysocks-client-arm - binary: apps/skysocks-client - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=arm-linux-gnueabihf-musl-gcc - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: vpn-server-amd64 - binary: apps/vpn-server - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=musl-gcc - main: ./cmd/apps/vpn-server/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-server-arm64 - binary: apps/vpn-server - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=aarch64-linux-musl-gcc - main: ./cmd/apps/vpn-server/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: vpn-server-arm - binary: apps/vpn-server - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=arm-linux-gnueabihf-musl-gcc - main: ./cmd/apps/vpn-server/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: vpn-client-amd64 - binary: apps/vpn-client - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=musl-gcc - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-client-arm64 - binary: apps/vpn-client - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=aarch64-linux-musl-gcc - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: vpn-client-arm - binary: apps/vpn-client - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=arm-linux-gnueabihf-musl-gcc - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - -archives: - - id: amd64 - format: tar.gz - wrap_in_directory: false - name_template: 'skywire-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' - files: - - dmsghttp-config.json - - services-config.json - builds: - - skywire-visor-amd64 - - skywire-cli-amd64 - - skysocks-amd64 - - skysocks-client-amd64 - - skychat-amd64 - - vpn-server-amd64 - - vpn-client-amd64 - - - id: arm64 - format: tar.gz - wrap_in_directory: false - name_template: 'skywire-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' - files: - - dmsghttp-config.json - - services-config.json - builds: - - skywire-visor-arm64 - - skywire-cli-arm64 - - skysocks-arm64 - - skysocks-client-arm64 - - skychat-arm64 - - vpn-server-arm64 - - vpn-client-arm64 - - - id: arm - format: tar.gz - wrap_in_directory: false - name_template: 'skywire-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' - files: - - dmsghttp-config.json - - services-config.json - builds: - - skywire-visor-arm - - skywire-cli-arm - - skysocks-arm - - skysocks-client-arm - - skychat-arm - - vpn-server-arm - - vpn-client-arm - -checksum: - name_template: 'checksums.txt' -snapshot: - name_template: "{{ .Tag }}-next" -changelog: - sort: asc - filters: - exclude: - - '^docs:' - - '^test:' diff --git a/.goreleaser-darwin.yml b/.goreleaser-darwin.yml index 7f416ca75d..18b364819c 100644 --- a/.goreleaser-darwin.yml +++ b/.goreleaser-darwin.yml @@ -15,8 +15,8 @@ before: hooks: - go mod tidy builds: - - id: skywire-visor - binary: skywire-visor + - id: skywire + binary: skywire goos: - darwin goarch: @@ -24,61 +24,9 @@ builds: - arm64 env: - CGO_ENABLED=1 - main: ./cmd/skywire-visor/ + main: ./cmd/skywire/ ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}} - - id: skywire-cli - binary: skywire-cli - goos: - - darwin - goarch: - - amd64 - - arm64 - env: - - CGO_ENABLED=1 - main: ./cmd/skywire-cli/ - ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skychat - binary: apps/skychat - goos: - - darwin - goarch: - - amd64 - - arm64 - main: ./cmd/apps/skychat/ - ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks - binary: apps/skysocks - goos: - - darwin - goarch: - - amd64 - - arm64 - main: ./cmd/apps/skysocks/ - ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-client - binary: apps/skysocks-client - goos: - - darwin - goarch: - - amd64 - - arm64 - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-client - binary: apps/vpn-client - goos: - - darwin - goarch: - - amd64 - - arm64 - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - archives: - id: archive format: tar.gz @@ -88,12 +36,7 @@ archives: - dmsghttp-config.json - services-config.json builds: - - skywire-visor - - skywire-cli - - skysocks - - skysocks-client - - skychat - - vpn-client + - skywire allow_different_binary_count: true checksum: diff --git a/.goreleaser-linux.yml b/.goreleaser-linux.yml index 1cf6115aeb..f4baf76adf 100644 --- a/.goreleaser-linux.yml +++ b/.goreleaser-linux.yml @@ -17,7 +17,7 @@ before: - sed -i '/go conn.handleCall(msg)/c\conn.handleCall(msg)' ./vendor/github.com/godbus/dbus/v5/conn.go builds: - - id: skywire-deployment-amd64 + - id: skywire-amd64 binary: skywire goos: - linux @@ -26,10 +26,10 @@ builds: env: - CGO_ENABLED=1 - CC=/home/runner/work/skywire/skywire/musl-data/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc - main: ./cmd/skywire-deployment/ + main: ./cmd/skywire/ ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - id: skywire-deployment-arm64 + - id: skywire-arm64 binary: skywire goos: - linux @@ -38,10 +38,10 @@ builds: env: - CGO_ENABLED=1 - CC=/home/runner/work/skywire/skywire/musl-data/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc - main: ./cmd/skywire-deployment/ + main: ./cmd/skywire/ ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - id: skywire-deployment-arm + - id: skywire-arm binary: skywire goos: - linux @@ -52,10 +52,10 @@ builds: env: - CGO_ENABLED=1 - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc - main: ./cmd/skywire-deployment/ + main: ./cmd/skywire/ ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - id: skywire-deployment-armhf + - id: skywire-armhf binary: skywire goos: - linux @@ -66,10 +66,10 @@ builds: env: - CGO_ENABLED=1 - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc - main: ./cmd/skywire-deployment/ + main: ./cmd/skywire/ ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - id: skywire-deployment-riscv64 + - id: skywire-riscv64 binary: skywire goos: - linux @@ -78,457 +78,9 @@ builds: env: - CGO_ENABLED=1 - CC=/home/runner/work/skywire/skywire/musl-data/riscv64-linux-musl-cross/bin/riscv64-linux-musl-gcc - main: ./cmd/skywire-deployment/ + main: ./cmd/skywire/ ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - id: skywire-visor-amd64 - binary: skywire-visor - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc - main: ./cmd/skywire-visor/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-visor-arm64 - binary: skywire-visor - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc - main: ./cmd/skywire-visor/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-visor-arm - binary: skywire-visor - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc - main: ./cmd/skywire-visor/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-visor-armhf - binary: skywire-visor - goos: - - linux - goarch: - - arm - goarm: - - 7 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc - main: ./cmd/skywire-visor/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-visor-riscv64 - binary: skywire-visor - goos: - - linux - goarch: - - riscv64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/riscv64-linux-musl-cross/bin/riscv64-linux-musl-gcc - main: ./cmd/skywire-visor/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-cli-amd64 - binary: skywire-cli - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc - main: ./cmd/skywire-cli/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-cli-arm64 - binary: skywire-cli - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc - main: ./cmd/skywire-cli/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-cli-arm - binary: skywire-cli - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc - main: ./cmd/skywire-cli/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-cli-armhf - binary: skywire-cli - goos: - - linux - goarch: - - arm - goarm: - - 7 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc - main: ./cmd/skywire-cli/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skywire-cli-riscv64 - binary: skywire-cli - goos: - - linux - goarch: - - riscv64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/riscv64-linux-musl-cross/bin/riscv64-linux-musl-gcc - main: ./cmd/skywire-cli/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}} - - - id: skychat-amd64 - binary: apps/skychat - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc - main: ./cmd/apps/skychat/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skychat-arm64 - binary: apps/skychat - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc - main: ./cmd/apps/skychat/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skychat-arm - binary: apps/skychat - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc - main: ./cmd/apps/skychat/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skychat-armhf - binary: apps/skychat - goos: - - linux - goarch: - - arm - goarm: - - 7 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc - main: ./cmd/apps/skychat/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skychat-riscv64 - binary: apps/skychat - goos: - - linux - goarch: - - riscv64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/riscv64-linux-musl-cross/bin/riscv64-linux-musl-gcc - main: ./cmd/apps/skychat/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-amd64 - binary: apps/skysocks - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc - main: ./cmd/apps/skysocks/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-arm64 - binary: apps/skysocks - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc - main: ./cmd/apps/skysocks/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-arm - binary: apps/skysocks - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc - main: ./cmd/apps/skysocks/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-armhf - binary: apps/skysocks - goos: - - linux - goarch: - - arm - goarm: - - 7 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc - main: ./cmd/apps/skysocks/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-riscv64 - binary: apps/skysocks - goos: - - linux - goarch: - - riscv64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/riscv64-linux-musl-cross/bin/riscv64-linux-musl-gcc - main: ./cmd/apps/skysocks/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-client-amd64 - binary: apps/skysocks-client - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-client-arm64 - binary: apps/skysocks-client - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-client-arm - binary: apps/skysocks-client - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-client-armhf - binary: apps/skysocks-client - goos: - - linux - goarch: - - arm - goarm: - - 7 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-client-riscv64 - binary: apps/skysocks-client - goos: - - linux - goarch: - - riscv64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/riscv64-linux-musl-cross/bin/riscv64-linux-musl-gcc - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-server-amd64 - binary: apps/vpn-server - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc - main: ./cmd/apps/vpn-server/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-server-arm64 - binary: apps/vpn-server - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc - main: ./cmd/apps/vpn-server/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-server-arm - binary: apps/vpn-server - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc - main: ./cmd/apps/vpn-server/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-server-armhf - binary: apps/vpn-server - goos: - - linux - goarch: - - arm - goarm: - - 7 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc - main: ./cmd/apps/vpn-server/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-server-riscv64 - binary: apps/vpn-server - goos: - - linux - goarch: - - riscv64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/riscv64-linux-musl-cross/bin/riscv64-linux-musl-gcc - main: ./cmd/apps/vpn-server/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-client-amd64 - binary: apps/vpn-client - goos: - - linux - goarch: - - amd64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-client-arm64 - binary: apps/vpn-client - goos: - - linux - goarch: - - arm64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-client-arm - binary: apps/vpn-client - goos: - - linux - goarch: - - arm - goarm: - - 6 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-client-armhf - binary: apps/vpn-client - goos: - - linux - goarch: - - arm - goarm: - - 7 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-client-riscv64 - binary: apps/vpn-client - goos: - - linux - goarch: - - riscv64 - env: - - CGO_ENABLED=1 - - CC=/home/runner/work/skywire/skywire/musl-data/riscv64-linux-musl-cross/bin/riscv64-linux-musl-gcc - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - archives: - id: amd64 format: tar.gz @@ -538,13 +90,7 @@ archives: - dmsghttp-config.json - services-config.json builds: - - skywire-visor-amd64 - - skywire-cli-amd64 - - skysocks-amd64 - - skysocks-client-amd64 - - skychat-amd64 - - vpn-server-amd64 - - vpn-client-amd64 + - skywire-amd64 - id: arm64 format: tar.gz @@ -554,13 +100,7 @@ archives: - dmsghttp-config.json - services-config.json builds: - - skywire-visor-arm64 - - skywire-cli-arm64 - - skysocks-arm64 - - skysocks-client-arm64 - - skychat-arm64 - - vpn-server-arm64 - - vpn-client-arm64 + - skywire-arm64 - id: arm format: tar.gz @@ -570,13 +110,7 @@ archives: - dmsghttp-config.json - services-config.json builds: - - skywire-visor-arm - - skywire-cli-arm - - skysocks-arm - - skysocks-client-arm - - skychat-arm - - vpn-server-arm - - vpn-client-arm + - skywire-arm - id: armhf format: tar.gz @@ -586,13 +120,7 @@ archives: - dmsghttp-config.json - services-config.json builds: - - skywire-visor-armhf - - skywire-cli-armhf - - skysocks-armhf - - skysocks-client-armhf - - skychat-armhf - - vpn-server-armhf - - vpn-client-armhf + - skywire-armhf - id: riscv64 format: tar.gz @@ -602,63 +130,7 @@ archives: - dmsghttp-config.json - services-config.json builds: - - skywire-visor-riscv64 - - skywire-cli-riscv64 - - skysocks-riscv64 - - skysocks-client-riscv64 - - skychat-riscv64 - - vpn-server-riscv64 - - vpn-client-riscv64 - - - id: deployment-amd64 - format: tar.gz - wrap_in_directory: false - name_template: 'skywire-deployment-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' - files: - - dmsghttp-config.json - - services-config.json - builds: - - skywire-deployment-amd64 - - - id: deployment-arm64 - format: tar.gz - wrap_in_directory: false - name_template: 'skywire-deployment-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' - files: - - dmsghttp-config.json - - services-config.json - builds: - - skywire-deployment-arm64 - - - id: deployment-arm - format: tar.gz - wrap_in_directory: false - name_template: 'skywire-deployment-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' - files: - - dmsghttp-config.json - - services-config.json - builds: - - skywire-deployment-arm - - - id: deployment-armhf - format: tar.gz - wrap_in_directory: false - name_template: 'skywire-deployment-v{{ .Version }}-{{ .Os }}-{{ .Arch }}hf' - files: - - dmsghttp-config.json - - services-config.json - builds: - - skywire-deployment-armhf - - - id: deployment-riscv64 - format: tar.gz - wrap_in_directory: false - name_template: 'skywire-deployment-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' - files: - - dmsghttp-config.json - - services-config.json - builds: - - skywire-deployment-riscv64 + - skywire-riscv64 checksum: name_template: 'checksums.txt' diff --git a/.goreleaser-windows.yml b/.goreleaser-windows.yml index 0aa0a2882c..ce28a9cfe3 100644 --- a/.goreleaser-windows.yml +++ b/.goreleaser-windows.yml @@ -15,8 +15,8 @@ before: hooks: - go mod tidy builds: - - id: skywire-visor - binary: skywire-visor + - id: skywire + binary: skywire goos: - windows goarch: @@ -24,46 +24,8 @@ builds: - 386 env: - CGO_ENABLED=1 - main: ./cmd/skywire-visor/ + main: ./cmd/skywire/ ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}} - - - id: skywire-cli - binary: skywire-cli - goos: - - windows - goarch: - - amd64 - - 386 - env: - - CGO_ENABLED=0 - main: ./cmd/skywire-cli/ - ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: vpn-client - binary: apps/vpn-client - goos: - - windows - goarch: - - amd64 - - 386 - env: - - CGO_ENABLED=0 - main: ./cmd/apps/vpn-client/ - ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks-client - binary: apps/skysocks-client - goos: - - windows - goarch: - - amd64 - - 386 - env: - - CGO_ENABLED=0 - main: ./cmd/apps/skysocks-client/ - ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} - - - id: skysocks binary: apps/skysocks goos: - windows @@ -85,11 +47,7 @@ archives: - dmsghttp-config.json - services-config.json builds: - - skywire-visor - - skywire-cli - - vpn-client - - skysocks-client - - skysocks + - skywire allow_different_binary_count: true checksum: diff --git a/Makefile b/Makefile index 4bdc2629f9..7ff47b5049 100644 --- a/Makefile +++ b/Makefile @@ -102,15 +102,15 @@ check: lint check-cg test ## Run linters and tests check-cg: ## Cursory check of the main help menu, offline dmsghttp config gen and offline config gen @echo "checking help menu for compilation without errors" @echo - go run cmd/skywire-deployment/skywire.go --help + go run cmd/skywire/skywire.go --help @echo @echo "checking dmsghttp offline config gen" @echo - go run cmd/skywire-deployment/skywire.go cli config gen --nofetch -dnw + go run cmd/skywire/skywire.go cli config gen --nofetch -dnw @echo @echo "checking offline config gen" @echo - go run cmd/skywire-deployment/skywire.go cli config gen --nofetch -nw + go run cmd/skywire/skywire.go cli config gen --nofetch -nw @echo @echo "config gen succeeded without error" @echo @@ -121,8 +121,10 @@ check-windows: lint-windows test-windows ## Run linters and tests on windows ima build: host-apps bin ## Install dependencies, build apps and binaries. `go build` with ${OPTS} build-merged: ## Install dependencies, build apps and binaries. `go build` with ${OPTS} - ${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH)skywire ./cmd/skywire-deployment + ${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH)skywire ./cmd/skywire +build-merged-windows: clean-windows + powershell '${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH)skywire.exe ./cmd/skywire' build-windows: host-apps-windows bin-windows ## Install dependencies, build apps and binaries. `go build` with ${OPTS} @@ -177,9 +179,9 @@ test: ## Run tests -go clean -testcache &>/dev/null ${OPTS} go test ${TEST_OPTS} ./internal/... ./pkg/... ./cmd/... ${OPTS} go test ${TEST_OPTS} - go run cmd/skywire-deployment/skywire.go --help - go run cmd/skywire-deployment/skywire.go cli config gen -dnw - go run cmd/skywire-deployment/skywire.go cli config gen --nofetch -nw + go run cmd/skywire/skywire.go --help + go run cmd/skywire/skywire.go cli config gen -dnw + go run cmd/skywire/skywire.go cli config gen --nofetch -nw test-windows: ## Run tests on windows @go clean -testcache @@ -246,7 +248,7 @@ host-apps-race: ## Build app bin: fix-systray-vendor bin-fix unfix-systray-vendor bin-fix: ## Build `skywire-visor`, `skywire-cli` - ${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH) ./cmd/skywire-visor ./cmd/skywire-cli ./cmd/setup-node ./cmd/skywire-deployment + ${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH) ./cmd/skywire-visor ./cmd/skywire-cli ./cmd/setup-node ./cmd/skywire fix-systray-vendor: @if [ $(UNAME_S) = "Linux" ]; then\ @@ -360,7 +362,7 @@ run-source: prepare ## Run skywire from source, without compiling binaries go run ./cmd/skywire-cli/skywire-cli.go config gen -in | sudo go run ./cmd/skywire-visor/skywire-visor.go -n || true run-source-merged: prepare1 ## Run skywire from source, without compiling binaries - go run ./cmd/skywire-deployment/skywire.go cli config gen -in | sudo go run ./cmd/skywire-deployment/skywire.go visor -n || true + go run ./cmd/skywire/skywire.go cli config gen -in | sudo go run ./cmd/skywire/skywire.go visor -n || true run-systray: prepare ## Run skywire from source, with vpn server enabled go run ./cmd/skywire-cli/skywire-cli.go config gen -ni | sudo go run ./cmd/skywire-visor/skywire-visor.go -n --systray || true diff --git a/cmd/skywire-cli/commands/config/gen.go b/cmd/skywire-cli/commands/config/gen.go index e411ae58b4..21e0974586 100644 --- a/cmd/skywire-cli/commands/config/gen.go +++ b/cmd/skywire-cli/commands/config/gen.go @@ -848,84 +848,41 @@ var genConfigCmd = &cobra.Command{ conf.Launcher.Apps = []appserver.AppConfig{ { Name: visorconfig.VPNClientName, - Binary: visorconfig.VPNClientName, + Binary: "skywire", AutoStart: false, Port: routing.Port(skyenv.VPNClientPort), - Args: []string{"--dns", dnsServer}, + Args: []string{"app", "vpn-client", "--dns", dnsServer}, }, { Name: visorconfig.SkychatName, - Binary: visorconfig.SkychatName, + Binary: "skywire", AutoStart: true, Port: routing.Port(skyenv.SkychatPort), - Args: []string{"--addr", visorconfig.SkychatAddr}, + Args: []string{"app", "skychat", "--addr", visorconfig.SkychatAddr}, }, { Name: visorconfig.SkysocksName, - Binary: visorconfig.SkysocksName, + Binary: "skywire", AutoStart: true, Port: routing.Port(visorconfig.SkysocksPort), + Args: []string{"app", "skysocks"}, }, { Name: visorconfig.SkysocksClientName, - Binary: visorconfig.SkysocksClientName, + Binary: "skywire", AutoStart: false, Port: routing.Port(visorconfig.SkysocksClientPort), - Args: []string{"--addr", visorconfig.SkysocksClientAddr}, + Args: []string{"app", "skysocks-client", "--addr", visorconfig.SkysocksClientAddr}, }, { Name: visorconfig.VPNServerName, - Binary: visorconfig.VPNServerName, + Binary: "skywire", AutoStart: isVpnServerEnable, + Args: []string{"app", "vpn-server"}, Port: routing.Port(visorconfig.VPNServerPort), }, } - skywire := os.Args[0] - isMatch := strings.Contains("/tmp/", skywire) - if (!isStdout) || (!isMatch) { - //binaries have .exe extension on windows - var exe string - if visorconfig.OS == "win" { - exe = ".exe" - } - // Disable apps not found at bin_path with above exceptions for go run and stdout - if _, err := os.Stat(conf.Launcher.BinPath + "/" + "skychat" + exe); err != nil { - if disableApps == "" { - disableApps = "skychat" - } else { - disableApps = disableApps + ",skychat" - } - } - if _, err := os.Stat(conf.Launcher.BinPath + "/" + "skysocks" + exe); err != nil { - if disableApps == "" { - disableApps = "skysocks" - } else { - disableApps = disableApps + ",skysocks" - } - } - if _, err := os.Stat(conf.Launcher.BinPath + "/" + "skysocks-client" + exe); err != nil { - if disableApps == "" { - disableApps = "skysocks-client" - } else { - disableApps = disableApps + ",skysocks-client" - } - } - if _, err := os.Stat(conf.Launcher.BinPath + "/" + "vpn-client" + exe); err != nil { - if disableApps == "" { - disableApps = "vpn-client" - } else { - disableApps = disableApps + ",vpn-client" - } - } - if _, err := os.Stat(conf.Launcher.BinPath + "/" + "vpn-server" + exe); err != nil { - if disableApps == "" { - disableApps = "vpn-server" - } else { - disableApps = disableApps + ",vpn-server" - } - } - } // Disable apps --disable-apps flag if disableApps != "" { apps := strings.Split(disableApps, ",") diff --git a/cmd/skywire-deployment/README.md b/cmd/skywire-deployment/README.md deleted file mode 100644 index 07c976b8f6..0000000000 --- a/cmd/skywire-deployment/README.md +++ /dev/null @@ -1,2974 +0,0 @@ -# Skywire Deployment Merged Binary - - -# skywire documentation - -## subcommand tree - -A tree representation of the skywire subcommands - -``` -└─┬skywire - ├──visor - ├─┬cli - │ ├─┬config - │ │ ├──gen - │ │ ├──gen-keys - │ │ ├──check-pk - │ │ └─┬update - │ │ ├──dmsghttp - │ │ ├──svc - │ │ ├──hv - │ │ ├──sc - │ │ ├──ss - │ │ ├──vpnc - │ │ └──vpns - │ ├─┬dmsgpty - │ │ ├──ui - │ │ ├──url - │ │ ├──list - │ │ └──start - │ ├─┬visor - │ │ ├─┬app - │ │ │ ├──ls - │ │ │ ├──start - │ │ │ ├──stop - │ │ │ ├──register - │ │ │ ├──deregister - │ │ │ ├──log - │ │ │ └─┬arg - │ │ │ ├──autostart - │ │ │ ├──killswitch - │ │ │ ├──secure - │ │ │ ├──passcode - │ │ │ └──netifc - │ │ ├─┬hv - │ │ │ ├──ui - │ │ │ ├──cpk - │ │ │ └──pk - │ │ ├──pk - │ │ ├──info - │ │ ├──ver - │ │ ├──ports - │ │ ├──ip - │ │ ├──ping - │ │ ├──test - │ │ ├──start - │ │ ├──reload - │ │ ├──halt - │ │ ├─┬route - │ │ │ ├──ls-rules - │ │ │ ├──rule - │ │ │ ├──rm-rule - │ │ │ └─┬add-rule - │ │ │ ├──app - │ │ │ ├──fwd - │ │ │ └──intfwd - │ │ └─┬tp - │ │ ├──type - │ │ ├──ls - │ │ ├──id - │ │ ├──add - │ │ ├──rm - │ │ └──disc - │ ├─┬vpn - │ │ ├──start - │ │ ├──stop - │ │ ├──status - │ │ ├──list - │ │ ├──ui - │ │ └──url - │ ├──ut - │ ├──fwd - │ ├──rev - │ ├──reward - │ ├──rewards - │ ├──survey - │ ├──rtfind - │ ├──rtree - │ ├─┬mdisc - │ │ ├──entry - │ │ └──servers - │ ├──completion - │ ├──log - │ ├─┬proxy - │ │ ├──start - │ │ ├──stop - │ │ ├──status - │ │ └──list - │ ├──tree - │ └──doc - ├─┬svc - │ ├──sn - │ ├──tpd - │ ├──tps - │ ├──ar - │ ├──rf - │ ├──cb - │ ├──kg - │ ├──lc - │ ├──nv - │ ├─┬se - │ │ ├──visor - │ │ ├──dmsg - │ │ └──setup - │ ├──sd - │ ├──nwmon - │ ├──pvm - │ ├──ssm - │ └──vpnm - ├─┬dmsg - │ ├─┬pty - │ │ ├─┬cli - │ │ │ ├──whitelist - │ │ │ ├──whitelist-add - │ │ │ └──whitelist-remove - │ │ ├─┬host - │ │ │ └──confgen - │ │ └──ui - │ ├──disc - │ ├─┬server - │ │ ├─┬config - │ │ │ └──gen - │ │ └──start - │ ├──http - │ ├──curl - │ ├─┬web - │ │ └──gen-keys - │ ├─┬socks - │ │ ├──server - │ │ └──client - │ └──mon - ├─┬app - │ ├──vpn-server - │ ├──vpn-client - │ ├──skysocks-client - │ ├──skysocks - │ └──skychat - ├──tree - └──doc - - - -``` - -### visor - -``` - - ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┬ ┬┬┌─┐┌─┐┬─┐ - └─┐├┴┐└┬┘││││├┬┘├┤───└┐┌┘│└─┐│ │├┬┘ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └┘ ┴└─┘└─┘┴└─ - - - -Flags: - -c, --config string config file to use (default): skywire-config.json - -C, --confarg string supply config as argument - -b, --browser open hypervisor ui in default web browser - --systray run as systray - -i, --hvui run as hypervisor * - --all show all flags - --csrf Request a CSRF token for sensitive hypervisor API requests (default true) - - -``` - -### cli - -``` - - ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┌─┐┬ ┬ - └─┐├┴┐└┬┘││││├┬┘├┤───│ │ │ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └─┘┴─┘┴ - -Available Commands: - config Generate or update a skywire config - dmsgpty Interact with remote visors - visor Query the Skywire Visor - vpn VPN client - ut query uptime tracker - fwd Control skyforwarding - rev reverse proxy skyfwd - reward skycoin reward address - rewards calculate rewards from uptime data & collected surveys - survey system survey - rtfind Query the Route Finder - rtree map of transports on the skywire network - mdisc Query remote DMSG Discovery - completion Generate completion script - log survey & transport log collection - proxy Skysocks client - tree subcommand tree - doc generate markdown docs - - -``` - -skywire command line interface - -## skywire - -``` - - ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ - └─┐├┴┐└┬┘││││├┬┘├┤ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ - -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 - - -``` - -## global flags - -The skywire-cli interacts with the running visor via rpc calls. By default the rpc server is available on localhost:3435. The rpc address and port the visor is using may be changed in the config file, once generated. - -It is not recommended to expose the rpc server on the local network. Exposing the rpc allows unsecured access to the machine over the local network - -``` - -Global Flags: - - --rpc string RPC server address (default "localhost:3435") - - --json bool print output as json - -``` - -#### cli config - -``` -Generate or update the config file used by skywire-visor. - -Available Commands: - gen Generate a config file - gen-keys generate public / secret keypair - check-pk check a skywire public key - update Update a config file - - -``` - -##### cli config gen - -``` -Generate a config file - - Config defaults file may also be specified with: - SKYENV=/path/to/skywire.conf skywire-cli config gen - print the SKYENV file template with: - skywire-cli config gen -q - - - -Flags: - -a, --url string services conf url - - (default "http://conf.skywire.skycoin.com") - --loglvl string level of logging in config (default "info") - -b, --bestproto best protocol (dmsg | direct) based on location - -c, --noauth disable authentication for hypervisor UI - -d, --dmsghttp use dmsg connection to skywire services - -D, --dmsgconf string dmsghttp-config path (default "dmsghttp-config.json") - --minsess int number of dmsg servers to connect to (0 = unlimited) (default 2) - -e, --auth enable auth on hypervisor UI - -f, --force remove pre-existing config - -g, --disableapps string comma separated list of apps to disable - -i, --ishv local hypervisor configuration - -j, --hvpks string list of public keys to add as hypervisor - --dmsgpty string add dmsgpty whitelist PKs - --survey string add survey whitelist PKs - --routesetup string add route setup node PKs - --tpsetup string add transport setup node PKs - -k, --os string (linux / mac / win) paths (default "linux") - -l, --publicip allow display node ip in services - -m, --example-apps add example apps to the config - -n, --stdout write config to stdout - -N, --squash output config without whitespace or newlines - -q, --envs show the environmental variable settings - -o, --out string output config: skywire-config.json - -p, --pkg use path for package: /opt/skywire - -u, --user use paths for user space: /home/d0mo - -r, --regen re-generate existing config & retain keys - -s, --sk cipher.SecKey a random key is generated if unspecified - - (default 0000000000000000000000000000000000000000000000000000000000000000) - -t, --testenv use test deployment conf.skywire.dev - -v, --servevpn enable vpn server - -w, --hide dont print the config to the terminal :: show errors with -n flag - -x, --retainhv retain existing hypervisors with regen - -y, --autoconn disable autoconnect to public visors - -z, --public publicize visor in service discovery - --stcpr int set tcp transport listening port - 0 for random - --sudph int set udp transport listening port - 0 for random - --binpath string set bin_path for visor vative apps - --proxyclientpk string set server public key for proxy client - --startproxyclient autostart proxy client - --noproxyserver disable autostart of proxy server - --proxyserverpass string set proxy server password - --proxyclientpass string password for the proxy client to access the server (if needed) - --killsw string vpn client killswitch - --addvpn string set vpn server public key for vpn client - --vpnpass string password for vpn client to access the vpn server (if needed) - --vpnserverpass string set password to the vpn server - --secure string change secure mode status of vpn server - --netifc string VPN Server network interface (detected: eno1) - --nofetch do not fetch the services from the service conf url - -S, --svcconf string fallback service configuration file (default "services-config.json") - --nodefaults do not use hardcoded defaults for production / test services - --version string custom version testing override - --all show all flags - - -``` - -##### Example for package / msi - -``` -$ skywire cli config gen -bpirxn -{ - "version": "v1.3.18", - "sk": "eab215b4851fb14cbcb856a0b763923bb0d21dde0ede41eeb7ff176327fe760a", - "pk": "03603bdd732230acfbbeaf769a92487b469176ff84d5cce1041bf36963cbbc1d69", - "dmsg": { - "discovery": "http://dmsgd.skywire.skycoin.com", - "sessions_count": 2, - "servers": [], - "servers_type": "all" - }, - "dmsgpty": { - "dmsg_port": 22, - "cli_network": "unix", - "cli_address": "/tmp/dmsgpty.sock", - "whitelist": [] - }, - "skywire-tcp": { - "pk_table": null, - "listening_address": ":7777" - }, - "transport": { - "discovery": "http://tpd.skywire.skycoin.com", - "address_resolver": "http://ar.skywire.skycoin.com", - "public_autoconnect": true, - "transport_setup": [ - "03530b786c670fc7f5ab9021478c7ec9cd06a03f3ea1416c50c4a8889ef5bba80e", - "03271c0de223b80400d9bd4b7722b536a245eb6c9c3176781ee41e7bac8f9bad21", - "03a792e6d960c88c6fb2184ee4f16714c58b55f0746840617a19f7dd6e021699d9", - "0313efedc579f57f05d4f5bc3fbf0261f31e51cdcfde7e568169acf92c78868926", - "025c7bbf23e3441a36d7e8a1e9d717921e2a49a2ce035680fec4808a048d244c8a", - "030eb6967f6e23e81db0d214f925fc5ce3371e1b059fb8379ae3eb1edfc95e0b46", - "02e582c0a5e5563aad47f561b272e4c3a9f7ac716258b58e58eb50afd83c286a7f", - "02ddc6c749d6ed067bb68df19c9bcb1a58b7587464043b1707398ffa26a9746b26", - "03aa0b1c4e23616872058c11c6efba777c130a85eaf909945d697399a1eb08426d", - "03adb2c924987d8deef04d02bd95236c5ae172fe5dfe7273e0461d96bf4bc220be" - ], - "log_store": { - "type": "file", - "location": "/opt/skywire/local/transport_logs", - "rotation_interval": "168h0m0s" - }, - "stcpr_port": 0, - "sudph_port": 0 - }, - "routing": { - "route_setup_nodes": [ - "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557", - "024fbd3997d4260f731b01abcfce60b8967a6d4c6a11d1008812810ea1437ce438", - "03b87c282f6e9f70d97aeea90b07cf09864a235ef718725632d067873431dd1015" - ], - "route_finder": "http://rf.skywire.skycoin.com", - "route_finder_timeout": "10s", - "min_hops": 0 - }, - "uptime_tracker": { - "addr": "http://ut.skywire.skycoin.com" - }, - "launcher": { - "service_discovery": "http://sd.skycoin.com", - "apps": [ - { - "name": "vpn-client", - "binary": "vpn-client", - "args": [ - "--dns", - "1.1.1.1" - ], - "auto_start": false, - "port": 43 - }, - { - "name": "skychat", - "binary": "skychat", - "args": [ - "--addr", - ":8001" - ], - "auto_start": true, - "port": 1 - }, - { - "name": "skysocks", - "binary": "skysocks", - "auto_start": true, - "port": 3 - }, - { - "name": "skysocks-client", - "binary": "skysocks-client", - "args": [ - "--addr", - ":1080" - ], - "auto_start": false, - "port": 13 - }, - { - "name": "vpn-server", - "binary": "vpn-server", - "auto_start": false, - "port": 44 - } - ], - "server_addr": "localhost:5505", - "bin_path": "/opt/skywire/apps", - "display_node_ip": false - }, - "survey_whitelist": [ - "02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637", - "03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3", - "020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9", - "027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1", - "031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65", - "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a", - "03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4" - ], - "hypervisors": [], - "cli_addr": "localhost:3435", - "log_level": "", - "local_path": "/opt/skywire/local", - "dmsghttp_server_path": "/opt/skywire/local/custom", - "stun_servers": [ - "192.53.117.238:3478", - "170.187.228.44:3478", - "192.53.117.237:3478", - "192.53.117.146:3478", - "192.53.117.60:3478", - "192.53.117.124:3478", - "170.187.228.178:3478", - "170.187.225.246:3478" - ], - "shutdown_timeout": "10s", - "is_public": false, - "persistent_transports": null, - "hypervisor": { - "db_path": "/opt/skywire/users.db", - "enable_auth": true, - "cookies": { - "hash_key": "19a47254be4a7d9ce7664d20b4271bb402434eadfbb6c94dd59922d5cbf89ce3c03f1d54c320ca624fa44e8d85ad0b1df2a84acf607ef1ef7ea63bce99a50c53", - "block_key": "09df61d626fbda1632c91604620ca94c926125a109c4cf2f3d9bb608bd24b904", - "expires_duration": 43200000000000, - "path": "/", - "domain": "" - }, - "dmsg_port": 46, - "http_addr": ":8000", - "enable_tls": false, - "tls_cert_file": "./ssl/cert.pem", - "tls_key_file": "./ssl/key.pem" - } -} -``` - -##### cli config gen-keys - -``` -generate public / secret keypair - - - - -``` - -##### cli config check-pk - -``` -check a skywire public key - - - - -``` - -##### cli config update - -``` -Update a config file - -Available Commands: - dmsghttp update dmsghttp-config.json file from config bootstrap service - svc update services-config.json file from config bootstrap service - hv update hypervisor config - sc update skysocks-client config - ss update skysocks-server config - vpnc update vpn-client config - vpns update vpn-server config - -Flags: - -a, --endpoints update server endpoints - --log-level string level of logging in config - -b, --url string service config URL: conf.skywire.skycoin.com - -t, --testenv use test deployment: conf.skywire.dev - --public-autoconn string change public autoconnect configuration - --set-minhop int change min hops value (default -1) - -i, --input string path of input config file. - -o, --output string config file to output - -u, --user update config at: $HOME/skywire-config.json - - -``` - -###### cli config update dmsghttp - -``` -update dmsghttp-config.json file from config bootstrap service - - - -Flags: - -p, --path string path of dmsghttp-config file, default is for pkg installation (default "/opt/skywire/dmsghttp-config.json") - -Global Flags: - -i, --input string path of input config file. - -o, --output string config file to output - -u, --user update config at: $HOME/skywire-config.json - - -``` - -###### cli config update svc - -``` -update services-config.json file from config bootstrap service - - - -Flags: - -p, --path string path of services-config file, default is for pkg installation (default "/opt/skywire/services-config.json") - -Global Flags: - -i, --input string path of input config file. - -o, --output string config file to output - -u, --user update config at: $HOME/skywire-config.json - - -``` - -###### cli config update hv - -``` -update hypervisor config - - - -Flags: - -+, --add-pks string public keys of hypervisors that should be added to this visor - -r, --reset resets hypervisor configuration - -Global Flags: - -i, --input string path of input config file. - -o, --output string config file to output - -u, --user update config at: $HOME/skywire-config.json - - -``` - -###### cli config update sc - -``` -update skysocks-client config - - - -Flags: - -+, --add-server string add skysocks server address to skysock-client - -r, --reset reset skysocks-client configuration - -Global Flags: - -i, --input string path of input config file. - -o, --output string config file to output - -u, --user update config at: $HOME/skywire-config.json - - -``` - -###### cli config update ss - -``` -update skysocks-server config - - - -Flags: - -s, --passwd string add passcode to skysocks server - -r, --reset reset skysocks configuration - -Global Flags: - -i, --input string path of input config file. - -o, --output string config file to output - -u, --user update config at: $HOME/skywire-config.json - - -``` - -###### cli config update vpnc - -``` -update vpn-client config - - - -Flags: - -x, --killsw string change killswitch status of vpn-client - --add-server string add server address to vpn-client - -s, --pass string add passcode of server if needed - -r, --reset reset vpn-client configurations - -Global Flags: - -i, --input string path of input config file. - -o, --output string config file to output - -u, --user update config at: $HOME/skywire-config.json - - -``` - -###### cli config update vpns - -``` -update vpn-server config - - - -Flags: - -s, --passwd string add passcode to vpn-server - --secure string change secure mode status of vpn-server - --autostart string change autostart of vpn-server - --netifc string set default network interface - -r, --reset reset vpn-server configurations - -Global Flags: - -i, --input string path of input config file. - -o, --output string config file to output - -u, --user update config at: $HOME/skywire-config.json - - -``` - -#### cli dmsgpty - -``` -Interact with remote visors - -Available Commands: - ui Open dmsgpty UI in default browser - url Show dmsgpty UI URL - list List connected visors - start Start dmsgpty session - - -``` - -##### cli dmsgpty ui - -``` -Open dmsgpty UI in default browser - - - -Flags: - -i, --input string read from specified config file - -p, --pkg read from /opt/skywire/skywire.json - -v, --visor string public key of visor to connect to - - -``` - -##### cli dmsgpty url - -``` -Show dmsgpty UI URL - - - -Flags: - -i, --input string read from specified config file - -p, --pkg read from /opt/skywire/skywire.json - -v, --visor string public key of visor to connect to - - -``` - -##### cli dmsgpty list - -``` -List connected visors - - - -Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli dmsgpty start - -``` -Start dmsgpty session - - - -Flags: - -p, --port string port of remote visor dmsgpty (default "22") - --rpc string RPC server address (default "localhost:3435") - - -``` - -#### cli visor - -``` -Query the Skywire Visor - -Available Commands: - app App settings - hv Hypervisor - pk Public key of the visor - info Summary of visor info - ver Version and build info - ports List of Ports - ip IP information of network - ping Ping the visor with given pk - test Test the visor with public visors on network - start start visor - halt Stop a running visor - route View and set rules - tp View and set transports - -Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor app - -``` - - App settings - -Available Commands: - ls List apps - start Launch app - stop Halt app - register Register app - deregister Deregister app - log Logs from app - arg App args - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app ls - -``` - - List apps - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app start - -``` - - Launch app - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app stop - -``` - - Halt app - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app register - -``` - - Register app - - - -Flags: - -a, --appname string name of the app - -p, --localpath string path of the local folder (default "./local") - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app deregister - -``` - - Deregister app - - - -Flags: - -k, --procKey string proc key of the app to deregister - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app log - -``` - - Logs from app since RFC3339Nano-formatted timestamp. - - - "beginning" is a special timestamp to fetch all the logs - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app arg - -``` -App args - -Available Commands: - autostart Set app autostart - killswitch Set app killswitch - secure Set app secure - passcode Set app passcode - netifc Set app network interface - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app arg autostart - -``` -App args - -Available Commands: - autostart Set app autostart - killswitch Set app killswitch - secure Set app secure - passcode Set app passcode - netifc Set app network interface - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app arg killswitch - -``` -App args - -Available Commands: - autostart Set app autostart - killswitch Set app killswitch - secure Set app secure - passcode Set app passcode - netifc Set app network interface - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app arg secure - -``` -App args - -Available Commands: - autostart Set app autostart - killswitch Set app killswitch - secure Set app secure - passcode Set app passcode - netifc Set app network interface - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app arg passcode - -``` -App args - -Available Commands: - autostart Set app autostart - killswitch Set app killswitch - secure Set app secure - passcode Set app passcode - netifc Set app network interface - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor app arg netifc - -``` -App args - -Available Commands: - autostart Set app autostart - killswitch Set app killswitch - secure Set app secure - passcode Set app passcode - netifc Set app network interface - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor hv - -``` - - Hypervisor - - - Access the hypervisor UI - - View remote hypervisor public key - -Available Commands: - ui open Hypervisor UI in default browser - cpk Public key of remote hypervisor(s) set in config - pk Public key of remote hypervisor(s) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor hv ui - -``` - - open Hypervisor UI in default browser - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor hv cpk - -``` - - Public key of remote hypervisor(s) set in config - - - -Flags: - -w, --http serve public key via http - -i, --input string path of input config file. - -p, --pkg read from /opt/skywire/skywire.json - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor hv pk - -``` -Public key of remote hypervisor(s) which are currently connected to - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor pk - -``` - - Public key of the visor - - - -Flags: - -w, --http serve public key via http - -i, --input string path of input config file. - -p, --pkg read from {/opt/skywire/apps /opt/skywire/local {/opt/skywire/users.db true}} - -x, --prt string serve public key via http (default "7998") - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor info - -``` - - Summary of visor info - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor ver - -``` - - Version and build info - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor ports - -``` - - List of all ports used by visor services and apps - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor ip - -``` - - IP information of network - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor ping - -``` - - Creates a route with the provided pk as a hop and returns latency on the conn - - - -Flags: - -s, --size int Size of packet, in KB, default is 2KB (default 2) - -t, --tries int Number of tries (default 1) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor test - -``` - - Creates a route with public visors as a hop and returns latency on the conn - - - -Flags: - -c, --count int Count of Public Visors for using in test. (default 2) - -s, --size int Size of packet, in KB, default is 2KB (default 2) - -t, --tries int Number of tries per public visors (default 1) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor start - -``` -start visor - - - -Flags: - -s, --src 'go run' external commands from the skywire sources - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor reload - -``` -reload visor - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor halt - -``` - - Stop a running visor - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor route - -``` - - View and set routing rules - -Available Commands: - ls-rules List routing rules - rule Return routing rule by route ID key - rm-rule Remove routing rule - add-rule Add routing rule - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor route ls-rules - -``` - - List routing rules - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor route rule - -``` - - Return routing rule by route ID key - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor route rm-rule - -``` - - Remove routing rule - - - -Flags: - -a, --all remove all routing rules - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor route add-rule - -``` - - Add routing rule - -Available Commands: - app Add app/consume routing rule - fwd Add forward routing rule - intfwd Add intermediary forward routing rule - -Flags: - --keep-alive duration timeout for rule expiration (default 30s) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor route add-rule app - -``` - - Add routing rule - -Available Commands: - app Add app/consume routing rule - fwd Add forward routing rule - intfwd Add intermediary forward routing rule - -Flags: - --keep-alive duration timeout for rule expiration (default 30s) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor route add-rule fwd - -``` - - Add routing rule - -Available Commands: - app Add app/consume routing rule - fwd Add forward routing rule - intfwd Add intermediary forward routing rule - -Flags: - --keep-alive duration timeout for rule expiration (default 30s) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor route add-rule intfwd - -``` - - Add routing rule - -Available Commands: - app Add app/consume routing rule - fwd Add forward routing rule - intfwd Add intermediary forward routing rule - -Flags: - --keep-alive duration timeout for rule expiration (default 30s) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli visor tp - -``` - - Transports are bidirectional communication protocols - used between two Skywire Visors (or Transport Edges) - - Each Transport is represented as a unique 16 byte (128 bit) - UUID value called the Transport ID - and has a Transport Type that identifies - a specific implementation of the Transport. - - Types: stcp stcpr sudph dmsg - -Available Commands: - type Transport types used by the local visor - ls Available transports - id Transport summary by id - add Add a transport - rm Remove transport(s) by id - disc Discover remote transport(s) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor tp type - -``` - - Transport types used by the local visor - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor tp ls - -``` - - Available transports - - displays transports of the local visor - - - -Flags: - -t, --types strings show transport(s) type(s) comma-separated - -p, --pks strings show transport(s) for public key(s) comma-separated - -l, --logs show transport logs (default true) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor tp id - -``` - - Transport summary by id - - - -Flags: - -i, --id string transport ID - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor tp add - -``` - - Add a transport - - If the transport type is unspecified, - the visor will attempt to establish a transport - in the following order: skywire-tcp, stcpr, sudph, dmsg - - - -Flags: - -r, --rpk string remote public key. - -o, --timeout duration if specified, sets an operation timeout - -t, --type string type of transport to add. - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor tp rm - -``` - - Remove transport(s) by id - - - -Flags: - -a, --all remove all transports - -i, --id string remove transport of given ID - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -###### cli visor tp disc - -``` - - Discover remote transport(s) by ID or public key - - - -Flags: - -i, --id string obtain transport of given ID - -p, --pk string obtain transports by public key - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -#### cli vpn - -``` -VPN client - -Available Commands: - start start the vpn for - stop stop the vpnclient - status vpn client status - list List servers - ui Open VPN UI in default browser - url Show VPN UI URL - -Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli vpn start - -``` -start the vpn for - - - -Flags: - -k, --pk string server public key - -t, --timeout int starting timeout value in second (default 20) - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli vpn stop - -``` -stop the vpnclient - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli vpn status - -``` -vpn client status - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli vpn list - -``` -List vpn servers from service discovery -http://sd.skycoin.com/api/services?type=vpn -http://sd.skycoin.com/api/services?type=vpn&country=US - -Set cache file location to "" to avoid using cache files - - - -Flags: - -m, --cfa int update cache files if older than n minutes (default 5) - --cfs string SD cache file location (default "/tmp/vpnsd.json") - --cfu string UT cache file location. (default "/tmp/ut.json") - -c, --country string filter results by country - -l, --label label keys by country (SLOW) - -o, --noton do not filter by online status in UT - -k, --pk string check vpn service discovery for public key - -r, --raw print raw data - -a, --sdurl string service discovery url (default "http://sd.skycoin.com") - -s, --stats return only a count of the results - -u, --unfilter provide unfiltered results - -w, --uturl string uptime tracker url (default "http://ut.skywire.skycoin.com") - -v, --ver string filter results by version - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli vpn ui - -``` -Open VPN UI in default browser - - - -Flags: - -c, --config string config path - -p, --pkg use package config path: /opt/skywire - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli vpn url - -``` -Show VPN UI URL - - - -Flags: - -c, --config string config path - -p, --pkg use package config path: /opt/skywire - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -#### cli ut - -``` -query uptime tracker - -http://ut.skywire.skycoin.com/uptimes?v=v2 - -Check local visor daily uptime percent with: - skywire-cli ut -k $(skywire-cli visor pk)n -Set cache file location to "" to avoid using cache files - - - -Flags: - -m, --cfa int update cache files if older than n minutes (default 5) - --cfu string UT cache file location. (default "/tmp/ut.json") - -n, --min int list visors meeting minimum uptime (default 75) - -o, --on list currently online visors - -k, --pk string check uptime for the specified key - -s, --stats count the number of results - -u, --url string specify alternative uptime tracker url (default "http://ut.skywire.skycoin.com") - - -``` - -#### cli fwd - -``` -Control skyforwarding - forward local ports over skywire - - - -Flags: - -d, --deregister deregister local port of the external (http) app - -l, --ls list registered local ports - -p, --port int local port of the external (http) app - - -``` - -#### cli rev - -``` -connect or disconnect from remote ports - - - -Flags: - -l, --ls list configured connections - -k, --pk string remote public key to connect to - -p, --port int local port to reverse proxy - -r, --remote int remote port to read from - -d, --stop string disconnect from specified - - -``` - -#### cli reward - -``` - - skycoin reward address set to: - - - -Flags: - --all show all flags - - -``` - -#### cli rewards - -``` - -Collect surveys: skywire-cli log -Fetch uptimes: skywire-cli ut > ut.txt - - - -Flags: - -d, --date string date for which to calculate reward (default "2024-03-12") - -k, --pk string check reward for pubkey - -n, --noarch string disallowed architectures, comma separated (default "amd64") - -y, --year int yearly total rewards (default 408000) - -u, --utfile string uptime tracker data file (default "ut.txt") - -p, --path string path to the surveys (default "log_collecting") - -0, --h0 hide statistical data - -1, --h1 hide survey csv data - -2, --h2 hide reward csv data - -e, --err account for non rewarded keys - - -``` - -#### cli survey - -``` -print the system survey - - - -Flags: - -s, --sha generate checksum of system survey - - -``` - -``` -unknown command "survey" for "skywire" - -``` - -#### cli rtfind - -``` -Query the Route Finder -Assumes the local visor public key as an argument if only one argument is given - - - -Flags: - -n, --min uint16 minimum hops (default 1) - -x, --max uint16 maximum hops (default 1000) - -t, --timeout duration request timeout (default 10s) - -a, --addr string route finder service address - http://rf.skywire.skycoin.com - - -``` - -#### cli rtree - -``` -display a tree representation of transports from TPD - -http://tpd.skywire.skycoin.com/all-transports - -Set cache file location to "" to avoid using cache files - - - -Flags: - -m, --cfa int update cache files if older than n minutes (default 5) - --cft string TPD cache file location (default "/tmp/tpd.json") - --cfu string UT cache file location. (default "/tmp/ut.json") - -o, --noton do not filter by online status in UT - -P, --pad int padding between tree and tpid (default 15) - -p, --pretty print pretty json data - -r, --raw print raw json data - -s, --stats return only statistics - -a, --tpdurl string transport discovery url (default "http://tpd.skywire.skycoin.com") - -w, --uturl string uptime tracker url (default "http://ut.skywire.skycoin.com") - - -``` - -#### cli mdisc - -``` -Query remote DMSG Discovery - -Available Commands: - entry Fetch an entry - servers Fetch available servers - - -``` - -##### cli mdisc entry - -``` -Fetch an entry - - - -Flags: - -a, --addr string DMSG discovery server address - http://dmsgd.skywire.skycoin.com - - -``` - -##### cli mdisc servers - -``` -Fetch available servers - - - -Flags: - --addr string address of DMSG discovery server - (default "http://dmsgd.skywire.skycoin.com") - - -``` - -#### cli completion - -``` -Generate completion script - - - - -``` - -#### cli log - -``` -Fetch health, survey, and transport logging from visors which are online in the uptime tracker -http://ut.skywire.skycoin.com/uptimes?v=v2 -http://ut.skywire.skycoin.com/uptimes?v=v2&visors=;; - - - -Flags: - -e, --env string deployment to get uptimes from (default "prod") - -l, --log fetch only transport logs - -v, --survey fetch only surveys - -f, --file string fetch only a specific file from all online visors - -k, --pks string fetch only from specific public keys ; semicolon separated - -d, --dir string save files to specified dir (default "log_collecting") - -c, --clean delete files and folders on errors - --minv string minimum visor version to fetch from (default "v1.3.15") - --include-versions string list of version that not satisfy our minimum version condition, but we want include them - -n, --duration int number of days before today to fetch transport logs for - --all consider all visors ; no version filtering - --batchSize int number of visor in each batch (default 50) - --maxfilesize int maximum file size allowed to download during collecting logs, in KB (default 1024) - -D, --dmsg-disc string dmsg discovery url - (default "http://dmsgd.skywire.skycoin.com") - -u, --ut string custom uptime tracker url - -s, --sk cipher.SecKey a random key is generated if unspecified - - (default 0000000000000000000000000000000000000000000000000000000000000000) - - -``` - -#### cli proxy - -``` -Skysocks client - -Available Commands: - start start the proxy client - stop stop the proxy client - status proxy client status - list List servers - -Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli proxy start - -``` -start the proxy client - - - -Flags: - -a, --addr string address of proxy for use - -n, --name string name of skysocks client - -k, --pk string server public key - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli proxy stop - -``` -stop the proxy client - - - -Flags: - --all stop all skysocks client - --name string specific skysocks client that want stop - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli proxy status - -``` -proxy client status - - - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -##### cli proxy list - -``` -List proxy servers from service discovery -http://sd.skycoin.com/api/services?type=proxy -http://sd.skycoin.com/api/services?type=proxy&country=US - -Set cache file location to "" to avoid using cache files - - - -Flags: - -m, --cfa int update cache files if older than n minutes (default 5) - --cfs string SD cache file location (default "/tmp/proxysd.json") - --cfu string UT cache file location. (default "/tmp/ut.json") - -c, --country string filter results by country - -l, --label label keys by country (SLOW) - -o, --noton do not filter by online status in UT - -k, --pk string check proxy service discovery for public key - -r, --raw print raw data - -a, --sdurl string service discovery url (default "http://sd.skycoin.com") - -s, --stats return only a count of the results - -u, --unfilter provide unfiltered results - -w, --uturl string uptime tracker url (default "http://ut.skywire.skycoin.com") - -v, --ver string filter results by version - -Global Flags: - --rpc string RPC server address (default "localhost:3435") - - -``` - -#### cli tree - -``` -subcommand tree - - - - -``` - -#### cli doc - -``` -generate markdown docs - - UNHIDEFLAGS=1 go run cmd/skywire-cli/skywire-cli.go doc - - UNHIDEFLAGS=1 go run cmd/skywire-cli/skywire-cli.go doc > cmd/skywire-cli/README1.md - - generate toc: - - cat cmd/skywire-cli/README1.md | gh-md-toc - - - - -``` - -### svc - -``` - - ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┌─┐┌─┐┬─┐┬ ┬┬┌─┐┌─┐┌─┐ - └─┐├┴┐└┬┘││││├┬┘├┤───└─┐├┤ ├┬┘└┐┌┘││ ├┤ └─┐ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └─┘└─┘┴└─ └┘ ┴└─┘└─┘└─┘ - -Available Commands: - sn Route Setup Node for skywire - tpd Transport Discovery Server for skywire - tps Transport setup server for skywire - ar Address Resolver Server for skywire - rf Route Finder Server for skywire - cb Config Bootstrap Server for skywire - kg skywire keys generator, prints pub-key and sec-key - lc Liveness checker of the deployment. - nv Node Visualizer Server for skywire - se skywire environment generator - sd Service discovery server - nwmon Network monitor for skywire VPN and Visor. - pvm Public Visor monitor. - ssm Skysocks monitor. - vpnm VPN monitor. - - -``` - -#### svc sn - -``` - - ┌─┐┌─┐┌┬┐┬ ┬┌─┐ ┌┐┌┌─┐┌┬┐┌─┐ - └─┐├┤ │ │ │├─┘───││││ │ ││├┤ - └─┘└─┘ ┴ └─┘┴ ┘└┘└─┘─┴┘└─┘ - - - -Flags: - -m, --metrics string address to bind metrics API to - -i, --stdin read config from STDIN - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "setup_node") - - -``` - -#### svc tpd - -``` - - ┌┬┐┬─┐┌─┐┌┐┌┌─┐┌─┐┌─┐┬─┐┌┬┐ ┌┬┐┬┌─┐┌─┐┌─┐┬ ┬┌─┐┬─┐┬ ┬ - │ ├┬┘├─┤│││└─┐├─┘│ │├┬┘ │───│││└─┐│ │ │└┐┌┘├┤ ├┬┘└┬┘ - ┴ ┴└─┴ ┴┘└┘└─┘┴ └─┘┴└─ ┴ ─┴┘┴└─┘└─┘└─┘ └┘ └─┘┴└─ ┴ ------ depends: redis, postgresql and initial DB setup ----- -sudo -iu postgres createdb tpd -keys-gen | tee tpd-config.json -PG_USER="postgres" PG_DATABASE="tpd" PG_PASSWORD="" transport-discovery --sk $(tail -n1 tpd-config.json) - - - -Flags: - -a, --addr string address to bind to (default ":9091") - --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") - --dmsgPort uint16 dmsg port value - (default 80) - -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") - -m, --metrics string address to bind metrics API to - --pg-host string host of postgres (default "localhost") - --pg-port string port of postgres (default "5432") - --redis string connections string for a redis store (default "redis://localhost:6379") - --redis-pool-size int redis connection pool size (default 10) - --sk cipher.SecKey dmsg secret key - (default 0000000000000000000000000000000000000000000000000000000000000000) - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "transport_discovery") - --test-environment distinguished between prod and test environment - -t, --testing enable testing to start without redis - --whitelist-keys string list of whitelisted keys of network monitor used for deregistration - - -``` - -#### svc tps - -``` - - ┌┬┐┬─┐┌─┐┌┐┌┌─┐┌─┐┌─┐┬─┐┌┬┐ ┌─┐┌─┐┌┬┐┬ ┬┌─┐ - │ ├┬┘├─┤│││└─┐├─┘│ │├┬┘ │───└─┐├┤ │ │ │├─┘ - ┴ ┴└─┴ ┴┘└┘└─┘┴ └─┘┴└─ ┴ └─┘└─┘ ┴ └─┘┴ - - - -Flags: - -c, --config string path to config file - -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") - - -``` - -#### svc ar - -``` - - ┌─┐┌┬┐┌┬┐┬─┐┌─┐┌─┐┌─┐ ┬─┐┌─┐┌─┐┌─┐┬ ┬ ┬┌─┐┬─┐ - ├─┤ ││ ││├┬┘├┤ └─┐└─┐───├┬┘├┤ └─┐│ ││ └┐┌┘├┤ ├┬┘ - ┴ ┴─┴┘─┴┘┴└─└─┘└─┘└─┘ ┴└─└─┘└─┘└─┘┴─┘└┘ └─┘┴└─ - -depends: redis - -Note: the specified port must be accessible from the internet ip address or port forwarded for udp -skywire cli config gen-keys > ar-config.json -skywire svc ar --addr ":9093" --redis "redis://localhost:6379" --sk $(tail -n1 ar-config.json) - -Usage: - skywire svc ar - -Flags: - -a, --addr string address to bind to (default ":9093") - --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") - --dmsgPort uint16 dmsg port value - (default 80) - -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") - -m, --metrics string address to bind metrics API to - --redis string connections string for a redis store (default "redis://localhost:6379") - --redis-pool-size int redis connection pool size (default 10) - --sk cipher.SecKey dmsg secret key - (default 0000000000000000000000000000000000000000000000000000000000000000) - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "address_resolver") - --test-environment distinguished between prod and test environment - -t, --testing enable testing to start without redis - --whitelist-keys string list of whitelisted keys of network monitor used for deregistration - - -``` - -#### svc rf - -``` - - ┬─┐┌─┐┬ ┬┌┬┐┌─┐ ┌─┐┬┌┐┌┌┬┐┌─┐┬─┐ - ├┬┘│ ││ │ │ ├┤───├┤ ││││ ││├┤ ├┬┘ - ┴└─└─┘└─┘ ┴ └─┘ └ ┴┘└┘─┴┘└─┘┴└─ ------ depends: postgres and initial db setup ----- -sudo -iu postgres createdb rf -skywire cli config gen-keys | tee rf-config.json -PG_USER="postgres" PG_DATABASE="rf" PG_PASSWORD="" route-finder --addr ":9092" --sk $(tail -n1 rf-config.json) - - - -Flags: - -a, --addr string address to bind to (default ":9092") - --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") - --dmsgPort uint16 dmsg port value - (default 80) - -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") - -m, --metrics string address to bind metrics API to - --pg-host string host of postgres (default "localhost") - --pg-port string port of postgres (default "5432") - --sk cipher.SecKey dmsg secret key - (default 0000000000000000000000000000000000000000000000000000000000000000) - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "route_finder") - -t, --testing enable testing to start without redis - - -``` - -#### svc cb - -``` - - ┌─┐┌─┐┌┐┌┌─┐┬┌─┐ ┌┐ ┌─┐┌─┐┌┬┐┌─┐┌┬┐┬─┐┌─┐┌─┐┌─┐┌─┐┬─┐ - │ │ ││││├┤ ││ ┬───├┴┐│ ││ │ │ └─┐ │ ├┬┘├─┤├─┘├─┘├┤ ├┬┘ - └─┘└─┘┘└┘└ ┴└─┘ └─┘└─┘└─┘ ┴ └─┘ ┴ ┴└─┴ ┴┴ ┴ └─┘┴└─ - - - -Flags: - -a, --addr string address to bind to (default ":9082") - -c, --config string stun server list file location (default "./config.json") - --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") - --dmsgPort uint16 dmsg port value - (default 80) - -d, --domain string the domain of the endpoints (default "skywire.skycoin.com") - --sk cipher.SecKey dmsg secret key - (default 0000000000000000000000000000000000000000000000000000000000000000) - --tag string logging tag (default "address_resolver") - - -``` - -#### svc kg - -``` - - ┬┌─┌─┐┬ ┬┌─┐ ┌─┐┌─┐┌┐┌ - ├┴┐├┤ └┬┘└─┐───│ ┬├┤ │││ - ┴ ┴└─┘ ┴ └─┘ └─┘└─┘┘└┘ - - - - -``` - -#### svc lc - -``` - - ┬ ┬┬ ┬┌─┐┌┐┌┌─┐┌─┐┌─┐ ┌─┐┬ ┬┌─┐┌─┐┬┌─┌─┐┬─┐ - │ │└┐┌┘├┤ │││├┤ └─┐└─┐───│ ├─┤├┤ │ ├┴┐├┤ ├┬┘ - ┴─┘┴ └┘ └─┘┘└┘└─┘└─┘└─┘ └─┘┴ ┴└─┘└─┘┴ ┴└─┘┴└─ - - - -Flags: - -a, --addr string address to bind to. (default ":9081") - -c, --config string config file location. (default "liveness-checker.json") - -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") - --redis string connections string for a redis store (default "redis://localhost:6379") - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "liveness_checker") - -t, --testing enable testing to start without redis - - -``` - -#### svc nv - -``` - - ┌┐┌┌─┐┌┬┐┌─┐ ┬ ┬┬┌─┐┬ ┬┌─┐┬ ┬┌─┐┌─┐┬─┐ - ││││ │ ││├┤───└┐┌┘│└─┐│ │├─┤│ │┌─┘├┤ ├┬┘ - ┘└┘└─┘─┴┘└─┘ └┘ ┴└─┘└─┘┴ ┴┴─┘┴└─┘└─┘┴└─ - - - -Flags: - -a, --addr string address to bind to (default ":9081") - -l, --log enable request logging (default true) - -m, --metrics string address to bind metrics API to - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "node-visualizer") - -t, --testing enable testing to start without redis - - -``` - -#### svc se - -``` - - ┌─┐┬ ┬ ┌─┐┌┐┌┬ ┬ - └─┐│││───├┤ │││└┐┌┘ - └─┘└┴┘ └─┘┘└┘ └┘ - -Available Commands: - visor Generate config for skywire-visor - dmsg Generate config for dmsg-server - setup Generate config for setup node - -Flags: - -d, --docker Environment with dockerized skywire-services - -l, --local Environment with skywire-services on localhost - -n, --network string Docker network to use (default "SKYNET") - -p, --public Environment with public skywire-services - - -``` - -##### svc se visor - -``` -Generate config for skywire-visor - - - - -``` - -##### svc se dmsg - -``` -Generate config for dmsg-server - - - - -``` - -##### svc se setup - -``` -Generate config for setup node - - - - -``` - -#### svc sd - -``` - - ┌─┐┌─┐┬─┐┬ ┬┬┌─┐┌─┐ ┌┬┐┬┌─┐┌─┐┌─┐┬ ┬┌─┐┬─┐┬ ┬ - └─┐├┤ ├┬┘└┐┌┘││ ├┤───│││└─┐│ │ │└┐┌┘├┤ ├┬┘└┬┘ - └─┘└─┘┴└─ └┘ ┴└─┘└─┘ ─┴┘┴└─┘└─┘└─┘ └┘ └─┘┴└─ ┴ ------ depends: redis, postgresql and initial DB setup ----- -sudo -iu postgres createdb sd -keys-gen | tee sd-config.json -PG_USER="postgres" PG_DATABASE="sd" PG_PASSWORD="" service-discovery --sk $(tail -n1 sd-config.json) - - - -Flags: - -a, --addr string address to bind to (default ":9098") - -g, --api-key string geo API key - -d, --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") - --dmsgPort uint16 dmsg port value (default 80) - -m, --metrics string address to bind metrics API to - -o, --pg-host string host of postgres (default "localhost") - -p, --pg-port string port of postgres (default "5432") - -r, --redis string connections string for a redis store (default "redis://localhost:6379") - -s, --sk cipher.SecKey dmsg secret key - (default 0000000000000000000000000000000000000000000000000000000000000000) - -t, --test run in test mode and disable auth - -n, --test-environment distinguished between prod and test environment - -w, --whitelist-keys string list of whitelisted keys of network monitor used for deregistration - - -``` - -#### svc nwmon - -``` - - ┌┐┌┌─┐┌┬┐┬ ┬┌─┐┬─┐┬┌─ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ - │││├┤ │ ││││ │├┬┘├┴┐───││││ │││││ │ │ │├┬┘ - ┘└┘└─┘ ┴ └┴┘└─┘┴└─┴ ┴ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ - - - -Flags: - -a, --addr string address to bind to. (default ":9080") - -v, --ar-url string url to address resolver. - -b, --batchsize int Batch size of deregistration (default 30) - -c, --config string config file location. (default "network-monitor.json") - -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") - -m, --metrics string address to bind metrics API to - --redis string connections string for a redis store (default "redis://localhost:6379") - --redis-pool-size int redis connection pool size (default 10) - -n, --sd-url string url to service discovery. - --sleep-deregistration duration Sleep time for derigstration process in minutes (default 10ns) - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "network_monitor") - -t, --testing enable testing to start without redis - -u, --ut-url string url to uptime tracker visor data. - - -``` - -#### svc pvm - -``` - - ┌─┐┬ ┬┌┐ ┬ ┬┌─┐ ┬ ┬┬┌─┐┌─┐┬─┐ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ - ├─┘│ │├┴┐│ ││───└┐┌┘│└─┐│ │├┬┘───││││ │││││ │ │ │├┬┘ - ┴ └─┘└─┘┴─┘┴└─┘ └┘ ┴└─┘└─┘┴└─ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ - - - -Flags: - -a, --addr string address to bind to. (default ":9082") - -c, --config string config file location. (default "public-visor-monitor.json") - -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") - -s, --sleep-deregistration duration Sleep time for derigstration process in minutes (default 10ns) - --tag string logging tag (default "public_visor_monitor") - - -``` - -#### svc ssm - -``` - - ┌─┐┬┌─┬ ┬┌─┐┌─┐┌─┐┬┌─┌─┐ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ - └─┐├┴┐└┬┘└─┐│ ││ ├┴┐└─┐───││││ │││││ │ │ │├┬┘ - └─┘┴ ┴ ┴ └─┘└─┘└─┘┴ ┴└─┘ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ - - - -Flags: - -a, --addr string address to bind to. (default ":9081") - -c, --config string config file location. (default "skysocks-monitor.json") - -s, --sleep-deregistration duration Sleep time for derigstration process in minutes (default 10ns) - --tag string logging tag (default "skysocks_monitor") - - -``` - -#### svc vpnm - -``` - - ┬ ┬┌─┐┌┐┌ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ - └┐┌┘├─┘│││───││││ │││││ │ │ │├┬┘ - └┘ ┴ ┘└┘ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ - - - -Flags: - -a, --addr string address to bind to. (default ":9081") - -c, --config string config file location. (default "vpn-monitor.json") - -s, --sleep-deregistration duration Sleep time for derigstration process in minutes (default 10ns) - --tag string logging tag (default "vpn_monitor") - - -``` - -### dmsg - -``` - - ┌┬┐┌┬┐┌─┐┌─┐ - │││││└─┐│ ┬ - ─┴┘┴ ┴└─┘└─┘ - -Available Commands: - pty Dmsg pseudoterminal (pty) - disc DMSG Discovery Server - server DMSG Server - http DMSG http file server - curl DMSG curl utility - web DMSG resolving proxy & browser client - socks DMSG socks5 proxy server & client - mon DMSG monitor of DMSG discovery entries. - - -``` - -#### dmsg pty - -``` - - ┌─┐┌┬┐┬ ┬ - ├─┘ │ └┬┘ - ┴ ┴ ┴ - -Available Commands: - cli DMSG pseudoterminal command line interface - host DMSG host for pseudoterminal command line interface - ui DMSG pseudoterminal GUI - - -``` - -##### dmsg pty cli - -``` - - ┌┬┐┌┬┐┌─┐┌─┐┌─┐┌┬┐┬ ┬ ┌─┐┬ ┬ - │││││└─┐│ ┬├─┘ │ └┬┘───│ │ │ - ─┴┘┴ ┴└─┘└─┘┴ ┴ ┴ └─┘┴─┘┴ -DMSG pseudoterminal command line interface - -Available Commands: - whitelist lists all whitelisted public keys - whitelist-add adds public key(s) to the whitelist - whitelist-remove removes public key(s) from the whitelist - -Flags: - --addr dmsg.Addr remote dmsg address of format 'pk:port' - If unspecified, the pty will start locally - (default 000000000000000000000000000000000000000000000000000000000000000000:~) - -a, --args strings command arguments - -r, --cliaddr string address to use for dialing to dmsgpty-host (default "/tmp/dmsgpty.sock") - -n, --clinet string network to use for dialing to dmsgpty-host (default "unix") - -c, --cmd string name of command to run - (default "/bin/bash") - -p, --confpath string config path (default "config.json") - - -``` - -###### dmsg pty cli whitelist - -``` -lists all whitelisted public keys - - - - -``` - -###### dmsg pty cli whitelist-add - -``` -adds public key(s) to the whitelist - - - - -``` - -###### dmsg pty cli whitelist-remove - -``` -removes public key(s) from the whitelist - - - - -``` - -##### dmsg pty host - -``` - - ┌┬┐┌┬┐┌─┐┌─┐┌─┐┌┬┐┬ ┬ ┬ ┬┌─┐┌─┐┌┬┐ - │││││└─┐│ ┬├─┘ │ └┬┘───├─┤│ │└─┐ │ - ─┴┘┴ ┴└─┘└─┘┴ ┴ ┴ ┴ ┴└─┘└─┘ ┴ -DMSG host for pseudoterminal command line interface - -Available Commands: - confgen generates config file - -Flags: - --cliaddr string address used for listening for cli connections (default "/tmp/dmsgpty.sock") - --clinet string network used for listening for cli connections (default "unix") - -c, --confpath string config path (default "./config.json") - --confstdin config will be read from stdin if set - --dmsgdisc string dmsg discovery address (default "http://dmsgd.skywire.skycoin.com") - --dmsgport uint16 dmsg port for listening for remote hosts (default 22) - --dmsgsessions int minimum number of dmsg sessions to ensure (default 1) - --envprefix string env prefix (default "DMSGPTY") - --wl cipher.PubKeys whitelist of the dmsgpty-host (default public keys: - ) - - -``` - -###### dmsg pty host confgen - -``` -generates config file - - - -Flags: - --unsafe will unsafely write config if set - - -``` - -##### dmsg pty ui - -``` - - ┌┬┐┌┬┐┌─┐┌─┐┌─┐┌┬┐┬ ┬ ┬ ┬┬ - │││││└─┐│ ┬├─┘ │ └┬┘───│ ││ - ─┴┘┴ ┴└─┘└─┘┴ ┴ ┴ └─┘┴ - DMSG pseudoterminal GUI - - - -Flags: - --addr string network address to serve UI on (default ":8080") - --arg stringArray command arguments to include when initiating pty - --cmd string command to run when initiating pty (default "/bin/bash") - --haddr string dmsgpty host network address (default "/tmp/dmsgpty.sock") - --hnet string dmsgpty host network name (default "unix") - - -``` - -#### dmsg disc - -``` - - ┌┬┐┌┬┐┌─┐┌─┐ ┌┬┐┬┌─┐┌─┐┌─┐┬ ┬┌─┐┬─┐┬ ┬ - │││││└─┐│ ┬───│││└─┐│ │ │└┐┌┘├┤ ├┬┘└┬┘ - ─┴┘┴ ┴└─┘└─┘ ─┴┘┴└─┘└─┘└─┘ └┘ └─┘┴└─ ┴ -DMSG Discovery Server ------ depends: redis ----- -skywire cli config gen-keys > dmsgd-config.json -skywire dmsg disc --sk $(tail -n1 dmsgd-config.json) - - - -Flags: - -a, --addr string address to bind to (default ":9090") - --auth string auth passphrase as simple auth for official dmsg servers registration - --dmsgPort uint16 dmsg port value (default 80) - --enable-load-testing enable load testing - --entry-timeout duration discovery entry timeout (default 3m0s) - -m, --metrics string address to serve metrics API from - --official-servers string list of official dmsg servers keys separated by comma - --redis string connections string for a redis store (default "redis://localhost:6379") - --sk cipher.SecKey dmsg secret key - (default 0000000000000000000000000000000000000000000000000000000000000000) - --syslog string address in which to dial to syslog server - --syslog-lvl string minimum log level to report (default "debug") - --syslog-net string network in which to dial to syslog server (default "udp") - --tag string tag used for logging and metrics (default "dmsg_disc") - --test-environment distinguished between prod and test environment - -t, --test-mode in testing mode - --whitelist-keys string list of whitelisted keys of network monitor used for deregistration - - -``` - -#### dmsg server - -``` - - ┌┬┐┌┬┐┌─┐┌─┐ ┌─┐┌─┐┬─┐┬ ┬┌─┐┬─┐ - ││││││└─┐│ ┬ ─ └─┐├┤ ├┬┘└┐┌┘├┤ ├┬┘ - ─┴┘┴ ┴└─┘└─┘ └─┘└─┘┴└─ └┘ └─┘┴└─ -DMSG Server -skywire dmsg server config gen -o dmsg-config.json -skywire dmsg server start dmsg-config.json - -Available Commands: - config Generate a dmsg-server config - start Start Dmsg Server - - -``` - -##### dmsg server config - -``` -Generate a dmsg-server config - -Available Commands: - gen Generate a config file - - -``` - -###### dmsg server config gen - -``` -Generate a config file - - - -Flags: - -o, --output string config output path/name - -t, --testenv use test deployment - - -``` - -##### dmsg server start - -``` -Start Dmsg Server - - - -Flags: - --auth string auth passphrase as simple auth for official dmsg servers registration - -c, --config string location of config file (STDIN to read from standard input) (default "config.json") - --limit-ip int set limitation of IPs want connect to specific dmsg-server, default value is 15 (default 15) - -m, --metrics string address to serve metrics API from - --stdin whether to read config via stdin - --syslog string address in which to dial to syslog server - --syslog-lvl string minimum log level to report (default "debug") - --syslog-net string network in which to dial to syslog server (default "udp") - --tag string tag used for logging and metrics (default "dmsg_srv") - - -``` - -#### dmsg http - -``` - - ┌┬┐┌┬┐┌─┐┌─┐┬ ┬┌┬┐┌┬┐┌─┐ - │││││└─┐│ ┬├─┤ │ │ ├─┘ - ─┴┘┴ ┴└─┘└─┘┴ ┴ ┴ ┴ ┴ -DMSG http file server - - - -Flags: - -d, --dir string local dir to serve via dmsghttp (default ".") - -D, --dmsg-disc string dmsg discovery url default: - http://dmsgd.skywire.skycoin.com - -p, --port uint dmsg port to serve from (default 80) - -s, --sk cipher.SecKey a random key is generated if unspecified - - (default 0000000000000000000000000000000000000000000000000000000000000000) - -w, --wl string whitelist keys, comma separated - - -``` - -#### dmsg curl - -``` - - ┌┬┐┌┬┐┌─┐┌─┐┌─┐┬ ┬┬─┐┬ - │││││└─┐│ ┬│ │ │├┬┘│ - ─┴┘┴ ┴└─┘└─┘└─┘└─┘┴└─┴─┘ -DMSG curl utility - - - -Flags: - -a, --agent AGENT identify as AGENT (default "dmsgcurl/unknown") - -d, --data string dmsghttp POST data - -c, --dmsg-disc string dmsg discovery url default: - http://dmsgd.skywire.skycoin.com - -l, --loglvl string [ debug | warn | error | fatal | panic | trace | info ] (default "fatal") - -o, --out string output filepath - -r, --replace replace exist file with new downloaded - -e, --sess int number of dmsg servers to connect to (default 1) - -s, --sk cipher.SecKey a random key is generated if unspecified - - (default 0000000000000000000000000000000000000000000000000000000000000000) - -t, --try int download attempts (0 unlimits) (default 1) - -w, --wait int time to wait between fetches - - -``` - -#### dmsg web - -``` - - ┌┬┐┌┬┐┌─┐┌─┐┬ ┬┌─┐┌┐ - │││││└─┐│ ┬│││├┤ ├┴┐ - ─┴┘┴ ┴└─┘└─┘└┴┘└─┘└─┘ -DMSG resolving proxy & browser client - access websites over dmsg - -Available Commands: - gen-keys generate public / secret keypair - -Flags: - -d, --dmsg-disc string dmsg discovery url default: - http://dmsgd.skywire.skycoin.com - -f, --filter string domain suffix to filter (default ".dmsg") - -l, --loglvl string [ debug | warn | error | fatal | panic | trace | info ] - -p, --port string port to serve the web application (default "8080") - -r, --proxy string configure additional socks5 proxy for dmsgweb (i.e. 127.0.0.1:1080) - -t, --resolve string resolve the specified dmsg address:port on the local port & disable proxy - -e, --sess int number of dmsg servers to connect to (default 1) - -s, --sk cipher.SecKey a random key is generated if unspecified - - (default 0000000000000000000000000000000000000000000000000000000000000000) - -q, --socks string port to serve the socks5 proxy (default "4445") - - -``` - -##### dmsg web gen-keys - -``` -generate public / secret keypair - - - - -``` - -#### dmsg socks - -``` - - ┌┬┐┌┬┐┌─┐┌─┐ ┌─┐┌─┐┌─┐┬┌─┌─┐ - │││││└─┐│ ┬───└─┐│ ││ ├┴┐└─┐ - ─┴┘┴ ┴└─┘└─┘ └─┘└─┘└─┘┴ ┴└─┘ -DMSG socks5 proxy server & client - -Available Commands: - server dmsg socks5 proxy server - client socks5 proxy client for dmsg socks5 proxy server - - -``` - -##### dmsg socks server - -``` -dmsg socks5 proxy server - - - -Flags: - -D, --dmsg-disc string dmsg discovery url (default "http://dmsgd.skywire.skycoin.com") - -q, --dport uint16 dmsg port to serve socks5 (default 1081) - -s, --sk cipher.SecKey a random key is generated if unspecified - - (default 0000000000000000000000000000000000000000000000000000000000000000) - -w, --wl string whitelist keys, comma separated - - -``` - -##### dmsg socks client - -``` -socks5 proxy client for dmsg socks5 proxy server - - - -Flags: - -D, --dmsg-disc string dmsg discovery url (default "http://dmsgd.skywire.skycoin.com") - -q, --dport uint16 dmsg port to connect to socks5 server (default 1081) - -k, --pk string dmsg socks5 proxy server public key to connect to - -p, --port int TCP port to serve SOCKS5 proxy locally (default 1081) - -s, --sk cipher.SecKey a random key is generated if unspecified - - (default 0000000000000000000000000000000000000000000000000000000000000000) - - -``` - -#### dmsg mon - -``` - - ┌┬┐┌┬┐┌─┐┌─┐ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ - │││││└─┐│ ┬───││││ │││││ │ │ │├┬┘ - ─┴┘┴ ┴└─┘└─┘ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ - - - -Flags: - -a, --addr string address to bind to. (default ":9080") - -b, --batchsize int Batch size of deregistration (default 20) - -c, --config string config file location. (default "dmsg-monitor.json") - -d, --dmsg-url string url to dmsg data. - -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") - -s, --sleep-deregistration duration Sleep time for derigstration process in minutes (default 60ns) - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "dmsg_monitor") - -u, --ut-url string url to uptime tracker visor data. - - -``` - -### app - -``` - - ┌─┐┌─┐┌─┐┌─┐ - ├─┤├─┘├─┘└─┐ - ┴ ┴┴ ┴ └─┘ - -Available Commands: - vpn-server skywire vpn server application - vpn-client skywire vpn client application - skysocks-client skywire socks5 proxy client application - skysocks skywire socks5 proxy server application - skychat skywire chat application - - -``` - -#### app vpn-server - -``` - - ┬ ┬┌─┐┌┐┌ ┌─┐┌─┐┬─┐┬ ┬┌─┐┬─┐ - └┐┌┘├─┘│││───└─┐├┤ ├┬┘└┐┌┘├┤ ├┬┘ - └┘ ┴ ┘└┘ └─┘└─┘┴└─ └┘ └─┘┴└─ - - - -Flags: - --netifc string Default network interface for multiple available interfaces - --passcode string passcode to authenticate connecting users - --pk string local pubkey - --secure Forbid connections from clients to server local network (default true) - --sk string local seckey - - -``` - -#### app vpn-client - -``` - - ┬ ┬┌─┐┌┐┌ ┌─┐┬ ┬┌─┐┌┐┌┌┬┐ - └┐┌┘├─┘│││───│ │ │├┤ │││ │ - └┘ ┴ ┘└┘ └─┘┴─┘┴└─┘┘└┘ ┴ - - - -Flags: - --dns string address of DNS want set to tun - --killswitch If set, the Internet won't be restored during reconnection attempts - --passcode string passcode to authenticate connection - --pk string local pubkey - --sk string local seckey - --srv string PubKey of the server to connect to - - -``` - -#### app skysocks-client - -``` - - ┌─┐┬┌─┬ ┬┌─┐┌─┐┌─┐┬┌─┌─┐ ┌─┐┬ ┬┌─┐┌┐┌┌┬┐ - └─┐├┴┐└┬┘└─┐│ ││ ├┴┐└─┐───│ │ │├┤ │││ │ - └─┘┴ ┴ ┴ └─┘└─┘└─┘┴ ┴└─┘ └─┘┴─┘┴└─┘┘└┘ ┴ - - - -Flags: - --addr string Client address to listen on (default ":1080") - --http string http proxy mode - --srv string PubKey of the server to connect to - - -``` - -#### app skysocks - -``` - - ┌─┐┬┌─┬ ┬┌─┐┌─┐┌─┐┬┌─┌─┐ - └─┐├┴┐└┬┘└─┐│ ││ ├┴┐└─┐ - └─┘┴ ┴ ┴ └─┘└─┘└─┘┴ ┴└─┘ - - - -Flags: - --passcode string passcode to authenticate connecting users - - -``` - -#### app skychat - -``` - - ┌─┐┬┌─┬ ┬┌─┐┬ ┬┌─┐┌┬┐ - └─┐├┴┐└┬┘│ ├─┤├─┤ │ - └─┘┴ ┴ ┴ └─┘┴ ┴┴ ┴ ┴ - - - -Flags: - --addr string address to bind, put an * before the port if you want to be able to access outside localhost (default ":8001") - - -``` - -### tree - -``` -subcommand tree - - - - -``` - -### doc - -``` -generate markdown docs - - UNHIDEFLAGS=1 go run cmd/skywire-deployment/skywire.go doc - - UNHIDEFLAGS=1 go run cmd/skywire-deployment/skywire.go doc > cmd/skywire-deployment/README1.md - - generate toc: - - cat cmd/skywire-deployment/README1.md | gh-md-toc - - - - -``` diff --git a/cmd/skywire-deployment/skywire.go b/cmd/skywire-deployment/skywire.go deleted file mode 100644 index a191baad99..0000000000 --- a/cmd/skywire-deployment/skywire.go +++ /dev/null @@ -1,407 +0,0 @@ -// cmd/skywire-deployment/skywire-deployment.go -/* -skywire deployment -*/ -package main - -import ( - "fmt" - "log" - "os" - "path/filepath" - "strings" - - "github.com/bitfield/script" - cc "github.com/ivanpirog/coloredcobra" - "github.com/pterm/pterm" - "github.com/pterm/pterm/putils" - dmsgdisc "github.com/skycoin/dmsg/cmd/dmsg-discovery/commands" - dmsgserver "github.com/skycoin/dmsg/cmd/dmsg-server/commands" - dmsgsocks "github.com/skycoin/dmsg/cmd/dmsg-socks5/commands" - dmsgcurl "github.com/skycoin/dmsg/cmd/dmsgcurl/commands" - dmsghttp "github.com/skycoin/dmsg/cmd/dmsghttp/commands" - dmsgptycli "github.com/skycoin/dmsg/cmd/dmsgpty-cli/commands" - dmsgptyhost "github.com/skycoin/dmsg/cmd/dmsgpty-host/commands" - dmsgptyui "github.com/skycoin/dmsg/cmd/dmsgpty-ui/commands" - dmsgweb "github.com/skycoin/dmsg/cmd/dmsgweb/commands" - sd "github.com/skycoin/skycoin-service-discovery/cmd/service-discovery/commands" - "github.com/spf13/cobra" - - ar "github.com/skycoin/skywire-services/cmd/address-resolver/commands" - confbs "github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands" - dmsgmon "github.com/skycoin/skywire-services/cmd/dmsg-monitor/commands" - kg "github.com/skycoin/skywire-services/cmd/keys-gen/commands" - lc "github.com/skycoin/skywire-services/cmd/liveness-checker/commands" - nwmon "github.com/skycoin/skywire-services/cmd/network-monitor/commands" - nv "github.com/skycoin/skywire-services/cmd/node-visualizer/commands" - pvmon "github.com/skycoin/skywire-services/cmd/public-visor-monitor/commands" - rf "github.com/skycoin/skywire-services/cmd/route-finder/commands" - ssmon "github.com/skycoin/skywire-services/cmd/skysocks-monitor/commands" - se "github.com/skycoin/skywire-services/cmd/sw-env/commands" - tpd "github.com/skycoin/skywire-services/cmd/transport-discovery/commands" - tps "github.com/skycoin/skywire-services/cmd/transport-setup/commands" - vpnmon "github.com/skycoin/skywire-services/cmd/vpn-monitor/commands" - "github.com/skycoin/skywire-utilities/pkg/buildinfo" - sc "github.com/skycoin/skywire/cmd/apps/skychat/commands" - ssc "github.com/skycoin/skywire/cmd/apps/skysocks-client/commands" - ss "github.com/skycoin/skywire/cmd/apps/skysocks/commands" - vpnc "github.com/skycoin/skywire/cmd/apps/vpn-client/commands" - vpns "github.com/skycoin/skywire/cmd/apps/vpn-server/commands" - sn "github.com/skycoin/skywire/cmd/setup-node/commands" - scli "github.com/skycoin/skywire/cmd/skywire-cli/commands" - "github.com/skycoin/skywire/pkg/visor" -) - -func init() { - dmsgptyCmd.AddCommand( - dmsgptycli.RootCmd, - dmsgptyhost.RootCmd, - dmsgptyui.RootCmd, - ) - dmsgCmd.AddCommand( - dmsgptyCmd, - dmsgdisc.RootCmd, - dmsgserver.RootCmd, - dmsghttp.RootCmd, - dmsgcurl.RootCmd, - dmsgweb.RootCmd, - dmsgsocks.RootCmd, - dmsgmon.RootCmd, - ) - svcCmd.AddCommand( - sn.RootCmd, - tpd.RootCmd, - tps.RootCmd, - ar.RootCmd, - rf.RootCmd, - confbs.RootCmd, - kg.RootCmd, - lc.RootCmd, - nv.RootCmd, - se.RootCmd, - sd.RootCmd, - nwmon.RootCmd, - pvmon.RootCmd, - ssmon.RootCmd, - vpnmon.RootCmd, - ) - appsCmd.AddCommand( - vpns.RootCmd, - vpnc.RootCmd, - ssc.RootCmd, - ss.RootCmd, - sc.RootCmd, - ) - RootCmd.AddCommand( - visor.RootCmd, - scli.RootCmd, - svcCmd, - dmsgCmd, - appsCmd, - treeCmd, - docCmd, - ) - visor.RootCmd.Long = ` - ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┬ ┬┬┌─┐┌─┐┬─┐ - └─┐├┴┐└┬┘││││├┬┘├┤───└┐┌┘│└─┐│ │├┬┘ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └┘ ┴└─┘└─┘┴└─` - dmsgcurl.RootCmd.Use = "curl" - dmsgweb.RootCmd.Use = "web" - dmsgptycli.RootCmd.Use = "cli" - dmsgptyhost.RootCmd.Use = "host" - dmsgptyui.RootCmd.Use = "ui" - dmsgdisc.RootCmd.Use = "disc" - dmsgserver.RootCmd.Use = "server" - dmsghttp.RootCmd.Use = "http" - dmsgcurl.RootCmd.Use = "curl" - dmsgweb.RootCmd.Use = "web" - dmsgsocks.RootCmd.Use = "socks" - dmsgmon.RootCmd.Use = "mon" - tpd.RootCmd.Use = "tpd" - tps.RootCmd.Use = "tps" - ar.RootCmd.Use = "ar" - rf.RootCmd.Use = "rf" - confbs.RootCmd.Use = "cb" - kg.RootCmd.Use = "kg" - lc.RootCmd.Use = "lc" - nv.RootCmd.Use = "nv" - vpnmon.RootCmd.Use = "vpnm" - pvmon.RootCmd.Use = "pvm" - ssmon.RootCmd.Use = "ssm" - nwmon.RootCmd.Use = "nwmon" - se.RootCmd.Use = "se" - sd.RootCmd.Use = "sd" - sn.RootCmd.Use = "sn" - scli.RootCmd.Use = "cli" - visor.RootCmd.Use = "visor" - vpns.RootCmd.Use = "vpn-server" - vpnc.RootCmd.Use = "vpn-client" - ssc.RootCmd.Use = "skysocks-client" - ss.RootCmd.Use = "skysocks" - sc.RootCmd.Use = "skychat" - - var helpflag bool - RootCmd.SetUsageTemplate(help) - RootCmd.PersistentFlags().BoolVarP(&helpflag, "help", "h", false, "help for "+RootCmd.Use) - RootCmd.SetHelpCommand(&cobra.Command{Hidden: true}) - RootCmd.PersistentFlags().MarkHidden("help") //nolint - RootCmd.CompletionOptions.DisableDefaultCmd = true - RootCmd.SetUsageTemplate(help) - -} - -// RootCmd contains literally every 'command' from four repos here -var RootCmd = &cobra.Command{ - Use: func() string { - return strings.Split(filepath.Base(strings.ReplaceAll(strings.ReplaceAll(fmt.Sprintf("%v", os.Args), "[", ""), "]", "")), " ")[0] - }(), - Long: ` - ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ - └─┐├┴┐└┬┘││││├┬┘├┤ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘`, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, - Version: buildinfo.Version(), -} - -// RootCmd contains all subcommands -var svcCmd = &cobra.Command{ - Use: "svc", - Short: "Skywire services", - Long: ` - ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┌─┐┌─┐┬─┐┬ ┬┬┌─┐┌─┐┌─┐ - └─┐├┴┐└┬┘││││├┬┘├┤───└─┐├┤ ├┬┘└┐┌┘││ ├┤ └─┐ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └─┘└─┘┴└─ └┘ ┴└─┘└─┘└─┘`, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, - Version: buildinfo.Version(), -} - -// RootCmd contains all binaries which may be separately compiled as subcommands -var dmsgCmd = &cobra.Command{ - Use: "dmsg", - Short: "Dmsg services & utilities", - Long: ` - ┌┬┐┌┬┐┌─┐┌─┐ - │││││└─┐│ ┬ - ─┴┘┴ ┴└─┘└─┘ `, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, -} - -var dmsgptyCmd = &cobra.Command{ - Use: "pty", - Short: "Dmsg pseudoterminal (pty)", - Long: ` - ┌─┐┌┬┐┬ ┬ - ├─┘ │ └┬┘ - ┴ ┴ ┴ `, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, -} -var appsCmd = &cobra.Command{ - Use: "app", - Short: "skywire native applications", - Long: ` - ┌─┐┌─┐┌─┐┌─┐ - ├─┤├─┘├─┘└─┐ - ┴ ┴┴ ┴ └─┘`, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, -} - -var treeCmd = &cobra.Command{ - Use: "tree", - Short: "subcommand tree", - Long: `subcommand tree`, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, - Run: func(cmd *cobra.Command, args []string) { - // You can use a LeveledList here, for easy generation. - leveledList := pterm.LeveledList{} - leveledList = append(leveledList, pterm.LeveledListItem{Level: 0, Text: RootCmd.Use}) - for _, j := range RootCmd.Commands() { - use := strings.Split(j.Use, " ") - leveledList = append(leveledList, pterm.LeveledListItem{Level: 1, Text: use[0]}) - for _, k := range j.Commands() { - use := strings.Split(k.Use, " ") - leveledList = append(leveledList, pterm.LeveledListItem{Level: 2, Text: use[0]}) - for _, l := range k.Commands() { - use := strings.Split(l.Use, " ") - leveledList = append(leveledList, pterm.LeveledListItem{Level: 3, Text: use[0]}) - for _, m := range l.Commands() { - use := strings.Split(m.Use, " ") - leveledList = append(leveledList, pterm.LeveledListItem{Level: 4, Text: use[0]}) - for _, n := range m.Commands() { - use := strings.Split(n.Use, " ") - leveledList = append(leveledList, pterm.LeveledListItem{Level: 5, Text: use[0]}) - for _, o := range n.Commands() { - use := strings.Split(o.Use, " ") - leveledList = append(leveledList, pterm.LeveledListItem{Level: 6, Text: use[0]}) - for _, p := range o.Commands() { - use := strings.Split(p.Use, " ") - leveledList = append(leveledList, pterm.LeveledListItem{Level: 7, Text: use[0]}) - } - } - } - } - } - } - } - // Generate tree from LeveledList. - r := putils.TreeFromLeveledList(leveledList) - - // Render TreePrinter - err := pterm.DefaultTree.WithRoot(r).Render() - if err != nil { - log.Fatal("render subcommand tree: ", err) - } - }, -} - -// for toc generation use: https://github.com/ekalinin/github-markdown-toc.go -var docCmd = &cobra.Command{ - Use: "doc", - Short: "generate markdown docs", - Long: `generate markdown docs - - UNHIDEFLAGS=1 go run cmd/skywire-deployment/skywire.go doc - - UNHIDEFLAGS=1 go run cmd/skywire-deployment/skywire.go doc > cmd/skywire-deployment/README1.md - - generate toc: - - cat cmd/skywire-deployment/README1.md | gh-md-toc`, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, - Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("\n# %s\n", "skywire documentation") - fmt.Printf("\n## %s\n", "subcommand tree") - fmt.Printf("\n%s\n", "A tree representation of the skywire subcommands") - fmt.Printf("\n```\n") - _, err := script.Exec(os.Args[0] + " tree").Stdout() //nolint - if err != nil { - fmt.Println(err.Error()) - } - fmt.Printf("\n```\n") - - var use string - for _, j := range RootCmd.Commands() { - use = strings.Split(j.Use, " ")[0] - fmt.Printf("\n### %s\n", use) - fmt.Printf("\n```\n") - j.Help() //nolint - fmt.Printf("\n```\n") - if j.Name() == "cli" { - fmt.Printf("\n%s\n", "skywire command line interface") - fmt.Printf("\n## %s\n", RootCmd.Use) - fmt.Printf("\n```\n") - RootCmd.Help() //nolint - fmt.Printf("\n```\n") - fmt.Printf("\n## %s\n", "global flags") - fmt.Printf("\n%s\n", "The skywire-cli interacts with the running visor via rpc calls. By default the rpc server is available on localhost:3435. The rpc address and port the visor is using may be changed in the config file, once generated.") - - fmt.Printf("\n%s\n", "It is not recommended to expose the rpc server on the local network. Exposing the rpc allows unsecured access to the machine over the local network") - fmt.Printf("\n```\n") - fmt.Printf("\n%s\n", "Global Flags:") - fmt.Printf("\n%s\n", " --rpc string RPC server address (default \"localhost:3435\")") - fmt.Printf("\n%s\n", " --json bool print output as json") - fmt.Printf("\n```\n") - } - for _, k := range j.Commands() { - use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] - fmt.Printf("\n#### %s\n", use) - fmt.Printf("\n```\n") - k.Help() //nolint - fmt.Printf("\n```\n") - if k.Name() == "survey" { - fmt.Printf("\n```\n") - _, err = script.Exec("sudo " + os.Args[0] + ` survey`).Stdout() //nolint - if err != nil { - fmt.Println(err.Error()) - } - fmt.Printf("\n```\n") - } - for _, l := range k.Commands() { - use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + " " + strings.Split(l.Use, " ")[0] - fmt.Printf("\n##### %s\n", use) - fmt.Printf("\n```\n") - l.Help() //nolint - fmt.Printf("\n```\n") - if l.Name() == "gen" { - fmt.Printf("\n##### Example for package / msi\n") - fmt.Printf("\n```\n") - fmt.Printf("$ skywire cli config gen -bpirxn\n") - _, err = script.Exec(os.Args[0] + ` cli config gen -bpirxn`).Stdout() //nolint - if err != nil { - fmt.Println(err.Error()) - } - fmt.Printf("\n```\n") - } - for _, m := range l.Commands() { - use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + " " + strings.Split(l.Use, " ")[0] + " " + strings.Split(m.Use, " ")[0] - fmt.Printf("\n###### %s\n", use) - fmt.Printf("\n```\n") - m.Help() //nolint - fmt.Printf("\n```\n") - for _, n := range m.Commands() { - use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + " " + strings.Split(l.Use, " ")[0] + " " + strings.Split(m.Use, " ")[0] + " " + strings.Split(n.Use, " ")[0] - fmt.Printf("\n###### %s\n", use) - fmt.Printf("\n```\n") - m.Help() //nolint - fmt.Printf("\n```\n") - for _, o := range n.Commands() { - use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + " " + strings.Split(l.Use, " ")[0] + " " + strings.Split(m.Use, " ")[0] + " " + strings.Split(n.Use, " ")[0] + " " + strings.Split(o.Use, " ")[0] - fmt.Printf("\n###### %s\n", use) - fmt.Printf("\n```\n") - m.Help() //nolint - fmt.Printf("\n```\n") - } - } - } - } - } - } - }, -} - -func main() { - cc.Init(&cc.Config{ - RootCmd: RootCmd, - Headings: cc.HiBlue + cc.Bold, - Commands: cc.HiBlue + cc.Bold, - CmdShortDescr: cc.HiBlue, - Example: cc.HiBlue + cc.Italic, - ExecName: cc.HiBlue + cc.Bold, - Flags: cc.HiBlue + cc.Bold, - FlagsDescr: cc.HiBlue, - NoExtraNewlines: true, - NoBottomNewline: true, - }) - if err := RootCmd.Execute(); err != nil { - fmt.Println(err) - } -} - -const help = "{{if gt (len .Aliases) 0}}" + - "{{.NameAndAliases}}{{end}}{{if .HasAvailableSubCommands}}" + - "Available Commands:{{range .Commands}}{{if (or .IsAvailableCommand)}}\r\n " + - "{{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}\r\n\r\n" + - "Flags:\r\n" + - "{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}}\r\n\r\n" + - "Global Flags:\r\n" + - "{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}\r\n\r\n" diff --git a/cmd/skywire/README.md b/cmd/skywire/README.md index 79e6c702d5..6fb04b769c 100644 --- a/cmd/skywire/README.md +++ b/cmd/skywire/README.md @@ -1,101 +1,2974 @@ -# Skywire merged binary +# Skywire Merged Binary -`cmd/skywire/skywire.go` represents a merged binary which integrates the skywire-cli, skywire-visor, setup-node, and app binaries. +# skywire documentation +## subcommand tree -``` -$ skywire +A tree representation of the skywire subcommands - ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ - └─┐├┴┐└┬┘││││├┬┘├┤ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ +``` +└─┬skywire + ├──visor + ├─┬cli + │ ├─┬config + │ │ ├──gen + │ │ ├──gen-keys + │ │ ├──check-pk + │ │ └─┬update + │ │ ├──dmsghttp + │ │ ├──svc + │ │ ├──hv + │ │ ├──sc + │ │ ├──ss + │ │ ├──vpnc + │ │ └──vpns + │ ├─┬dmsgpty + │ │ ├──ui + │ │ ├──url + │ │ ├──list + │ │ └──start + │ ├─┬visor + │ │ ├─┬app + │ │ │ ├──ls + │ │ │ ├──start + │ │ │ ├──stop + │ │ │ ├──register + │ │ │ ├──deregister + │ │ │ ├──log + │ │ │ └─┬arg + │ │ │ ├──autostart + │ │ │ ├──killswitch + │ │ │ ├──secure + │ │ │ ├──passcode + │ │ │ └──netifc + │ │ ├─┬hv + │ │ │ ├──ui + │ │ │ ├──cpk + │ │ │ └──pk + │ │ ├──pk + │ │ ├──info + │ │ ├──ver + │ │ ├──ports + │ │ ├──ip + │ │ ├──ping + │ │ ├──test + │ │ ├──start + │ │ ├──reload + │ │ ├──halt + │ │ ├─┬route + │ │ │ ├──ls-rules + │ │ │ ├──rule + │ │ │ ├──rm-rule + │ │ │ └─┬add-rule + │ │ │ ├──app + │ │ │ ├──fwd + │ │ │ └──intfwd + │ │ └─┬tp + │ │ ├──type + │ │ ├──ls + │ │ ├──id + │ │ ├──add + │ │ ├──rm + │ │ └──disc + │ ├─┬vpn + │ │ ├──start + │ │ ├──stop + │ │ ├──status + │ │ ├──list + │ │ ├──ui + │ │ └──url + │ ├──ut + │ ├──fwd + │ ├──rev + │ ├──reward + │ ├──rewards + │ ├──survey + │ ├──rtfind + │ ├──rtree + │ ├─┬mdisc + │ │ ├──entry + │ │ └──servers + │ ├──completion + │ ├──log + │ ├─┬proxy + │ │ ├──start + │ │ ├──stop + │ │ ├──status + │ │ └──list + │ ├──tree + │ └──doc + ├─┬svc + │ ├──sn + │ ├──tpd + │ ├──tps + │ ├──ar + │ ├──rf + │ ├──cb + │ ├──kg + │ ├──lc + │ ├──nv + │ ├─┬se + │ │ ├──visor + │ │ ├──dmsg + │ │ └──setup + │ ├──sd + │ ├──nwmon + │ ├──pvm + │ ├──ssm + │ └──vpnm + ├─┬dmsg + │ ├─┬pty + │ │ ├─┬cli + │ │ │ ├──whitelist + │ │ │ ├──whitelist-add + │ │ │ └──whitelist-remove + │ │ ├─┬host + │ │ │ └──confgen + │ │ └──ui + │ ├──disc + │ ├─┬server + │ │ ├─┬config + │ │ │ └──gen + │ │ └──start + │ ├──http + │ ├──curl + │ ├─┬web + │ │ └──gen-keys + │ ├─┬socks + │ │ ├──server + │ │ └──client + │ └──mon + ├─┬app + │ ├──vpn-server + │ ├──vpn-client + │ ├──skysocks-client + │ ├──skysocks + │ └──skychat + ├──tree + └──doc -Available Commands: - visor Skywire Visor - cli Command Line Interface for skywire - sn Route Setup Node for skywire - app skywire native applications -Flags: - -v, --version version for skywire ``` -``` -$ skywire visor --help +### visor +``` ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┬ ┬┬┌─┐┌─┐┬─┐ └─┐├┴┐└┬┘││││├┬┘├┤───└┐┌┘│└─┐│ │├┬┘ └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └┘ ┴└─┘└─┘┴└─ - Flags: + + +Flags: -c, --config string config file to use (default): skywire-config.json -C, --confarg string supply config as argument -b, --browser open hypervisor ui in default web browser --systray run as systray - -i, --hvui run as hypervisor * + -i, --hvui run as hypervisor * --all show all flags --csrf Request a CSRF token for sensitive hypervisor API requests (default true) - -v, --version version for visor ``` +### cli ``` -$ skywire cli ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┌─┐┬ ┬ └─┐├┴┐└┬┘││││├┬┘├┤───│ │ │ └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └─┘┴─┘┴ -Usage: - skywire cli +Available Commands: + config Generate or update a skywire config + dmsgpty Interact with remote visors + visor Query the Skywire Visor + vpn VPN client + ut query uptime tracker + fwd Control skyforwarding + rev reverse proxy skyfwd + reward skycoin reward address + rewards calculate rewards from uptime data & collected surveys + survey system survey + rtfind Query the Route Finder + rtree map of transports on the skywire network + mdisc Query remote DMSG Discovery + completion Generate completion script + log survey & transport log collection + proxy Skysocks client + tree subcommand tree + doc generate markdown docs + + +``` + +skywire command line interface + +## skywire + +``` + + ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ + └─┐├┴┐└┬┘││││├┬┘├┤ + └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ + +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 + + +``` + +## global flags + +The skywire-cli interacts with the running visor via rpc calls. By default the rpc server is available on localhost:3435. The rpc address and port the visor is using may be changed in the config file, once generated. + +It is not recommended to expose the rpc server on the local network. Exposing the rpc allows unsecured access to the machine over the local network + +``` + +Global Flags: + + --rpc string RPC server address (default "localhost:3435") + + --json bool print output as json + +``` + +#### cli config + +``` +Generate or update the config file used by skywire-visor. Available Commands: - config Generate or update a skywire config - dmsgpty Interact with remote visors - visor Query the Skywire Visor - vpn VPN client - ut query uptime tracker - fwd Control skyforwarding - rev reverse proxy skyfwd - reward skycoin reward address - rewards calculate rewards from uptime data & collected surveys - survey system survey - rtfind Query the Route Finder - rtree map of transports on the skywire network - mdisc Query remote DMSG Discovery - completion Generate completion script - log survey & transport log collection - proxy Skysocks client - tree subcommand tree - doc generate markdown docs + gen Generate a config file + gen-keys generate public / secret keypair + check-pk check a skywire public key + update Update a config file + + +``` + +##### cli config gen + +``` +Generate a config file + + Config defaults file may also be specified with: + SKYENV=/path/to/skywire.conf skywire-cli config gen + print the SKYENV file template with: + skywire-cli config gen -q + + Flags: - -v, --version version for cli + -a, --url string services conf url + + (default "http://conf.skywire.skycoin.com") + --loglvl string level of logging in config (default "info") + -b, --bestproto best protocol (dmsg | direct) based on location + -c, --noauth disable authentication for hypervisor UI + -d, --dmsghttp use dmsg connection to skywire services + -D, --dmsgconf string dmsghttp-config path (default "dmsghttp-config.json") + --minsess int number of dmsg servers to connect to (0 = unlimited) (default 2) + -e, --auth enable auth on hypervisor UI + -f, --force remove pre-existing config + -g, --disableapps string comma separated list of apps to disable + -i, --ishv local hypervisor configuration + -j, --hvpks string list of public keys to add as hypervisor + --dmsgpty string add dmsgpty whitelist PKs + --survey string add survey whitelist PKs + --routesetup string add route setup node PKs + --tpsetup string add transport setup node PKs + -k, --os string (linux / mac / win) paths (default "linux") + -l, --publicip allow display node ip in services + -m, --example-apps add example apps to the config + -n, --stdout write config to stdout + -N, --squash output config without whitespace or newlines + -q, --envs show the environmental variable settings + -o, --out string output config: skywire-config.json + -p, --pkg use path for package: /opt/skywire + -u, --user use paths for user space: /home/d0mo + -r, --regen re-generate existing config & retain keys + -s, --sk cipher.SecKey a random key is generated if unspecified + + (default 0000000000000000000000000000000000000000000000000000000000000000) + -t, --testenv use test deployment conf.skywire.dev + -v, --servevpn enable vpn server + -w, --hide dont print the config to the terminal :: show errors with -n flag + -x, --retainhv retain existing hypervisors with regen + -y, --autoconn disable autoconnect to public visors + -z, --public publicize visor in service discovery + --stcpr int set tcp transport listening port - 0 for random + --sudph int set udp transport listening port - 0 for random + --binpath string set bin_path for visor vative apps + --proxyclientpk string set server public key for proxy client + --startproxyclient autostart proxy client + --noproxyserver disable autostart of proxy server + --proxyserverpass string set proxy server password + --proxyclientpass string password for the proxy client to access the server (if needed) + --killsw string vpn client killswitch + --addvpn string set vpn server public key for vpn client + --vpnpass string password for vpn client to access the vpn server (if needed) + --vpnserverpass string set password to the vpn server + --secure string change secure mode status of vpn server + --netifc string VPN Server network interface (detected: eno1) + --nofetch do not fetch the services from the service conf url + -S, --svcconf string fallback service configuration file (default "services-config.json") + --nodefaults do not use hardcoded defaults for production / test services + --version string custom version testing override + --all show all flags + + +``` +##### Example for package / msi +``` +$ skywire cli config gen -bpirxn +{ + "version": "v1.3.18", + "sk": "eab215b4851fb14cbcb856a0b763923bb0d21dde0ede41eeb7ff176327fe760a", + "pk": "03603bdd732230acfbbeaf769a92487b469176ff84d5cce1041bf36963cbbc1d69", + "dmsg": { + "discovery": "http://dmsgd.skywire.skycoin.com", + "sessions_count": 2, + "servers": [], + "servers_type": "all" + }, + "dmsgpty": { + "dmsg_port": 22, + "cli_network": "unix", + "cli_address": "/tmp/dmsgpty.sock", + "whitelist": [] + }, + "skywire-tcp": { + "pk_table": null, + "listening_address": ":7777" + }, + "transport": { + "discovery": "http://tpd.skywire.skycoin.com", + "address_resolver": "http://ar.skywire.skycoin.com", + "public_autoconnect": true, + "transport_setup": [ + "03530b786c670fc7f5ab9021478c7ec9cd06a03f3ea1416c50c4a8889ef5bba80e", + "03271c0de223b80400d9bd4b7722b536a245eb6c9c3176781ee41e7bac8f9bad21", + "03a792e6d960c88c6fb2184ee4f16714c58b55f0746840617a19f7dd6e021699d9", + "0313efedc579f57f05d4f5bc3fbf0261f31e51cdcfde7e568169acf92c78868926", + "025c7bbf23e3441a36d7e8a1e9d717921e2a49a2ce035680fec4808a048d244c8a", + "030eb6967f6e23e81db0d214f925fc5ce3371e1b059fb8379ae3eb1edfc95e0b46", + "02e582c0a5e5563aad47f561b272e4c3a9f7ac716258b58e58eb50afd83c286a7f", + "02ddc6c749d6ed067bb68df19c9bcb1a58b7587464043b1707398ffa26a9746b26", + "03aa0b1c4e23616872058c11c6efba777c130a85eaf909945d697399a1eb08426d", + "03adb2c924987d8deef04d02bd95236c5ae172fe5dfe7273e0461d96bf4bc220be" + ], + "log_store": { + "type": "file", + "location": "/opt/skywire/local/transport_logs", + "rotation_interval": "168h0m0s" + }, + "stcpr_port": 0, + "sudph_port": 0 + }, + "routing": { + "route_setup_nodes": [ + "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557", + "024fbd3997d4260f731b01abcfce60b8967a6d4c6a11d1008812810ea1437ce438", + "03b87c282f6e9f70d97aeea90b07cf09864a235ef718725632d067873431dd1015" + ], + "route_finder": "http://rf.skywire.skycoin.com", + "route_finder_timeout": "10s", + "min_hops": 0 + }, + "uptime_tracker": { + "addr": "http://ut.skywire.skycoin.com" + }, + "launcher": { + "service_discovery": "http://sd.skycoin.com", + "apps": [ + { + "name": "vpn-client", + "binary": "vpn-client", + "args": [ + "--dns", + "1.1.1.1" + ], + "auto_start": false, + "port": 43 + }, + { + "name": "skychat", + "binary": "skychat", + "args": [ + "--addr", + ":8001" + ], + "auto_start": true, + "port": 1 + }, + { + "name": "skysocks", + "binary": "skysocks", + "auto_start": true, + "port": 3 + }, + { + "name": "skysocks-client", + "binary": "skysocks-client", + "args": [ + "--addr", + ":1080" + ], + "auto_start": false, + "port": 13 + }, + { + "name": "vpn-server", + "binary": "vpn-server", + "auto_start": false, + "port": 44 + } + ], + "server_addr": "localhost:5505", + "bin_path": "/opt/skywire/apps", + "display_node_ip": false + }, + "survey_whitelist": [ + "02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637", + "03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3", + "020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9", + "027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1", + "031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65", + "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a", + "03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4" + ], + "hypervisors": [], + "cli_addr": "localhost:3435", + "log_level": "", + "local_path": "/opt/skywire/local", + "dmsghttp_server_path": "/opt/skywire/local/custom", + "stun_servers": [ + "192.53.117.238:3478", + "170.187.228.44:3478", + "192.53.117.237:3478", + "192.53.117.146:3478", + "192.53.117.60:3478", + "192.53.117.124:3478", + "170.187.228.178:3478", + "170.187.225.246:3478" + ], + "shutdown_timeout": "10s", + "is_public": false, + "persistent_transports": null, + "hypervisor": { + "db_path": "/opt/skywire/users.db", + "enable_auth": true, + "cookies": { + "hash_key": "19a47254be4a7d9ce7664d20b4271bb402434eadfbb6c94dd59922d5cbf89ce3c03f1d54c320ca624fa44e8d85ad0b1df2a84acf607ef1ef7ea63bce99a50c53", + "block_key": "09df61d626fbda1632c91604620ca94c926125a109c4cf2f3d9bb608bd24b904", + "expires_duration": 43200000000000, + "path": "/", + "domain": "" + }, + "dmsg_port": 46, + "http_addr": ":8000", + "enable_tls": false, + "tls_cert_file": "./ssl/cert.pem", + "tls_key_file": "./ssl/key.pem" + } +} ``` +##### cli config gen-keys + ``` -$ skywire sn --help +generate public / secret keypair + + - ┌─┐┌─┐┌┬┐┬ ┬┌─┐ ┌┐┌┌─┐┌┬┐┌─┐ - └─┐├┤ │ │ │├─┘───││││ │ ││├┤ - └─┘└─┘ ┴ └─┘┴ ┘└┘└─┘─┴┘└─┘ +``` + +##### cli config check-pk + +``` +check a skywire public key + + + + +``` + +##### cli config update + +``` +Update a config file +Available Commands: + dmsghttp update dmsghttp-config.json file from config bootstrap service + svc update services-config.json file from config bootstrap service + hv update hypervisor config + sc update skysocks-client config + ss update skysocks-server config + vpnc update vpn-client config + vpns update vpn-server config Flags: - -m, --metrics string address to bind metrics API to - -i, --stdin read config from STDIN - --syslog string syslog server address. E.g. localhost:514 - --tag string logging tag (default "setup_node") + -a, --endpoints update server endpoints + --log-level string level of logging in config + -b, --url string service config URL: conf.skywire.skycoin.com + -t, --testenv use test deployment: conf.skywire.dev + --public-autoconn string change public autoconnect configuration + --set-minhop int change min hops value (default -1) + -i, --input string path of input config file. + -o, --output string config file to output + -u, --user update config at: $HOME/skywire-config.json + + +``` + +###### cli config update dmsghttp + +``` +update dmsghttp-config.json file from config bootstrap service + + + +Flags: + -p, --path string path of dmsghttp-config file, default is for pkg installation (default "/opt/skywire/dmsghttp-config.json") + +Global Flags: + -i, --input string path of input config file. + -o, --output string config file to output + -u, --user update config at: $HOME/skywire-config.json + + +``` + +###### cli config update svc + +``` +update services-config.json file from config bootstrap service + + + +Flags: + -p, --path string path of services-config file, default is for pkg installation (default "/opt/skywire/services-config.json") + +Global Flags: + -i, --input string path of input config file. + -o, --output string config file to output + -u, --user update config at: $HOME/skywire-config.json + + +``` + +###### cli config update hv + +``` +update hypervisor config + + + +Flags: + -+, --add-pks string public keys of hypervisors that should be added to this visor + -r, --reset resets hypervisor configuration + +Global Flags: + -i, --input string path of input config file. + -o, --output string config file to output + -u, --user update config at: $HOME/skywire-config.json + + +``` + +###### cli config update sc + +``` +update skysocks-client config + + + +Flags: + -+, --add-server string add skysocks server address to skysock-client + -r, --reset reset skysocks-client configuration + +Global Flags: + -i, --input string path of input config file. + -o, --output string config file to output + -u, --user update config at: $HOME/skywire-config.json + + +``` + +###### cli config update ss + +``` +update skysocks-server config + + + +Flags: + -s, --passwd string add passcode to skysocks server + -r, --reset reset skysocks configuration + +Global Flags: + -i, --input string path of input config file. + -o, --output string config file to output + -u, --user update config at: $HOME/skywire-config.json + + +``` + +###### cli config update vpnc + +``` +update vpn-client config + + + +Flags: + -x, --killsw string change killswitch status of vpn-client + --add-server string add server address to vpn-client + -s, --pass string add passcode of server if needed + -r, --reset reset vpn-client configurations + +Global Flags: + -i, --input string path of input config file. + -o, --output string config file to output + -u, --user update config at: $HOME/skywire-config.json + + +``` + +###### cli config update vpns + +``` +update vpn-server config + + + +Flags: + -s, --passwd string add passcode to vpn-server + --secure string change secure mode status of vpn-server + --autostart string change autostart of vpn-server + --netifc string set default network interface + -r, --reset reset vpn-server configurations + +Global Flags: + -i, --input string path of input config file. + -o, --output string config file to output + -u, --user update config at: $HOME/skywire-config.json + + +``` + +#### cli dmsgpty + +``` +Interact with remote visors + +Available Commands: + ui Open dmsgpty UI in default browser + url Show dmsgpty UI URL + list List connected visors + start Start dmsgpty session + + +``` + +##### cli dmsgpty ui + +``` +Open dmsgpty UI in default browser + + + +Flags: + -i, --input string read from specified config file + -p, --pkg read from /opt/skywire/skywire.json + -v, --visor string public key of visor to connect to + + +``` + +##### cli dmsgpty url + +``` +Show dmsgpty UI URL + + + +Flags: + -i, --input string read from specified config file + -p, --pkg read from /opt/skywire/skywire.json + -v, --visor string public key of visor to connect to + + +``` + +##### cli dmsgpty list + +``` +List connected visors + + + +Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli dmsgpty start + +``` +Start dmsgpty session + + + +Flags: + -p, --port string port of remote visor dmsgpty (default "22") + --rpc string RPC server address (default "localhost:3435") + + +``` + +#### cli visor + +``` +Query the Skywire Visor + +Available Commands: + app App settings + hv Hypervisor + pk Public key of the visor + info Summary of visor info + ver Version and build info + ports List of Ports + ip IP information of network + ping Ping the visor with given pk + test Test the visor with public visors on network + start start visor + halt Stop a running visor + route View and set rules + tp View and set transports + +Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor app + +``` + + App settings + +Available Commands: + ls List apps + start Launch app + stop Halt app + register Register app + deregister Deregister app + log Logs from app + arg App args + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app ls + +``` + + List apps + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app start + +``` + + Launch app + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app stop + +``` + + Halt app + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") ``` -Refer to the existing documentation for separate binaries until further documentation for the merged binaries are generated. The command structure is otherwise identical. +###### cli visor app register + +``` + + Register app + + + +Flags: + -a, --appname string name of the app + -p, --localpath string path of the local folder (default "./local") + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app deregister + +``` + + Deregister app + + + +Flags: + -k, --procKey string proc key of the app to deregister + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app log + +``` + + Logs from app since RFC3339Nano-formatted timestamp. + + + "beginning" is a special timestamp to fetch all the logs + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app arg + +``` +App args + +Available Commands: + autostart Set app autostart + killswitch Set app killswitch + secure Set app secure + passcode Set app passcode + netifc Set app network interface + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app arg autostart + +``` +App args + +Available Commands: + autostart Set app autostart + killswitch Set app killswitch + secure Set app secure + passcode Set app passcode + netifc Set app network interface + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app arg killswitch + +``` +App args + +Available Commands: + autostart Set app autostart + killswitch Set app killswitch + secure Set app secure + passcode Set app passcode + netifc Set app network interface + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app arg secure + +``` +App args + +Available Commands: + autostart Set app autostart + killswitch Set app killswitch + secure Set app secure + passcode Set app passcode + netifc Set app network interface + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app arg passcode + +``` +App args + +Available Commands: + autostart Set app autostart + killswitch Set app killswitch + secure Set app secure + passcode Set app passcode + netifc Set app network interface + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor app arg netifc + +``` +App args + +Available Commands: + autostart Set app autostart + killswitch Set app killswitch + secure Set app secure + passcode Set app passcode + netifc Set app network interface + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor hv + +``` + + Hypervisor + + + Access the hypervisor UI + + View remote hypervisor public key + +Available Commands: + ui open Hypervisor UI in default browser + cpk Public key of remote hypervisor(s) set in config + pk Public key of remote hypervisor(s) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor hv ui + +``` + + open Hypervisor UI in default browser + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor hv cpk + +``` + + Public key of remote hypervisor(s) set in config + + + +Flags: + -w, --http serve public key via http + -i, --input string path of input config file. + -p, --pkg read from /opt/skywire/skywire.json + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor hv pk + +``` +Public key of remote hypervisor(s) which are currently connected to + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor pk + +``` + + Public key of the visor + + + +Flags: + -w, --http serve public key via http + -i, --input string path of input config file. + -p, --pkg read from {/opt/skywire/apps /opt/skywire/local {/opt/skywire/users.db true}} + -x, --prt string serve public key via http (default "7998") + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor info + +``` + + Summary of visor info + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor ver + +``` + + Version and build info + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor ports + +``` + + List of all ports used by visor services and apps + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor ip + +``` + + IP information of network + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor ping + +``` + + Creates a route with the provided pk as a hop and returns latency on the conn + + + +Flags: + -s, --size int Size of packet, in KB, default is 2KB (default 2) + -t, --tries int Number of tries (default 1) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor test + +``` + + Creates a route with public visors as a hop and returns latency on the conn + + + +Flags: + -c, --count int Count of Public Visors for using in test. (default 2) + -s, --size int Size of packet, in KB, default is 2KB (default 2) + -t, --tries int Number of tries per public visors (default 1) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor start + +``` +start visor + + + +Flags: + -s, --src 'go run' external commands from the skywire sources + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor reload + +``` +reload visor + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor halt + +``` + + Stop a running visor + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor route + +``` + + View and set routing rules + +Available Commands: + ls-rules List routing rules + rule Return routing rule by route ID key + rm-rule Remove routing rule + add-rule Add routing rule + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor route ls-rules + +``` + + List routing rules + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor route rule + +``` + + Return routing rule by route ID key + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor route rm-rule + +``` + + Remove routing rule + + + +Flags: + -a, --all remove all routing rules + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor route add-rule + +``` + + Add routing rule + +Available Commands: + app Add app/consume routing rule + fwd Add forward routing rule + intfwd Add intermediary forward routing rule + +Flags: + --keep-alive duration timeout for rule expiration (default 30s) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor route add-rule app + +``` + + Add routing rule + +Available Commands: + app Add app/consume routing rule + fwd Add forward routing rule + intfwd Add intermediary forward routing rule + +Flags: + --keep-alive duration timeout for rule expiration (default 30s) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor route add-rule fwd + +``` + + Add routing rule + +Available Commands: + app Add app/consume routing rule + fwd Add forward routing rule + intfwd Add intermediary forward routing rule + +Flags: + --keep-alive duration timeout for rule expiration (default 30s) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor route add-rule intfwd + +``` + + Add routing rule + +Available Commands: + app Add app/consume routing rule + fwd Add forward routing rule + intfwd Add intermediary forward routing rule + +Flags: + --keep-alive duration timeout for rule expiration (default 30s) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli visor tp + +``` + + Transports are bidirectional communication protocols + used between two Skywire Visors (or Transport Edges) + + Each Transport is represented as a unique 16 byte (128 bit) + UUID value called the Transport ID + and has a Transport Type that identifies + a specific implementation of the Transport. + + Types: stcp stcpr sudph dmsg + +Available Commands: + type Transport types used by the local visor + ls Available transports + id Transport summary by id + add Add a transport + rm Remove transport(s) by id + disc Discover remote transport(s) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor tp type + +``` + + Transport types used by the local visor + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor tp ls + +``` + + Available transports + + displays transports of the local visor + + + +Flags: + -t, --types strings show transport(s) type(s) comma-separated + -p, --pks strings show transport(s) for public key(s) comma-separated + -l, --logs show transport logs (default true) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor tp id + +``` + + Transport summary by id + + + +Flags: + -i, --id string transport ID + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor tp add + +``` + + Add a transport + + If the transport type is unspecified, + the visor will attempt to establish a transport + in the following order: skywire-tcp, stcpr, sudph, dmsg + + + +Flags: + -r, --rpk string remote public key. + -o, --timeout duration if specified, sets an operation timeout + -t, --type string type of transport to add. + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor tp rm + +``` + + Remove transport(s) by id + + + +Flags: + -a, --all remove all transports + -i, --id string remove transport of given ID + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +###### cli visor tp disc + +``` + + Discover remote transport(s) by ID or public key + + + +Flags: + -i, --id string obtain transport of given ID + -p, --pk string obtain transports by public key + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +#### cli vpn + +``` +VPN client + +Available Commands: + start start the vpn for + stop stop the vpnclient + status vpn client status + list List servers + ui Open VPN UI in default browser + url Show VPN UI URL + +Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli vpn start + +``` +start the vpn for + + + +Flags: + -k, --pk string server public key + -t, --timeout int starting timeout value in second (default 20) + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli vpn stop + +``` +stop the vpnclient + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli vpn status + +``` +vpn client status + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli vpn list + +``` +List vpn servers from service discovery +http://sd.skycoin.com/api/services?type=vpn +http://sd.skycoin.com/api/services?type=vpn&country=US + +Set cache file location to "" to avoid using cache files + + + +Flags: + -m, --cfa int update cache files if older than n minutes (default 5) + --cfs string SD cache file location (default "/tmp/vpnsd.json") + --cfu string UT cache file location. (default "/tmp/ut.json") + -c, --country string filter results by country + -l, --label label keys by country (SLOW) + -o, --noton do not filter by online status in UT + -k, --pk string check vpn service discovery for public key + -r, --raw print raw data + -a, --sdurl string service discovery url (default "http://sd.skycoin.com") + -s, --stats return only a count of the results + -u, --unfilter provide unfiltered results + -w, --uturl string uptime tracker url (default "http://ut.skywire.skycoin.com") + -v, --ver string filter results by version + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli vpn ui + +``` +Open VPN UI in default browser + + + +Flags: + -c, --config string config path + -p, --pkg use package config path: /opt/skywire + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli vpn url + +``` +Show VPN UI URL + + + +Flags: + -c, --config string config path + -p, --pkg use package config path: /opt/skywire + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +#### cli ut + +``` +query uptime tracker + +http://ut.skywire.skycoin.com/uptimes?v=v2 + +Check local visor daily uptime percent with: + skywire-cli ut -k $(skywire-cli visor pk)n +Set cache file location to "" to avoid using cache files + + + +Flags: + -m, --cfa int update cache files if older than n minutes (default 5) + --cfu string UT cache file location. (default "/tmp/ut.json") + -n, --min int list visors meeting minimum uptime (default 75) + -o, --on list currently online visors + -k, --pk string check uptime for the specified key + -s, --stats count the number of results + -u, --url string specify alternative uptime tracker url (default "http://ut.skywire.skycoin.com") + + +``` + +#### cli fwd + +``` +Control skyforwarding + forward local ports over skywire + + + +Flags: + -d, --deregister deregister local port of the external (http) app + -l, --ls list registered local ports + -p, --port int local port of the external (http) app + + +``` + +#### cli rev + +``` +connect or disconnect from remote ports + + + +Flags: + -l, --ls list configured connections + -k, --pk string remote public key to connect to + -p, --port int local port to reverse proxy + -r, --remote int remote port to read from + -d, --stop string disconnect from specified + + +``` + +#### cli reward + +``` + + skycoin reward address set to: + + + +Flags: + --all show all flags + + +``` + +#### cli rewards + +``` + +Collect surveys: skywire-cli log +Fetch uptimes: skywire-cli ut > ut.txt + + + +Flags: + -d, --date string date for which to calculate reward (default "2024-03-12") + -k, --pk string check reward for pubkey + -n, --noarch string disallowed architectures, comma separated (default "amd64") + -y, --year int yearly total rewards (default 408000) + -u, --utfile string uptime tracker data file (default "ut.txt") + -p, --path string path to the surveys (default "log_collecting") + -0, --h0 hide statistical data + -1, --h1 hide survey csv data + -2, --h2 hide reward csv data + -e, --err account for non rewarded keys + + +``` + +#### cli survey + +``` +print the system survey + + + +Flags: + -s, --sha generate checksum of system survey + + +``` + +``` +unknown command "survey" for "skywire" + +``` + +#### cli rtfind + +``` +Query the Route Finder +Assumes the local visor public key as an argument if only one argument is given + + + +Flags: + -n, --min uint16 minimum hops (default 1) + -x, --max uint16 maximum hops (default 1000) + -t, --timeout duration request timeout (default 10s) + -a, --addr string route finder service address + http://rf.skywire.skycoin.com + + +``` + +#### cli rtree + +``` +display a tree representation of transports from TPD + +http://tpd.skywire.skycoin.com/all-transports + +Set cache file location to "" to avoid using cache files + + + +Flags: + -m, --cfa int update cache files if older than n minutes (default 5) + --cft string TPD cache file location (default "/tmp/tpd.json") + --cfu string UT cache file location. (default "/tmp/ut.json") + -o, --noton do not filter by online status in UT + -P, --pad int padding between tree and tpid (default 15) + -p, --pretty print pretty json data + -r, --raw print raw json data + -s, --stats return only statistics + -a, --tpdurl string transport discovery url (default "http://tpd.skywire.skycoin.com") + -w, --uturl string uptime tracker url (default "http://ut.skywire.skycoin.com") + + +``` + +#### cli mdisc + +``` +Query remote DMSG Discovery + +Available Commands: + entry Fetch an entry + servers Fetch available servers + + +``` + +##### cli mdisc entry + +``` +Fetch an entry + + + +Flags: + -a, --addr string DMSG discovery server address + http://dmsgd.skywire.skycoin.com + + +``` + +##### cli mdisc servers + +``` +Fetch available servers + + + +Flags: + --addr string address of DMSG discovery server + (default "http://dmsgd.skywire.skycoin.com") + + +``` + +#### cli completion + +``` +Generate completion script + + + + +``` + +#### cli log + +``` +Fetch health, survey, and transport logging from visors which are online in the uptime tracker +http://ut.skywire.skycoin.com/uptimes?v=v2 +http://ut.skywire.skycoin.com/uptimes?v=v2&visors=;; + + + +Flags: + -e, --env string deployment to get uptimes from (default "prod") + -l, --log fetch only transport logs + -v, --survey fetch only surveys + -f, --file string fetch only a specific file from all online visors + -k, --pks string fetch only from specific public keys ; semicolon separated + -d, --dir string save files to specified dir (default "log_collecting") + -c, --clean delete files and folders on errors + --minv string minimum visor version to fetch from (default "v1.3.15") + --include-versions string list of version that not satisfy our minimum version condition, but we want include them + -n, --duration int number of days before today to fetch transport logs for + --all consider all visors ; no version filtering + --batchSize int number of visor in each batch (default 50) + --maxfilesize int maximum file size allowed to download during collecting logs, in KB (default 1024) + -D, --dmsg-disc string dmsg discovery url + (default "http://dmsgd.skywire.skycoin.com") + -u, --ut string custom uptime tracker url + -s, --sk cipher.SecKey a random key is generated if unspecified + + (default 0000000000000000000000000000000000000000000000000000000000000000) + + +``` + +#### cli proxy + +``` +Skysocks client + +Available Commands: + start start the proxy client + stop stop the proxy client + status proxy client status + list List servers + +Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli proxy start + +``` +start the proxy client + + + +Flags: + -a, --addr string address of proxy for use + -n, --name string name of skysocks client + -k, --pk string server public key + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli proxy stop + +``` +stop the proxy client + + + +Flags: + --all stop all skysocks client + --name string specific skysocks client that want stop + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli proxy status + +``` +proxy client status + + + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +##### cli proxy list + +``` +List proxy servers from service discovery +http://sd.skycoin.com/api/services?type=proxy +http://sd.skycoin.com/api/services?type=proxy&country=US + +Set cache file location to "" to avoid using cache files + + + +Flags: + -m, --cfa int update cache files if older than n minutes (default 5) + --cfs string SD cache file location (default "/tmp/proxysd.json") + --cfu string UT cache file location. (default "/tmp/ut.json") + -c, --country string filter results by country + -l, --label label keys by country (SLOW) + -o, --noton do not filter by online status in UT + -k, --pk string check proxy service discovery for public key + -r, --raw print raw data + -a, --sdurl string service discovery url (default "http://sd.skycoin.com") + -s, --stats return only a count of the results + -u, --unfilter provide unfiltered results + -w, --uturl string uptime tracker url (default "http://ut.skywire.skycoin.com") + -v, --ver string filter results by version + +Global Flags: + --rpc string RPC server address (default "localhost:3435") + + +``` + +#### cli tree + +``` +subcommand tree + + + + +``` + +#### cli doc + +``` +generate markdown docs + + UNHIDEFLAGS=1 go run cmd/skywire-cli/skywire-cli.go doc + + UNHIDEFLAGS=1 go run cmd/skywire-cli/skywire-cli.go doc > cmd/skywire-cli/README1.md + + generate toc: + + cat cmd/skywire-cli/README1.md | gh-md-toc + + + + +``` + +### svc + +``` + + ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┌─┐┌─┐┬─┐┬ ┬┬┌─┐┌─┐┌─┐ + └─┐├┴┐└┬┘││││├┬┘├┤───└─┐├┤ ├┬┘└┐┌┘││ ├┤ └─┐ + └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └─┘└─┘┴└─ └┘ ┴└─┘└─┘└─┘ + +Available Commands: + sn Route Setup Node for skywire + tpd Transport Discovery Server for skywire + tps Transport setup server for skywire + ar Address Resolver Server for skywire + rf Route Finder Server for skywire + cb Config Bootstrap Server for skywire + kg skywire keys generator, prints pub-key and sec-key + lc Liveness checker of the deployment. + nv Node Visualizer Server for skywire + se skywire environment generator + sd Service discovery server + nwmon Network monitor for skywire VPN and Visor. + pvm Public Visor monitor. + ssm Skysocks monitor. + vpnm VPN monitor. + + +``` + +#### svc sn + +``` + + ┌─┐┌─┐┌┬┐┬ ┬┌─┐ ┌┐┌┌─┐┌┬┐┌─┐ + └─┐├┤ │ │ │├─┘───││││ │ ││├┤ + └─┘└─┘ ┴ └─┘┴ ┘└┘└─┘─┴┘└─┘ + + + +Flags: + -m, --metrics string address to bind metrics API to + -i, --stdin read config from STDIN + --syslog string syslog server address. E.g. localhost:514 + --tag string logging tag (default "setup_node") + + +``` + +#### svc tpd + +``` + + ┌┬┐┬─┐┌─┐┌┐┌┌─┐┌─┐┌─┐┬─┐┌┬┐ ┌┬┐┬┌─┐┌─┐┌─┐┬ ┬┌─┐┬─┐┬ ┬ + │ ├┬┘├─┤│││└─┐├─┘│ │├┬┘ │───│││└─┐│ │ │└┐┌┘├┤ ├┬┘└┬┘ + ┴ ┴└─┴ ┴┘└┘└─┘┴ └─┘┴└─ ┴ ─┴┘┴└─┘└─┘└─┘ └┘ └─┘┴└─ ┴ +----- depends: redis, postgresql and initial DB setup ----- +sudo -iu postgres createdb tpd +keys-gen | tee tpd-config.json +PG_USER="postgres" PG_DATABASE="tpd" PG_PASSWORD="" transport-discovery --sk $(tail -n1 tpd-config.json) + + + +Flags: + -a, --addr string address to bind to (default ":9091") + --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") + --dmsgPort uint16 dmsg port value + (default 80) + -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") + -m, --metrics string address to bind metrics API to + --pg-host string host of postgres (default "localhost") + --pg-port string port of postgres (default "5432") + --redis string connections string for a redis store (default "redis://localhost:6379") + --redis-pool-size int redis connection pool size (default 10) + --sk cipher.SecKey dmsg secret key + (default 0000000000000000000000000000000000000000000000000000000000000000) + --syslog string syslog server address. E.g. localhost:514 + --tag string logging tag (default "transport_discovery") + --test-environment distinguished between prod and test environment + -t, --testing enable testing to start without redis + --whitelist-keys string list of whitelisted keys of network monitor used for deregistration + + +``` + +#### svc tps + +``` + + ┌┬┐┬─┐┌─┐┌┐┌┌─┐┌─┐┌─┐┬─┐┌┬┐ ┌─┐┌─┐┌┬┐┬ ┬┌─┐ + │ ├┬┘├─┤│││└─┐├─┘│ │├┬┘ │───└─┐├┤ │ │ │├─┘ + ┴ ┴└─┴ ┴┘└┘└─┘┴ └─┘┴└─ ┴ └─┘└─┘ ┴ └─┘┴ + + + +Flags: + -c, --config string path to config file + -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") + + +``` + +#### svc ar + +``` + + ┌─┐┌┬┐┌┬┐┬─┐┌─┐┌─┐┌─┐ ┬─┐┌─┐┌─┐┌─┐┬ ┬ ┬┌─┐┬─┐ + ├─┤ ││ ││├┬┘├┤ └─┐└─┐───├┬┘├┤ └─┐│ ││ └┐┌┘├┤ ├┬┘ + ┴ ┴─┴┘─┴┘┴└─└─┘└─┘└─┘ ┴└─└─┘└─┘└─┘┴─┘└┘ └─┘┴└─ + +depends: redis + +Note: the specified port must be accessible from the internet ip address or port forwarded for udp +skywire cli config gen-keys > ar-config.json +skywire svc ar --addr ":9093" --redis "redis://localhost:6379" --sk $(tail -n1 ar-config.json) + +Usage: + skywire svc ar + +Flags: + -a, --addr string address to bind to (default ":9093") + --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") + --dmsgPort uint16 dmsg port value + (default 80) + -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") + -m, --metrics string address to bind metrics API to + --redis string connections string for a redis store (default "redis://localhost:6379") + --redis-pool-size int redis connection pool size (default 10) + --sk cipher.SecKey dmsg secret key + (default 0000000000000000000000000000000000000000000000000000000000000000) + --syslog string syslog server address. E.g. localhost:514 + --tag string logging tag (default "address_resolver") + --test-environment distinguished between prod and test environment + -t, --testing enable testing to start without redis + --whitelist-keys string list of whitelisted keys of network monitor used for deregistration + + +``` + +#### svc rf + +``` + + ┬─┐┌─┐┬ ┬┌┬┐┌─┐ ┌─┐┬┌┐┌┌┬┐┌─┐┬─┐ + ├┬┘│ ││ │ │ ├┤───├┤ ││││ ││├┤ ├┬┘ + ┴└─└─┘└─┘ ┴ └─┘ └ ┴┘└┘─┴┘└─┘┴└─ +----- depends: postgres and initial db setup ----- +sudo -iu postgres createdb rf +skywire cli config gen-keys | tee rf-config.json +PG_USER="postgres" PG_DATABASE="rf" PG_PASSWORD="" route-finder --addr ":9092" --sk $(tail -n1 rf-config.json) + + + +Flags: + -a, --addr string address to bind to (default ":9092") + --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") + --dmsgPort uint16 dmsg port value + (default 80) + -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") + -m, --metrics string address to bind metrics API to + --pg-host string host of postgres (default "localhost") + --pg-port string port of postgres (default "5432") + --sk cipher.SecKey dmsg secret key + (default 0000000000000000000000000000000000000000000000000000000000000000) + --syslog string syslog server address. E.g. localhost:514 + --tag string logging tag (default "route_finder") + -t, --testing enable testing to start without redis + + +``` + +#### svc cb + +``` + + ┌─┐┌─┐┌┐┌┌─┐┬┌─┐ ┌┐ ┌─┐┌─┐┌┬┐┌─┐┌┬┐┬─┐┌─┐┌─┐┌─┐┌─┐┬─┐ + │ │ ││││├┤ ││ ┬───├┴┐│ ││ │ │ └─┐ │ ├┬┘├─┤├─┘├─┘├┤ ├┬┘ + └─┘└─┘┘└┘└ ┴└─┘ └─┘└─┘└─┘ ┴ └─┘ ┴ ┴└─┴ ┴┴ ┴ └─┘┴└─ + + + +Flags: + -a, --addr string address to bind to (default ":9082") + -c, --config string stun server list file location (default "./config.json") + --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") + --dmsgPort uint16 dmsg port value + (default 80) + -d, --domain string the domain of the endpoints (default "skywire.skycoin.com") + --sk cipher.SecKey dmsg secret key + (default 0000000000000000000000000000000000000000000000000000000000000000) + --tag string logging tag (default "address_resolver") + + +``` + +#### svc kg + +``` + + ┬┌─┌─┐┬ ┬┌─┐ ┌─┐┌─┐┌┐┌ + ├┴┐├┤ └┬┘└─┐───│ ┬├┤ │││ + ┴ ┴└─┘ ┴ └─┘ └─┘└─┘┘└┘ + + + + +``` + +#### svc lc + +``` + + ┬ ┬┬ ┬┌─┐┌┐┌┌─┐┌─┐┌─┐ ┌─┐┬ ┬┌─┐┌─┐┬┌─┌─┐┬─┐ + │ │└┐┌┘├┤ │││├┤ └─┐└─┐───│ ├─┤├┤ │ ├┴┐├┤ ├┬┘ + ┴─┘┴ └┘ └─┘┘└┘└─┘└─┘└─┘ └─┘┴ ┴└─┘└─┘┴ ┴└─┘┴└─ + + + +Flags: + -a, --addr string address to bind to. (default ":9081") + -c, --config string config file location. (default "liveness-checker.json") + -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") + --redis string connections string for a redis store (default "redis://localhost:6379") + --syslog string syslog server address. E.g. localhost:514 + --tag string logging tag (default "liveness_checker") + -t, --testing enable testing to start without redis + + +``` + +#### svc nv + +``` + + ┌┐┌┌─┐┌┬┐┌─┐ ┬ ┬┬┌─┐┬ ┬┌─┐┬ ┬┌─┐┌─┐┬─┐ + ││││ │ ││├┤───└┐┌┘│└─┐│ │├─┤│ │┌─┘├┤ ├┬┘ + ┘└┘└─┘─┴┘└─┘ └┘ ┴└─┘└─┘┴ ┴┴─┘┴└─┘└─┘┴└─ + + + +Flags: + -a, --addr string address to bind to (default ":9081") + -l, --log enable request logging (default true) + -m, --metrics string address to bind metrics API to + --syslog string syslog server address. E.g. localhost:514 + --tag string logging tag (default "node-visualizer") + -t, --testing enable testing to start without redis + + +``` + +#### svc se + +``` + + ┌─┐┬ ┬ ┌─┐┌┐┌┬ ┬ + └─┐│││───├┤ │││└┐┌┘ + └─┘└┴┘ └─┘┘└┘ └┘ + +Available Commands: + visor Generate config for skywire-visor + dmsg Generate config for dmsg-server + setup Generate config for setup node + +Flags: + -d, --docker Environment with dockerized skywire-services + -l, --local Environment with skywire-services on localhost + -n, --network string Docker network to use (default "SKYNET") + -p, --public Environment with public skywire-services + + +``` + +##### svc se visor + +``` +Generate config for skywire-visor + + + + +``` + +##### svc se dmsg + +``` +Generate config for dmsg-server + + + + +``` + +##### svc se setup + +``` +Generate config for setup node + + + + +``` + +#### svc sd + +``` + + ┌─┐┌─┐┬─┐┬ ┬┬┌─┐┌─┐ ┌┬┐┬┌─┐┌─┐┌─┐┬ ┬┌─┐┬─┐┬ ┬ + └─┐├┤ ├┬┘└┐┌┘││ ├┤───│││└─┐│ │ │└┐┌┘├┤ ├┬┘└┬┘ + └─┘└─┘┴└─ └┘ ┴└─┘└─┘ ─┴┘┴└─┘└─┘└─┘ └┘ └─┘┴└─ ┴ +----- depends: redis, postgresql and initial DB setup ----- +sudo -iu postgres createdb sd +keys-gen | tee sd-config.json +PG_USER="postgres" PG_DATABASE="sd" PG_PASSWORD="" service-discovery --sk $(tail -n1 sd-config.json) + + + +Flags: + -a, --addr string address to bind to (default ":9098") + -g, --api-key string geo API key + -d, --dmsg-disc string url of dmsg-discovery (default "http://dmsgd.skywire.skycoin.com") + --dmsgPort uint16 dmsg port value (default 80) + -m, --metrics string address to bind metrics API to + -o, --pg-host string host of postgres (default "localhost") + -p, --pg-port string port of postgres (default "5432") + -r, --redis string connections string for a redis store (default "redis://localhost:6379") + -s, --sk cipher.SecKey dmsg secret key + (default 0000000000000000000000000000000000000000000000000000000000000000) + -t, --test run in test mode and disable auth + -n, --test-environment distinguished between prod and test environment + -w, --whitelist-keys string list of whitelisted keys of network monitor used for deregistration + + +``` + +#### svc nwmon + +``` + + ┌┐┌┌─┐┌┬┐┬ ┬┌─┐┬─┐┬┌─ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ + │││├┤ │ ││││ │├┬┘├┴┐───││││ │││││ │ │ │├┬┘ + ┘└┘└─┘ ┴ └┴┘└─┘┴└─┴ ┴ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ + + + +Flags: + -a, --addr string address to bind to. (default ":9080") + -v, --ar-url string url to address resolver. + -b, --batchsize int Batch size of deregistration (default 30) + -c, --config string config file location. (default "network-monitor.json") + -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") + -m, --metrics string address to bind metrics API to + --redis string connections string for a redis store (default "redis://localhost:6379") + --redis-pool-size int redis connection pool size (default 10) + -n, --sd-url string url to service discovery. + --sleep-deregistration duration Sleep time for derigstration process in minutes (default 10ns) + --syslog string syslog server address. E.g. localhost:514 + --tag string logging tag (default "network_monitor") + -t, --testing enable testing to start without redis + -u, --ut-url string url to uptime tracker visor data. + + +``` + +#### svc pvm + +``` + + ┌─┐┬ ┬┌┐ ┬ ┬┌─┐ ┬ ┬┬┌─┐┌─┐┬─┐ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ + ├─┘│ │├┴┐│ ││───└┐┌┘│└─┐│ │├┬┘───││││ │││││ │ │ │├┬┘ + ┴ └─┘└─┘┴─┘┴└─┘ └┘ ┴└─┘└─┘┴└─ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ + + + +Flags: + -a, --addr string address to bind to. (default ":9082") + -c, --config string config file location. (default "public-visor-monitor.json") + -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") + -s, --sleep-deregistration duration Sleep time for derigstration process in minutes (default 10ns) + --tag string logging tag (default "public_visor_monitor") + + +``` + +#### svc ssm + +``` + + ┌─┐┬┌─┬ ┬┌─┐┌─┐┌─┐┬┌─┌─┐ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ + └─┐├┴┐└┬┘└─┐│ ││ ├┴┐└─┐───││││ │││││ │ │ │├┬┘ + └─┘┴ ┴ ┴ └─┘└─┘└─┘┴ ┴└─┘ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ + + + +Flags: + -a, --addr string address to bind to. (default ":9081") + -c, --config string config file location. (default "skysocks-monitor.json") + -s, --sleep-deregistration duration Sleep time for derigstration process in minutes (default 10ns) + --tag string logging tag (default "skysocks_monitor") + + +``` + +#### svc vpnm + +``` + + ┬ ┬┌─┐┌┐┌ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ + └┐┌┘├─┘│││───││││ │││││ │ │ │├┬┘ + └┘ ┴ ┘└┘ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ + + + +Flags: + -a, --addr string address to bind to. (default ":9081") + -c, --config string config file location. (default "vpn-monitor.json") + -s, --sleep-deregistration duration Sleep time for derigstration process in minutes (default 10ns) + --tag string logging tag (default "vpn_monitor") + + +``` + +### dmsg + +``` + + ┌┬┐┌┬┐┌─┐┌─┐ + │││││└─┐│ ┬ + ─┴┘┴ ┴└─┘└─┘ + +Available Commands: + pty Dmsg pseudoterminal (pty) + disc DMSG Discovery Server + server DMSG Server + http DMSG http file server + curl DMSG curl utility + web DMSG resolving proxy & browser client + socks DMSG socks5 proxy server & client + mon DMSG monitor of DMSG discovery entries. + + +``` + +#### dmsg pty + +``` + + ┌─┐┌┬┐┬ ┬ + ├─┘ │ └┬┘ + ┴ ┴ ┴ + +Available Commands: + cli DMSG pseudoterminal command line interface + host DMSG host for pseudoterminal command line interface + ui DMSG pseudoterminal GUI + + +``` + +##### dmsg pty cli + +``` + + ┌┬┐┌┬┐┌─┐┌─┐┌─┐┌┬┐┬ ┬ ┌─┐┬ ┬ + │││││└─┐│ ┬├─┘ │ └┬┘───│ │ │ + ─┴┘┴ ┴└─┘└─┘┴ ┴ ┴ └─┘┴─┘┴ +DMSG pseudoterminal command line interface + +Available Commands: + whitelist lists all whitelisted public keys + whitelist-add adds public key(s) to the whitelist + whitelist-remove removes public key(s) from the whitelist + +Flags: + --addr dmsg.Addr remote dmsg address of format 'pk:port' + If unspecified, the pty will start locally + (default 000000000000000000000000000000000000000000000000000000000000000000:~) + -a, --args strings command arguments + -r, --cliaddr string address to use for dialing to dmsgpty-host (default "/tmp/dmsgpty.sock") + -n, --clinet string network to use for dialing to dmsgpty-host (default "unix") + -c, --cmd string name of command to run + (default "/bin/bash") + -p, --confpath string config path (default "config.json") + + +``` + +###### dmsg pty cli whitelist + +``` +lists all whitelisted public keys + + + + +``` + +###### dmsg pty cli whitelist-add + +``` +adds public key(s) to the whitelist + + + + +``` + +###### dmsg pty cli whitelist-remove + +``` +removes public key(s) from the whitelist + + + + +``` + +##### dmsg pty host + +``` + + ┌┬┐┌┬┐┌─┐┌─┐┌─┐┌┬┐┬ ┬ ┬ ┬┌─┐┌─┐┌┬┐ + │││││└─┐│ ┬├─┘ │ └┬┘───├─┤│ │└─┐ │ + ─┴┘┴ ┴└─┘└─┘┴ ┴ ┴ ┴ ┴└─┘└─┘ ┴ +DMSG host for pseudoterminal command line interface + +Available Commands: + confgen generates config file + +Flags: + --cliaddr string address used for listening for cli connections (default "/tmp/dmsgpty.sock") + --clinet string network used for listening for cli connections (default "unix") + -c, --confpath string config path (default "./config.json") + --confstdin config will be read from stdin if set + --dmsgdisc string dmsg discovery address (default "http://dmsgd.skywire.skycoin.com") + --dmsgport uint16 dmsg port for listening for remote hosts (default 22) + --dmsgsessions int minimum number of dmsg sessions to ensure (default 1) + --envprefix string env prefix (default "DMSGPTY") + --wl cipher.PubKeys whitelist of the dmsgpty-host (default public keys: + ) + + +``` + +###### dmsg pty host confgen + +``` +generates config file + + + +Flags: + --unsafe will unsafely write config if set + + +``` + +##### dmsg pty ui + +``` + + ┌┬┐┌┬┐┌─┐┌─┐┌─┐┌┬┐┬ ┬ ┬ ┬┬ + │││││└─┐│ ┬├─┘ │ └┬┘───│ ││ + ─┴┘┴ ┴└─┘└─┘┴ ┴ ┴ └─┘┴ + DMSG pseudoterminal GUI + + + +Flags: + --addr string network address to serve UI on (default ":8080") + --arg stringArray command arguments to include when initiating pty + --cmd string command to run when initiating pty (default "/bin/bash") + --haddr string dmsgpty host network address (default "/tmp/dmsgpty.sock") + --hnet string dmsgpty host network name (default "unix") + + +``` + +#### dmsg disc + +``` + + ┌┬┐┌┬┐┌─┐┌─┐ ┌┬┐┬┌─┐┌─┐┌─┐┬ ┬┌─┐┬─┐┬ ┬ + │││││└─┐│ ┬───│││└─┐│ │ │└┐┌┘├┤ ├┬┘└┬┘ + ─┴┘┴ ┴└─┘└─┘ ─┴┘┴└─┘└─┘└─┘ └┘ └─┘┴└─ ┴ +DMSG Discovery Server +----- depends: redis ----- +skywire cli config gen-keys > dmsgd-config.json +skywire dmsg disc --sk $(tail -n1 dmsgd-config.json) + + + +Flags: + -a, --addr string address to bind to (default ":9090") + --auth string auth passphrase as simple auth for official dmsg servers registration + --dmsgPort uint16 dmsg port value (default 80) + --enable-load-testing enable load testing + --entry-timeout duration discovery entry timeout (default 3m0s) + -m, --metrics string address to serve metrics API from + --official-servers string list of official dmsg servers keys separated by comma + --redis string connections string for a redis store (default "redis://localhost:6379") + --sk cipher.SecKey dmsg secret key + (default 0000000000000000000000000000000000000000000000000000000000000000) + --syslog string address in which to dial to syslog server + --syslog-lvl string minimum log level to report (default "debug") + --syslog-net string network in which to dial to syslog server (default "udp") + --tag string tag used for logging and metrics (default "dmsg_disc") + --test-environment distinguished between prod and test environment + -t, --test-mode in testing mode + --whitelist-keys string list of whitelisted keys of network monitor used for deregistration + + +``` + +#### dmsg server + +``` + + ┌┬┐┌┬┐┌─┐┌─┐ ┌─┐┌─┐┬─┐┬ ┬┌─┐┬─┐ + ││││││└─┐│ ┬ ─ └─┐├┤ ├┬┘└┐┌┘├┤ ├┬┘ + ─┴┘┴ ┴└─┘└─┘ └─┘└─┘┴└─ └┘ └─┘┴└─ +DMSG Server +skywire dmsg server config gen -o dmsg-config.json +skywire dmsg server start dmsg-config.json + +Available Commands: + config Generate a dmsg-server config + start Start Dmsg Server + + +``` + +##### dmsg server config + +``` +Generate a dmsg-server config + +Available Commands: + gen Generate a config file + + +``` + +###### dmsg server config gen + +``` +Generate a config file + + + +Flags: + -o, --output string config output path/name + -t, --testenv use test deployment + + +``` + +##### dmsg server start + +``` +Start Dmsg Server + + + +Flags: + --auth string auth passphrase as simple auth for official dmsg servers registration + -c, --config string location of config file (STDIN to read from standard input) (default "config.json") + --limit-ip int set limitation of IPs want connect to specific dmsg-server, default value is 15 (default 15) + -m, --metrics string address to serve metrics API from + --stdin whether to read config via stdin + --syslog string address in which to dial to syslog server + --syslog-lvl string minimum log level to report (default "debug") + --syslog-net string network in which to dial to syslog server (default "udp") + --tag string tag used for logging and metrics (default "dmsg_srv") + + +``` + +#### dmsg http + +``` + + ┌┬┐┌┬┐┌─┐┌─┐┬ ┬┌┬┐┌┬┐┌─┐ + │││││└─┐│ ┬├─┤ │ │ ├─┘ + ─┴┘┴ ┴└─┘└─┘┴ ┴ ┴ ┴ ┴ +DMSG http file server + + + +Flags: + -d, --dir string local dir to serve via dmsghttp (default ".") + -D, --dmsg-disc string dmsg discovery url default: + http://dmsgd.skywire.skycoin.com + -p, --port uint dmsg port to serve from (default 80) + -s, --sk cipher.SecKey a random key is generated if unspecified + + (default 0000000000000000000000000000000000000000000000000000000000000000) + -w, --wl string whitelist keys, comma separated + + +``` + +#### dmsg curl + +``` + + ┌┬┐┌┬┐┌─┐┌─┐┌─┐┬ ┬┬─┐┬ + │││││└─┐│ ┬│ │ │├┬┘│ + ─┴┘┴ ┴└─┘└─┘└─┘└─┘┴└─┴─┘ +DMSG curl utility + + + +Flags: + -a, --agent AGENT identify as AGENT (default "dmsgcurl/unknown") + -d, --data string dmsghttp POST data + -c, --dmsg-disc string dmsg discovery url default: + http://dmsgd.skywire.skycoin.com + -l, --loglvl string [ debug | warn | error | fatal | panic | trace | info ] (default "fatal") + -o, --out string output filepath + -r, --replace replace exist file with new downloaded + -e, --sess int number of dmsg servers to connect to (default 1) + -s, --sk cipher.SecKey a random key is generated if unspecified + + (default 0000000000000000000000000000000000000000000000000000000000000000) + -t, --try int download attempts (0 unlimits) (default 1) + -w, --wait int time to wait between fetches + + +``` + +#### dmsg web + +``` + + ┌┬┐┌┬┐┌─┐┌─┐┬ ┬┌─┐┌┐ + │││││└─┐│ ┬│││├┤ ├┴┐ + ─┴┘┴ ┴└─┘└─┘└┴┘└─┘└─┘ +DMSG resolving proxy & browser client - access websites over dmsg + +Available Commands: + gen-keys generate public / secret keypair + +Flags: + -d, --dmsg-disc string dmsg discovery url default: + http://dmsgd.skywire.skycoin.com + -f, --filter string domain suffix to filter (default ".dmsg") + -l, --loglvl string [ debug | warn | error | fatal | panic | trace | info ] + -p, --port string port to serve the web application (default "8080") + -r, --proxy string configure additional socks5 proxy for dmsgweb (i.e. 127.0.0.1:1080) + -t, --resolve string resolve the specified dmsg address:port on the local port & disable proxy + -e, --sess int number of dmsg servers to connect to (default 1) + -s, --sk cipher.SecKey a random key is generated if unspecified + + (default 0000000000000000000000000000000000000000000000000000000000000000) + -q, --socks string port to serve the socks5 proxy (default "4445") + + +``` + +##### dmsg web gen-keys + +``` +generate public / secret keypair + + + + +``` + +#### dmsg socks + +``` + + ┌┬┐┌┬┐┌─┐┌─┐ ┌─┐┌─┐┌─┐┬┌─┌─┐ + │││││└─┐│ ┬───└─┐│ ││ ├┴┐└─┐ + ─┴┘┴ ┴└─┘└─┘ └─┘└─┘└─┘┴ ┴└─┘ +DMSG socks5 proxy server & client + +Available Commands: + server dmsg socks5 proxy server + client socks5 proxy client for dmsg socks5 proxy server + + +``` + +##### dmsg socks server + +``` +dmsg socks5 proxy server + + + +Flags: + -D, --dmsg-disc string dmsg discovery url (default "http://dmsgd.skywire.skycoin.com") + -q, --dport uint16 dmsg port to serve socks5 (default 1081) + -s, --sk cipher.SecKey a random key is generated if unspecified + + (default 0000000000000000000000000000000000000000000000000000000000000000) + -w, --wl string whitelist keys, comma separated + + +``` + +##### dmsg socks client + +``` +socks5 proxy client for dmsg socks5 proxy server + + + +Flags: + -D, --dmsg-disc string dmsg discovery url (default "http://dmsgd.skywire.skycoin.com") + -q, --dport uint16 dmsg port to connect to socks5 server (default 1081) + -k, --pk string dmsg socks5 proxy server public key to connect to + -p, --port int TCP port to serve SOCKS5 proxy locally (default 1081) + -s, --sk cipher.SecKey a random key is generated if unspecified + + (default 0000000000000000000000000000000000000000000000000000000000000000) + + +``` + +#### dmsg mon + +``` + + ┌┬┐┌┬┐┌─┐┌─┐ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ + │││││└─┐│ ┬───││││ │││││ │ │ │├┬┘ + ─┴┘┴ ┴└─┘└─┘ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ + + + +Flags: + -a, --addr string address to bind to. (default ":9080") + -b, --batchsize int Batch size of deregistration (default 20) + -c, --config string config file location. (default "dmsg-monitor.json") + -d, --dmsg-url string url to dmsg data. + -l, --loglvl string set log level one of: info, error, warn, debug, trace, panic (default "info") + -s, --sleep-deregistration duration Sleep time for derigstration process in minutes (default 60ns) + --syslog string syslog server address. E.g. localhost:514 + --tag string logging tag (default "dmsg_monitor") + -u, --ut-url string url to uptime tracker visor data. + + +``` + +### app + +``` + + ┌─┐┌─┐┌─┐┌─┐ + ├─┤├─┘├─┘└─┐ + ┴ ┴┴ ┴ └─┘ + +Available Commands: + vpn-server skywire vpn server application + vpn-client skywire vpn client application + skysocks-client skywire socks5 proxy client application + skysocks skywire socks5 proxy server application + skychat skywire chat application + + +``` + +#### app vpn-server + +``` + + ┬ ┬┌─┐┌┐┌ ┌─┐┌─┐┬─┐┬ ┬┌─┐┬─┐ + └┐┌┘├─┘│││───└─┐├┤ ├┬┘└┐┌┘├┤ ├┬┘ + └┘ ┴ ┘└┘ └─┘└─┘┴└─ └┘ └─┘┴└─ + + + +Flags: + --netifc string Default network interface for multiple available interfaces + --passcode string passcode to authenticate connecting users + --pk string local pubkey + --secure Forbid connections from clients to server local network (default true) + --sk string local seckey + + +``` + +#### app vpn-client + +``` + + ┬ ┬┌─┐┌┐┌ ┌─┐┬ ┬┌─┐┌┐┌┌┬┐ + └┐┌┘├─┘│││───│ │ │├┤ │││ │ + └┘ ┴ ┘└┘ └─┘┴─┘┴└─┘┘└┘ ┴ + + + +Flags: + --dns string address of DNS want set to tun + --killswitch If set, the Internet won't be restored during reconnection attempts + --passcode string passcode to authenticate connection + --pk string local pubkey + --sk string local seckey + --srv string PubKey of the server to connect to + + +``` + +#### app skysocks-client + +``` + + ┌─┐┬┌─┬ ┬┌─┐┌─┐┌─┐┬┌─┌─┐ ┌─┐┬ ┬┌─┐┌┐┌┌┬┐ + └─┐├┴┐└┬┘└─┐│ ││ ├┴┐└─┐───│ │ │├┤ │││ │ + └─┘┴ ┴ ┴ └─┘└─┘└─┘┴ ┴└─┘ └─┘┴─┘┴└─┘┘└┘ ┴ + + + +Flags: + --addr string Client address to listen on (default ":1080") + --http string http proxy mode + --srv string PubKey of the server to connect to + + +``` + +#### app skysocks + +``` + + ┌─┐┬┌─┬ ┬┌─┐┌─┐┌─┐┬┌─┌─┐ + └─┐├┴┐└┬┘└─┐│ ││ ├┴┐└─┐ + └─┘┴ ┴ ┴ └─┘└─┘└─┘┴ ┴└─┘ + + + +Flags: + --passcode string passcode to authenticate connecting users + + +``` + +#### app skychat + +``` + + ┌─┐┬┌─┬ ┬┌─┐┬ ┬┌─┐┌┬┐ + └─┐├┴┐└┬┘│ ├─┤├─┤ │ + └─┘┴ ┴ ┴ └─┘┴ ┴┴ ┴ ┴ + + + +Flags: + --addr string address to bind, put an * before the port if you want to be able to access outside localhost (default ":8001") + + +``` + +### tree + +``` +subcommand tree + + + + +``` + +### doc + +``` +generate markdown docs + + UNHIDEFLAGS=1 go run cmd/skywire/skywire.go doc + + UNHIDEFLAGS=1 go run cmd/skywire/skywire.go doc > cmd/skywire/README1.md + + generate toc: + + cat cmd/skywire/README1.md | gh-md-toc + + + + +``` diff --git a/cmd/skywire/skywire.go b/cmd/skywire/skywire.go index 1997ad0f2d..08466e37dd 100644 --- a/cmd/skywire/skywire.go +++ b/cmd/skywire/skywire.go @@ -1,15 +1,46 @@ // cmd/skywire/skywire.go /* -skywire merged binary command structure +skywire */ package main import ( "fmt" + "log" + "os" + "path/filepath" + "strings" + "github.com/bitfield/script" cc "github.com/ivanpirog/coloredcobra" + "github.com/pterm/pterm" + "github.com/pterm/pterm/putils" + dmsgdisc "github.com/skycoin/dmsg/cmd/dmsg-discovery/commands" + dmsgserver "github.com/skycoin/dmsg/cmd/dmsg-server/commands" + dmsgsocks "github.com/skycoin/dmsg/cmd/dmsg-socks5/commands" + dmsgcurl "github.com/skycoin/dmsg/cmd/dmsgcurl/commands" + dmsghttp "github.com/skycoin/dmsg/cmd/dmsghttp/commands" + dmsgptycli "github.com/skycoin/dmsg/cmd/dmsgpty-cli/commands" + dmsgptyhost "github.com/skycoin/dmsg/cmd/dmsgpty-host/commands" + dmsgptyui "github.com/skycoin/dmsg/cmd/dmsgpty-ui/commands" + dmsgweb "github.com/skycoin/dmsg/cmd/dmsgweb/commands" + sd "github.com/skycoin/skycoin-service-discovery/cmd/service-discovery/commands" "github.com/spf13/cobra" + ar "github.com/skycoin/skywire-services/cmd/address-resolver/commands" + confbs "github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands" + dmsgmon "github.com/skycoin/skywire-services/cmd/dmsg-monitor/commands" + kg "github.com/skycoin/skywire-services/cmd/keys-gen/commands" + lc "github.com/skycoin/skywire-services/cmd/liveness-checker/commands" + nwmon "github.com/skycoin/skywire-services/cmd/network-monitor/commands" + nv "github.com/skycoin/skywire-services/cmd/node-visualizer/commands" + pvmon "github.com/skycoin/skywire-services/cmd/public-visor-monitor/commands" + rf "github.com/skycoin/skywire-services/cmd/route-finder/commands" + ssmon "github.com/skycoin/skywire-services/cmd/skysocks-monitor/commands" + se "github.com/skycoin/skywire-services/cmd/sw-env/commands" + tpd "github.com/skycoin/skywire-services/cmd/transport-discovery/commands" + tps "github.com/skycoin/skywire-services/cmd/transport-setup/commands" + vpnmon "github.com/skycoin/skywire-services/cmd/vpn-monitor/commands" "github.com/skycoin/skywire-utilities/pkg/buildinfo" sc "github.com/skycoin/skywire/cmd/apps/skychat/commands" ssc "github.com/skycoin/skywire/cmd/apps/skysocks-client/commands" @@ -17,11 +48,43 @@ import ( vpnc "github.com/skycoin/skywire/cmd/apps/vpn-client/commands" vpns "github.com/skycoin/skywire/cmd/apps/vpn-server/commands" sn "github.com/skycoin/skywire/cmd/setup-node/commands" - cli "github.com/skycoin/skywire/cmd/skywire-cli/commands" + scli "github.com/skycoin/skywire/cmd/skywire-cli/commands" "github.com/skycoin/skywire/pkg/visor" ) func init() { + dmsgptyCmd.AddCommand( + dmsgptycli.RootCmd, + dmsgptyhost.RootCmd, + dmsgptyui.RootCmd, + ) + dmsgCmd.AddCommand( + dmsgptyCmd, + dmsgdisc.RootCmd, + dmsgserver.RootCmd, + dmsghttp.RootCmd, + dmsgcurl.RootCmd, + dmsgweb.RootCmd, + dmsgsocks.RootCmd, + dmsgmon.RootCmd, + ) + svcCmd.AddCommand( + sn.RootCmd, + tpd.RootCmd, + tps.RootCmd, + ar.RootCmd, + rf.RootCmd, + confbs.RootCmd, + kg.RootCmd, + lc.RootCmd, + nv.RootCmd, + se.RootCmd, + sd.RootCmd, + nwmon.RootCmd, + pvmon.RootCmd, + ssmon.RootCmd, + vpnmon.RootCmd, + ) appsCmd.AddCommand( vpns.RootCmd, vpnc.RootCmd, @@ -31,17 +94,46 @@ func init() { ) RootCmd.AddCommand( visor.RootCmd, - cli.RootCmd, - sn.RootCmd, + scli.RootCmd, + svcCmd, + dmsgCmd, appsCmd, + treeCmd, + docCmd, ) visor.RootCmd.Long = ` ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┬ ┬┬┌─┐┌─┐┬─┐ └─┐├┴┐└┬┘││││├┬┘├┤───└┐┌┘│└─┐│ │├┬┘ └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └┘ ┴└─┘└─┘┴└─` - visor.RootCmd.Use = "visor" - cli.RootCmd.Use = "cli" + dmsgcurl.RootCmd.Use = "curl" + dmsgweb.RootCmd.Use = "web" + dmsgptycli.RootCmd.Use = "cli" + dmsgptyhost.RootCmd.Use = "host" + dmsgptyui.RootCmd.Use = "ui" + dmsgdisc.RootCmd.Use = "disc" + dmsgserver.RootCmd.Use = "server" + dmsghttp.RootCmd.Use = "http" + dmsgcurl.RootCmd.Use = "curl" + dmsgweb.RootCmd.Use = "web" + dmsgsocks.RootCmd.Use = "socks" + dmsgmon.RootCmd.Use = "mon" + tpd.RootCmd.Use = "tpd" + tps.RootCmd.Use = "tps" + ar.RootCmd.Use = "ar" + rf.RootCmd.Use = "rf" + confbs.RootCmd.Use = "cb" + kg.RootCmd.Use = "kg" + lc.RootCmd.Use = "lc" + nv.RootCmd.Use = "nv" + vpnmon.RootCmd.Use = "vpnm" + pvmon.RootCmd.Use = "pvm" + ssmon.RootCmd.Use = "ssm" + nwmon.RootCmd.Use = "nwmon" + se.RootCmd.Use = "se" + sd.RootCmd.Use = "sd" sn.RootCmd.Use = "sn" + scli.RootCmd.Use = "cli" + visor.RootCmd.Use = "visor" vpns.RootCmd.Use = "vpn-server" vpnc.RootCmd.Use = "vpn-client" ssc.RootCmd.Use = "skysocks-client" @@ -58,9 +150,11 @@ func init() { } -// RootCmd contains skywire-visor, skywire-cli, setup-node, and the visor native apps +// RootCmd contains literally every 'command' from four repos here var RootCmd = &cobra.Command{ - Use: "skywire", + Use: func() string { + return strings.Split(filepath.Base(strings.ReplaceAll(strings.ReplaceAll(fmt.Sprintf("%v", os.Args), "[", ""), "]", "")), " ")[0] + }(), Long: ` ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ └─┐├┴┐└┬┘││││├┬┘├┤ @@ -72,7 +166,47 @@ var RootCmd = &cobra.Command{ Version: buildinfo.Version(), } -// appsCmd contains the visor native apps +// RootCmd contains all subcommands +var svcCmd = &cobra.Command{ + Use: "svc", + Short: "Skywire services", + Long: ` + ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┌─┐┌─┐┬─┐┬ ┬┬┌─┐┌─┐┌─┐ + └─┐├┴┐└┬┘││││├┬┘├┤───└─┐├┤ ├┬┘└┐┌┘││ ├┤ └─┐ + └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └─┘└─┘┴└─ └┘ ┴└─┘└─┘└─┘`, + SilenceErrors: true, + SilenceUsage: true, + DisableSuggestions: true, + DisableFlagsInUseLine: true, + Version: buildinfo.Version(), +} + +// RootCmd contains all binaries which may be separately compiled as subcommands +var dmsgCmd = &cobra.Command{ + Use: "dmsg", + Short: "Dmsg services & utilities", + Long: ` + ┌┬┐┌┬┐┌─┐┌─┐ + │││││└─┐│ ┬ + ─┴┘┴ ┴└─┘└─┘ `, + SilenceErrors: true, + SilenceUsage: true, + DisableSuggestions: true, + DisableFlagsInUseLine: true, +} + +var dmsgptyCmd = &cobra.Command{ + Use: "pty", + Short: "Dmsg pseudoterminal (pty)", + Long: ` + ┌─┐┌┬┐┬ ┬ + ├─┘ │ └┬┘ + ┴ ┴ ┴ `, + SilenceErrors: true, + SilenceUsage: true, + DisableSuggestions: true, + DisableFlagsInUseLine: true, +} var appsCmd = &cobra.Command{ Use: "app", Short: "skywire native applications", @@ -86,8 +220,166 @@ var appsCmd = &cobra.Command{ DisableFlagsInUseLine: true, } -func main() { +var treeCmd = &cobra.Command{ + Use: "tree", + Short: "subcommand tree", + Long: `subcommand tree`, + SilenceErrors: true, + SilenceUsage: true, + DisableSuggestions: true, + DisableFlagsInUseLine: true, + Run: func(cmd *cobra.Command, args []string) { + // You can use a LeveledList here, for easy generation. + leveledList := pterm.LeveledList{} + leveledList = append(leveledList, pterm.LeveledListItem{Level: 0, Text: RootCmd.Use}) + for _, j := range RootCmd.Commands() { + use := strings.Split(j.Use, " ") + leveledList = append(leveledList, pterm.LeveledListItem{Level: 1, Text: use[0]}) + for _, k := range j.Commands() { + use := strings.Split(k.Use, " ") + leveledList = append(leveledList, pterm.LeveledListItem{Level: 2, Text: use[0]}) + for _, l := range k.Commands() { + use := strings.Split(l.Use, " ") + leveledList = append(leveledList, pterm.LeveledListItem{Level: 3, Text: use[0]}) + for _, m := range l.Commands() { + use := strings.Split(m.Use, " ") + leveledList = append(leveledList, pterm.LeveledListItem{Level: 4, Text: use[0]}) + for _, n := range m.Commands() { + use := strings.Split(n.Use, " ") + leveledList = append(leveledList, pterm.LeveledListItem{Level: 5, Text: use[0]}) + for _, o := range n.Commands() { + use := strings.Split(o.Use, " ") + leveledList = append(leveledList, pterm.LeveledListItem{Level: 6, Text: use[0]}) + for _, p := range o.Commands() { + use := strings.Split(p.Use, " ") + leveledList = append(leveledList, pterm.LeveledListItem{Level: 7, Text: use[0]}) + } + } + } + } + } + } + } + // Generate tree from LeveledList. + r := putils.TreeFromLeveledList(leveledList) + + // Render TreePrinter + err := pterm.DefaultTree.WithRoot(r).Render() + if err != nil { + log.Fatal("render subcommand tree: ", err) + } + }, +} + +// for toc generation use: https://github.com/ekalinin/github-markdown-toc.go +var docCmd = &cobra.Command{ + Use: "doc", + Short: "generate markdown docs", + Long: `generate markdown docs + UNHIDEFLAGS=1 go run cmd/skywire/skywire.go doc + + UNHIDEFLAGS=1 go run cmd/skywire/skywire.go doc > cmd/skywire/README1.md + + generate toc: + + cat cmd/skywire/README1.md | gh-md-toc`, + SilenceErrors: true, + SilenceUsage: true, + DisableSuggestions: true, + DisableFlagsInUseLine: true, + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("\n# %s\n", "skywire documentation") + fmt.Printf("\n## %s\n", "subcommand tree") + fmt.Printf("\n%s\n", "A tree representation of the skywire subcommands") + fmt.Printf("\n```\n") + _, err := script.Exec(os.Args[0] + " tree").Stdout() //nolint + if err != nil { + fmt.Println(err.Error()) + } + fmt.Printf("\n```\n") + + var use string + for _, j := range RootCmd.Commands() { + use = strings.Split(j.Use, " ")[0] + fmt.Printf("\n### %s\n", use) + fmt.Printf("\n```\n") + j.Help() //nolint + fmt.Printf("\n```\n") + if j.Name() == "cli" { + fmt.Printf("\n%s\n", "skywire command line interface") + fmt.Printf("\n## %s\n", RootCmd.Use) + fmt.Printf("\n```\n") + RootCmd.Help() //nolint + fmt.Printf("\n```\n") + fmt.Printf("\n## %s\n", "global flags") + fmt.Printf("\n%s\n", "The skywire-cli interacts with the running visor via rpc calls. By default the rpc server is available on localhost:3435. The rpc address and port the visor is using may be changed in the config file, once generated.") + + fmt.Printf("\n%s\n", "It is not recommended to expose the rpc server on the local network. Exposing the rpc allows unsecured access to the machine over the local network") + fmt.Printf("\n```\n") + fmt.Printf("\n%s\n", "Global Flags:") + fmt.Printf("\n%s\n", " --rpc string RPC server address (default \"localhost:3435\")") + fmt.Printf("\n%s\n", " --json bool print output as json") + fmt.Printf("\n```\n") + } + for _, k := range j.Commands() { + use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + fmt.Printf("\n#### %s\n", use) + fmt.Printf("\n```\n") + k.Help() //nolint + fmt.Printf("\n```\n") + if k.Name() == "survey" { + fmt.Printf("\n```\n") + _, err = script.Exec("sudo " + os.Args[0] + ` survey`).Stdout() //nolint + if err != nil { + fmt.Println(err.Error()) + } + fmt.Printf("\n```\n") + } + for _, l := range k.Commands() { + use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + " " + strings.Split(l.Use, " ")[0] + fmt.Printf("\n##### %s\n", use) + fmt.Printf("\n```\n") + l.Help() //nolint + fmt.Printf("\n```\n") + if l.Name() == "gen" { + fmt.Printf("\n##### Example for package / msi\n") + fmt.Printf("\n```\n") + fmt.Printf("$ skywire cli config gen -bpirxn\n") + _, err = script.Exec(os.Args[0] + ` cli config gen -bpirxn`).Stdout() //nolint + if err != nil { + fmt.Println(err.Error()) + } + fmt.Printf("\n```\n") + } + for _, m := range l.Commands() { + use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + " " + strings.Split(l.Use, " ")[0] + " " + strings.Split(m.Use, " ")[0] + fmt.Printf("\n###### %s\n", use) + fmt.Printf("\n```\n") + m.Help() //nolint + fmt.Printf("\n```\n") + for _, n := range m.Commands() { + use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + " " + strings.Split(l.Use, " ")[0] + " " + strings.Split(m.Use, " ")[0] + " " + strings.Split(n.Use, " ")[0] + fmt.Printf("\n###### %s\n", use) + fmt.Printf("\n```\n") + m.Help() //nolint + fmt.Printf("\n```\n") + for _, o := range n.Commands() { + use = strings.Split(j.Use, " ")[0] + " " + strings.Split(k.Use, " ")[0] + " " + strings.Split(l.Use, " ")[0] + " " + strings.Split(m.Use, " ")[0] + " " + strings.Split(n.Use, " ")[0] + " " + strings.Split(o.Use, " ")[0] + fmt.Printf("\n###### %s\n", use) + fmt.Printf("\n```\n") + m.Help() //nolint + fmt.Printf("\n```\n") + } + } + } + } + } + } + }, +} + +func main() { cc.Init(&cc.Config{ RootCmd: RootCmd, Headings: cc.HiBlue + cc.Bold, diff --git a/go.mod b/go.mod index 18a1bbfdf1..f2d428f3fc 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/skycoin/dmsg v1.3.18-0.20240311074627-0ba753f65a88 github.com/skycoin/skycoin v0.27.1 github.com/skycoin/skycoin-service-discovery v0.0.0-20240306165129-2af10aca698e - github.com/skycoin/skywire-services v0.0.0-20240316160900-0498a9053d6b + github.com/skycoin/skywire-services v0.0.0-20240316183902-caaa6f3db525 github.com/skycoin/skywire-utilities v1.3.18-0.20240208220612-9f31eda72f33 github.com/skycoin/systray v1.10.0 github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 diff --git a/go.sum b/go.sum index e6d4fd103f..8a2479cba7 100644 --- a/go.sum +++ b/go.sum @@ -448,6 +448,8 @@ github.com/skycoin/skywire-services v0.0.0-20240306165304-177c854f4aec h1:yhD4TO github.com/skycoin/skywire-services v0.0.0-20240306165304-177c854f4aec/go.mod h1:wtdETGZ3hm1DBYEQ/3t5b1apF4mw3heWTZiOisSgIsE= github.com/skycoin/skywire-services v0.0.0-20240316160900-0498a9053d6b h1:HhR53PD9o16fpOjegLgh05Ve+4tutLBiEzvIk1afU+o= github.com/skycoin/skywire-services v0.0.0-20240316160900-0498a9053d6b/go.mod h1:wtdETGZ3hm1DBYEQ/3t5b1apF4mw3heWTZiOisSgIsE= +github.com/skycoin/skywire-services v0.0.0-20240316183902-caaa6f3db525 h1:E6rHwv91yXloEiqyV1kET+lf7GvCVsReW7EqBNeD9hE= +github.com/skycoin/skywire-services v0.0.0-20240316183902-caaa6f3db525/go.mod h1:wtdETGZ3hm1DBYEQ/3t5b1apF4mw3heWTZiOisSgIsE= github.com/skycoin/skywire-ut v0.0.0-20240316145729-abfe9e406f95 h1:4S//aHVTTiSeE6Ig2adEa75O+YkWSdMbBcAmdI5DnMI= github.com/skycoin/skywire-ut v0.0.0-20240316145729-abfe9e406f95/go.mod h1:rL48Kq3Zh//41xzKQpUgrP+KiS8WX3DGXRkdVHjE+FI= github.com/skycoin/skywire-utilities v1.3.18-0.20240208220612-9f31eda72f33 h1:BzhyKolEWT8cnXZJMxC0TYGCvu3wMYdI6NOpvToN+uQ= diff --git a/pkg/app/launcher/launcher.go b/pkg/app/launcher/launcher.go index 262abc553d..642ac1b450 100644 --- a/pkg/app/launcher/launcher.go +++ b/pkg/app/launcher/launcher.go @@ -293,6 +293,11 @@ func (l *AppLauncher) RestartApp(name, binary string) error { } func makeProcConfig(lc AppLauncherConfig, ac appserver.AppConfig, envs []string) (appcommon.ProcConfig, error) { + binPath := lc.BinPath + if ac.Binary == "skywire" { + binPath, _ = os.Getwd() //nolint + } + procConf := appcommon.ProcConfig{ AppName: ac.Name, AppSrvAddr: lc.ServerAddr, @@ -302,7 +307,7 @@ func makeProcConfig(lc AppLauncherConfig, ac appserver.AppConfig, envs []string) ProcWorkDir: filepath.Join(lc.LocalPath, ac.Name), VisorPK: lc.VisorPK, RoutingPort: ac.Port, - BinaryLoc: filepath.Join(lc.BinPath, ac.Binary), + BinaryLoc: filepath.Join(binPath, ac.Binary), LogDBLoc: filepath.Join(lc.LocalPath, ac.Name+"_log.db"), } err := ensureDir(&procConf.ProcWorkDir) diff --git a/pkg/visor/visorconfig/config.go b/pkg/visor/visorconfig/config.go index d13fdfadda..d456596052 100644 --- a/pkg/visor/visorconfig/config.go +++ b/pkg/visor/visorconfig/config.go @@ -235,36 +235,38 @@ func makeDefaultLauncherAppsConfig(dnsServer string) []appserver.AppConfig { defaultConfig := []appserver.AppConfig{ { Name: VPNClientName, - Binary: VPNClientName, + Binary: "skywire", AutoStart: false, Port: routing.Port(skyenv.VPNClientPort), - Args: []string{"--dns", dnsServer}, + Args: []string{"app", "vpn-client", "--dns", dnsServer}, }, { Name: SkychatName, - Binary: SkychatName, + Binary: "skywire", AutoStart: true, Port: routing.Port(skyenv.SkychatPort), - Args: []string{"--addr", SkychatAddr}, + Args: []string{"app", "skychat", "--addr", SkychatAddr}, }, { Name: SkysocksName, - Binary: SkysocksName, + Binary: "skywire", AutoStart: true, Port: routing.Port(skyenv.SkysocksPort), + Args: []string{"app", "skysocks"}, }, { Name: SkysocksClientName, - Binary: SkysocksClientName, + Binary: "skywire", AutoStart: false, Port: routing.Port(skyenv.SkysocksClientPort), - Args: []string{"--addr", SkysocksClientAddr}, + Args: []string{"app", "skysocks-client", "--addr", SkysocksClientAddr}, }, { Name: VPNServerName, - Binary: VPNServerName, + Binary: "skywire", AutoStart: false, Port: routing.Port(skyenv.VPNServerPort), + Args: []string{"app", "vpn-server"}, }, } return defaultConfig diff --git a/scripts/mac_installer/Distribution.xml b/scripts/mac_installer/Distribution.xml index b6c5fffe0b..44311be3ce 100644 --- a/scripts/mac_installer/Distribution.xml +++ b/scripts/mac_installer/Distribution.xml @@ -13,4 +13,4 @@ installer.pkg Skywire - \ No newline at end of file + diff --git a/scripts/mac_installer/create_installer.sh b/scripts/mac_installer/create_installer.sh index e8ef1383c3..0132597781 100755 --- a/scripts/mac_installer/create_installer.sh +++ b/scripts/mac_installer/create_installer.sh @@ -71,19 +71,14 @@ function build_installer() { cp ${mac_script_dir}/Entitlements.plist ${installer_build_dir}/entitlements.plist cp ${mac_script_dir}/icon.icns ${installer_package_dir}/Contents/Resources/icon.icns - mv ./skywire-visor ${installer_package_dir}/Contents/MacOS/skywire-visor - mv ./skywire-cli ${installer_package_dir}/Contents/MacOS/skywire-cli - mv ./apps/vpn-client ${installer_package_dir}/Contents/MacOS/apps/vpn-client - mv ./apps/skysocks ${installer_package_dir}/Contents/MacOS/apps/skysocks - mv ./apps/skysocks-client ${installer_package_dir}/Contents/MacOS/apps/skysocks-client - mv ./apps/skychat ${installer_package_dir}/Contents/MacOS/apps/skychat + mv ./skywire ${installer_package_dir}/Contents/MacOS/skywire cp ./dmsghttp-config.json ${installer_package_dir}/Contents/MacOS/dmsghttp-config.json cp ./services-config.json ${installer_package_dir}/Contents/MacOS/services-config.json cat <${installer_package_dir}/Contents/MacOS/Skywire #!/bin/bash -osascript -e "do shell script \"/Applications/Skywire.app/Contents/MacOS/skywire-visor -c '/Users/\${USER}/Library/Application Support/Skywire/skywire-config.json' --systray > /Users/\${USER}/Library/Logs/skywire/visor.log\" with administrator privileges" +osascript -e "do shell script \"/Applications/Skywire.app/Contents/MacOS/skywire visor -c '/Users/\${USER}/Library/Application Support/Skywire/skywire-config.json' --systray > /Users/\${USER}/Library/Logs/skywire/visor.log\" with administrator privileges" EOF diff --git a/scripts/mac_installer/desktop-deinstaller/deinstaller.go b/scripts/mac_installer/desktop-deinstaller/deinstaller.go index b24f3ddc26..761d030d4e 100644 --- a/scripts/mac_installer/desktop-deinstaller/deinstaller.go +++ b/scripts/mac_installer/desktop-deinstaller/deinstaller.go @@ -43,14 +43,13 @@ exit 0 } uninstallScript := ` -if pgrep vpn-client; then skywire-cli visor stop-app vpn-client; fi +if pgrep vpn-client; then skywire cli visor stop-app vpn-client; fi if pgrep skywire; then pkill -f skywire; fi pkgutil --forget ` + osxServiceIdentifier + ` pkgutil --forget com.skycoin.skywire.updater pkgutil --forget com.skycoin.skywire.remover rm -rf ` + filepath.Join(os.Getenv("HOME"), "Library", "Logs", "skywire") + ` -unlink /usr/local/bin/skywire-cli rm -rf /Applications/Skywire.app ` diff --git a/scripts/mac_installer/install_scripts/postinstall b/scripts/mac_installer/install_scripts/postinstall index 90076fb648..af5e2406f1 100755 --- a/scripts/mac_installer/install_scripts/postinstall +++ b/scripts/mac_installer/install_scripts/postinstall @@ -15,7 +15,7 @@ chown -R "${USER}" "$skywire_dir" echo "generating skywire config if it doesn't exist" if [[ ! -f "${skywire_dir}"/skywire-config.json ]]; then - /Applications/Skywire.app/Contents/MacOS/skywire-cli config gen -bpio "${skywire_dir}"/skywire-config.json + /Applications/Skywire.app/Contents/MacOS/skywire cli config gen -bpio "${skywire_dir}"/skywire-config.json fi chown "${USER}" "${skywire_dir}"/skywire-config.json @@ -54,6 +54,4 @@ echo "moving applications to /Applications" if [[ ! -d /usr/local/bin ]]; then mkdir /usr/local/bin fi -if [[ ! -L /usr/local/bin/skywire-cli ]]; then - ln -s /Applications/Skywire.app/Contents/MacOS/skywire-cli /usr/local/bin/skywire-cli -fi + diff --git a/scripts/mac_installer/remove_scripts/postinstall b/scripts/mac_installer/remove_scripts/postinstall index c54d3fdf09..b8ab18874b 100755 --- a/scripts/mac_installer/remove_scripts/postinstall +++ b/scripts/mac_installer/remove_scripts/postinstall @@ -11,7 +11,6 @@ pkill -f skywire rm -rf /Users/"$USER"/Library/LaunchAgents/com.skycoin.skywire.logcleaner.plist rm -rf "${skywire_dir}"/local rm -rf "${log_dir}" -unlink /usr/local/bin/skywire-cli pkgutil --forget com.skycoin.skywire.visor pkgutil --forget com.skycoin.skywire.updater diff --git a/scripts/mac_installer/update_scripts/postinstall b/scripts/mac_installer/update_scripts/postinstall index c988b13d0a..2953aa3601 100755 --- a/scripts/mac_installer/update_scripts/postinstall +++ b/scripts/mac_installer/update_scripts/postinstall @@ -21,10 +21,6 @@ if [[ -L /usr/local/bin/skywire-cli ]]; then unlink /usr/local/bin/skywire-cli fi -/Applications/Skywire.app/Contents/MacOS/skywire-cli config gen -bprio "${skywire_dir}"/skywire-config.json +/Applications/Skywire.app/Contents/MacOS/skywire cli config gen -bprio "${skywire_dir}"/skywire-config.json chown "${USER}" "${skywire_dir}"/skywire-config.json -echo "updating skywire" -if [[ ! -L /usr/local/bin/skywire-cli ]]; then - ln -s /Applications/Skywire.app/Contents/MacOS/skywire-cli /usr/local/bin/skywire-cli -fi diff --git a/scripts/mac_installer/update_scripts/preinstall b/scripts/mac_installer/update_scripts/preinstall index 91d6b0900e..f5e85af087 100755 --- a/scripts/mac_installer/update_scripts/preinstall +++ b/scripts/mac_installer/update_scripts/preinstall @@ -2,7 +2,7 @@ sudo -u "$USER" launchctl remove com.skycoin.skywire.logcleaner -if pgrep vpn-client; then skywire-cli visor stop-app vpn-client; fi +if pgrep vpn-client; then skywire cli visor stop-app vpn-client; fi if pgrep skywire; then pkill -f skywire; fi diff --git a/scripts/win_installer/Product.wxs b/scripts/win_installer/Product.wxs index ce28636c22..9682a035e5 100644 --- a/scripts/win_installer/Product.wxs +++ b/scripts/win_installer/Product.wxs @@ -24,8 +24,7 @@ - - + @@ -35,9 +34,6 @@ - - - diff --git a/scripts/win_installer/script.ps1 b/scripts/win_installer/script.ps1 index d3d6f716d8..5869904f57 100644 --- a/scripts/win_installer/script.ps1 +++ b/scripts/win_installer/script.ps1 @@ -65,11 +65,7 @@ function BuildInstaller($arch) Write-Output "# 4. Preparing Environment for Wix... #" Set-Location .\scripts\win_installer mkdir -p ".\build\apps" > $null - Move-Item ..\..\archive\skywire-visor.exe .\build\skywire-visor.exe - Move-Item ..\..\archive\skywire-cli.exe .\build\skywire-cli.exe - Move-Item ..\..\archive\apps\vpn-client.exe .\build\apps\vpn-client.exe - Move-Item ..\..\archive\apps\skysocks-client.exe .\build\apps\skysocks-client.exe - Move-Item ..\..\archive\apps\skysocks.exe .\build\apps\skysocks.exe + Move-Item ..\..\archive\skywire.exe .\build\skywire.exe Copy-Item ..\..\archive\dmsghttp-config.json .\build\dmsghttp-config.json Copy-Item ..\..\archive\services-config.json .\build\services-config.json Copy-Item skywire.bat .\build\skywire.bat diff --git a/scripts/win_installer/skywire.bat b/scripts/win_installer/skywire.bat index 54e4d5dfed..0ada7e649e 100644 --- a/scripts/win_installer/skywire.bat +++ b/scripts/win_installer/skywire.bat @@ -38,12 +38,12 @@ if exist "%HOMEPATH%\skywire-config.json" ( :: Generating new config file if not exist if not exist "skywire-config.json" ( - skywire-cli config gen -birpw >nul 2>&1 + skywire cli config gen -birpw >nul 2>&1 ) :: Regenerating config file after update and install new version of Skywire if exist "new.update" ( - skywire-cli config gen -birpwx >nul 2>&1 + skywire cli config gen -birpwx >nul 2>&1 del new.update >nul 2>&1 ) @@ -51,4 +51,4 @@ if exist "new.update" ( start "" http://127.0.0.1:8000 :: Running Skywire -skywire-visor.exe -c "skywire-config.json" --systray >> local\logs\skywire_%start_time%.log +skywire.exe visor -c "skywire-config.json" --systray >> local\logs\skywire_%start_time%.log diff --git a/vendor/github.com/skycoin/skywire-services/internal/vpn/tun_device_windows.go b/vendor/github.com/skycoin/skywire-services/internal/vpn/tun_device_windows.go new file mode 100644 index 0000000000..bc49187e5c --- /dev/null +++ b/vendor/github.com/skycoin/skywire-services/internal/vpn/tun_device_windows.go @@ -0,0 +1,50 @@ +//go:build windows +// +build windows + +package vpn + +import ( + "fmt" + + "golang.zx2c4.com/wireguard/tun" +) + +type tunDevice struct { + tun tun.Device + name string +} + +func newTUNDevice() (TUNDevice, error) { + const tunName = "tun0" + + dev, err := tun.CreateTUN(tunName, TUNMTU) + if err != nil { + return nil, fmt.Errorf("error allocating TUN interface: %w", err) + } + + name, err := dev.Name() + if err != nil { + return nil, fmt.Errorf("error getting interface name: %w", err) + } + + return &tunDevice{ + tun: dev, + name: name, + }, nil +} + +func (t *tunDevice) Read(buf []byte) (int, error) { + return t.tun.Read(buf, 0) +} + +func (t *tunDevice) Write(buf []byte) (int, error) { + return t.tun.Write(buf, 0) +} + +func (t *tunDevice) Close() error { + return t.tun.Close() +} + +func (t *tunDevice) Name() string { + return t.name +} diff --git a/vendor/modules.txt b/vendor/modules.txt index e1046a4b32..d92d728813 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -499,7 +499,7 @@ github.com/skycoin/skycoin-service-discovery/internal/pg github.com/skycoin/skycoin-service-discovery/internal/sdmetrics github.com/skycoin/skycoin-service-discovery/pkg/service-discovery/api github.com/skycoin/skycoin-service-discovery/pkg/service-discovery/store -# github.com/skycoin/skywire-services v0.0.0-20240316160900-0498a9053d6b +# github.com/skycoin/skywire-services v0.0.0-20240316183902-caaa6f3db525 ## explicit; go 1.21 github.com/skycoin/skywire-services/cmd/address-resolver/commands github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands