From 50d313921778e489268d43ba9a20a6e6e11fb06d Mon Sep 17 00:00:00 2001 From: Moses Narrow <36607567+0pcom@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:39:09 -0500 Subject: [PATCH] remove hardcoded deployment defaults (#78) * remove hardcoded services * revert changes to go.mod * update vendor deps * update vendor deps * update CI workflow to use golangci-lint v1.60.3 & go version 1.23.0 ; update .golangci-lint.yaml * add uptime tracker code from skywire-ut develop branch * fix import path in golangci.yaml * fix CI errors * add goda dependency graph * add goda dependency graph svg * add check-help makefile directive ; standardize cli help menus --- .github/workflows/test.yml | 4 +- .golangci.yml | 17 +- Makefile | 60 +- README.md | 10 + cmd/address-resolver/commands/root.go | 50 +- cmd/config-bootstrapper/commands/root.go | 8 +- cmd/dmsg-monitor/README.md | 16 - cmd/dmsg-monitor/commands/root.go | 123 -- cmd/dmsg-monitor/dmsg-monitor.go | 43 - cmd/liveness-checker/README.md | 19 - cmd/liveness-checker/commands/root.go | 124 -- cmd/liveness-checker/liveness-checker.go | 43 - cmd/network-monitor/commands/root.go | 6 +- cmd/public-visor-monitor/commands/root.go | 2 +- cmd/route-finder/commands/root.go | 12 +- cmd/skywire-services/services.go | 21 +- cmd/tpd-monitor/commands/root.go | 10 +- cmd/transport-discovery/commands/root.go | 29 +- cmd/transport-setup/commands/root.go | 34 +- cmd/uptime-tracker/commands/root.go | 62 +- cmd/uptime-tracker/uptime-tracker.go | 33 + docs/skywire-services-goda-graph.svg | 1051 +++++++++++++ go.mod | 10 +- go.sum | 12 +- internal/armetrics/victoria_metrics.go | 4 +- internal/config/default_environments_test.go | 4 +- internal/config/runners.go | 4 +- internal/lc/data.go | 4 +- internal/nmmetrics/victoria_metrics.go | 4 +- internal/tpdiscmetrics/empty.go | 4 +- internal/tpdiscmetrics/metrics.go | 4 +- internal/utmetrics/victoria_metrics.go | 4 +- internal/vpn/client_config.go | 4 +- internal/vpn/handshake_status.go | 4 +- internal/vpn/hello.go | 4 +- internal/vpn/tun_device.go | 4 +- pkg/address-resolver/api/api.go | 3 +- pkg/config-bootstrapper/api/api.go | 22 +- pkg/dmsg-monitor/api/api.go | 450 ------ pkg/liveness-checker/api/api.go | 617 -------- pkg/liveness-checker/store/memory_store.go | 46 - .../store/memory_store_test.go | 13 - pkg/liveness-checker/store/redis_store.go | 118 -- .../store/redis_store_test.go | 38 - pkg/liveness-checker/store/store.go | 40 - pkg/node-visualizer/api/store.go | 4 +- pkg/route-finder/store/priority_queue.go | 4 +- pkg/transport-discovery/api/api.go | 3 +- .../github.com/skycoin/dmsg/pkg/dmsg/const.go | 13 +- .../skycoin/dmsg/pkg/dmsgcurl/dmsgcurl.go | 4 +- .../skycoin/dmsg/pkg/dmsgcurl/flags.go | 12 +- .../skycoin/dmsg/pkg/dmsgpty/conf.go | 2 +- .../skycoin/dmsg/pkg/dmsgserver/config.go | 12 +- .../github.com/skycoin/skywire/.dockerignore | 5 + vendor/github.com/skycoin/skywire/.gitignore | 76 + .../github.com/skycoin/skywire/.golangci.yml | 197 +++ .../skycoin/skywire/.goreleaser-darwin.yml | 51 + .../skycoin/skywire/.goreleaser-linux.yml | 144 ++ .../skycoin/skywire/.goreleaser-windows.yml | 53 + .../github.com/skycoin/skywire/CHANGELOG.md | 1319 +++++++++++++++++ vendor/github.com/skycoin/skywire/Makefile | 370 +++++ vendor/github.com/skycoin/skywire/README.md | 551 +++++++ vendor/github.com/skycoin/skywire/REWARDS.md | 150 ++ .../skycoin/skywire/dmsghttp-config.json | 76 + .../skycoin/skywire/mainnet_rules.md | 434 ++++++ .../skycoin/skywire/services-config.json | 92 ++ vendor/github.com/skycoin/skywire/skywire.go | 98 ++ vendor/modules.txt | 5 +- 68 files changed, 4978 insertions(+), 1891 deletions(-) delete mode 100644 cmd/dmsg-monitor/README.md delete mode 100644 cmd/dmsg-monitor/commands/root.go delete mode 100644 cmd/dmsg-monitor/dmsg-monitor.go delete mode 100644 cmd/liveness-checker/README.md delete mode 100644 cmd/liveness-checker/commands/root.go delete mode 100644 cmd/liveness-checker/liveness-checker.go create mode 100644 docs/skywire-services-goda-graph.svg delete mode 100644 pkg/dmsg-monitor/api/api.go delete mode 100644 pkg/liveness-checker/api/api.go delete mode 100644 pkg/liveness-checker/store/memory_store.go delete mode 100644 pkg/liveness-checker/store/memory_store_test.go delete mode 100644 pkg/liveness-checker/store/redis_store.go delete mode 100644 pkg/liveness-checker/store/redis_store_test.go delete mode 100644 pkg/liveness-checker/store/store.go create mode 100644 vendor/github.com/skycoin/skywire/.dockerignore create mode 100644 vendor/github.com/skycoin/skywire/.gitignore create mode 100644 vendor/github.com/skycoin/skywire/.golangci.yml create mode 100644 vendor/github.com/skycoin/skywire/.goreleaser-darwin.yml create mode 100644 vendor/github.com/skycoin/skywire/.goreleaser-linux.yml create mode 100644 vendor/github.com/skycoin/skywire/.goreleaser-windows.yml create mode 100644 vendor/github.com/skycoin/skywire/CHANGELOG.md create mode 100644 vendor/github.com/skycoin/skywire/Makefile create mode 100644 vendor/github.com/skycoin/skywire/README.md create mode 100644 vendor/github.com/skycoin/skywire/REWARDS.md create mode 100644 vendor/github.com/skycoin/skywire/dmsghttp-config.json create mode 100644 vendor/github.com/skycoin/skywire/mainnet_rules.md create mode 100644 vendor/github.com/skycoin/skywire/services-config.json create mode 100644 vendor/github.com/skycoin/skywire/skywire.go diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c0e3a4d..18348d4f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,13 +7,13 @@ jobs: - name: Setup golang uses: actions/setup-go@v3 with: - go-version: 1.21.x + go-version: 1.23.x - name: Check out code uses: actions/checkout@v3 - name: Install Requirements run: | GO111MODULES=off; go mod vendor - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3 - name: Setup SSH Key Build and run e2e run : | make e2e-build diff --git a/.golangci.yml b/.golangci.yml index 1450308c..764c81fe 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -4,10 +4,10 @@ # options for analysis running run: # default concurrency is a available CPU number - concurrency: 1 + concurrency: 4 # timeout for analysis, e.g. 30s, 5m, default is 1m - deadline: 10m + deadline: 3m # exit code when at least one issue was found, default is 1 issues-exit-code: 1 @@ -45,7 +45,7 @@ run: # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" - format: colored-line-number + formats: colored-line-number # print lines of code with issue, default is true print-issued-lines: true @@ -66,8 +66,7 @@ linters-settings: check-blank: true govet: # report about shadowed variables - check-shadowing: true - + shadow: true # Obtain type information from installed (to $GOPATH/pkg) package files: # golangci-lint will execute `go install -i` and `go test -i` for analyzed packages # before analyzing them. @@ -81,7 +80,7 @@ linters-settings: # 2. you use go >= 1.10 # 3. you do repeated runs (false for CI) or cache $GOPATH/pkg or `go env GOCACHE` dir in CI. use-installed-packages: false - revive: + golint: # minimal confidence for issues, default is 0.8 min-confidence: 0.8 gofmt: @@ -145,26 +144,24 @@ linters-settings: simple: true range-loops: true # Report preallocation suggestions on range loops, true by default for-loops: false # Report preallocation suggestions on for loops, false by default + goimports: + local-prefixes: github.com/skycoin/skywire-services linters: enable: - revive - goimports - - unused - unparam - errcheck - gosimple - staticcheck - - unused - ineffassign - typecheck - gosec - - megacheck - misspell - nakedret enable-all: false - disable: disable-all: true presets: fast: false diff --git a/Makefile b/Makefile index 39d3b865..ee91ac71 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,65 @@ test: ## Run tests for net go test ${TEST_OPTS} -mod=vendor ./internal/... go test ${TEST_OPTS} -mod=vendor ./pkg/... -check: lint test lint-shell ## Run lint and test +check: lint check-help test lint-shell ## Run lint and test + +check-help: ## Cursory check of the help menus + @echo "checking help menus for compilation without errors" + @echo + go run cmd/skywire-services/services.go --help + @echo + go run cmd/skywire-services/services.go ar --help + @echo + go run cmd/skywire-services/services.go confbs --help + @echo + go run cmd/skywire-services/services.go kg --help + @echo + go run cmd/skywire-services/services.go nv --help + @echo + go run cmd/skywire-services/services.go rf --help + @echo + go run cmd/skywire-services/services.go se --help + @echo + go run cmd/skywire-services/services.go tpd --help + @echo + go run cmd/skywire-services/services.go tps --help + @echo + go run cmd/skywire-services/services.go ut --help + @echo + go run cmd/config-bootstrapper/config.go --help + @echo + go run cmd/tpd-monitor/tpd-monitor.go --help + @echo + go run cmd/transport-discovery/transport-discovery.go --help + @echo + go run cmd/keys-gen/keys-gen.go --help + @echo + go run cmd/skysocks-monitor/skysocks-monitor.go --help + @echo + go run cmd/sw-env/sw-env.go --help + @echo + go run cmd/uptime-tracker/uptime-tracker.go --help + @echo + go run cmd/route-finder/route-finder.go --help + @echo + go run cmd/setup-node/setup-node.go --help + @echo + go run cmd/transport-setup/transport-setup.go --help + @echo + go run cmd/public-visor-monitor/public-visor-monitor.go --help + @echo + go run cmd/node-visualizer/node-visualizer.go --help + @echo +# go run cmd/skysocks-lite-client/skysocks-lite-client.go --help +# @echo + go run cmd/vpn-monitor/vpn-monitor.go --help + @echo + go run cmd/address-resolver/address-resolver.go --help + @echo +# go run cmd/vpn-lite-client/vpn-lite-client.go --help +# @echo + go run cmd/network-monitor/network-monitor.go --help + @echo ## : ## _ [E2E tests suite] diff --git a/README.md b/README.md index 2c4b9a1a..f598ad11 100644 --- a/README.md +++ b/README.md @@ -73,3 +73,13 @@ Check the [docs](docs/Deployments.md) for more documentation on the deployments. - [Dmsg Server](https://github.com/skycoin/dmsg/blob/develop/cmd/dmsg-server/README.md) - [Service Discovery](https://github.com/skycoin/skycoin-service-discovery/blob/master/README.md#http-api) - [Uptime Tracker](cmd/uptime-tracker/README.md) + +## Dependency Graph + +made with [goda](https://github.com/loov/goda) + +``` +goda graph github.com/skycoin/skywire-services/... | dot -Tsvg -o docs/skywire-services-goda-graph.svg +``` + +![Dependency Graph](docs/skywire-services-goda-graph.svg "github.com/skycoin/skywire-services Dependency Graph") diff --git a/cmd/address-resolver/commands/root.go b/cmd/address-resolver/commands/root.go index 474b002d..dea96d2a 100644 --- a/cmd/address-resolver/commands/root.go +++ b/cmd/address-resolver/commands/root.go @@ -10,7 +10,6 @@ import ( "strings" "time" - cc "github.com/ivanpirog/coloredcobra" "github.com/skycoin/dmsg/pkg/direct" "github.com/skycoin/dmsg/pkg/dmsg" "github.com/skycoin/dmsg/pkg/dmsghttp" @@ -20,7 +19,6 @@ import ( "github.com/skycoin/skywire-utilities/pkg/httpauth" "github.com/skycoin/skywire-utilities/pkg/logging" "github.com/skycoin/skywire-utilities/pkg/metricsutil" - "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire-utilities/pkg/storeconfig" "github.com/skycoin/skywire-utilities/pkg/tcpproxy" "github.com/spf13/cobra" @@ -57,20 +55,15 @@ func init() { RootCmd.Flags().StringVarP(&metricsAddr, "metrics", "m", "", "address to bind metrics API to\033[0m") RootCmd.Flags().StringVar(&redisURL, "redis", "redis://localhost:6379", "connections string for a redis store\033[0m") RootCmd.Flags().IntVar(&redisPoolSize, "redis-pool-size", 10, "redis connection pool size\033[0m") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "set log level one of: info, error, warn, debug, trace, panic") + RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "[info|error|warn|debug|trace|panic]\033[0m") RootCmd.Flags().StringVar(&tag, "tag", "address_resolver", "logging tag\033[0m") RootCmd.Flags().BoolVarP(&testing, "testing", "t", false, "enable testing to start without redis\033[0m") - RootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", "http://dmsgd.skywire.skycoin.com", "url of dmsg-discovery\033[0m") + RootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", dmsg.DiscAddr(false), "url of dmsg discovery\033[0m") RootCmd.Flags().StringVar(&whitelistKeys, "whitelist-keys", "", "list of whitelisted keys of network monitor used for deregistration\033[0m") RootCmd.Flags().BoolVar(&testEnvironment, "test-environment", false, "distinguished between prod and test environment\033[0m") - RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\r") - RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\r") - RootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler") - var helpflag bool - RootCmd.SetUsageTemplate(help) - RootCmd.PersistentFlags().BoolVarP(&helpflag, "help", "h", false, "help for address-resolver") - RootCmd.SetHelpCommand(&cobra.Command{Hidden: true}) - RootCmd.PersistentFlags().MarkHidden("help") //nolint + RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\033[0m\n\r") + RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\033[0m") + RootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler\033[0m") } // RootCmd contains the root command @@ -133,14 +126,7 @@ skywire svc ar --addr ":9093" --redis "redis://localhost:6379" --sk $(tail -n1 a var whitelistPKs []string if whitelistKeys != "" { whitelistPKs = strings.Split(whitelistKeys, ",") - } else { - if testEnvironment { - whitelistPKs = strings.Split(skyenv.TestNetworkMonitorPKs, ",") - } else { - whitelistPKs = strings.Split(skyenv.NetworkMonitorPKs, ",") - } } - for _, v := range whitelistPKs { api.WhitelistPKs.Set(v) } @@ -232,33 +218,9 @@ skywire svc ar --addr ":9093" --redis "redis://localhost:6379" --sk $(tail -n1 a }, } -// Execute executes root CLI command. +// Execute executes root CLI command func Execute() { - cc.Init(&cc.Config{ - RootCmd: RootCmd, - Headings: cc.HiBlue + cc.Bold, //+ cc.Underline, - Commands: cc.HiBlue + cc.Bold, - CmdShortDescr: cc.HiBlue, - Example: cc.HiBlue + cc.Italic, - ExecName: cc.HiBlue + cc.Bold, - Flags: cc.HiBlue + cc.Bold, - //FlagsDataType: cc.HiBlue, - FlagsDescr: cc.HiBlue, - NoExtraNewlines: true, - NoBottomNewline: true, - }) if err := RootCmd.Execute(); err != nil { log.Fatal("Failed to execute command: ", err) - } } - -const help = "Usage:\r\n" + - " {{.UseLine}}{{if .HasAvailableSubCommands}}{{end}} {{if gt (len .Aliases) 0}}\r\n\r\n" + - "{{.NameAndAliases}}{{end}}{{if .HasAvailableSubCommands}}\r\n\r\n" + - "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/config-bootstrapper/commands/root.go b/cmd/config-bootstrapper/commands/root.go index 93830af7..bf43495b 100644 --- a/cmd/config-bootstrapper/commands/root.go +++ b/cmd/config-bootstrapper/commands/root.go @@ -40,10 +40,10 @@ func init() { RootCmd.Flags().StringVar(&tag, "tag", "address_resolver", "logging tag\033[0m") RootCmd.Flags().StringVarP(&stunPath, "config", "c", "./config.json", "stun server list file location\033[0m") RootCmd.Flags().StringVarP(&domain, "domain", "d", "skywire.skycoin.com", "the domain of the endpoints\033[0m") - RootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", "http://dmsgd.skywire.skycoin.com", "url of dmsg-discovery\033[0m") - RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\r") - RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\r") - RootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler") + RootCmd.Flags().StringVarP(&dmsgDisc, "dmsg-disc", "D", dmsg.DiscAddr(false), "url of dmsg-discovery\033[0m") + RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\033[0m\n\r") + RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\033[0m") + RootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler\033[0m") } // RootCmd contains the root command diff --git a/cmd/dmsg-monitor/README.md b/cmd/dmsg-monitor/README.md deleted file mode 100644 index 247b3f98..00000000 --- a/cmd/dmsg-monitor/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# DMSG Monitor - -## API endpoints - -### GET `/health` -Gets the health info of the service. e.g. -``` -{ - "build_info": { - "version": "v1.0.1-267-ge1617c5b", - "commit": "e1617c5b0121182cfd2b610dc518e4753e56440e", - "date": "2022-10-25T11:01:52Z" - }, - "started_at": "2022-10-25T11:10:45.152629597Z" -} -``` diff --git a/cmd/dmsg-monitor/commands/root.go b/cmd/dmsg-monitor/commands/root.go deleted file mode 100644 index ec48499e..00000000 --- a/cmd/dmsg-monitor/commands/root.go +++ /dev/null @@ -1,123 +0,0 @@ -// Package commands cmd/dmsg-monitor/commands/root.go -package commands - -import ( - "context" - "fmt" - "log" - "os" - "path/filepath" - "strings" - "time" - - "github.com/skycoin/skywire-utilities/pkg/buildinfo" - "github.com/skycoin/skywire-utilities/pkg/cipher" - "github.com/skycoin/skywire-utilities/pkg/cmdutil" - "github.com/skycoin/skywire-utilities/pkg/logging" - "github.com/skycoin/skywire-utilities/pkg/tcpproxy" - "github.com/spf13/cobra" - - "github.com/skycoin/skywire-services/pkg/dmsg-monitor/api" -) - -var ( - confPath string - dmsgURL string - utURL string - addr string - tag string - logLvl string - sleepDeregistration time.Duration - batchSize int -) - -func init() { - RootCmd.Flags().StringVarP(&addr, "addr", "a", ":9080", "address to bind to.\033[0m") - RootCmd.Flags().DurationVarP(&sleepDeregistration, "sleep-deregistration", "s", 60, "Sleep time for derigstration process in minutes\033[0m") - RootCmd.Flags().IntVarP(&batchSize, "batchsize", "b", 20, "Batch size of deregistration\033[0m") - RootCmd.Flags().StringVarP(&confPath, "config", "c", "dmsg-monitor.json", "config file location.\033[0m") - RootCmd.Flags().StringVarP(&dmsgURL, "dmsg-url", "d", "", "url to dmsg data.\033[0m") - RootCmd.Flags().StringVarP(&utURL, "ut-url", "u", "", "url to uptime tracker visor data.\033[0m") - RootCmd.Flags().StringVar(&tag, "tag", "dmsg_monitor", "logging tag\033[0m") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "set log level one of: info, error, warn, debug, trace, panic") -} - -// RootCmd contains the root command -var RootCmd = &cobra.Command{ - Use: func() string { - return strings.Split(filepath.Base(strings.ReplaceAll(strings.ReplaceAll(fmt.Sprintf("%v", os.Args), "[", ""), "]", "")), " ")[0] - }(), - Short: "DMSG monitor of DMSG discovery entries.", - Long: ` - ┌┬┐┌┬┐┌─┐┌─┐ ┌┬┐┌─┐┌┐┌┬┌┬┐┌─┐┬─┐ - │││││└─┐│ ┬───││││ │││││ │ │ │├┬┘ - ─┴┘┴ ┴└─┘└─┘ ┴ ┴└─┘┘└┘┴ ┴ └─┘┴└─ -`, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, - Version: buildinfo.Version(), - Run: func(_ *cobra.Command, _ []string) { - if _, err := buildinfo.Get().WriteTo(os.Stdout); err != nil { - log.Printf("Failed to output build info: %v", err) - } - - mLogger := logging.NewMasterLogger() - lvl, err := logging.LevelFromString(logLvl) - if err != nil { - mLogger.Fatal("Invalid log level") - } - logging.SetLevel(lvl) - - conf := api.InitConfig(confPath, mLogger) - - if dmsgURL == "" { - dmsgURL = conf.Dmsg.Discovery - } - if utURL == "" { - utURL = conf.UptimeTracker.Addr + "/uptimes" - } - - var srvURLs api.ServicesURLs - srvURLs.DMSG = dmsgURL - srvURLs.UT = utURL - - logger := mLogger.PackageLogger(tag) - - logger.WithField("addr", addr).Info("Serving DMSG-Monitor API...") - - monitorSign, _ := cipher.SignPayload([]byte(conf.PK.Hex()), conf.SK) //nolint - - var monitorConfig api.DMSGMonitorConfig - monitorConfig.PK = conf.PK - monitorConfig.Sign = monitorSign - monitorConfig.BatchSize = batchSize - - dmsgMonitorAPI := api.New(logger, srvURLs, monitorConfig) - - ctx, cancel := cmdutil.SignalContext(context.Background(), logger) - defer cancel() - - go dmsgMonitorAPI.InitDeregistrationLoop(ctx, conf, sleepDeregistration) - - go func() { - if err := tcpproxy.ListenAndServe(addr, dmsgMonitorAPI); err != nil { - logger.Errorf("serve: %v", err) - cancel() - } - }() - - <-ctx.Done() - if err := dmsgMonitorAPI.Visor.Close(); err != nil { - logger.WithError(err).Error("Visor closed with error.") - } - }, -} - -// Execute executes root CLI command. -func Execute() { - if err := RootCmd.Execute(); err != nil { - log.Fatal("Failed to execute command: ", err) - } -} diff --git a/cmd/dmsg-monitor/dmsg-monitor.go b/cmd/dmsg-monitor/dmsg-monitor.go deleted file mode 100644 index a582269c..00000000 --- a/cmd/dmsg-monitor/dmsg-monitor.go +++ /dev/null @@ -1,43 +0,0 @@ -// Package main cmd/dmsg-monitor/dmsg-monitor.go -package main - -import ( - cc "github.com/ivanpirog/coloredcobra" - "github.com/spf13/cobra" - - "github.com/skycoin/skywire-services/cmd/dmsg-monitor/commands" -) - -func init() { - var helpflag bool - commands.RootCmd.SetUsageTemplate(help) - commands.RootCmd.PersistentFlags().BoolVarP(&helpflag, "help", "h", false, "help for dmsgpty-cli") - commands.RootCmd.SetHelpCommand(&cobra.Command{Hidden: true}) - commands.RootCmd.PersistentFlags().MarkHidden("help") //nolint -} - -func main() { - cc.Init(&cc.Config{ - RootCmd: commands.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, - }) - commands.Execute() -} - -const help = "Usage:\r\n" + - " {{.UseLine}}{{if .HasAvailableSubCommands}}{{end}} {{if gt (len .Aliases) 0}}\r\n\r\n" + - "{{.NameAndAliases}}{{end}}{{if .HasAvailableSubCommands}}\r\n\r\n" + - "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/liveness-checker/README.md b/cmd/liveness-checker/README.md deleted file mode 100644 index 15262884..00000000 --- a/cmd/liveness-checker/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Liveness Checker - -## API endpoints - -### GET `/health` - Gets the health info of the service. e.g. - ``` - { - "build_info": { - "version": "v1.0.1-267-ge1617c5b", - "commit": "e1617c5b0121182cfd2b610dc518e4753e56440e", - "date": "2022-10-25T11:01:52Z" - }, - "started_at": "2022-10-25T11:10:45.152629597Z" - } - ``` - -### GET `/status` -Gets the status of all the services of the deployment \ No newline at end of file diff --git a/cmd/liveness-checker/commands/root.go b/cmd/liveness-checker/commands/root.go deleted file mode 100644 index 9f5efd7b..00000000 --- a/cmd/liveness-checker/commands/root.go +++ /dev/null @@ -1,124 +0,0 @@ -// Package commands cmd/liveness-checker/commands/root.go -package commands - -import ( - "context" - "fmt" - "log" - "os" - "path/filepath" - "strings" - - "github.com/skycoin/skywire-utilities/pkg/buildinfo" - "github.com/skycoin/skywire-utilities/pkg/cmdutil" - "github.com/skycoin/skywire-utilities/pkg/logging" - "github.com/skycoin/skywire-utilities/pkg/storeconfig" - "github.com/skycoin/skywire-utilities/pkg/tcpproxy" - "github.com/spf13/cobra" - - "github.com/skycoin/skywire-services/pkg/liveness-checker/api" - "github.com/skycoin/skywire-services/pkg/liveness-checker/store" -) - -const ( - redisScheme = "redis://" -) - -var ( - confPath string - addr string - tag string - logLvl string - redisURL string - testing bool -) - -func init() { - RootCmd.Flags().StringVarP(&addr, "addr", "a", ":9081", "address to bind to.\033[0m") - RootCmd.Flags().StringVarP(&confPath, "config", "c", "liveness-checker.json", "config file location.\033[0m") - RootCmd.Flags().StringVar(&tag, "tag", "liveness_checker", "logging tag\033[0m") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "set log level one of: info, error, warn, debug, trace, panic") - RootCmd.Flags().StringVar(&redisURL, "redis", "redis://localhost:6379", "connections string for a redis store\033[0m") - RootCmd.Flags().BoolVarP(&testing, "testing", "t", false, "enable testing to start without redis\033[0m") -} - -// RootCmd contains the root command -var RootCmd = &cobra.Command{ - Use: func() string { - return strings.Split(filepath.Base(strings.ReplaceAll(strings.ReplaceAll(fmt.Sprintf("%v", os.Args), "[", ""), "]", "")), " ")[0] - }(), - Short: "Liveness checker of the deployment.", - Long: ` - ┬ ┬┬ ┬┌─┐┌┐┌┌─┐┌─┐┌─┐ ┌─┐┬ ┬┌─┐┌─┐┬┌─┌─┐┬─┐ - │ │└┐┌┘├┤ │││├┤ └─┐└─┐───│ ├─┤├┤ │ ├┴┐├┤ ├┬┘ - ┴─┘┴ └┘ └─┘┘└┘└─┘└─┘└─┘ └─┘┴ ┴└─┘└─┘┴ ┴└─┘┴└─`, - SilenceErrors: true, - SilenceUsage: true, - DisableSuggestions: true, - DisableFlagsInUseLine: true, - Version: buildinfo.Version(), - Run: func(_ *cobra.Command, _ []string) { - if _, err := buildinfo.Get().WriteTo(os.Stdout); err != nil { - log.Printf("Failed to output build info: %v", err) - } - - if !strings.HasPrefix(redisURL, redisScheme) { - redisURL = redisScheme + redisURL - } - - storeConfig := storeconfig.Config{ - Type: storeconfig.Redis, - URL: redisURL, - Password: storeconfig.RedisPassword(), - } - - if testing { - storeConfig.Type = storeconfig.Memory - } - - mLogger := logging.NewMasterLogger() - lvl, err := logging.LevelFromString(logLvl) - if err != nil { - mLogger.Fatal("Invalid loglvl detected") - } - - logging.SetLevel(lvl) - - conf, confAPI := api.InitConfig(confPath, mLogger) - - logger := mLogger.PackageLogger(tag) - - ctx, cancel := cmdutil.SignalContext(context.Background(), logger) - defer cancel() - - s, err := store.New(ctx, storeConfig, logger) - if err != nil { - logger.Fatal("Failed to initialize redis store: ", err) - } - - logger.WithField("addr", addr).Info("Serving discovery API...") - - lcAPI := api.New(conf.PK, conf.SK, s, logger, mLogger, confAPI) - - go lcAPI.RunBackgroundTasks(ctx, conf) - - go func() { - if err := tcpproxy.ListenAndServe(addr, lcAPI); err != nil { - logger.Errorf("serve: %v", err) - cancel() - } - }() - - <-ctx.Done() - if err := lcAPI.Visor.Close(); err != nil { - logger.WithError(err).Error("Visor closed with error.") - } - }, -} - -// Execute executes root CLI command. -func Execute() { - if err := RootCmd.Execute(); err != nil { - log.Fatal("Failed to execute command: ", err) - } -} diff --git a/cmd/liveness-checker/liveness-checker.go b/cmd/liveness-checker/liveness-checker.go deleted file mode 100644 index 8339ea9d..00000000 --- a/cmd/liveness-checker/liveness-checker.go +++ /dev/null @@ -1,43 +0,0 @@ -// Package main cmd/liveness-checker/liveness-checker.go -package main - -import ( - cc "github.com/ivanpirog/coloredcobra" - "github.com/spf13/cobra" - - "github.com/skycoin/skywire-services/cmd/liveness-checker/commands" -) - -func init() { - var helpflag bool - commands.RootCmd.SetUsageTemplate(help) - commands.RootCmd.PersistentFlags().BoolVarP(&helpflag, "help", "h", false, "help for dmsgpty-cli") - commands.RootCmd.SetHelpCommand(&cobra.Command{Hidden: true}) - commands.RootCmd.PersistentFlags().MarkHidden("help") //nolint -} - -func main() { - cc.Init(&cc.Config{ - RootCmd: commands.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, - }) - commands.Execute() -} - -const help = "Usage:\r\n" + - " {{.UseLine}}{{if .HasAvailableSubCommands}}{{end}} {{if gt (len .Aliases) 0}}\r\n\r\n" + - "{{.NameAndAliases}}{{end}}{{if .HasAvailableSubCommands}}\r\n\r\n" + - "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/network-monitor/commands/root.go b/cmd/network-monitor/commands/root.go index c787d39f..385fc8bd 100644 --- a/cmd/network-monitor/commands/root.go +++ b/cmd/network-monitor/commands/root.go @@ -49,11 +49,11 @@ func init() { RootCmd.Flags().DurationVar(&sleepDeregistration, "sleep-deregistration", 10, "Sleep time for derigstration process in minutes\033[0m") RootCmd.Flags().IntVarP(&batchSize, "batchsize", "b", 30, "Batch size of deregistration\033[0m") RootCmd.Flags().StringVarP(&confPath, "config", "c", "network-monitor.json", "config file location.\033[0m") - RootCmd.Flags().StringVarP(&sdURL, "sd-url", "n", "", "url to service discovery.\033[0m") - RootCmd.Flags().StringVarP(&arURL, "ar-url", "v", "", "url to address resolver.\033[0m") + RootCmd.Flags().StringVarP(&sdURL, "sd-url", "n", "", "url to service discovery\033[0m") + RootCmd.Flags().StringVarP(&arURL, "ar-url", "v", "", "url to address resolver\033[0m") RootCmd.Flags().StringVarP(&utURL, "ut-url", "u", "", "url to uptime tracker visor data.\033[0m") RootCmd.Flags().StringVar(&tag, "tag", "network_monitor", "logging tag\033[0m") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "set log level one of: info, error, warn, debug, trace, panic") + RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "[info|error|warn|debug|trace|panic]\033[0m") RootCmd.Flags().StringVarP(&metricsAddr, "metrics", "m", "", "address to bind metrics API to\033[0m") RootCmd.Flags().StringVar(&redisURL, "redis", "redis://localhost:6379", "connections string for a redis store\033[0m") RootCmd.Flags().BoolVarP(&testing, "testing", "t", false, "enable testing to start without redis\033[0m") diff --git a/cmd/public-visor-monitor/commands/root.go b/cmd/public-visor-monitor/commands/root.go index dcf1e9da..06eb9db1 100644 --- a/cmd/public-visor-monitor/commands/root.go +++ b/cmd/public-visor-monitor/commands/root.go @@ -33,7 +33,7 @@ func init() { RootCmd.Flags().DurationVarP(&sleepDeregistration, "sleep-deregistration", "s", 10, "Sleep time for derigstration process in minutes\033[0m") RootCmd.Flags().StringVarP(&confPath, "config", "c", "public-visor-monitor.json", "config file location.\033[0m") RootCmd.Flags().StringVar(&tag, "tag", "public_visor_monitor", "logging tag\033[0m") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "set log level one of: info, error, warn, debug, trace, panic") + RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "[info|error|warn|debug|trace|panic]\033[0m") } // RootCmd contains the root command diff --git a/cmd/route-finder/commands/root.go b/cmd/route-finder/commands/root.go index e9543df1..669f7aae 100644 --- a/cmd/route-finder/commands/root.go +++ b/cmd/route-finder/commands/root.go @@ -48,14 +48,14 @@ func init() { RootCmd.Flags().StringVarP(&metricsAddr, "metrics", "m", "", "address to bind metrics API to\033[0m") RootCmd.Flags().StringVar(&pgHost, "pg-host", "localhost", "host of postgres\033[0m") RootCmd.Flags().StringVar(&pgPort, "pg-port", "5432", "port of postgres\033[0m") - RootCmd.Flags().IntVar(&pgMaxOpenConn, "pg-max-open-conn", 60, "maximum open connection of db") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "set log level one of: info, error, warn, debug, trace, panic") + RootCmd.Flags().IntVar(&pgMaxOpenConn, "pg-max-open-conn", 60, "maximum open connection of db\033[0m") + RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "[info|error|warn|debug|trace|panic]\033[0m") RootCmd.Flags().StringVar(&tag, "tag", "route_finder", "logging tag\033[0m") RootCmd.Flags().BoolVarP(&testing, "testing", "t", false, "enable testing to start without redis\033[0m") - RootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", "http://dmsgd.skywire.skycoin.com", "url of dmsg-discovery\033[0m") - RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\r") - RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\r") - RootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler") + RootCmd.Flags().StringVarP(&dmsgDisc, "dmsg-disc", "D", dmsg.DiscAddr(false), "url of dmsg discovery\033[0m") + RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\033[0m\n\r") + RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\033[0m") + RootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler\033[0m") } // RootCmd contains the root command diff --git a/cmd/skywire-services/services.go b/cmd/skywire-services/services.go index 8f441692..37142cce 100644 --- a/cmd/skywire-services/services.go +++ b/cmd/skywire-services/services.go @@ -3,6 +3,7 @@ package main import ( "fmt" + "log" "os" "path/filepath" "strings" @@ -13,45 +14,36 @@ import ( ar "github.com/skycoin/skywire-services/cmd/address-resolver/commands" confbs "github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands" - dmsgm "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" nv "github.com/skycoin/skywire-services/cmd/node-visualizer/commands" - pvm "github.com/skycoin/skywire-services/cmd/public-visor-monitor/commands" rf "github.com/skycoin/skywire-services/cmd/route-finder/commands" se "github.com/skycoin/skywire-services/cmd/sw-env/commands" - tpdm "github.com/skycoin/skywire-services/cmd/tpd-monitor/commands" tpd "github.com/skycoin/skywire-services/cmd/transport-discovery/commands" tps "github.com/skycoin/skywire-services/cmd/transport-setup/commands" + ut "github.com/skycoin/skywire-services/cmd/uptime-tracker/commands" ) func init() { RootCmd.AddCommand( tpd.RootCmd, tps.RootCmd, - tpdm.RootCmd, ar.RootCmd, rf.RootCmd, confbs.RootCmd, kg.RootCmd, - lc.RootCmd, nv.RootCmd, - pvm.RootCmd, se.RootCmd, - dmsgm.RootCmd, + ut.RootCmd, ) tpd.RootCmd.Use = "tpd" tps.RootCmd.Use = "tps" - tpdm.RootCmd.Use = "tpdm" ar.RootCmd.Use = "ar" rf.RootCmd.Use = "rf" confbs.RootCmd.Use = "confbs" kg.RootCmd.Use = "kg" - lc.RootCmd.Use = "lc" nv.RootCmd.Use = "nv" - pvm.RootCmd.Use = "pvm" se.RootCmd.Use = "se" - dmsgm.RootCmd.Use = "dmsgm" + ut.RootCmd.Use = "ut" var helpflag bool RootCmd.SetUsageTemplate(help) @@ -71,7 +63,8 @@ var RootCmd = &cobra.Command{ Long: ` ┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┌─┐┌─┐┬─┐┬ ┬┬┌─┐┌─┐┌─┐ └─┐├┴┐└┬┘││││├┬┘├┤───└─┐├┤ ├┬┘└┐┌┘││ ├┤ └─┐ - └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └─┘└─┘┴└─ └┘ ┴└─┘└─┘└─┘`, + └─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └─┘└─┘┴└─ └┘ ┴└─┘└─┘└─┘ + Skywire services`, SilenceErrors: true, SilenceUsage: true, DisableSuggestions: true, @@ -93,7 +86,7 @@ func main() { NoBottomNewline: true, }) if err := RootCmd.Execute(); err != nil { - fmt.Println(err) + log.Fatal(err) } } diff --git a/cmd/tpd-monitor/commands/root.go b/cmd/tpd-monitor/commands/root.go index e2c59544..f495d153 100644 --- a/cmd/tpd-monitor/commands/root.go +++ b/cmd/tpd-monitor/commands/root.go @@ -32,13 +32,13 @@ var ( ) func init() { - RootCmd.Flags().StringVarP(&addr, "addr", "a", ":9080", "address to bind to.\033[0m") + RootCmd.Flags().StringVarP(&addr, "addr", "a", ":9080", "address to bind to\033[0m") RootCmd.Flags().DurationVarP(&sleepDeregistration, "sleep-deregistration", "s", 10, "Sleep time for deregistration process in minutes\033[0m") - RootCmd.Flags().StringVarP(&confPath, "config", "c", "tpd-monitor.json", "config file location.\033[0m") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "set log level one of: info, error, warn, debug, trace, panic") + RootCmd.Flags().StringVarP(&confPath, "config", "c", "tpd-monitor.json", "config file location\033[0m") + RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "[info|error|warn|debug|trace|panic]\033[0m") RootCmd.Flags().StringVar(&dmsgURL, "dmsg-url", "", "url to dmsg data.\033[0m") - RootCmd.Flags().StringVar(&tpdURL, "tpd-url", "", "url to transport discovery.\033[0m") - RootCmd.Flags().StringVar(&arURL, "ar-url", "", "url to address resolver.\033[0m") + RootCmd.Flags().StringVar(&tpdURL, "tpd-url", "", "url to transport discovery\033[0m") + RootCmd.Flags().StringVar(&arURL, "ar-url", "", "url to address resolver\033[0m") RootCmd.Flags().StringVar(&tag, "tag", "tpd-monitor", "logging tag\033[0m") } diff --git a/cmd/transport-discovery/commands/root.go b/cmd/transport-discovery/commands/root.go index 9424c294..68152474 100644 --- a/cmd/transport-discovery/commands/root.go +++ b/cmd/transport-discovery/commands/root.go @@ -3,6 +3,7 @@ package commands import ( "context" + "encoding/json" "fmt" "log" "os" @@ -13,13 +14,13 @@ import ( "github.com/skycoin/dmsg/pkg/direct" "github.com/skycoin/dmsg/pkg/dmsg" "github.com/skycoin/dmsg/pkg/dmsghttp" + "github.com/skycoin/skywire" "github.com/skycoin/skywire-utilities/pkg/buildinfo" "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/cmdutil" "github.com/skycoin/skywire-utilities/pkg/httpauth" "github.com/skycoin/skywire-utilities/pkg/logging" "github.com/skycoin/skywire-utilities/pkg/metricsutil" - "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire-utilities/pkg/storeconfig" "github.com/skycoin/skywire-utilities/pkg/tcpproxy" "github.com/spf13/cobra" @@ -56,22 +57,29 @@ var ( ) func init() { + var envServices skywire.EnvServices + var services skywire.Services + if err := json.Unmarshal([]byte(skywire.ServicesJSON), &envServices); err == nil { + if err := json.Unmarshal(envServices.Prod, &services); err == nil { + dmsgDisc = services.DmsgDiscovery + } + } RootCmd.Flags().StringVarP(&addr, "addr", "a", ":9091", "address to bind to\033[0m") RootCmd.Flags().StringVarP(&metricsAddr, "metrics", "m", "", "address to bind metrics API to\033[0m") RootCmd.Flags().StringVar(&redisURL, "redis", "redis://localhost:6379", "connections string for a redis store\033[0m") RootCmd.Flags().IntVar(&redisPoolSize, "redis-pool-size", 10, "redis connection pool size\033[0m") RootCmd.Flags().StringVar(&pgHost, "pg-host", "localhost", "host of postgres\033[0m") RootCmd.Flags().StringVar(&pgPort, "pg-port", "5432", "port of postgres\033[0m") - RootCmd.Flags().IntVar(&pgMaxOpenConn, "pg-max-open-conn", 60, "maximum open connection of db") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "set log level one of: info, error, warn, debug, trace, panic") + RootCmd.Flags().IntVar(&pgMaxOpenConn, "pg-max-open-conn", 60, "maximum open connection of db\033[0m") + RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "info", "[info|error|warn|debug|trace|panic]\033[0m") RootCmd.Flags().StringVar(&tag, "tag", "transport_discovery", "logging tag\033[0m") RootCmd.Flags().BoolVarP(&testing, "testing", "t", false, "enable testing to start without redis\033[0m") - RootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", "http://dmsgd.skywire.skycoin.com", "url of dmsg-discovery\033[0m") + RootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", dmsgDisc, "url of dmsg-discovery\033[0m") RootCmd.Flags().StringVar(&whitelistKeys, "whitelist-keys", "", "list of whitelisted keys of network monitor used for deregistration\033[0m") RootCmd.Flags().BoolVar(&testEnvironment, "test-environment", false, "distinguished between prod and test environment\033[0m") - RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\r") - RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\r") - RootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler") + RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\033[0m\n\r") + RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\033[0m") + RootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler\033[0m") } // RootCmd contains the root command @@ -120,14 +128,7 @@ PG_USER="postgres" PG_DATABASE="tpd" PG_PASSWORD="" transport-discovery --sk $(t var whitelistPKs []string if whitelistKeys != "" { whitelistPKs = strings.Split(whitelistKeys, ",") - } else { - if testEnvironment { - whitelistPKs = strings.Split(skyenv.TestNetworkMonitorPKs, ",") - } else { - whitelistPKs = strings.Split(skyenv.NetworkMonitorPKs, ",") - } } - for _, v := range whitelistPKs { api.WhitelistPKs.Set(v) } diff --git a/cmd/transport-setup/commands/root.go b/cmd/transport-setup/commands/root.go index 9e713121..d22716a0 100644 --- a/cmd/transport-setup/commands/root.go +++ b/cmd/transport-setup/commands/root.go @@ -42,20 +42,20 @@ func init() { rmTPCmd.Flags().SortFlags = false listTPCmd.Flags().SortFlags = false RootCmd.Flags().StringVarP(&configFile, "config", "c", "", "path to config file\033[0m") - RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "debug", "[info|error|warn|debug|trace|panic]") + RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "debug", "[info|error|warn|debug|trace|panic]\033[0m") RootCmd.AddCommand(addTPCmd, rmTPCmd, listTPCmd) - addTPCmd.Flags().StringVarP(&fromPK, "from", "1", "", "PK to request transport setup") - addTPCmd.Flags().StringVarP(&toPK, "to", "2", "", "other transport edge PK") - addTPCmd.Flags().StringVarP(&tpType, "type", "t", "", "transport type to request creation of [stcpr|sudph|dmsg]") - rmTPCmd.Flags().StringVarP(&fromPK, "from", "1", "", "PK to request transport takedown") - rmTPCmd.Flags().StringVarP(&tpID, "tpid", "i", "", "id of transport to remove") - listTPCmd.Flags().StringVarP(&fromPK, "from", "1", "", "PK to request transport list") - addTPCmd.Flags().BoolVarP(&nice, "pretty", "p", false, "pretty print result") - rmTPCmd.Flags().BoolVarP(&nice, "pretty", "p", false, "pretty print result") - listTPCmd.Flags().BoolVarP(&nice, "pretty", "p", false, "pretty print result") - addTPCmd.Flags().StringVarP(&tpsnAddr, "addr", "z", "http://127.0.0.1:8080", "address of the transport setup-node") - rmTPCmd.Flags().StringVarP(&tpsnAddr, "addr", "z", "http://127.0.0.1:8080", "address of the transport setup-node") - listTPCmd.Flags().StringVarP(&tpsnAddr, "addr", "z", "http://127.0.0.1:8080", "address of the transport setup-node") + addTPCmd.Flags().StringVarP(&fromPK, "from", "1", "", "PK to request transport setup\033[0m") + addTPCmd.Flags().StringVarP(&toPK, "to", "2", "", "other transport edge PK\033[0m") + addTPCmd.Flags().StringVarP(&tpType, "type", "t", "", "transport type to request creation of [stcpr|sudph|dmsg]\033[0m") + rmTPCmd.Flags().StringVarP(&fromPK, "from", "1", "", "PK to request transport takedown\033[0m") + rmTPCmd.Flags().StringVarP(&tpID, "tpid", "i", "", "id of transport to remove\033[0m") + listTPCmd.Flags().StringVarP(&fromPK, "from", "1", "", "PK to request transport list\033[0m") + addTPCmd.Flags().BoolVarP(&nice, "pretty", "p", false, "pretty print result\033[0m") + rmTPCmd.Flags().BoolVarP(&nice, "pretty", "p", false, "pretty print result\033[0m") + listTPCmd.Flags().BoolVarP(&nice, "pretty", "p", false, "pretty print result\033[0m") + addTPCmd.Flags().StringVarP(&tpsnAddr, "addr", "z", "http://127.0.0.1:8080", "address of the transport setup-node\033[0m") + rmTPCmd.Flags().StringVarP(&tpsnAddr, "addr", "z", "http://127.0.0.1:8080", "address of the transport setup-node\033[0m") + listTPCmd.Flags().StringVarP(&tpsnAddr, "addr", "z", "http://127.0.0.1:8080", "address of the transport setup-node\033[0m") } // RootCmd contains the root command @@ -88,7 +88,7 @@ Takes config in the following format: DisableSuggestions: true, DisableFlagsInUseLine: true, Version: buildinfo.Version(), - Run: func(_ *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { if configFile == "" { log.Fatal("please specify config file") } @@ -122,7 +122,7 @@ var addTPCmd = &cobra.Command{ SilenceUsage: true, DisableSuggestions: true, DisableFlagsInUseLine: true, - Run: func(_ *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { err := pk1.Set(fromPK) if err != nil { log.Fatalf("-1 invalid public key: %v\n", err) @@ -163,7 +163,7 @@ var rmTPCmd = &cobra.Command{ SilenceUsage: true, DisableSuggestions: true, DisableFlagsInUseLine: true, - Run: func(_ *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { err := pk1.Set(fromPK) if err != nil { log.Fatalf("invalid public key: %v\n", err) @@ -199,7 +199,7 @@ var listTPCmd = &cobra.Command{ SilenceUsage: true, DisableSuggestions: true, DisableFlagsInUseLine: true, - Run: func(_ *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { res, err := script.Get(tpsnAddr + "/" + fromPK + "/transports").String() if err != nil { log.Fatal("something unexpected happened: ", err, res) diff --git a/cmd/uptime-tracker/commands/root.go b/cmd/uptime-tracker/commands/root.go index a32a3521..6fb3cbff 100644 --- a/cmd/uptime-tracker/commands/root.go +++ b/cmd/uptime-tracker/commands/root.go @@ -6,6 +6,7 @@ import ( "fmt" "log" "os" + "path/filepath" "strings" "time" @@ -53,36 +54,42 @@ var ( dmsgDisc string sk cipher.SecKey dmsgPort uint16 - dmsgServerType string storeDataCutoff int storeDataPath string ) func init() { - rootCmd.Flags().StringVarP(&addr, "addr", "a", ":9096", "address to bind to") - rootCmd.Flags().StringVarP(&pAddr, "private-addr", "p", ":9086", "private address to bind to") - rootCmd.Flags().StringVarP(&metricsAddr, "metrics", "m", ":2121", "address to bind metrics API to") - rootCmd.Flags().StringVar(&redisURL, "redis", "redis://localhost:6379", "connections string for a redis store") - rootCmd.Flags().IntVar(&redisPoolSize, "redis-pool-size", 10, "redis connection pool size") - rootCmd.Flags().StringVar(&pgHost, "pg-host", "localhost", "host of postgres") - rootCmd.Flags().StringVar(&pgPort, "pg-port", "5432", "port of postgres") - rootCmd.Flags().IntVar(&pgMaxOpenConn, "pg-max-open-conn", 60, "maximum open connection of db") - rootCmd.Flags().IntVar(&storeDataCutoff, "store-data-cutoff", 7, "number of days data store in db") - rootCmd.Flags().StringVar(&storeDataPath, "store-data-path", "/var/lib/skywire-ut/daily-data", "path of db daily data store") - rootCmd.Flags().BoolVarP(&logEnabled, "log", "l", true, "enable request logging") - rootCmd.Flags().StringVar(&tag, "tag", "uptime_tracker", "logging tag") - rootCmd.Flags().StringVar(&ipAPIKey, "ip-api-key", "", "geo API key") - rootCmd.Flags().BoolVar(&enableLoadTesting, "enable-load-testing", false, "enable load testing") - rootCmd.Flags().BoolVarP(&testing, "testing", "t", false, "enable testing to start without redis") - rootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", "http://dmsgd.skywire.skycoin.com", "url of dmsg-discovery") - rootCmd.Flags().Var(&sk, "sk", "dmsg secret key") - rootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\r") - rootCmd.Flags().StringVar(&dmsgServerType, "dmsg-server-type", "", "type of dmsg server on dmsghttp handler") + RootCmd.Flags().StringVarP(&addr, "addr", "a", ":9096", "address to bind to\033[0m") + RootCmd.Flags().StringVarP(&pAddr, "private-addr", "p", ":9086", "private address to bind to\033[0m") + RootCmd.Flags().StringVarP(&metricsAddr, "metrics", "m", ":2121", "address to bind metrics API to\033[0m") + RootCmd.Flags().StringVar(&redisURL, "redis", "redis://localhost:6379", "connections string for a redis store\033[0m") + RootCmd.Flags().IntVar(&redisPoolSize, "redis-pool-size", 10, "redis connection pool size\033[0m") + RootCmd.Flags().StringVar(&pgHost, "pg-host", "localhost", "host of postgres\033[0m") + RootCmd.Flags().StringVar(&pgPort, "pg-port", "5432", "port of postgres\033[0m") + RootCmd.Flags().IntVar(&pgMaxOpenConn, "pg-max-open-conn", 60, "maximum open connection of db\033[0m") + RootCmd.Flags().IntVar(&storeDataCutoff, "store-data-cutoff", 7, "number of days data store in db\033[0m") + RootCmd.Flags().StringVar(&storeDataPath, "store-data-path", "/var/lib/skywire-services/daily-data", "path of db daily data store\033[0m") + RootCmd.Flags().BoolVarP(&logEnabled, "log", "l", true, "enable request logging\033[0m") + RootCmd.Flags().StringVar(&tag, "tag", "uptime_tracker", "logging tag\033[0m") + RootCmd.Flags().StringVar(&ipAPIKey, "ip-api-key", "", "geo API key\033[0m") + RootCmd.Flags().BoolVar(&enableLoadTesting, "enable-load-testing", false, "enable load testing\033[0m") + RootCmd.Flags().BoolVarP(&testing, "testing", "t", false, "enable testing to start without redis\033[0m") + RootCmd.Flags().StringVar(&dmsgDisc, "dmsg-disc", dmsg.DiscAddr(false), "url of dmsg discovery\033[0m") + RootCmd.Flags().Var(&sk, "sk", "dmsg secret key\033[0m\n\r") + RootCmd.Flags().Uint16Var(&dmsgPort, "dmsgPort", dmsg.DefaultDmsgHTTPPort, "dmsg port value\033[0m") } -var rootCmd = &cobra.Command{ - Use: "uptime-tracker", +// RootCmd contains the root cli commanmd +var RootCmd = &cobra.Command{ + Use: func() string { + return strings.Split(filepath.Base(strings.ReplaceAll(strings.ReplaceAll(fmt.Sprintf("%v", os.Args), "[", ""), "]", "")), " ")[0] + }(), Short: "Uptime Tracker Server for skywire", + Long: ` + ┬ ┬┌─┐┌┬┐┬┌┬┐┌─┐ ┌┬┐┬─┐┌─┐┌─┐┬┌─┌─┐┬─┐ + │ │├─┘ │ ││││├┤───│ ├┬┘├─┤│ ├┴┐├┤ ├┬┘ + └─┘┴ ┴ ┴┴ ┴└─┘ ┴ ┴└─┴ ┴└─┘┴ ┴└─┘┴└─ + Uptime Tracker Server for skywire`, Run: func(_ *cobra.Command, _ []string) { if _, err := buildinfo.Get().WriteTo(os.Stdout); err != nil { log.Printf("Failed to output build info: %v", err) @@ -180,15 +187,14 @@ var rootCmd = &cobra.Command{ }() if !pk.Null() { - servers := dmsghttp.GetServers(ctx, dmsgDisc, dmsgServerType, logger) + servers := dmsghttp.GetServers(ctx, dmsgDisc, "", logger) var keys cipher.PubKeys keys = append(keys, pk) dClient := direct.NewClient(direct.GetAllEntries(keys, servers), logger) config := &dmsg.Config{ - MinSessions: 0, // listen on all available servers - UpdateInterval: dmsg.DefaultUpdateInterval, - ConnectedServersType: dmsgServerType, + MinSessions: 0, // listen on all available servers + UpdateInterval: dmsg.DefaultUpdateInterval, } dmsgDC, closeDmsgDC, err := direct.StartDmsg(ctx, logger, pk, sk, dClient, config) @@ -205,7 +211,7 @@ var rootCmd = &cobra.Command{ } }() - go dmsghttp.UpdateServers(ctx, dClient, dmsgDisc, dmsgDC, dmsgServerType, logger) + go dmsghttp.UpdateServers(ctx, dClient, dmsgDisc, dmsgDC, "", logger) go func() { if err := dmsghttp.ListenAndServe(ctx, sk, utAPI, dClient, dmsg.DefaultDmsgHTTPPort, dmsgDC, logger); err != nil { @@ -221,7 +227,7 @@ var rootCmd = &cobra.Command{ // Execute executes root CLI command. func Execute() { - if err := rootCmd.Execute(); err != nil { + if err := RootCmd.Execute(); err != nil { fmt.Println(err) os.Exit(statusFailure) diff --git a/cmd/uptime-tracker/uptime-tracker.go b/cmd/uptime-tracker/uptime-tracker.go index 8b1d031b..15728f04 100644 --- a/cmd/uptime-tracker/uptime-tracker.go +++ b/cmd/uptime-tracker/uptime-tracker.go @@ -2,9 +2,42 @@ package main import ( + cc "github.com/ivanpirog/coloredcobra" + "github.com/spf13/cobra" + "github.com/skycoin/skywire-services/cmd/uptime-tracker/commands" ) +func init() { + var helpflag bool + commands.RootCmd.SetUsageTemplate(help) + commands.RootCmd.PersistentFlags().BoolVarP(&helpflag, "help", "h", false, "help for dmsgpty-cli") + commands.RootCmd.SetHelpCommand(&cobra.Command{Hidden: true}) + commands.RootCmd.PersistentFlags().MarkHidden("help") //nolint +} + func main() { + cc.Init(&cc.Config{ + RootCmd: commands.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, + }) commands.Execute() } + +const help = "Usage:\r\n" + + " {{.UseLine}}{{if .HasAvailableSubCommands}}{{end}} {{if gt (len .Aliases) 0}}\r\n\r\n" + + "{{.NameAndAliases}}{{end}}{{if .HasAvailableSubCommands}}\r\n\r\n" + + "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/docs/skywire-services-goda-graph.svg b/docs/skywire-services-goda-graph.svg new file mode 100644 index 00000000..41881c7d --- /dev/null +++ b/docs/skywire-services-goda-graph.svg @@ -0,0 +1,1051 @@ + + + + + + +G + + + +github.com/skycoin/skywire-services + + +github.com/skycoin/skywire-services +5 / 115B + + + + + +github.com/skycoin/skywire-services/cmd/address-resolver + + +github.com/skycoin/skywire-services/cmd/address-resolver +36 / 1.4KB + + + + + +github.com/skycoin/skywire-services/cmd/address-resolver/commands + + +github.com/skycoin/skywire-services/cmd/address-resolver/commands +218 / 8.3KB + + + + + +github.com/skycoin/skywire-services/cmd/address-resolver:e->github.com/skycoin/skywire-services/cmd/address-resolver/commands + + + + + +github.com/skycoin/skywire-services/internal/armetrics + + +github.com/skycoin/skywire-services/internal/armetrics +33 / 1.0KB + + + + + +github.com/skycoin/skywire-services/cmd/address-resolver/commands:e->github.com/skycoin/skywire-services/internal/armetrics + + + + + +github.com/skycoin/skywire-services/pkg/address-resolver/api + + +github.com/skycoin/skywire-services/pkg/address-resolver/api +501 / 17.1KB + + + + + +github.com/skycoin/skywire-services/cmd/address-resolver/commands:e->github.com/skycoin/skywire-services/pkg/address-resolver/api + + + + + +github.com/skycoin/skywire-services/pkg/address-resolver/store + + +github.com/skycoin/skywire-services/pkg/address-resolver/store +219 / 6.8KB + + + + + +github.com/skycoin/skywire-services/cmd/address-resolver/commands:e->github.com/skycoin/skywire-services/pkg/address-resolver/store + + + + + +github.com/skycoin/skywire-services/cmd/config-bootstrapper + + +github.com/skycoin/skywire-services/cmd/config-bootstrapper +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands + + +github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands +140 / 5.0KB + + + + + +github.com/skycoin/skywire-services/cmd/config-bootstrapper:e->github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands + + + + + +github.com/skycoin/skywire-services/pkg/config-bootstrapper/api + + +github.com/skycoin/skywire-services/pkg/config-bootstrapper/api +176 / 5.8KB + + + + + +github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands:e->github.com/skycoin/skywire-services/pkg/config-bootstrapper/api + + + + + +github.com/skycoin/skywire-services/cmd/keys-gen + + +github.com/skycoin/skywire-services/cmd/keys-gen +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/keys-gen/commands + + +github.com/skycoin/skywire-services/cmd/keys-gen/commands +39 / 1.2KB + + + + + +github.com/skycoin/skywire-services/cmd/keys-gen:e->github.com/skycoin/skywire-services/cmd/keys-gen/commands + + + + + +github.com/skycoin/skywire-services/cmd/network-monitor + + +github.com/skycoin/skywire-services/cmd/network-monitor +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/network-monitor/commands + + +github.com/skycoin/skywire-services/cmd/network-monitor/commands +148 / 5.5KB + + + + + +github.com/skycoin/skywire-services/cmd/network-monitor:e->github.com/skycoin/skywire-services/cmd/network-monitor/commands + + + + + +github.com/skycoin/skywire-services/internal/nmmetrics + + +github.com/skycoin/skywire-services/internal/nmmetrics +54 / 2.2KB + + + + + +github.com/skycoin/skywire-services/cmd/network-monitor/commands:e->github.com/skycoin/skywire-services/internal/nmmetrics + + + + + +github.com/skycoin/skywire-services/pkg/network-monitor/api + + +github.com/skycoin/skywire-services/pkg/network-monitor/api +510 / 15.8KB + + + + + +github.com/skycoin/skywire-services/cmd/network-monitor/commands:e->github.com/skycoin/skywire-services/pkg/network-monitor/api + + + + + +github.com/skycoin/skywire-services/pkg/network-monitor/store + + +github.com/skycoin/skywire-services/pkg/network-monitor/store +159 / 4.2KB + + + + + +github.com/skycoin/skywire-services/cmd/network-monitor/commands:e->github.com/skycoin/skywire-services/pkg/network-monitor/store + + + + + +github.com/skycoin/skywire-services/cmd/node-visualizer + + +github.com/skycoin/skywire-services/cmd/node-visualizer +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/node-visualizer/commands + + +github.com/skycoin/skywire-services/cmd/node-visualizer/commands +88 / 3.0KB + + + + + +github.com/skycoin/skywire-services/cmd/node-visualizer:e->github.com/skycoin/skywire-services/cmd/node-visualizer/commands + + + + + +github.com/skycoin/skywire-services/internal/tpdiscmetrics + + +github.com/skycoin/skywire-services/internal/tpdiscmetrics +61 / 2.0KB + + + + + +github.com/skycoin/skywire-services/cmd/node-visualizer/commands:e->github.com/skycoin/skywire-services/internal/tpdiscmetrics + + + + + +github.com/skycoin/skywire-services/pkg/node-visualizer/api + + +github.com/skycoin/skywire-services/pkg/node-visualizer/api +346 / 9.5KB + + + + + +github.com/skycoin/skywire-services/cmd/node-visualizer/commands:e->github.com/skycoin/skywire-services/pkg/node-visualizer/api + + + + + +github.com/skycoin/skywire-services/cmd/public-visor-monitor + + +github.com/skycoin/skywire-services/cmd/public-visor-monitor +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/public-visor-monitor/commands + + +github.com/skycoin/skywire-services/cmd/public-visor-monitor/commands +93 / 3.5KB + + + + + +github.com/skycoin/skywire-services/cmd/public-visor-monitor:e->github.com/skycoin/skywire-services/cmd/public-visor-monitor/commands + + + + + +github.com/skycoin/skywire-services/pkg/public-visor-monitor/api + + +github.com/skycoin/skywire-services/pkg/public-visor-monitor/api +288 / 8.9KB + + + + + +github.com/skycoin/skywire-services/cmd/public-visor-monitor/commands:e->github.com/skycoin/skywire-services/pkg/public-visor-monitor/api + + + + + +github.com/skycoin/skywire-services/cmd/route-finder + + +github.com/skycoin/skywire-services/cmd/route-finder +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/route-finder/commands + + +github.com/skycoin/skywire-services/cmd/route-finder/commands +164 / 6.0KB + + + + + +github.com/skycoin/skywire-services/cmd/route-finder:e->github.com/skycoin/skywire-services/cmd/route-finder/commands + + + + + +github.com/skycoin/skywire-services/internal/pg + + +github.com/skycoin/skywire-services/internal/pg +16 / 385B + + + + + +github.com/skycoin/skywire-services/cmd/route-finder/commands:e->github.com/skycoin/skywire-services/internal/pg + + + + + +github.com/skycoin/skywire-services/pkg/route-finder/api + + +github.com/skycoin/skywire-services/pkg/route-finder/api +164 / 5.2KB + + + + + +github.com/skycoin/skywire-services/cmd/route-finder/commands:e->github.com/skycoin/skywire-services/pkg/route-finder/api + + + + + +github.com/skycoin/skywire-services/pkg/transport-discovery/store + + +github.com/skycoin/skywire-services/pkg/transport-discovery/store +270 / 7.8KB + + + + + +github.com/skycoin/skywire-services/cmd/route-finder/commands:e->github.com/skycoin/skywire-services/pkg/transport-discovery/store + + + + + +github.com/skycoin/skywire-services/cmd/setup-node + + +github.com/skycoin/skywire-services/cmd/setup-node +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/skysocks-lite-client + + +github.com/skycoin/skywire-services/cmd/skysocks-lite-client +110 / 3.5KB + + + + + +github.com/skycoin/skywire-services/internal/skysocks + + +github.com/skycoin/skywire-services/internal/skysocks +173 / 4.1KB + + + + + +github.com/skycoin/skywire-services/cmd/skysocks-lite-client:e->github.com/skycoin/skywire-services/internal/skysocks + + + + + +github.com/skycoin/skywire-services/cmd/skysocks-monitor + + +github.com/skycoin/skywire-services/cmd/skysocks-monitor +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/skysocks-monitor/commands + + +github.com/skycoin/skywire-services/cmd/skysocks-monitor/commands +86 / 3.1KB + + + + + +github.com/skycoin/skywire-services/cmd/skysocks-monitor:e->github.com/skycoin/skywire-services/cmd/skysocks-monitor/commands + + + + + +github.com/skycoin/skywire-services/pkg/skysocks-monitor/api + + +github.com/skycoin/skywire-services/pkg/skysocks-monitor/api +355 / 11.2KB + + + + + +github.com/skycoin/skywire-services/cmd/skysocks-monitor/commands:e->github.com/skycoin/skywire-services/pkg/skysocks-monitor/api + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services + + +github.com/skycoin/skywire-services/cmd/skywire-services +87 / 3.2KB + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services:e->github.com/skycoin/skywire-services/cmd/address-resolver/commands + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services:e->github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services:e->github.com/skycoin/skywire-services/cmd/keys-gen/commands + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services:e->github.com/skycoin/skywire-services/cmd/node-visualizer/commands + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services:e->github.com/skycoin/skywire-services/cmd/route-finder/commands + + + + + +github.com/skycoin/skywire-services/cmd/sw-env/commands + + +github.com/skycoin/skywire-services/cmd/sw-env/commands +82 / 2.5KB + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services:e->github.com/skycoin/skywire-services/cmd/sw-env/commands + + + + + +github.com/skycoin/skywire-services/cmd/transport-discovery/commands + + +github.com/skycoin/skywire-services/cmd/transport-discovery/commands +212 / 8.0KB + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services:e->github.com/skycoin/skywire-services/cmd/transport-discovery/commands + + + + + +github.com/skycoin/skywire-services/cmd/transport-setup/commands + + +github.com/skycoin/skywire-services/cmd/transport-setup/commands +209 / 6.8KB + + + + + +github.com/skycoin/skywire-services/cmd/skywire-services:e->github.com/skycoin/skywire-services/cmd/transport-setup/commands + + + + + +github.com/skycoin/skywire-services/cmd/sw-env + + +github.com/skycoin/skywire-services/cmd/sw-env +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/sw-env:e->github.com/skycoin/skywire-services/cmd/sw-env/commands + + + + + +github.com/skycoin/skywire-services/internal/config + + +github.com/skycoin/skywire-services/internal/config +509 / 19.0KB + + + + + +github.com/skycoin/skywire-services/cmd/sw-env/commands:e->github.com/skycoin/skywire-services/internal/config + + + + + +github.com/skycoin/skywire-services/cmd/tpd-monitor + + +github.com/skycoin/skywire-services/cmd/tpd-monitor +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/tpd-monitor/commands + + +github.com/skycoin/skywire-services/cmd/tpd-monitor/commands +105 / 3.8KB + + + + + +github.com/skycoin/skywire-services/cmd/tpd-monitor:e->github.com/skycoin/skywire-services/cmd/tpd-monitor/commands + + + + + +github.com/skycoin/skywire-services/pkg/tpd-monitor/api + + +github.com/skycoin/skywire-services/pkg/tpd-monitor/api +370 / 10.8KB + + + + + +github.com/skycoin/skywire-services/cmd/tpd-monitor/commands:e->github.com/skycoin/skywire-services/pkg/tpd-monitor/api + + + + + +github.com/skycoin/skywire-services/cmd/transport-discovery + + +github.com/skycoin/skywire-services/cmd/transport-discovery +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/transport-discovery:e->github.com/skycoin/skywire-services/cmd/transport-discovery/commands + + + + + +github.com/skycoin/skywire-services/cmd/transport-discovery/commands:e->github.com/skycoin/skywire-services/internal/pg + + + + + +github.com/skycoin/skywire-services/cmd/transport-discovery/commands:e->github.com/skycoin/skywire-services/internal/tpdiscmetrics + + + + + +github.com/skycoin/skywire-services/pkg/transport-discovery/api + + +github.com/skycoin/skywire-services/pkg/transport-discovery/api +362 / 12.2KB + + + + + +github.com/skycoin/skywire-services/cmd/transport-discovery/commands:e->github.com/skycoin/skywire-services/pkg/transport-discovery/api + + + + + +github.com/skycoin/skywire-services/cmd/transport-discovery/commands:e->github.com/skycoin/skywire-services/pkg/transport-discovery/store + + + + + +github.com/skycoin/skywire-services/cmd/transport-setup + + +github.com/skycoin/skywire-services/cmd/transport-setup +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/transport-setup:e->github.com/skycoin/skywire-services/cmd/transport-setup/commands + + + + + +github.com/skycoin/skywire-services/pkg/transport-setup/api + + +github.com/skycoin/skywire-services/pkg/transport-setup/api +188 / 6.1KB + + + + + +github.com/skycoin/skywire-services/cmd/transport-setup/commands:e->github.com/skycoin/skywire-services/pkg/transport-setup/api + + + + + +github.com/skycoin/skywire-services/pkg/transport-setup/config + + +github.com/skycoin/skywire-services/pkg/transport-setup/config +34 / 1.0KB + + + + + +github.com/skycoin/skywire-services/cmd/transport-setup/commands:e->github.com/skycoin/skywire-services/pkg/transport-setup/config + + + + + +github.com/skycoin/skywire-services/cmd/uptime-tracker + + +github.com/skycoin/skywire-services/cmd/uptime-tracker +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/uptime-tracker/commands + + +github.com/skycoin/skywire-services/cmd/uptime-tracker/commands +197 / 7.3KB + + + + + +github.com/skycoin/skywire-services/cmd/uptime-tracker:e->github.com/skycoin/skywire-services/cmd/uptime-tracker/commands + + + + + +github.com/skycoin/skywire-services/cmd/uptime-tracker/commands:e->github.com/skycoin/skywire-services/internal/pg + + + + + +github.com/skycoin/skywire-services/internal/utmetrics + + +github.com/skycoin/skywire-services/internal/utmetrics +33 / 1.0KB + + + + + +github.com/skycoin/skywire-services/cmd/uptime-tracker/commands:e->github.com/skycoin/skywire-services/internal/utmetrics + + + + + +github.com/skycoin/skywire-services/pkg/uptime-tracker/api + + +github.com/skycoin/skywire-services/pkg/uptime-tracker/api +653 / 21.1KB + + + + + +github.com/skycoin/skywire-services/cmd/uptime-tracker/commands:e->github.com/skycoin/skywire-services/pkg/uptime-tracker/api + + + + + +github.com/skycoin/skywire-services/pkg/uptime-tracker/store + + +github.com/skycoin/skywire-services/pkg/uptime-tracker/store +601 / 20.3KB + + + + + +github.com/skycoin/skywire-services/cmd/uptime-tracker/commands:e->github.com/skycoin/skywire-services/pkg/uptime-tracker/store + + + + + +github.com/skycoin/skywire-services/cmd/visor-map/commands + + +github.com/skycoin/skywire-services/cmd/visor-map/commands +128 / 4.0KB + + + + + +github.com/skycoin/skywire-services/cmd/vpn-lite-client + + +github.com/skycoin/skywire-services/cmd/vpn-lite-client +68 / 2.0KB + + + + + +github.com/skycoin/skywire-services/internal/vpn + + +github.com/skycoin/skywire-services/internal/vpn +502 / 14.8KB + + + + + +github.com/skycoin/skywire-services/cmd/vpn-lite-client:e->github.com/skycoin/skywire-services/internal/vpn + + + + + +github.com/skycoin/skywire-services/cmd/vpn-monitor + + +github.com/skycoin/skywire-services/cmd/vpn-monitor +38 / 1.5KB + + + + + +github.com/skycoin/skywire-services/cmd/vpn-monitor/commands + + +github.com/skycoin/skywire-services/cmd/vpn-monitor/commands +86 / 3.0KB + + + + + +github.com/skycoin/skywire-services/cmd/vpn-monitor:e->github.com/skycoin/skywire-services/cmd/vpn-monitor/commands + + + + + +github.com/skycoin/skywire-services/pkg/vpn-monitor/api + + +github.com/skycoin/skywire-services/pkg/vpn-monitor/api +358 / 10.9KB + + + + + +github.com/skycoin/skywire-services/cmd/vpn-monitor/commands:e->github.com/skycoin/skywire-services/pkg/vpn-monitor/api + + + + + +github.com/skycoin/skywire-services/internal/integration + + +github.com/skycoin/skywire-services/internal/integration +0 / 0B + + + + + +github.com/skycoin/skywire-services/internal/lc + + +github.com/skycoin/skywire-services/internal/lc +18 / 0.7KB + + + + + +github.com/skycoin/skywire-services/internal/nm + + +github.com/skycoin/skywire-services/internal/nm +12 / 314B + + + + + +github.com/skycoin/skywire-services/pkg/address-resolver/api:e->github.com/skycoin/skywire-services/internal/armetrics + + + + + +github.com/skycoin/skywire-services/pkg/address-resolver/api:e->github.com/skycoin/skywire-services/pkg/address-resolver/store + + + + + +github.com/skycoin/skywire-services/pkg/network-monitor/api:e->github.com/skycoin/skywire-services/internal/nm + + + + + +github.com/skycoin/skywire-services/pkg/network-monitor/api:e->github.com/skycoin/skywire-services/internal/nmmetrics + + + + + +github.com/skycoin/skywire-services/pkg/network-monitor/api:e->github.com/skycoin/skywire-services/pkg/network-monitor/store + + + + + +github.com/skycoin/skywire-services/pkg/network-monitor/store:e->github.com/skycoin/skywire-services/internal/nm + + + + + +github.com/skycoin/skywire-services/pkg/node-visualizer/api:e->github.com/skycoin/skywire-services/internal/tpdiscmetrics + + + + + +github.com/skycoin/skywire-services/pkg/route-finder/store + + +github.com/skycoin/skywire-services/pkg/route-finder/store +320 / 9.5KB + + + + + +github.com/skycoin/skywire-services/pkg/route-finder/api:e->github.com/skycoin/skywire-services/pkg/route-finder/store + + + + + +github.com/skycoin/skywire-services/pkg/route-finder/api:e->github.com/skycoin/skywire-services/pkg/transport-discovery/store + + + + + +github.com/skycoin/skywire-services/pkg/route-finder/store:e->github.com/skycoin/skywire-services/pkg/transport-discovery/store + + + + + +github.com/skycoin/skywire-services/pkg/skysocks-monitor/api:e->github.com/skycoin/skywire-services/internal/vpn + + + + + +github.com/skycoin/skywire-services/pkg/transport-discovery/api:e->github.com/skycoin/skywire-services/internal/tpdiscmetrics + + + + + +github.com/skycoin/skywire-services/pkg/transport-discovery/api:e->github.com/skycoin/skywire-services/pkg/transport-discovery/store + + + + + +github.com/skycoin/skywire-services/pkg/transport-setup/api:e->github.com/skycoin/skywire-services/pkg/transport-setup/config + + + + + +github.com/skycoin/skywire-services/pkg/uptime-tracker/api:e->github.com/skycoin/skywire-services/internal/utmetrics + + + + + +github.com/skycoin/skywire-services/pkg/uptime-tracker/api:e->github.com/skycoin/skywire-services/pkg/uptime-tracker/store + + + + + +github.com/skycoin/skywire-services/pkg/vpn-monitor/api:e->github.com/skycoin/skywire-services/internal/vpn + + + + + diff --git a/go.mod b/go.mod index da4f5600..3c524e3f 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ toolchain go1.21.12 require ( github.com/bitfield/script v0.22.1 - github.com/ccding/go-stun/stun v0.0.0-20200514191101-4dc67bcdb029 github.com/dgraph-io/badger/v3 v3.2103.2 github.com/docker/docker v1.13.1 github.com/flopp/go-staticmaps v0.0.0-20220221183018-c226716bec53 @@ -24,8 +23,8 @@ require ( github.com/json-iterator/go v1.1.12 github.com/rs/cors v1.8.2 github.com/sirupsen/logrus v1.9.3 - github.com/skycoin/dmsg v1.3.26-0.20240910062314-dc25f3d9ea6c - github.com/skycoin/skywire v1.3.25-beta + github.com/skycoin/dmsg v1.3.26-0.20240922174815-ced25b343ec5 + github.com/skycoin/skywire v1.3.26-0.20240922162315-789cef41c9a1 github.com/skycoin/skywire-utilities v1.3.25 github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 github.com/spf13/cobra v1.7.0 @@ -47,6 +46,7 @@ require ( github.com/VictoriaMetrics/metrics v1.24.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bytedance/sonic v1.10.0 // indirect + github.com/ccding/go-stun/stun v0.0.0-20200514191101-4dc67bcdb029 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect @@ -157,7 +157,9 @@ require ( ) // Uncomment it for tests with alternative branches and run `make dep` -// replace github.com/skycoin/dmsg => ../dmsg +//replace github.com/skycoin/skywire => ../skywire +//replace github.com/skycoin/dmsg => ../dmsg + // replace github.com/skycoin/dmsg => github.com/skycoin/dmsg // replace github.com/skycoin/skywire => ../skywire diff --git a/go.sum b/go.sum index 1d68b162..9ea6a64f 100644 --- a/go.sum +++ b/go.sum @@ -391,18 +391,14 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skycoin/dmsg v1.3.25 h1:Gs4aRhLq/ZCo5I0vN3nTv/N5/MC6sunWCuS50Tct6qI= -github.com/skycoin/dmsg v1.3.25/go.mod h1:3pyc9MmDJQYP0spTAWKLMctz4+ZKjMZgXtdMmXpYolw= -github.com/skycoin/dmsg v1.3.26-0.20240910062314-dc25f3d9ea6c h1:7miiImujaW74EAD/cqs6tAXzoVRK7K9yk69R8oqKC/g= -github.com/skycoin/dmsg v1.3.26-0.20240910062314-dc25f3d9ea6c/go.mod h1:3pyc9MmDJQYP0spTAWKLMctz4+ZKjMZgXtdMmXpYolw= +github.com/skycoin/dmsg v1.3.26-0.20240922174815-ced25b343ec5 h1:992WLADQdKjZbpJYdw0EYuOaI7mKHQQ57jDFebvUYPs= +github.com/skycoin/dmsg v1.3.26-0.20240922174815-ced25b343ec5/go.mod h1:qfF8cAig3JHLAojmfYEWn8ttV4aHsiitkZeD1TH8Wrg= github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6 h1:1Nc5EBY6pjfw1kwW0duwyG+7WliWz5u9kgk1h5MnLuA= github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:UXghlricA7J3aRD/k7p/zBObQfmBawwCxIVPVjz2Q3o= github.com/skycoin/skycoin v0.27.1 h1:HatxsRwVSPaV4qxH6290xPBmkH/HgiuAoY2qC+e8C9I= github.com/skycoin/skycoin v0.27.1/go.mod h1:78nHjQzd8KG0jJJVL/j0xMmrihXi70ti63fh8vXScJw= -github.com/skycoin/skywire v1.3.24 h1:d5hvMD2WpJNkVzuN4S6Gg2OK29YO39mJQa/+PlcdTio= -github.com/skycoin/skywire v1.3.24/go.mod h1:X0LJO/q6kFV/TxTi4+E7rYfPiP7dFsMXVKY5zrMQoiU= -github.com/skycoin/skywire v1.3.25-beta h1:F3oDF36CaK3YAFogl2/jNkAqJWHaJP4HVBVFRpP72BU= -github.com/skycoin/skywire v1.3.25-beta/go.mod h1:TAUZX3dAcvsJhblLMuwZ1MjmIJL85He73MZdKT95Qv4= +github.com/skycoin/skywire v1.3.26-0.20240922162315-789cef41c9a1 h1:3OFs/rnlDZYmhRGOEZq0wZk1LC45/UZTRpFXVDJ2lSA= +github.com/skycoin/skywire v1.3.26-0.20240922162315-789cef41c9a1/go.mod h1:jsyaaHXEIEDcbTcceUTIi23BZAYXqBDhk/tjRnfCUs4= github.com/skycoin/skywire-utilities v1.3.25 h1:mk8dUonFdhVopFF3d9wbOyXXoiuAO+mN1y+ve6SzgX4= github.com/skycoin/skywire-utilities v1.3.25/go.mod h1:yFKWpL1bDRPKU3uK+cTF4PnYUMe+eyIj5N2bk4sF5Cw= github.com/skycoin/systray v1.10.0 h1:fQZJHMylpVvfmOOTLvUssfyHVDoC8Idx6Ba2BlLEuGg= diff --git a/internal/armetrics/victoria_metrics.go b/internal/armetrics/victoria_metrics.go index e86186bf..30e53c1f 100644 --- a/internal/armetrics/victoria_metrics.go +++ b/internal/armetrics/victoria_metrics.go @@ -1,6 +1,8 @@ package armetrics -import "github.com/skycoin/skywire-utilities/pkg/metricsutil" +import ( + "github.com/skycoin/skywire-utilities/pkg/metricsutil" +) // VictoriaMetrics implements `Metrics` using `VictoriaMetrics`. type VictoriaMetrics struct { diff --git a/internal/config/default_environments_test.go b/internal/config/default_environments_test.go index d4e49f34..d829038e 100644 --- a/internal/config/default_environments_test.go +++ b/internal/config/default_environments_test.go @@ -1,6 +1,8 @@ package config -import "fmt" +import ( + "fmt" +) func ExampleEnvConfig_AddThreeChatVisors() { globalEnv := &EnvConfig{ diff --git a/internal/config/runners.go b/internal/config/runners.go index 5c21ab0d..f0fdeacd 100644 --- a/internal/config/runners.go +++ b/internal/config/runners.go @@ -1,6 +1,8 @@ package config -import "fmt" +import ( + "fmt" +) const ( // DockerRedisCmdTemplate is a template for running dockerized redis diff --git a/internal/lc/data.go b/internal/lc/data.go index 4758bd00..0854f69e 100644 --- a/internal/lc/data.go +++ b/internal/lc/data.go @@ -1,7 +1,9 @@ // Package lc internal/lc/data.go package lc -import "github.com/skycoin/skywire-utilities/pkg/httputil" +import ( + "github.com/skycoin/skywire-utilities/pkg/httputil" +) // ServiceSummary summary of a visor connection type ServiceSummary struct { diff --git a/internal/nmmetrics/victoria_metrics.go b/internal/nmmetrics/victoria_metrics.go index 7608f49f..65fc7eb5 100644 --- a/internal/nmmetrics/victoria_metrics.go +++ b/internal/nmmetrics/victoria_metrics.go @@ -1,6 +1,8 @@ package nmmetrics -import "github.com/skycoin/skywire-utilities/pkg/metricsutil" +import ( + "github.com/skycoin/skywire-utilities/pkg/metricsutil" +) // VictoriaMetrics implements `Metrics` using `VictoriaMetrics`. type VictoriaMetrics struct { diff --git a/internal/tpdiscmetrics/empty.go b/internal/tpdiscmetrics/empty.go index f1927478..9bfeae2a 100644 --- a/internal/tpdiscmetrics/empty.go +++ b/internal/tpdiscmetrics/empty.go @@ -1,7 +1,9 @@ // Package tpdiscmetrics internal/tpdiscmetrics/empty.go package tpdiscmetrics -import "github.com/skycoin/skywire/pkg/transport/network" +import ( + "github.com/skycoin/skywire/pkg/transport/network" +) // NewEmpty constructs new empty metrics. func NewEmpty() Empty { diff --git a/internal/tpdiscmetrics/metrics.go b/internal/tpdiscmetrics/metrics.go index 33026b29..6840758c 100644 --- a/internal/tpdiscmetrics/metrics.go +++ b/internal/tpdiscmetrics/metrics.go @@ -1,6 +1,8 @@ package tpdiscmetrics -import "github.com/skycoin/skywire/pkg/transport/network" +import ( + "github.com/skycoin/skywire/pkg/transport/network" +) // Metrics collects metrics for metrics tracking system. type Metrics interface { diff --git a/internal/utmetrics/victoria_metrics.go b/internal/utmetrics/victoria_metrics.go index b8b82e14..76e9dae3 100644 --- a/internal/utmetrics/victoria_metrics.go +++ b/internal/utmetrics/victoria_metrics.go @@ -1,6 +1,8 @@ package utmetrics -import "github.com/skycoin/skywire-utilities/pkg/metricsutil" +import ( + "github.com/skycoin/skywire-utilities/pkg/metricsutil" +) // VictoriaMetrics implements `Metrics` using `VictoriaMetrics`. type VictoriaMetrics struct { diff --git a/internal/vpn/client_config.go b/internal/vpn/client_config.go index a5285ffd..5ae334d2 100644 --- a/internal/vpn/client_config.go +++ b/internal/vpn/client_config.go @@ -1,6 +1,8 @@ package vpn -import "github.com/skycoin/skywire-utilities/pkg/cipher" +import ( + "github.com/skycoin/skywire-utilities/pkg/cipher" +) // ClientConfig is a configuration for VPN client. type ClientConfig struct { diff --git a/internal/vpn/handshake_status.go b/internal/vpn/handshake_status.go index ec44ab2c..18f2b4e1 100644 --- a/internal/vpn/handshake_status.go +++ b/internal/vpn/handshake_status.go @@ -1,6 +1,8 @@ package vpn -import "errors" +import ( + "errors" +) // HandshakeStatus is a status of Client/Server handshake. type HandshakeStatus int diff --git a/internal/vpn/hello.go b/internal/vpn/hello.go index b55b7486..cbf8186a 100644 --- a/internal/vpn/hello.go +++ b/internal/vpn/hello.go @@ -1,6 +1,8 @@ package vpn -import "net" +import ( + "net" +) // ClientHello is a message sent by client during the Client/Server handshake. type ClientHello struct { diff --git a/internal/vpn/tun_device.go b/internal/vpn/tun_device.go index 980aaeae..825f3765 100644 --- a/internal/vpn/tun_device.go +++ b/internal/vpn/tun_device.go @@ -1,6 +1,8 @@ package vpn -import "io" +import ( + "io" +) // TUNDevice is a wrapper for TUN interface. type TUNDevice interface { diff --git a/pkg/address-resolver/api/api.go b/pkg/address-resolver/api/api.go index bfade500..7c56f1d6 100644 --- a/pkg/address-resolver/api/api.go +++ b/pkg/address-resolver/api/api.go @@ -526,7 +526,8 @@ func (a *API) ListenUDP(listener net.Listener) { func (a *API) sudphConnHandshake(conn net.Conn) { remoteAddr := conn.RemoteAddr().String() - hs := handshake.ResponderHandshake(func(f2 handshake.Frame2) error { return nil }) + // hs := handshake.ResponderHandshake(func(f2 handshake.Frame2) error { return nil }) + hs := handshake.ResponderHandshake(func(_ handshake.Frame2) error { return nil }) wrapped, err := network.DoHandshake(conn, hs, network.SUDPH, a.log) if err != nil { diff --git a/pkg/config-bootstrapper/api/api.go b/pkg/config-bootstrapper/api/api.go index 05fa69e6..9851c15a 100644 --- a/pkg/config-bootstrapper/api/api.go +++ b/pkg/config-bootstrapper/api/api.go @@ -13,11 +13,11 @@ import ( "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" "github.com/sirupsen/logrus" + "github.com/skycoin/skywire" "github.com/skycoin/skywire-utilities/pkg/buildinfo" "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/httputil" "github.com/skycoin/skywire-utilities/pkg/logging" - "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/visor/visorconfig" ) @@ -62,22 +62,26 @@ type Config struct { // New creates a new api. func New(log *logging.Logger, conf Config, domain, dmsgAddr string) *API { + var envServices skywire.EnvServices + var svcs skywire.Services + json.Unmarshal([]byte(skywire.ServicesJSON), &envServices) //nolint + json.Unmarshal(envServices.Prod, &svcs) //nolint - sd := strings.Replace(skyenv.ServiceDiscAddr, "skycoin.com", domain, -1) + sd := strings.Replace(svcs.ServiceDiscovery, "skycoin.com", domain, -1) if domain == "skywire.skycoin.com" { - sd = skyenv.ServiceDiscAddr + sd = svcs.ServiceDiscovery } services := &visorconfig.Services{ - DmsgDiscovery: strings.Replace(skyenv.DmsgDiscAddr, "skywire.skycoin.com", domain, -1), - TransportDiscovery: strings.Replace(skyenv.TpDiscAddr, "skywire.skycoin.com", domain, -1), - AddressResolver: strings.Replace(skyenv.AddressResolverAddr, "skywire.skycoin.com", domain, -1), - RouteFinder: strings.Replace(skyenv.RouteFinderAddr, "skywire.skycoin.com", domain, -1), + DmsgDiscovery: strings.Replace(svcs.DmsgDiscovery, "skywire.skycoin.com", domain, -1), + TransportDiscovery: strings.Replace(svcs.TransportDiscovery, "skywire.skycoin.com", domain, -1), + AddressResolver: strings.Replace(svcs.AddressResolver, "skywire.skycoin.com", domain, -1), + RouteFinder: strings.Replace(svcs.RouteFinder, "skywire.skycoin.com", domain, -1), RouteSetupNodes: conf.SetupNodes, - UptimeTracker: strings.Replace(skyenv.UptimeTrackerAddr, "skywire.skycoin.com", domain, -1), + UptimeTracker: strings.Replace(svcs.UptimeTracker, "skywire.skycoin.com", domain, -1), ServiceDiscovery: sd, StunServers: conf.StunServers, - DNSServer: skyenv.DNSServer, + DNSServer: svcs.DNSServer, SurveyWhitelist: conf.SurveyWhitelist, TransportSetupPKs: conf.TransportSetupPKs, } diff --git a/pkg/dmsg-monitor/api/api.go b/pkg/dmsg-monitor/api/api.go deleted file mode 100644 index d377aafb..00000000 --- a/pkg/dmsg-monitor/api/api.go +++ /dev/null @@ -1,450 +0,0 @@ -// Package api pkg/dmsg-monitor/api.go -package api - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "math/rand" - "net/http" - "net/url" - "strings" - "sync" - "time" - - "github.com/go-chi/chi/v5" - "github.com/go-chi/chi/v5/middleware" - "github.com/sirupsen/logrus" - "github.com/skycoin/skywire-utilities/pkg/buildinfo" - "github.com/skycoin/skywire-utilities/pkg/cipher" - "github.com/skycoin/skywire-utilities/pkg/httputil" - "github.com/skycoin/skywire-utilities/pkg/logging" - utilenv "github.com/skycoin/skywire-utilities/pkg/skyenv" - "github.com/skycoin/skywire/pkg/app/appserver" - "github.com/skycoin/skywire/pkg/visor" - "github.com/skycoin/skywire/pkg/visor/visorconfig" -) - -// API register all the API endpoints. -// It implements a net/http.Handler. -type API struct { - http.Handler - - Visor *visor.Visor - - dmsgURL string - utURL string - logger logging.Logger - dMu sync.RWMutex - startedAt time.Time - - nmPk cipher.PubKey - nmSign cipher.Sig - batchSize int - whitelistedPKs map[string]bool -} - -// DMSGMonitorConfig is struct for Keys and Sign value of dmsg monitor -type DMSGMonitorConfig struct { - PK cipher.PubKey - Sign cipher.Sig - BatchSize int -} - -// ServicesURLs is struct for organize URL of services -type ServicesURLs struct { - DMSG string - UT string -} - -// HealthCheckResponse is struct of /health endpoint -type HealthCheckResponse struct { - BuildInfo *buildinfo.Info `json:"build_info,omitempty"` - StartedAt time.Time `json:"started_at,omitempty"` -} - -// Error is the object returned to the client when there's an error. -type Error struct { - Error string `json:"error"` -} - -// New returns a new *chi.Mux object, which can be started as a server -func New(logger *logging.Logger, srvURLs ServicesURLs, monitorConfig DMSGMonitorConfig) *API { - - api := &API{ - dmsgURL: srvURLs.DMSG, - utURL: srvURLs.UT, - logger: *logger, - startedAt: time.Now(), - nmPk: monitorConfig.PK, - nmSign: monitorConfig.Sign, - batchSize: monitorConfig.BatchSize, - whitelistedPKs: whitelistedPKs(), - } - r := chi.NewRouter() - - r.Use(middleware.RequestID) - r.Use(middleware.RealIP) - r.Use(middleware.Logger) - r.Use(middleware.Recoverer) - r.Use(httputil.SetLoggerMiddleware(logger)) - r.Get("/health", api.health) - api.Handler = r - - return api -} - -func (api *API) health(w http.ResponseWriter, r *http.Request) { - info := buildinfo.Get() - api.writeJSON(w, r, http.StatusOK, HealthCheckResponse{ - BuildInfo: info, - StartedAt: api.startedAt, - }) -} - -func (api *API) writeJSON(w http.ResponseWriter, r *http.Request, code int, object interface{}) { - jsonObject, err := json.Marshal(object) - if err != nil { - api.log(r).WithError(err).Errorf("failed to encode json response") - w.WriteHeader(http.StatusInternalServerError) - - return - } - - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(code) - - _, err = w.Write(jsonObject) - if err != nil { - api.log(r).WithError(err).Errorf("failed to write json response") - } -} - -func (api *API) log(r *http.Request) logrus.FieldLogger { - return httputil.GetLogger(r) -} - -// InitDeregistrationLoop is function which runs periodic background tasks of API. -func (api *API) InitDeregistrationLoop(ctx context.Context, conf *visorconfig.V1, sleepDeregistration time.Duration) { - // Start a visor - api.startVisor(ctx, conf) - - for { - select { - case <-ctx.Done(): - return - default: - api.deregister() - time.Sleep(sleepDeregistration * time.Minute) - } - } -} - -// deregister use as routine to deregister old/dead entries in the network -func (api *API) deregister() { - api.logger.Info("Deregistration routine start.") - defer api.dMu.Unlock() - api.dMu.Lock() - - // get uptimes data to check online/offline of visor based on uptime tracker - uptimes, err := getUptimeTracker(api.utURL) - if err != nil { - api.logger.Warnf("Error occur during get uptime tracker status list due to %s", err) - return - } - - api.dmsgDeregistration(uptimes) - - api.logger.Info("Deregistration routine completed.") -} - -// dmsgDeregistration is a routine to deregister dead dmsg entries in dmsg discovery -func (api *API) dmsgDeregistration(uptimes map[string]bool) { - api.logger.Info("DMSGD Deregistration started.") - - // get list of all dmsg clients, not servers - clients, err := getClients(api.dmsgURL) - if err != nil { - api.logger.Warnf("Error occur during get dmsg clients list due to %s", err) - return - } - //randomize the order of the dmsg entries - rand.Shuffle(len(clients), func(i, j int) { - clients[i], clients[j] = clients[j], clients[i] - }) - // check dmsg clients either alive or dead - checkerConfig := dmsgCheckerConfig{ - wg: new(sync.WaitGroup), - locker: new(sync.Mutex), - uptimes: uptimes, - transport: "dmsg", - } - deadDmsg := []string{} - var tmpBatchSize, deadDmsgCount int - for i, client := range clients { - if _, ok := api.whitelistedPKs[client]; !ok { - checkerConfig.wg.Add(1) - checkerConfig.client = client - go api.dmsgChecker(checkerConfig, &deadDmsg) - } - tmpBatchSize++ - if tmpBatchSize == api.batchSize || i == len(clients)-1 { - checkerConfig.wg.Wait() - // deregister clients from dmsg-discovery - if len(deadDmsg) > 0 { - api.dmsgDeregister(deadDmsg) - deadDmsgCount += len(deadDmsg) - } - deadDmsg = []string{} - tmpBatchSize = 0 - } - } - - api.logger.WithField("Number of dead DMSG entries", deadDmsgCount).Info("DMSGD Deregistration completed.") -} - -func (api *API) dmsgChecker(cfg dmsgCheckerConfig, deadDmsg *[]string) { - defer cfg.wg.Done() - - key := cipher.PubKey{} - err := key.UnmarshalText([]byte(cfg.client)) - if err != nil { - api.logger.Warnf("Error marshaling key: %s", err) - return - } - - var trp bool - retrier := 3 - for retrier > 0 { - tp, err := api.Visor.AddTransport(key, cfg.transport, time.Second*3) - if err != nil { - api.logger.WithField("Retry", 4-retrier).WithError(err).Warnf("Failed to establish %v transport to %v", cfg.transport, key) - retrier-- - if strings.Contains(err.Error(), "unknown network type") { - trp = true - retrier = 0 - } - } else { - api.logger.Infof("Established %v transport to %v", cfg.transport, key) - trp = true - err = api.Visor.RemoveTransport(tp.ID) - if err != nil { - api.logger.Warnf("Error removing %v transport of %v: %v", cfg.transport, key, err) - } - retrier = 0 - } - } - - if !trp { - if status, ok := cfg.uptimes[key.Hex()]; !ok || !status { - cfg.locker.Lock() - *deadDmsg = append(*deadDmsg, key.Hex()) - cfg.locker.Unlock() - } - } -} - -func (api *API) dmsgDeregister(keys []string) { - err := api.deregisterRequest(keys, api.dmsgURL+"/dmsg-discovery/deregister", "dmsg discovery") - if err != nil { - api.logger.Warn(err) - return - } - api.logger.Info("Deregister request send to DSMGD") -} - -type dmsgCheckerConfig struct { - client string - transport string - uptimes map[string]bool - wg *sync.WaitGroup - locker *sync.Mutex -} - -// deregisterRequest is dereigstration handler for all services -func (api *API) deregisterRequest(keys []string, rawReqURL, service string) error { - reqURL, err := url.Parse(rawReqURL) - if err != nil { - return fmt.Errorf("Error on parsing deregistration URL : %v", err) - } - - jsonData, err := json.Marshal(keys) - if err != nil { - return fmt.Errorf("Error on parsing deregistration keys : %v", err) - } - body := bytes.NewReader(jsonData) - - req := &http.Request{ - Method: "DELETE", - URL: reqURL, - Header: map[string][]string{ - "NM-PK": {api.nmPk.Hex()}, - "NM-Sign": {api.nmSign.Hex()}, - }, - Body: io.NopCloser(body), - } - - res, err := http.DefaultClient.Do(req) - if err != nil { - return fmt.Errorf("Error on send deregistration request : %s", err) - } - defer res.Body.Close() //nolint - - if res.StatusCode != http.StatusOK { - return fmt.Errorf("Error deregister keys from %s : %s", service, err) - } - - return nil -} - -type clientList []string - -func getClients(dmsgURL string) (data clientList, err error) { - res, err := http.Get(dmsgURL + "/dmsg-discovery/visorEntries") //nolint - - if err != nil { - return nil, err - } - - body, err := io.ReadAll(res.Body) - - if err != nil { - return nil, err - } - - err = json.Unmarshal(body, &data) - if err != nil { - return nil, err - } - return data, nil -} - -func getUptimeTracker(utURL string) (map[string]bool, error) { - response := make(map[string]bool) - res, err := http.Get(utURL) //nolint - if err != nil { - return response, err - } - - body, err := io.ReadAll(res.Body) - if err != nil { - return response, err - } - var data []uptimes - err = json.Unmarshal(body, &data) - if err != nil { - return response, err - } - - for _, visor := range data { - response[visor.Key] = visor.Online - } - - return response, nil -} - -type uptimes struct { - Key string `json:"key"` - Online bool `json:"online"` -} - -func (api *API) startVisor(ctx context.Context, conf *visorconfig.V1) { - conf.SetLogger(logging.NewMasterLogger()) - v, ok := visor.NewVisor(ctx, conf) - if !ok { - api.logger.Fatal("Failed to start visor.") - } - api.Visor = v -} - -// InitConfig to initilise config -func InitConfig(confPath string, mLog *logging.MasterLogger) *visorconfig.V1 { - log := mLog.PackageLogger("network_monitor:config") - log.Info("Reading config from file.") - log.WithField("filepath", confPath).Info() - - oldConf, err := visorconfig.ReadFile(confPath) - if err != nil { - log.WithError(err).Fatal("Failed to read config file.") - } - var testEnv bool - if oldConf.Dmsg.Discovery == utilenv.TestDmsgDiscAddr { - testEnv = true - } - // have same services as old config - services := &visorconfig.Services{ - DmsgDiscovery: oldConf.Dmsg.Discovery, - TransportDiscovery: oldConf.Transport.Discovery, - AddressResolver: oldConf.Transport.AddressResolver, - RouteFinder: oldConf.Routing.RouteFinder, - RouteSetupNodes: oldConf.Routing.RouteSetupNodes, - UptimeTracker: oldConf.UptimeTracker.Addr, - ServiceDiscovery: oldConf.Launcher.ServiceDisc, - } - // update oldconfig - conf, err := visorconfig.MakeDefaultConfig(mLog, &oldConf.SK, false, false, testEnv, false, false, confPath, "", services) - if err != nil { - log.WithError(err).Fatal("Failed to create config.") - } - - // have the same apps that the old config had - var newConfLauncherApps []appserver.AppConfig - for _, app := range conf.Launcher.Apps { - for _, oldApp := range oldConf.Launcher.Apps { - if app.Name == oldApp.Name { - newConfLauncherApps = append(newConfLauncherApps, app) - } - } - } - conf.Launcher.Apps = newConfLauncherApps - - conf.Version = oldConf.Version - conf.LocalPath = oldConf.LocalPath - conf.Launcher.BinPath = oldConf.Launcher.BinPath - conf.Launcher.ServerAddr = oldConf.Launcher.ServerAddr - conf.CLIAddr = oldConf.CLIAddr - conf.Transport.TransportSetupPKs = oldConf.Transport.TransportSetupPKs - - // following services are not needed - conf.STCP = nil - conf.Dmsgpty = nil - conf.Transport.PublicAutoconnect = false - - // save the config file - if err := conf.Flush(); err != nil { - log.WithError(err).Fatal("Failed to flush config to file.") - } - - return conf -} - -func whitelistedPKs() map[string]bool { - whitelistedPKs := make(map[string]bool) - for _, pk := range strings.Split(utilenv.NetworkMonitorPKs, ",") { - whitelistedPKs[pk] = true - } - for _, pk := range strings.Split(utilenv.TestNetworkMonitorPKs, ",") { - whitelistedPKs[pk] = true - } - for _, pk := range strings.Split(utilenv.RouteSetupPKs, ",") { - whitelistedPKs[pk] = true - } - for _, pk := range strings.Split(utilenv.TestRouteSetupPKs, ",") { - whitelistedPKs[pk] = true - } - for _, pk := range strings.Split(utilenv.TPSetupPKs, ",") { - whitelistedPKs[pk] = true - } - for _, pk := range strings.Split(utilenv.TestTPSetupPKs, ",") { - whitelistedPKs[pk] = true - } - for _, pk := range strings.Split(utilenv.SurveyWhitelistPKs, ",") { - whitelistedPKs[pk] = true - } - for _, pk := range strings.Split(utilenv.RewardSystemPKs, ",") { - whitelistedPKs[pk] = true - } - return whitelistedPKs -} diff --git a/pkg/liveness-checker/api/api.go b/pkg/liveness-checker/api/api.go deleted file mode 100644 index ad444257..00000000 --- a/pkg/liveness-checker/api/api.go +++ /dev/null @@ -1,617 +0,0 @@ -// Package api pkg/liveness-checker/api.go -package api - -import ( - "context" - "crypto/tls" - "encoding/json" - "net/http" - "net/url" - "time" - - "github.com/ccding/go-stun/stun" - "github.com/go-chi/chi/v5" - "github.com/go-chi/chi/v5/middleware" - "github.com/sirupsen/logrus" - "github.com/skycoin/dmsg/pkg/disc" - "github.com/skycoin/dmsg/pkg/dmsg" - "github.com/skycoin/skywire-utilities/pkg/buildinfo" - "github.com/skycoin/skywire-utilities/pkg/cipher" - "github.com/skycoin/skywire-utilities/pkg/httputil" - "github.com/skycoin/skywire-utilities/pkg/logging" - utilenv "github.com/skycoin/skywire-utilities/pkg/skyenv" - "github.com/skycoin/skywire/pkg/app/appserver" - "github.com/skycoin/skywire/pkg/utclient" - "github.com/skycoin/skywire/pkg/visor" - "github.com/skycoin/skywire/pkg/visor/visorconfig" - - "github.com/skycoin/skywire-services/internal/lc" - "github.com/skycoin/skywire-services/pkg/liveness-checker/store" -) - -// API register all the API endpoints. -// It implements a net/http.Handler. -type API struct { - http.Handler - - lcPk cipher.PubKey - lcSk cipher.SecKey - - Visor *visor.Visor - - *visorconfig.Services - - logger *logging.Logger - mLogger *logging.MasterLogger - - store store.Store - startedAt time.Time -} - -// New returns a new *chi.Mux object, which can be started as a server -func New(lcPk cipher.PubKey, lcSk cipher.SecKey, s store.Store, logger *logging.Logger, mLogger *logging.MasterLogger, - services *visorconfig.Services) *API { - - api := &API{ - lcPk: lcPk, - lcSk: lcSk, - Services: services, - logger: logger, - mLogger: mLogger, - store: s, - startedAt: time.Now(), - } - r := chi.NewRouter() - - r.Use(middleware.RequestID) - r.Use(middleware.RealIP) - r.Use(middleware.Logger) - r.Use(middleware.Recoverer) - r.Use(httputil.SetLoggerMiddleware(logger)) - r.Get("/status", api.getStatus) - r.Get("/health", api.health) - api.Handler = r - - return api -} - -func (api *API) getStatus(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() - data, err := api.store.GetServiceSummaries(ctx) - if err != nil { - api.logger.WithError(err).Warnf("Error Getting service details") - } - if err := json.NewEncoder(w).Encode(data); err != nil { - api.writeError(w, r, err) - } -} - -func (api *API) health(w http.ResponseWriter, r *http.Request) { - info := buildinfo.Get() - api.writeJSON(w, r, http.StatusOK, httputil.HealthCheckResponse{ - BuildInfo: info, - StartedAt: api.startedAt, - }) -} - -func (api *API) writeJSON(w http.ResponseWriter, r *http.Request, code int, object interface{}) { - jsonObject, err := json.Marshal(object) - if err != nil { - api.log(r).WithError(err).Errorf("failed to encode json response") - w.WriteHeader(http.StatusInternalServerError) - - return - } - - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(code) - - _, err = w.Write(jsonObject) - if err != nil { - api.log(r).WithError(err).Errorf("failed to write json response") - } -} - -// ServeHTTP implements http.Handler. -func (api *API) writeError(w http.ResponseWriter, r *http.Request, err error) { - var status int - - if err == context.DeadlineExceeded { - status = http.StatusRequestTimeout - } - - // we still haven't found the error - if status == 0 { - if _, ok := err.(*json.SyntaxError); ok { - status = http.StatusBadRequest - } - } - - // we fallback to 500 - if status == 0 { - status = http.StatusInternalServerError - } - - if status != http.StatusNotFound { - api.log(r).Warnf("%d: %s", status, err) - } - - w.WriteHeader(status) - w.Header().Set("Content-Type", "application/json") - if err := json.NewEncoder(w).Encode(&httputil.Error{Error: err.Error()}); err != nil { - api.log(r).WithError(err).Warn("Failed to encode error") - } -} - -func (api *API) log(r *http.Request) logrus.FieldLogger { - return httputil.GetLogger(r) -} - -func (api *API) startVisor(ctx context.Context, conf *visorconfig.V1) { - conf.SetLogger(logging.NewMasterLogger()) - v, ok := visor.NewVisor(ctx, conf) - if !ok { - api.logger.Fatal("Failed to start visor.") - } - api.Visor = v -} - -// InitConfig to initilise config -func InitConfig(confPath string, mLog *logging.MasterLogger) (*visorconfig.V1, *visorconfig.Services) { - log := mLog.PackageLogger("liveness_checker:config") - log.Info("Reading config from file.") - log.WithField("filepath", confPath).Info() - - oldConf, err := visorconfig.ReadFile(confPath) - if err != nil { - log.WithError(err).Fatal("Failed to read config file.") - } - var testEnv bool - if oldConf.Dmsg.Discovery == utilenv.TestDmsgDiscAddr { - testEnv = true - } - // have same services as old config - services := &visorconfig.Services{ - DmsgDiscovery: oldConf.Dmsg.Discovery, - TransportDiscovery: oldConf.Transport.Discovery, - AddressResolver: oldConf.Transport.AddressResolver, - RouteFinder: oldConf.Routing.RouteFinder, - RouteSetupNodes: oldConf.Routing.RouteSetupNodes, - UptimeTracker: oldConf.UptimeTracker.Addr, - ServiceDiscovery: oldConf.Launcher.ServiceDisc, - StunServers: oldConf.StunServers, - } - // update oldconfig - conf, err := visorconfig.MakeDefaultConfig(mLog, &oldConf.SK, false, false, testEnv, false, false, confPath, "", services) - if err != nil { - log.WithError(err).Fatal("Failed to create config.") - } - - // have the same apps that the old config had - var newConfLauncherApps []appserver.AppConfig - for _, app := range conf.Launcher.Apps { - for _, oldApp := range oldConf.Launcher.Apps { - if app.Name == oldApp.Name { - newConfLauncherApps = append(newConfLauncherApps, app) - } - } - } - conf.Launcher.Apps = newConfLauncherApps - - conf.Version = oldConf.Version - conf.LocalPath = oldConf.LocalPath - conf.Launcher.BinPath = oldConf.Launcher.BinPath - conf.Launcher.ServerAddr = oldConf.Launcher.ServerAddr - conf.CLIAddr = oldConf.CLIAddr - - // following services are not needed - conf.STCP = nil - conf.Dmsgpty = nil - conf.Transport.PublicAutoconnect = false - - // save the config file - if err := conf.Flush(); err != nil { - log.WithError(err).Fatal("Failed to flush config to file.") - } - - // following services are not needed for the visor but we still need to - // save them in config for other background tasks - conf.UptimeTracker = nil - conf.StunServers = nil - - return conf, services -} - -// RunBackgroundTasks is function which runs periodic background tasks of API. -func (api *API) RunBackgroundTasks(ctx context.Context, conf *visorconfig.V1) { - - // Start a visor - api.startVisor(ctx, conf) - - ticker := time.NewTicker(time.Minute * 5) - api.checkAddressResolver(ctx) - api.checkServiceDiscovery(ctx) - api.checkTransportDiscovery(ctx) - api.checkDMSGDiscovery(ctx) - api.checkRouteFinder(ctx) - api.checkUptimeTracker(ctx) - api.checkIPService(ctx) - api.checkStunServers(ctx) - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - api.checkAddressResolver(ctx) - api.checkServiceDiscovery(ctx) - api.checkTransportDiscovery(ctx) - api.checkDMSGDiscovery(ctx) - api.checkRouteFinder(ctx) - api.checkUptimeTracker(ctx) - api.checkIPService(ctx) - api.checkStunServers(ctx) - // wait full timeout no matter how long the last phase took - ticker = time.NewTicker(time.Minute * 5) - api.logger.Info("liveness check routine complete.") - } - } -} - -// checkAddressResolver runs a liveness check on the address-resolver -func (api *API) checkAddressResolver(ctx context.Context) { - - online := true - var errs []string - - cInfo, err := checkCertificate(api.AddressResolver) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - health, err := httputil.GetServiceHealth(ctx, api.AddressResolver) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - Health: health, - CertificateInfo: cInfo, - } - - err = api.store.AddServiceSummary(ctx, "address-resolver", ss) - if err != nil { - api.logger.WithError(err).Warn("Failed to add address-resolver service summary to store.") - } - api.logger.Info("address-resolver liveness check complete.") -} - -// checkServiceDiscovery runs a liveness check on the service-discovery -func (api *API) checkServiceDiscovery(ctx context.Context) { - online := true - var errs []string - - cInfo, err := checkCertificate(api.ServiceDiscovery) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - health, err := httputil.GetServiceHealth(ctx, api.ServiceDiscovery) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - Health: health, - CertificateInfo: cInfo, - } - - err = api.store.AddServiceSummary(ctx, "service-discovery", ss) - if err != nil { - api.logger.WithError(err).Warn("Failed to add service-discovery service summary to store.") - } - api.logger.Info("service-discovery liveness check complete.") -} - -// checkTransportDiscovery runs a liveness check on the transport-discovery -func (api *API) checkTransportDiscovery(ctx context.Context) { - // will need visor for other checks - - online := true - var errs []string - - cInfo, err := checkCertificate(api.TransportDiscovery) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - health, err := httputil.GetServiceHealth(ctx, api.TransportDiscovery) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - Health: health, - CertificateInfo: cInfo, - } - - err = api.store.AddServiceSummary(ctx, "transport-discovery", ss) - if err != nil { - api.logger.WithError(err).Warn("Failed to add transport-discovery service summary to store.") - } - api.logger.Info("transport-discovery liveness check complete.") -} - -// checkDMSGDiscovery runs a liveness check on the dmsg-discovery -func (api *API) checkDMSGDiscovery(ctx context.Context) { - // will need visor for other checks - - online := true - var errs []string - - cInfo, err := checkCertificate(api.DmsgDiscovery) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - health, err := httputil.GetServiceHealth(ctx, api.DmsgDiscovery) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - disc := disc.NewHTTP(api.DmsgDiscovery, &http.Client{}, api.logger) - servers, err := disc.AllServers(ctx) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - _, err = disc.AvailableServers(ctx) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - Health: health, - CertificateInfo: cInfo, - } - - err = api.store.AddServiceSummary(ctx, "dmsg-discovery", ss) - if err != nil { - api.logger.WithError(err).Warn("Failed to add dmsg-discovery service summary to store.") - } - api.logger.Info("dmsg-discovery liveness check complete.") - - api.checkDMSGServers(ctx, disc, servers) -} - -// checkDMSGServers runs a liveness check on the servers registered in dmsg-discovery -func (api *API) checkDMSGServers(ctx context.Context, disc disc.APIClient, servers []*disc.Entry) { - // will need visor for other checks - online := true - var errs []string - - dmsgConf := dmsg.DefaultConfig() - client := dmsg.NewClient(api.lcPk, api.lcSk, disc, dmsgConf) - for _, server := range servers { - if err := client.EnsureSession(ctx, server); err != nil { - online = false - errs = append(errs, err.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - } - - serviceName := "dmsg-server:" + server.Server.Address - err := api.store.AddServiceSummary(ctx, serviceName, ss) - if err != nil { - api.logger.WithError(err).Warnf("Failed to add %v serviceName service summary to store.", serviceName) - } - api.logger.Infof("%v liveness check complete.", serviceName) - } - api.logger.Info("dmsg-server liveness check complete.") -} - -// checkRouteFinder runs a liveness check on the route-finder -func (api *API) checkRouteFinder(ctx context.Context) { - // will need visor for other checks - - online := true - var errs []string - - cInfo, err := checkCertificate(api.RouteFinder) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - health, err := httputil.GetServiceHealth(ctx, api.RouteFinder) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - Health: health, - CertificateInfo: cInfo, - } - - err = api.store.AddServiceSummary(ctx, "route-finder", ss) - if err != nil { - api.logger.WithError(err).Warn("Failed to add route-finder service summary to store.") - } - api.logger.Info("route-finder liveness check complete.") -} - -// checkUptimeTracker runs a liveness check on the uptime-tracker -func (api *API) checkUptimeTracker(ctx context.Context) { - - online := true - var errs []string - - cInfo, err := checkCertificate(api.UptimeTracker) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - health, err := httputil.GetServiceHealth(ctx, api.UptimeTracker) - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - ut, err := utclient.NewHTTP(api.UptimeTracker, api.lcPk, api.lcSk, &http.Client{}, "", api.mLogger) - if err != nil { - api.logger.WithError(err).Warn("failed to create uptime tracker client.") - } - - err = ut.UpdateVisorUptime(ctx, "") - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - Health: health, - CertificateInfo: cInfo, - } - - err = api.store.AddServiceSummary(ctx, "uptime-tracker", ss) - if err != nil { - api.logger.WithError(err).Warn("Failed to add uptime-tracker service summary to store.") - } - api.logger.Info("uptime-tracker liveness check complete.") -} - -// checkIPService runs a liveness check on the ip-service https://ip.skycoin.com/ -func (api *API) checkIPService(ctx context.Context) { - online := true - var errs []string - - cInfo, err := checkCertificate("https://ip.skycoin.com") - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - resp, err := http.Get("https://ip.skycoin.com") - if err != nil { - online = false - errs = append(errs, err.Error()) - } - - if resp != nil { - defer func() { - if cErr := resp.Body.Close(); cErr != nil && err == nil { - err = cErr - } - }() - } - - if resp.StatusCode != http.StatusOK { - var hErr httputil.HTTPError - if err = json.NewDecoder(resp.Body).Decode(&hErr); err != nil { - api.logger.WithError(err).Warn("Failed to decode response from ip.skycoin.com.") - errs = append(errs, err.Error()) - } - online = false - errs = append(errs, hErr.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - CertificateInfo: cInfo, - } - - err = api.store.AddServiceSummary(ctx, "ip-service", ss) - if err != nil { - api.logger.WithError(err).Warn("Failed to add ip-service service summary to store.") - } - api.logger.Info("ip-service liveness check complete.") -} - -// checkStunServers runs a liveness check on the the stun servers -func (api *API) checkStunServers(ctx context.Context) { - online := true - var errs []string - - for _, stunServer := range api.StunServers { - nC := stun.NewClient() - nC.SetServerAddr(stunServer) - - _, _, err := nC.Discover() - if err != nil { - api.logger.Warnf("Error %v on server: %v", err, stunServer) - online = false - errs = append(errs, err.Error()) - } - - ss := &lc.ServiceSummary{ - Online: online, - Errors: errs, - Timestamp: time.Now().Unix(), - } - serviceName := "stunserver:" + stunServer - err = api.store.AddServiceSummary(ctx, serviceName, ss) - if err != nil { - api.logger.WithError(err).Warn("Failed to add ip-service service summary to store.") - } - api.logger.Infof("%v liveness check complete.", serviceName) - } -} - -func checkCertificate(serviceURL string) (*lc.CertificateInfo, error) { - u, err := url.Parse(serviceURL) - if err != nil { - return nil, err - } - - conn, err := tls.Dial("tcp", u.Host+":443", nil) - if err != nil { - return nil, err - } - - err = conn.VerifyHostname(u.Host) - if err != nil { - return nil, err - } - - cert := &lc.CertificateInfo{ - Issuer: conn.ConnectionState().PeerCertificates[0].Issuer.String(), - Expiry: conn.ConnectionState().PeerCertificates[0].NotAfter.Format(time.RFC850), - } - - return cert, nil -} diff --git a/pkg/liveness-checker/store/memory_store.go b/pkg/liveness-checker/store/memory_store.go deleted file mode 100644 index 550e9ccf..00000000 --- a/pkg/liveness-checker/store/memory_store.go +++ /dev/null @@ -1,46 +0,0 @@ -// Package store pkg/liveness-checker/store/memory_store.go -package store - -import ( - "context" - "sync" - - "github.com/skycoin/skywire-services/internal/lc" -) - -type memStore struct { - serviceSummaries map[string]*lc.ServiceSummary - mu sync.RWMutex -} - -// newMemoryStore creates new uptimes memory store. -func newMemoryStore() Store { - return &memStore{ - serviceSummaries: make(map[string]*lc.ServiceSummary), - } -} - -func (s *memStore) AddServiceSummary(_ context.Context, key string, visorSum *lc.ServiceSummary) error { - s.mu.Lock() - defer s.mu.Unlock() - s.serviceSummaries[key] = visorSum - return nil -} - -func (s *memStore) GetServiceByName(_ context.Context, name string) (*lc.ServiceSummary, error) { - s.mu.RLock() - defer s.mu.RUnlock() - sSum := s.serviceSummaries[name] - return sSum, nil -} - -func (s *memStore) GetServiceSummaries(_ context.Context) (map[string]*lc.ServiceSummary, error) { - s.mu.RLock() - defer s.mu.RUnlock() - sSums := s.serviceSummaries - return sSums, nil -} - -func (s *memStore) Close() { - -} diff --git a/pkg/liveness-checker/store/memory_store_test.go b/pkg/liveness-checker/store/memory_store_test.go deleted file mode 100644 index 1c6ba0be..00000000 --- a/pkg/liveness-checker/store/memory_store_test.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build !no_ci -// +build !no_ci - -package store - -import ( - "testing" -) - -func TestMemory(t *testing.T) { - s := newMemoryStore() - testNetwork(t, s) -} diff --git a/pkg/liveness-checker/store/redis_store.go b/pkg/liveness-checker/store/redis_store.go deleted file mode 100644 index 8bd55bfd..00000000 --- a/pkg/liveness-checker/store/redis_store.go +++ /dev/null @@ -1,118 +0,0 @@ -package store - -import ( - "context" - "encoding/json" - "fmt" - "strings" - - "github.com/go-redis/redis/v8" - "github.com/skycoin/skywire-utilities/pkg/logging" - "github.com/skycoin/skywire-utilities/pkg/netutil" - - "github.com/skycoin/skywire-services/internal/lc" -) - -const ( - batchSize = int64(1000) - serviceName = "liveness-checker" -) - -type redisStore struct { - client *redis.Client -} - -func newRedisStore(ctx context.Context, addr, password string, poolSize int, logger *logging.Logger) (*redisStore, error) { - opt, err := redis.ParseURL(addr) - if err != nil { - return nil, fmt.Errorf("addr: %w", err) - } - - opt.Password = password - if poolSize != 0 { - opt.PoolSize = poolSize - } - redisCl := redis.NewClient(opt) - - err = netutil.NewRetrier(logger, netutil.DefaultInitBackoff, netutil.DefaultMaxBackoff, 10, netutil.DefaultFactor).Do(ctx, func() error { - _, err = redisCl.Ping(ctx).Result() - return err - }) - if err != nil { - return nil, err - } - - return &redisStore{redisCl}, nil -} - -func (s *redisStore) AddServiceSummary(ctx context.Context, key string, visorSum *lc.ServiceSummary) error { - - data, err := json.Marshal(visorSum) - if err != nil { - return err - } - - if _, err := s.client.Set(ctx, s.lcKey(key), string(data), 0).Result(); err != nil { - return err - } - - return nil -} - -func (s *redisStore) GetServiceByName(ctx context.Context, key string) (sSum *lc.ServiceSummary, err error) { - - data, err := s.client.Get(ctx, s.lcKey(key)).Result() - if err != nil { - return nil, ErrServiceNotFound - } - if err := json.Unmarshal([]byte(data), &sSum); err != nil { - return nil, err - } - - return sSum, nil -} - -func (s *redisStore) GetServiceSummaries(ctx context.Context) (map[string]*lc.ServiceSummary, error) { - response := make(map[string]*lc.ServiceSummary) - - serviceKeys, err := s.getServiceKeys(ctx) - if err != nil { - return response, err - } - - for _, serviceKey := range serviceKeys { - sSum, err := s.GetServiceByName(ctx, serviceKey) - if err != nil { - return response, err - } - response[serviceKey] = sSum - } - - return response, nil -} - -func (s *redisStore) getServiceKeys(ctx context.Context) ([]string, error) { - var pks []string - var cursor uint64 - - iter := s.client.Scan(ctx, cursor, s.searchKey(), batchSize).Iterator() - - for iter.Next(ctx) { - key := strings.ReplaceAll(iter.Val(), "liveness-checker:", "") - pks = append(pks, key) - } - - if err := iter.Err(); err != nil { - return pks, err - } - - return pks, nil -} - -func (s *redisStore) lcKey(key string) string { - return fmt.Sprintf("%v:%v", serviceName, key) -} - -func (s *redisStore) searchKey() string { - return fmt.Sprintf("%v*", serviceName) -} diff --git a/pkg/liveness-checker/store/redis_store_test.go b/pkg/liveness-checker/store/redis_store_test.go deleted file mode 100644 index 8d903dae..00000000 --- a/pkg/liveness-checker/store/redis_store_test.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build !no_ci -// +build !no_ci - -package store - -import ( - "context" - "testing" - "time" - - "github.com/skycoin/skywire-utilities/pkg/httputil" - "github.com/stretchr/testify/require" - - "github.com/skycoin/skywire-services/internal/lc" -) - -func testNetwork(t *testing.T, store Store) { - serviceSumObj := make(map[string]*lc.ServiceSummary) - - const iterations = 3 - for i := 0; i < iterations; i++ { - serviceSummary := &lc.ServiceSummary{ - Online: true, - Health: &httputil.HealthCheckResponse{}, - Timestamp: time.Now().Unix(), - } - serviceSumObj["dmsgd"] = serviceSummary - } - - conn := context.Background() - - t.Run("add service summaries", func(t *testing.T) { - for pk, sum := range serviceSumObj { - err := store.AddServiceSummary(conn, pk, sum) - require.NoError(t, err) - } - }) -} diff --git a/pkg/liveness-checker/store/store.go b/pkg/liveness-checker/store/store.go deleted file mode 100644 index 22b56a44..00000000 --- a/pkg/liveness-checker/store/store.go +++ /dev/null @@ -1,40 +0,0 @@ -package store - -import ( - "context" - "errors" - - "github.com/skycoin/skywire-utilities/pkg/logging" - "github.com/skycoin/skywire-utilities/pkg/storeconfig" - - "github.com/skycoin/skywire-services/internal/lc" -) - -var ( - // ErrServiceNotFound indicates that requested service is not registered. - ErrServiceNotFound = errors.New("Service not found") -) - -// Store stores Service metadata. -type Store interface { - ServiceStore -} - -// ServiceStore stores Service metadata. -type ServiceStore interface { - AddServiceSummary(context.Context, string, *lc.ServiceSummary) error - GetServiceByName(context.Context, string) (*lc.ServiceSummary, error) - GetServiceSummaries(context.Context) (map[string]*lc.ServiceSummary, error) -} - -// New constructs a new Store of requested type. -func New(ctx context.Context, config storeconfig.Config, logger *logging.Logger) (Store, error) { - switch config.Type { - case storeconfig.Memory: - return newMemoryStore(), nil - case storeconfig.Redis: - return newRedisStore(ctx, config.URL, config.Password, config.PoolSize, logger) - default: - return nil, errors.New("unknown store type") - } -} diff --git a/pkg/node-visualizer/api/store.go b/pkg/node-visualizer/api/store.go index 9d5ef0a8..72d31a01 100644 --- a/pkg/node-visualizer/api/store.go +++ b/pkg/node-visualizer/api/store.go @@ -38,7 +38,7 @@ func (a *API) AddToCache(p *PollResult) error { err := a.cache.View(func(txn *badger.Txn) error { for k, v := range p.Nodes { _, err := txn.Get([]byte("nodes/" + k)) - if err != nil && errors.Is(badger.ErrKeyNotFound, err) { + if err != nil && errors.Is(err, badger.ErrKeyNotFound) { b, err := json.Marshal(v) if err != nil { return err @@ -52,7 +52,7 @@ func (a *API) AddToCache(p *PollResult) error { } for _, v := range p.Edges { _, err := txn.Get([]byte("edges/" + v.ID.URN())) - if err != nil && errors.Is(badger.ErrKeyNotFound, err) { + if err != nil && errors.Is(err, badger.ErrKeyNotFound) { b, err := json.Marshal(v) if err != nil { return err diff --git a/pkg/route-finder/store/priority_queue.go b/pkg/route-finder/store/priority_queue.go index d21c57c1..623e449e 100644 --- a/pkg/route-finder/store/priority_queue.go +++ b/pkg/route-finder/store/priority_queue.go @@ -1,6 +1,8 @@ package store -import "container/heap" +import ( + "container/heap" +) // implementation from https://rosettacode.org/wiki/Dijkstra%27s_algorithm#Go // A priorityQueue implements heap.Interface and holds Items. diff --git a/pkg/transport-discovery/api/api.go b/pkg/transport-discovery/api/api.go index 6ac2ac78..74cff6ee 100644 --- a/pkg/transport-discovery/api/api.go +++ b/pkg/transport-discovery/api/api.go @@ -103,7 +103,8 @@ func New(log logrus.FieldLogger, s store.Store, nonceStore httpauth.NonceStore, r.Get("/health", api.health) r.Get("/all-transports", api.getAllTransports) r.Delete("/transports/deregister", api.deregisterTransport) - r.Post("/statuses", func(w http.ResponseWriter, r *http.Request) { + // r.Post("/statuses", func(w http.ResponseWriter, r *http.Request) { + r.Post("/statuses", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusGone) }) diff --git a/vendor/github.com/skycoin/dmsg/pkg/dmsg/const.go b/vendor/github.com/skycoin/dmsg/pkg/dmsg/const.go index 2718c8c2..ac3e8570 100644 --- a/vendor/github.com/skycoin/dmsg/pkg/dmsg/const.go +++ b/vendor/github.com/skycoin/dmsg/pkg/dmsg/const.go @@ -4,13 +4,11 @@ package dmsg import ( "time" - "github.com/skycoin/skywire-utilities/pkg/skyenv" + "github.com/skycoin/skywire" ) // Constants. const ( - DefaultDiscAddr = skyenv.DmsgDiscAddr - DefaultMinSessions = 1 DefaultUpdateInterval = time.Minute @@ -23,3 +21,12 @@ const ( DefaultCommunityDmsgServerType = "community" ) + +// DiscAddr returns the address of the dmsg discovery +func DiscAddr(testenv bool) string { + if testenv { + return skywire.Prod.DmsgDiscovery + + } + return skywire.Test.DmsgDiscovery +} diff --git a/vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/dmsgcurl.go b/vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/dmsgcurl.go index 20bf02f4..d713115e 100644 --- a/vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/dmsgcurl.go +++ b/vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/dmsgcurl.go @@ -22,7 +22,7 @@ import ( "github.com/skycoin/dmsg/pkg/dmsghttp" ) -var json = jsoniter.ConfigFastest +var jsonite = jsoniter.ConfigFastest // DmsgCurl contains the logic for dmsgcurl (curl over dmsg). type DmsgCurl struct { @@ -58,7 +58,7 @@ func (dg *DmsgCurl) String() string { for _, fg := range dg.flagGroups() { m[fg.Name()] = fg } - j, err := json.Marshal(m) + j, err := jsonite.Marshal(m) if err != nil { panic(err) } diff --git a/vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/flags.go b/vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/flags.go index 4f07c228..4a5264c6 100644 --- a/vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/flags.go +++ b/vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/flags.go @@ -2,10 +2,11 @@ package dmsgcurl import ( + "encoding/json" "flag" + "github.com/skycoin/skywire" "github.com/skycoin/skywire-utilities/pkg/buildinfo" - "github.com/skycoin/skywire-utilities/pkg/skyenv" ) // ExecName contains the execution name. @@ -39,7 +40,14 @@ type dmsgFlags struct { func (f *dmsgFlags) Name() string { return "Dmsg" } func (f *dmsgFlags) Init(fs *flag.FlagSet) { - fs.StringVar(&f.Disc, "dmsg-disc", skyenv.DmsgDiscAddr, "dmsg discovery `URL`") + var envServices skywire.EnvServices + var services skywire.Services + if err := json.Unmarshal([]byte(skywire.ServicesJSON), &envServices); err == nil { + if err := json.Unmarshal(envServices.Prod, &services); err == nil { + f.Disc = services.DmsgDiscovery + } + } + fs.StringVar(&f.Disc, "dmsg-disc", f.Disc, "dmsg discovery `URL`") fs.IntVar(&f.Sessions, "dmsg-sessions", 1, "connect to `NUMBER` of dmsg servers") } diff --git a/vendor/github.com/skycoin/dmsg/pkg/dmsgpty/conf.go b/vendor/github.com/skycoin/dmsg/pkg/dmsgpty/conf.go index 1fda2d47..61a1a3c5 100644 --- a/vendor/github.com/skycoin/dmsg/pkg/dmsgpty/conf.go +++ b/vendor/github.com/skycoin/dmsg/pkg/dmsgpty/conf.go @@ -26,7 +26,7 @@ type Config struct { // DefaultConfig is used to populate the config struct with its default values func DefaultConfig() Config { return Config{ - DmsgDisc: dmsg.DefaultDiscAddr, + DmsgDisc: dmsg.DiscAddr(false), DmsgSessions: dmsg.DefaultMinSessions, DmsgPort: DefaultPort, CLINet: DefaultCLINet, diff --git a/vendor/github.com/skycoin/dmsg/pkg/dmsgserver/config.go b/vendor/github.com/skycoin/dmsg/pkg/dmsgserver/config.go index 27c3fb2e..396c6258 100644 --- a/vendor/github.com/skycoin/dmsg/pkg/dmsgserver/config.go +++ b/vendor/github.com/skycoin/dmsg/pkg/dmsgserver/config.go @@ -8,20 +8,24 @@ import ( "github.com/skycoin/skycoin/src/util/logging" "github.com/skycoin/skywire-utilities/pkg/cipher" - "github.com/skycoin/skywire-utilities/pkg/skyenv" + + "github.com/skycoin/dmsg/pkg/dmsg" ) const ( - defaultDiscoveryURL = skyenv.DmsgDiscAddr defaultPublicAddress = "127.0.0.1:8081" defaultLocalAddress = ":8081" defaultHTTPAddress = ":8082" + // DefaultConfigPath default path of config file DefaultConfigPath = "config.json" - // DefaultDiscoverURLTest default URL for discovery in test env - DefaultDiscoverURLTest = skyenv.TestDmsgDiscAddr ) +var defaultDiscoveryURL = dmsg.DiscAddr(false) + +// DefaultDiscoverURLTest default URL for discovery in test env +var DefaultDiscoverURLTest = dmsg.DiscAddr(true) + // Config is structure of config file type Config struct { Path string `json:"-"` diff --git a/vendor/github.com/skycoin/skywire/.dockerignore b/vendor/github.com/skycoin/skywire/.dockerignore new file mode 100644 index 00000000..c0855292 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/.dockerignore @@ -0,0 +1,5 @@ +bin +skywire +ci_scripts +apps +integration diff --git a/vendor/github.com/skycoin/skywire/.gitignore b/vendor/github.com/skycoin/skywire/.gitignore new file mode 100644 index 00000000..226f538c --- /dev/null +++ b/vendor/github.com/skycoin/skywire/.gitignore @@ -0,0 +1,76 @@ +*.exe +*.exe~ +*.dll +*.so +*.dylib +*.test +*.out +.DS_Store +*.pem + +.idea/ +.vscode/ + +./skywire.json +./build/ +build/ +./apps/ +./skywire/ +./local/* +./local*/* +./transport_logs +./dmsgpty +./rewards +./rewards/ +rewards +./pkg/visor/apps/ +./pkg/visor/bar/ +./pkg/visor/foo/ + +./bin +./node +./users.db +./hypervisor +./*-node +./*-visor +./*-cli +./*-server +./*.json +!/dmsghttp-config.json +!/services-config.json +./*.sh +./*.log + +# Ignore backup go.mod after running '/ci_scripts/go_mod_replace.sh'. +go.mod-e + +# goreleaser and frontend builds +*.deb +./packages +./deb +./sysroot +./static/skywire-manager-src/dist/* +./visor +./dist-linux +./dist +./Char +./scripts/mac_installer/IconsSkycoin.tar.gz +./scripts/mac_installer/icon_128x128.png +./scripts/mac_installer/icon_128x128@2x.png +./mac_build +./skywire-installer*.pkg +*.dmg +./scripts/mac_installer/icon.iconset/ +./releaseChangelog.md +./skywire.msi +/scripts/win_installer/build/ +goreleaser* +gh* +./musl-data +./releaseChangelog.md +./goreleaser.zip +./goreleaser + +# Fix dirty error on release +releaseChangelog.md +musl-data diff --git a/vendor/github.com/skycoin/skywire/.golangci.yml b/vendor/github.com/skycoin/skywire/.golangci.yml new file mode 100644 index 00000000..a34efe31 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/.golangci.yml @@ -0,0 +1,197 @@ +# This file contains all available configuration options +# Modified for linting cmd/ and pkg/ + +# options for analysis running +run: + # default concurrency is a available CPU number + concurrency: 4 + + # timeout for analysis, e.g. 30s, 5m, default is 1m + deadline: 3m + + # exit code when at least one issue was found, default is 1 + issues-exit-code: 1 + + # include test files or not, default is true + tests: true + + # list of build tags, all linters use it. Default is empty list. + build-tags: + + # which dirs to skip: they won't be analyzed; + # can use regexp here: generated.*, regexp is applied on full path; + # default value is empty list, but next dirs are always skipped independently + # from this option's value: + # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ + skip-dirs: + + # which files to skip: they will be analyzed, but issues from them + # won't be reported. Default value is empty list, but there is + # no need to include all autogenerated files, we confidently recognize + # autogenerated files. If it's not please let us know. + skip-files: + + # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules": + # If invoked with -mod=readonly, the go command is disallowed from the implicit + # automatic updating of go.mod described above. Instead, it fails when any changes + # to go.mod are needed. This setting is most useful to check that go.mod does + # not need updates, such as in a continuous integration and testing system. + # If invoked with -mod=vendor, the go command assumes that the vendor + # directory holds the correct copies of dependencies and ignores + # the dependency descriptions in go.mod. + modules-download-mode: vendor + + +# output configuration options +output: + # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" + format: colored-line-number + + # print lines of code with issue, default is true + print-issued-lines: true + + # print linter name in the end of issue text, default is true + print-linter-name: true + + +# all available settings of specific linters +linters-settings: + errcheck: + # report about not checking of errors in type assetions: `a := b.(MyStruct)`; + # default is false: such cases aren't reported by default. + check-type-assertions: false + + # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; + # default is false: such cases aren't reported by default. + check-blank: true + govet: + # report about shadowed variables + check-shadowing: true + + # Obtain type information from installed (to $GOPATH/pkg) package files: + # golangci-lint will execute `go install -i` and `go test -i` for analyzed packages + # before analyzing them. + # By default this option is disabled and govet gets type information by loader from source code. + # Loading from source code is slow, but it's done only once for all linters. + # Go-installing of packages first time is much slower than loading them from source code, + # therefore this option is disabled by default. + # But repeated installation is fast in go >= 1.10 because of build caching. + # Enable this option only if all conditions are met: + # 1. you use only "fast" linters (--fast e.g.): no program loading occurs + # 2. you use go >= 1.10 + # 3. you do repeated runs (false for CI) or cache $GOPATH/pkg or `go env GOCACHE` dir in CI. + use-installed-packages: false + golint: + # minimal confidence for issues, default is 0.8 + min-confidence: 0.8 + gofmt: + # simplify code: gofmt with `-s` option, true by default + simplify: true + gocyclo: + # minimal code complexity to report, 30 by default (but we recommend 10-20) + min-complexity: 10 + maligned: + # print struct with more effective memory layout or not, false by default + suggest-new: true + dupl: + # tokens count to trigger issue, 150 by default + threshold: 100 + goconst: + # minimal length of string constant, 3 by default + min-len: 3 + # minimal occurrences count to trigger, 3 by default + min-occurrences: 3 + depguard: + list-type: blacklist + include-go-root: false + packages: + - github.com/pkg/errors + misspell: + # Correct spellings using locale preferences for US or UK. + # Default is to use a neutral variety of English. + # Setting locale to US will correct the British spelling of 'colour' to 'color'. + locale: US + lll: + # max line length, lines longer will be reported. Default is 120. + # '\t' is counted as 1 character by default, and can be changed with the tab-width option + line-length: 120 + # tab width in spaces. Default to 1. + tab-width: 1 + unused: + # treat code as a program (not a library) and report unused exported identifiers; default is false. + # XXX: if you enable this setting, unused will report a lot of false-positives in text editors: + # if it's called for subdir of a project it can't find funcs usages. All text editor integrations + # with golangci-lint call it on a directory with the changed file. + check-exported: false + unparam: + # call graph construction algorithm (cha, rta). In general, use cha for libraries, + # and rta for programs with main packages. Default is cha. + algo: cha + + # Inspect exported functions, default is false. Set to true if no external program/library imports your code. + # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: + # if it's called for subdir of a project it can't find external interfaces. All text editor integrations + # with golangci-lint call it on a directory with the changed file. + check-exported: false + nakedret: + # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 + max-func-lines: 30 + prealloc: + # XXX: we don't recommend using this linter before doing performance profiling. + # For most programs usage of prealloc will be a premature optimization. + + # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. + # True by default. + simple: true + range-loops: true # Report preallocation suggestions on range loops, true by default + for-loops: false # Report preallocation suggestions on for loops, false by default + goimports: + local-prefixes: github.com/skycoin/skywire + + +linters: + enable: + - revive + - goimports + - unparam + - errcheck + - gosimple + - staticcheck + - ineffassign + - typecheck + - gosec + - megacheck + - misspell + - nakedret + enable-all: false + disable-all: true + presets: + fast: false + + +issues: + # List of regexps of issue texts to exclude, empty list by default. + # But independently from this option we use default exclude patterns, + # it can be disabled by `exclude-use-default: false`. To list all + # excluded by default patterns execute `golangci-lint run --help` + exclude: + + # Independently from option `exclude` we use default exclude patterns, + # it can be disabled by this option. To list all + # excluded by default patterns execute `golangci-lint run --help`. + # Default value for this option is true. + exclude-use-default: false + + # Maximum issues count per one linter. Set to 0 to disable. Default is 50. + max-per-linter: 0 + + # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. + max-same: 0 + + # Show only new issues: if there are unstaged changes or untracked files, + # only those changes are analyzed, else only changes in HEAD~ are analyzed. + # It's a super-useful option for integration of golangci-lint into existing + # large codebase. It's not practical to fix all existing issues at the moment + # of integration: much better don't allow issues in new code. + # Default is false. + new: false diff --git a/vendor/github.com/skycoin/skywire/.goreleaser-darwin.yml b/vendor/github.com/skycoin/skywire/.goreleaser-darwin.yml new file mode 100644 index 00000000..18b36481 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/.goreleaser-darwin.yml @@ -0,0 +1,51 @@ +# 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 +builds: + - id: skywire + binary: skywire + goos: + - darwin + goarch: + - amd64 + - arm64 + env: + - CGO_ENABLED=1 + 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}} + +archives: + - id: archive + format: tar.gz + wrap_in_directory: false + name_template: 'skywire-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' + files: + - dmsghttp-config.json + - services-config.json + builds: + - skywire + allow_different_binary_count: true + +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/vendor/github.com/skycoin/skywire/.goreleaser-linux.yml b/vendor/github.com/skycoin/skywire/.goreleaser-linux.yml new file mode 100644 index 00000000..49e680b5 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/.goreleaser-linux.yml @@ -0,0 +1,144 @@ +# 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-amd64 + binary: skywire + 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/ + 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-arm64 + binary: skywire + 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/ + 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-arm + binary: skywire + 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/ + 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-armhf + binary: skywire + 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/ + 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-riscv64 + # binary: skywire + # 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/ + # 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-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-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-arm + + - id: armhf + format: tar.gz + wrap_in_directory: false + name_template: 'skywire-v{{ .Version }}-{{ .Os }}-{{ .Arch }}hf' + files: + - dmsghttp-config.json + - services-config.json + builds: + - skywire-armhf + + # - id: riscv64 + # format: tar.gz + # wrap_in_directory: false + # name_template: 'skywire-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' + # files: + # - dmsghttp-config.json + # - services-config.json + # builds: + # - skywire-riscv64 + +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/vendor/github.com/skycoin/skywire/.goreleaser-windows.yml b/vendor/github.com/skycoin/skywire/.goreleaser-windows.yml new file mode 100644 index 00000000..fb4140b8 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/.goreleaser-windows.yml @@ -0,0 +1,53 @@ +# 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 +builds: + - id: skywire + binary: skywire + goos: + - windows + goarch: + - amd64 + - 386 + - arm64 + env: + - CGO_ENABLED=1 + 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}} + + +archives: + - id: archive + format: zip + wrap_in_directory: false + name_template: 'skywire-v{{ .Version }}-{{ .Os }}-{{ .Arch }}' + files: + - dmsghttp-config.json + - services-config.json + builds: + - skywire + allow_different_binary_count: true + +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/vendor/github.com/skycoin/skywire/CHANGELOG.md b/vendor/github.com/skycoin/skywire/CHANGELOG.md new file mode 100644 index 00000000..b520af21 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/CHANGELOG.md @@ -0,0 +1,1319 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +updates may be generated with `scripts/changelog.sh ` + + +## 1.3.23 + +- Increment minimum version requirement to v1.3.23 +- add windows arm64 archive to release [#1852](https://github.com/skycoin/skywire/pull/1852) +- fix bearer token issue [#1851](https://github.com/skycoin/skywire/pull/1851) +- fix Windows release pipeline issue [#1850](https://github.com/skycoin/skywire/pull/1850) +- update service-config.json values [#1849](https://github.com/skycoin/skywire/pull/1849) +- fix missing `skywire` command in MacOS [#1848](https://github.com/skycoin/skywire/pull/1848) +- fix datarace in hv [#1847](https://github.com/skycoin/skywire/pull/1847) +- update deps [#1846](https://github.com/skycoin/skywire/pull/1846) +- add missing dmsg:// to dmsg services addresses [#1845](https://github.com/skycoin/skywire/pull/1845) +- build constraint to ignore gotop [#1844](https://github.com/skycoin/skywire/pull/1844) + +## 1.3.22 + +- ready for release 5 [#1843](https://github.com/skycoin/skywire/pull/1843) +- ready for release 4 [#1842](https://github.com/skycoin/skywire/pull/1842) +- readey for release 3 [#1841](https://github.com/skycoin/skywire/pull/1841) +- ready to release 2 for v1.3.22 [#1840](https://github.com/skycoin/skywire/pull/1840) +- ready to release [#1839](https://github.com/skycoin/skywire/pull/1839) +- fix release pipeline issues [#1838](https://github.com/skycoin/skywire/pull/1838) +- a little change on dmsghttp-config.json [#1837](https://github.com/skycoin/skywire/pull/1837) +- replace dmsg disc public key values [#1836](https://github.com/skycoin/skywire/pull/1836) +- update deps [#1835](https://github.com/skycoin/skywire/pull/1835) +- Include more of the deployment config in the survey [#1834](https://github.com/skycoin/skywire/pull/1834) +- update dmsghttp-config.json [#1833](https://github.com/skycoin/skywire/pull/1833) +- fix: mac os build error [#1829](https://github.com/skycoin/skywire/pull/1829) +- Update Skywire Specifications document [#1827](https://github.com/skycoin/skywire/pull/1827) +- minor optimizations to reward system backend and UI [#1825](https://github.com/skycoin/skywire/pull/1825) +- Update dmsg [#1823](https://github.com/skycoin/skywire/pull/1823) +- Reward System UI improvements [#1822](https://github.com/skycoin/skywire/pull/1822) +- add heartbeat logic for stcpr and dmsg [#1821](https://github.com/skycoin/skywire/pull/1821) +- Transport setup-node request logging integration with reward system UI [#1820](https://github.com/skycoin/skywire/pull/1820) +- improve `skywire cli tp tree` [#1818](https://github.com/skycoin/skywire/pull/1818) +- improve `skywire cli tp tree` [#1817](https://github.com/skycoin/skywire/pull/1817) +- system monitor - `skywire cli visor top` [#1813](https://github.com/skycoin/skywire/pull/1813) +- More statistics for UT & dmsg discovery [#1812](https://github.com/skycoin/skywire/pull/1812) +- Reward System Documentation [#1811](https://github.com/skycoin/skywire/pull/1811) +- Update CHANGELOG.md [#1810](https://github.com/skycoin/skywire/pull/1810) + +## 1.3.21 +- Update documentation ; increment min version requirement [#1809](https://github.com/skycoin/skywire/pull/1809) +- TPD concurrency [#1808](https://github.com/skycoin/skywire/pull/1808) +- Add module to ensure the visor is transportable [#1807](https://github.com/skycoin/skywire/pull/1807) +- add systemd services [#1806](https://github.com/skycoin/skywire/pull/1806) +- Reward System UI [#1805](https://github.com/skycoin/skywire/pull/1805) +- Update skywire-services in go.mod [#1801](https://github.com/skycoin/skywire/pull/1801) +- Improve manual transport creation logic [#1800](https://github.com/skycoin/skywire/pull/1800) +- Fix `skywire cli visor route` subcommand implementation [#1798](https://github.com/skycoin/skywire/pull/1798) +- Merge develop into master after release [#1794](https://github.com/skycoin/skywire/pull/1794) +- fix skywire cli vpn command [#1791](https://github.com/skycoin/skywire/pull/1791) +- fix `go mod vendor` issue [#1784](https://github.com/skycoin/skywire/pull/1784) +- `setup-node` config gen [#1783](https://github.com/skycoin/skywire/pull/1783) +- Fix small issues [#1782](https://github.com/skycoin/skywire/pull/1782) +- fix various issues [#1781](https://github.com/skycoin/skywire/pull/1781) +- Fix some little issues before v1.3.20-rc1 [#1780](https://github.com/skycoin/skywire/pull/1780) +- Fix app launch [#1778](https://github.com/skycoin/skywire/pull/1778) +- update README [#1777](https://github.com/skycoin/skywire/pull/1777) +- Move to united binary [#1776](https://github.com/skycoin/skywire/pull/1776) +- Update skywire-services and skywire-ut [#1775](https://github.com/skycoin/skywire/pull/1775) +- IPC issue on Windows [#1771](https://github.com/skycoin/skywire/pull/1771) +- Increment minimum version requirement [#1766](https://github.com/skycoin/skywire/pull/1766) +- change app subcommand names back to full app name [#1763](https://github.com/skycoin/skywire/pull/1763) +- new ConnectedServerType in config | little improve [#1760](https://github.com/skycoin/skywire/pull/1760) +- Fix `proxy start` and `proxy stop` [#1757](https://github.com/skycoin/skywire/pull/1757) +- Fix `skywire cli config gen -pd` [#1755](https://github.com/skycoin/skywire/pull/1755) +- Improve help menus ; update vendor deps [#1752](https://github.com/skycoin/skywire/pull/1752) +- Fix setup-node help menu in skywire-deployment subcommands [#1751](https://github.com/skycoin/skywire/pull/1751) +- Merged Docs [#1750](https://github.com/skycoin/skywire/pull/1750) +- Update skywire-services and skycoin-service-discovery deps [#1749](https://github.com/skycoin/skywire/pull/1749) +- Fix flag on skysocks-client [#1748](https://github.com/skycoin/skywire/pull/1748) +- Fix skychat flag issue [#1747](https://github.com/skycoin/skywire/pull/1747) +- update skywire-deployment [#1746](https://github.com/skycoin/skywire/pull/1746) +- Add dmsg client type [#1745](https://github.com/skycoin/skywire/pull/1745) +- Update stun servers IPs [#1744](https://github.com/skycoin/skywire/pull/1744) +- `skywire cli rtree` [#1743](https://github.com/skycoin/skywire/pull/1743) +- Clean Codebase [#1740](https://github.com/skycoin/skywire/pull/1740) +- fix linux goreleaser config issues [#1739](https://github.com/skycoin/skywire/pull/1739) +- fix linux release pipeline [#1738](https://github.com/skycoin/skywire/pull/1738) +- Add skywire-deployment release archives [#1737](https://github.com/skycoin/skywire/pull/1737) +- Fix v1.3.17 survey collection [#1736](https://github.com/skycoin/skywire/pull/1736) +- Fix `skywire-cli config gen --all` [#1735](https://github.com/skycoin/skywire/pull/1735) +- Fix offline config gen [#1734](https://github.com/skycoin/skywire/pull/1734) +- Fix VPN issue on Windows [#1729](https://github.com/skycoin/skywire/pull/1729) + + +## 1.3.17 +- Add http-proxy on skysocks-client [#1728](https://github.com/skycoin/skywire/pull/1728) +- Little Improve on skywire and setup-node [#1723](https://github.com/skycoin/skywire/pull/1723) +- Improve VPN and Proxy cli command [#1722](https://github.com/skycoin/skywire/pull/1722) +- Improve Survey and Log Collection [#1721](https://github.com/skycoin/skywire/pull/1721) +- Server list optimization [#1720](https://github.com/skycoin/skywire/pull/1720) +- Fix reward calc [#1719](https://github.com/skycoin/skywire/pull/1719) +- Fix reward calculation [#1716](https://github.com/skycoin/skywire/pull/1716) +- Fix log collection panic [#1711](https://github.com/skycoin/skywire/pull/1711) +- Fix win installer script [#1706](https://github.com/skycoin/skywire/pull/1706) + +## 1.3.16 + +- fix VPN issues on CI and Windows [#1703](https://github.com/skycoin/skywire/pull/1703) +- fix logic of close app [#1702](https://github.com/skycoin/skywire/pull/1702) + +## 1.3.15 + +- Update minimum version requirement in mainnet rules [#1699](https://github.com/skycoin/skywire/pull/1699) +- `riscv64` archive structure [#1698](https://github.com/skycoin/skywire/pull/1698) +- update golangci-lint [#1697](https://github.com/skycoin/skywire/pull/1697) +- fix enable vpn server environmental variable detection for config gen [#1695](https://github.com/skycoin/skywire/pull/1695) + +## 1.3.14 + +- improve postinstall script on Mac installer [#1691](https://github.com/skycoin/skywire/pull/1691) +- add skysocks client to windows archive [#1690](https://github.com/skycoin/skywire/pull/1690) +- add missed apps to package installer [#1689](https://github.com/skycoin/skywire/pull/1689) +- correct rewards update cutoff date [#1688](https://github.com/skycoin/skywire/pull/1688) +- update dmsghttp-config.json file [#1687](https://github.com/skycoin/skywire/pull/1687) +- Update Mainnet rules minimum version requirement [#1686](https://github.com/skycoin/skywire/pull/1686) +- Rebuild Hypervisor UI [#1685](https://github.com/skycoin/skywire/pull/1685) +- Update skywire-cli README.md [#1684](https://github.com/skycoin/skywire/pull/1684) +- new flag `--confpath` on generate config [#1683](https://github.com/skycoin/skywire/pull/1683) +- improve `skywire-cli proxy` command [#1680](https://github.com/skycoin/skywire/pull/1680) +- improve `skywire-cli ut` command logic [#1679](https://github.com/skycoin/skywire/pull/1679) +- update dmsg and skywire-utilities [#1677](https://github.com/skycoin/skywire/pull/1677) +- Fix/update skywire utilities [#1676](https://github.com/skycoin/skywire/pull/1676) +- Rebuild Hypervisor UI [#1672](https://github.com/skycoin/skywire/pull/1672) +- Fix two panic issues on `skywire-cli` commands [#1671](https://github.com/skycoin/skywire/pull/1671) +- Improve UI and Backend on `reboot` and `turn off` [#1670](https://github.com/skycoin/skywire/pull/1670) + +## 1.3.10 - 1.3.13 + +- add skywire version to `skywire-cli log` [#1669](https://github.com/skycoin/skywire/pull/1669) +- `skywire-cli reward calc` [#1668](https://github.com/skycoin/skywire/pull/1668) +- fix issue fetching data from hardcoded server [#1666](https://github.com/skycoin/skywire/pull/1666) +- replace dmsgget with dmsgcurl lib [#1663](https://github.com/skycoin/skywire/pull/1663) +- Fix wrong config generation with t flag [#1661](https://github.com/skycoin/skywire/pull/1661) +- Remove Comments [#1658](https://github.com/skycoin/skywire/pull/1658) +- Develop [#1655](https://github.com/skycoin/skywire/pull/1655) +- Update minimum version requirement in mainnet rules [#1654](https://github.com/skycoin/skywire/pull/1654) +- Fix transport bandwidth logs [#1653](https://github.com/skycoin/skywire/pull/1653) +- fix `ping` command logic [#1652](https://github.com/skycoin/skywire/pull/1652) +- improve ping command output [#1651](https://github.com/skycoin/skywire/pull/1651) +- Update Mainnet rules ; increment minimum version requirement [#1650](https://github.com/skycoin/skywire/pull/1650) +- improve `skywire-cli log` command [#1648](https://github.com/skycoin/skywire/pull/1648) +- UI improvements [#1647](https://github.com/skycoin/skywire/pull/1647) +- v1.3.11 [#1645](https://github.com/skycoin/skywire/pull/1645) +- source a .conf file with skywire-cli config gen [#1644](https://github.com/skycoin/skywire/pull/1644) +- UI for turning off the visor [#1642](https://github.com/skycoin/skywire/pull/1642) +- Update dmsghttp config [#1632](https://github.com/skycoin/skywire/pull/1632) +- Use `MarkFlagsMutuallyExclusive` for `config gen -rf` and `config gen -up` [#1629](https://github.com/skycoin/skywire/pull/1629) +- [WIP] dmsghttp updater [#1628](https://github.com/skycoin/skywire/pull/1628) +- Vendor dmsg@master and replace two yamux deps [#1626](https://github.com/skycoin/skywire/pull/1626) +- `skywire-cli log` collect transport bandwidth logging for today [#1625](https://github.com/skycoin/skywire/pull/1625) +- reduce `transport_manager` timeout on module shutting down [#1624](https://github.com/skycoin/skywire/pull/1624) +- collect surveys from online visors only [#1623](https://github.com/skycoin/skywire/pull/1623) +- Improvements for the UI [#1620](https://github.com/skycoin/skywire/pull/1620) +- Add details to mainnet rules article [#1618](https://github.com/skycoin/skywire/pull/1618) +- add new flag to log command [#1617](https://github.com/skycoin/skywire/pull/1617) +- improve log collection logic [#1615](https://github.com/skycoin/skywire/pull/1615) +- update dependencies [#1614](https://github.com/skycoin/skywire/pull/1614) +- fix GitHub Action [#1613](https://github.com/skycoin/skywire/pull/1613) +- `skywire-cli config gen -r` test [#1611](https://github.com/skycoin/skywire/pull/1611) +- Limit the Skychay UI to localhost [#1605](https://github.com/skycoin/skywire/pull/1605) +- Add CSRF protection to the Hypervisor API [#1604](https://github.com/skycoin/skywire/pull/1604) +- fix dockerhub username and token [#1601](https://github.com/skycoin/skywire/pull/1601) +- Fix/makefile clean target [#1600](https://github.com/skycoin/skywire/pull/1600) +- Merge Develop to Master [#1599](https://github.com/skycoin/skywire/pull/1599) +- Add dmsghttp servers [#1597](https://github.com/skycoin/skywire/pull/1597) +- fix release issue on mac and win [#1593](https://github.com/skycoin/skywire/pull/1593) +- remove .asc file from archives of release [#1592](https://github.com/skycoin/skywire/pull/1592) +- Fix `skywire-cli config gen -r` [#1591](https://github.com/skycoin/skywire/pull/1591) +- Merge develop to master [#1589](https://github.com/skycoin/skywire/pull/1589) +- Remove pgp key previously used for survey collection on earlier versions [#1588](https://github.com/skycoin/skywire/pull/1588) +- Update Command Documentation [#1587](https://github.com/skycoin/skywire/pull/1587) +- Fix config gen logic for fetching services & erroneous app config [#1586](https://github.com/skycoin/skywire/pull/1586) +- change json of service struct to transport_setup [#1585](https://github.com/skycoin/skywire/pull/1585) +- fix wrong variable name for config gen [#1584](https://github.com/skycoin/skywire/pull/1584) + +## 1.3.9 + +- Fix `skywire-cli config gen -r` + +## 1.3.8 + +- Rebuild Hypervisor UI [#1583](https://github.com/skycoin/skywire/pull/1583) +- Change Logserver to use c.JSON method ; remove variable for endpoint name '/node-info' [#1582](https://github.com/skycoin/skywire/pull/1582) +- update changelog [#1580](https://github.com/skycoin/skywire/pull/1580) +- Add Config gen flags for survey whitelist, transport and route setup pks [#1578](https://github.com/skycoin/skywire/pull/1578) +- Fix query of the conf service [#1578](https://github.com/skycoin/skywire/pull/1578) +- Revise config gen logic / structure [#1578](https://github.com/skycoin/skywire/pull/1578) +- Fix the js mime type [#1576](https://github.com/skycoin/skywire/pull/1576) +- Fix two new panic detected [#1573](https://github.com/skycoin/skywire/pull/1573) +- Health check of log collection api prerequisite for survey & transport log collection via `skywire-cli log` [#1568](https://github.com/skycoin/skywire/pull/1568) +- Fix typo on state name [#1567](https://github.com/skycoin/skywire/pull/1567) +- Log collection by secret key [#1566](https://github.com/skycoin/skywire/pull/1566) +- Optional combined compilation of `skywire-cli` `skywire-visor` & `setup-node` binaries [#1565](https://github.com/skycoin/skywire/pull/1565) +- Fix vpn start command [#1564](https://github.com/skycoin/skywire/pull/1564) +- Solve setupnode rpc issue [#1563](https://github.com/skycoin/skywire/pull/1563) +- Remove pgp encryption of the survey [#1562](https://github.com/skycoin/skywire/pull/1562) +- Change variable name [#1561](https://github.com/skycoin/skywire/pull/1561) +- add WhitelistedPKs to services struct [#1560](https://github.com/skycoin/skywire/pull/1560) +- Survey collection whitelist [#1557](https://github.com/skycoin/skywire/pull/1557) +- Dmsgpty whitelist [#1554](https://github.com/skycoin/skywire/pull/1554) +- `make config` directive & makefile optimizations [#1549](https://github.com/skycoin/skywire/pull/1549) +- Update skywire-utilities dependency [#1546](https://github.com/skycoin/skywire/pull/1546) +- fix `skywire-cli vpn list` [#1546](https://github.com/skycoin/skywire/pull/1546) +- Randomize the order of survey collection with `skywire-cli log` [#1541](https://github.com/skycoin/skywire/pull/1541) +- Fix skywire-cli config gen -a [#1539](https://github.com/skycoin/skywire/pull/1539) +- Print version of golangci-lint with `make check` [#1538](https://github.com/skycoin/skywire/pull/1538) +- Change port logic on sudph and stcpr init - set ports for sudph and stcpr [#1534](https://github.com/skycoin/skywire/pull/1534) +- Stop UI requests when not needed ; avoid unnecessary logging [#1533](https://github.com/skycoin/skywire/pull/1533) +- Remove survey checksum [#1532](https://github.com/skycoin/skywire/pull/1532) +- Update README.md [#1531](https://github.com/skycoin/skywire/pull/1531) +- Rebuild UI [#1530](https://github.com/skycoin/skywire/pull/1530) +- Logs UI [#1528](https://github.com/skycoin/skywire/pull/1528) +- Change bin_path to apps instead build/apps [#1526](https://github.com/skycoin/skywire/pull/1526) +- Fix for survey on armv7 [#1524](https://github.com/skycoin/skywire/pull/1524) +- Fix mac installer script issue [#1523](https://github.com/skycoin/skywire/pull/1523) +- Fix arm log store panic [#1522](https://github.com/skycoin/skywire/pull/1522) + +## 1.3.7 +- Fix deps (dependabot) [#1521](https://github.com/skycoin/skywire/pull/1521) +- improve transport logic [#1519](https://github.com/skycoin/skywire/pull/1519) +- survey issue arm7 hotfix [#1518](https://github.com/skycoin/skywire/pull/1518) +- Change build path of binaries to build folder [#1516](https://github.com/skycoin/skywire/pull/1516) +- Cli refactor [#1515](https://github.com/skycoin/skywire/pull/1515) +- update readme [#1514](https://github.com/skycoin/skywire/pull/1514) +- risc-v build [#1513](https://github.com/skycoin/skywire/pull/1513) +- Bump golang.org/x/text from 0.3.7 to 0.3.8 [#1511](https://github.com/skycoin/skywire/pull/1511) +- Bump golang.org/x/net from 0.0.0-20220722155237-a158d28d115b to 0.7.0 [#1510](https://github.com/skycoin/skywire/pull/1510) +- Bump golang.org/x/crypto from 0.0.0-20210921155107-089bfa567519 to 0.1.0 [#1509](https://github.com/skycoin/skywire/pull/1509) + +## 1.3.6 +- Hot fix on Launcher panic [#1508](https://github.com/skycoin/skywire/pull/1508) +- improve logging [#1507](https://github.com/skycoin/skywire/pull/1507) +- Fix appL nil [#1506](https://github.com/skycoin/skywire/pull/1506) +- fix docker login [#1503](https://github.com/skycoin/skywire/pull/1503) + +## 1.3.5 +- build UI for v1.3.5 [#1502](https://github.com/skycoin/skywire/pull/1502) +- remove `exec` and `profile` [#1501](https://github.com/skycoin/skywire/pull/1501) +- Update change log for patch release [#1500](https://github.com/skycoin/skywire/pull/1500) +- Remove the basic terminal from the UI [#1499](https://github.com/skycoin/skywire/pull/1499) +- Improvements for the UI code [#1498](https://github.com/skycoin/skywire/pull/1498) +- log collection size limit | improve survey logic [#1496](https://github.com/skycoin/skywire/pull/1496) +- Custom Apps [#1495](https://github.com/skycoin/skywire/pull/1495) +- improve survey logic [#1489](https://github.com/skycoin/skywire/pull/1489) + +## 1.3.4 +- Uncomment Profiler [#1480](https://github.com/skycoin/skywire/pull/1480) +- update changelog [#1480](https://github.com/skycoin/skywire/pull/1480) +- update release pipeline to include skycoin.asc in release. [#1480](https://github.com/skycoin/skywire/pull/1480) +- improve survey & encrypt to skycoin.asc [#1479](https://github.com/skycoin/skywire/pull/1479) +- add key to repo for survey encryption [#1478](https://github.com/skycoin/skywire/pull/1478) +- fix for go 1.19 [#1477](https://github.com/skycoin/skywire/pull/1477) +- rebuild ui [#1476](https://github.com/skycoin/skywire/pull/1476) +- Improvements for the UI [#1471](https://github.com/skycoin/skywire/pull/1471) +- improve on survey and log collecting [#1470](https://github.com/skycoin/skywire/pull/1470) +- Hide the update options [#1469](https://github.com/skycoin/skywire/pull/1469) +- improve log collecting logic [#1466](https://github.com/skycoin/skywire/pull/1466) +- Send visor version on update uptime [#1465](https://github.com/skycoin/skywire/pull/1465) + +## 1.3.3 +- remove autopeering [#1463](https://github.com/skycoin/skywire/pull/1463) +- rebuild ui after updates [#1461](https://github.com/skycoin/skywire/pull/1461) +- Use Angular Material MDC components [#1460](https://github.com/skycoin/skywire/pull/1460) +- move from AppVeyor to Github Action [#1459](https://github.com/skycoin/skywire/pull/1459) +- update changelog with recently merged PRs [#1456](https://github.com/skycoin/skywire/pull/1456) +- added `skywire-cli skysocksc` command ; cli interface for controlling skysocks [#1455](https://github.com/skycoin/skywire/pull/1455) +- add ServiceTypeProxy to servicedisc types [#1454](https://github.com/skycoin/skywire/pull/1454) +- rebuild UI [#1453](https://github.com/skycoin/skywire/pull/1453) +- Fix for the skysocks UI [#1452](https://github.com/skycoin/skywire/pull/1452) + +## 1.3.2 +- rebuild UI [#1450](https://github.com/skycoin/skywire/pull/1450) +- Update documentation [#1448](https://github.com/skycoin/skywire/pull/1448) + +## 1.3.0 +- change transport_logs folder to 755 permissions & various similar fixes [#1447](https://github.com/skycoin/skywire/pull/1447) +- Fix warn logs [#1446](https://github.com/skycoin/skywire/pull/1446) +- move survey generation to its own goroutine [#1445](https://github.com/skycoin/skywire/pull/1445) +- rebuild UI [#1444](https://github.com/skycoin/skywire/pull/1444) +- add hypervisor UI integration for managing the reward address [#1442](https://github.com/skycoin/skywire/pull/1442) +- update mainnet rules for collecting rewards under the new system [#1443](https://github.com/skycoin/skywire/pull/1443) +- omit all language differentiating types of miners (official, DIY) from mainnet_rules.md [#1443](https://github.com/skycoin/skywire/pull/1443) +- omit references to the whitelist, which will be deprecated, from mainnet_rules.md [#1443](https://github.com/skycoin/skywire/pull/1443) +- add description of reward tiers to mainnet_rules.md [#1443](https://github.com/skycoin/skywire/pull/1443) +- add description of how the new reward system will work to mainnet_rules.md [#1443](https://github.com/skycoin/skywire/pull/1443) +- Increment minimum required skywire version for rewards to 1.3.0 in mainnet_rules.md [#1443](https://github.com/skycoin/skywire/pull/1443) +- Fix delete reward file [#1441](https://github.com/skycoin/skywire/pull/1441) +- Show reward address on autoconfig [#1441](https://github.com/skycoin/skywire/pull/1441) +- disable public autoconnect logic for `config gen -b` [#1440](https://github.com/skycoin/skywire/pull/1440) +- Add changelog generation script [#1439](https://github.com/skycoin/skywire/pull/1439) +- Fix GetRewardAddress API [#1438](https://github.com/skycoin/skywire/pull/1438) +- fix release issues [#1432](https://github.com/skycoin/skywire/pull/1432) [#1434](https://github.com/skycoin/skywire/pull/1434) [#1433](https://github.com/skycoin/skywire/pull/1433) +- built tag for non-systray skywire-visor [#1429](https://github.com/skycoin/skywire/pull/1429) +- visor test subcommand [#1428](https://github.com/skycoin/skywire/pull/1428) +- Update to Angular 15 [#1426](https://github.com/skycoin/skywire/pull/1426) +- Hot fix on DNS [#1425](https://github.com/skycoin/skywire/pull/1425) +- update dmsg@develop [#1423](https://github.com/skycoin/skywire/pull/1423) +- Selected DMSG Server [#1422](https://github.com/skycoin/skywire/pull/1422) +- Integrated Autoconfig [#1417](https://github.com/skycoin/skywire/pull/1417) +- Update Angular to v14.2.11 [#1416](https://github.com/skycoin/skywire/pull/1416) +- skywire-cli log collecting command [#1414](https://github.com/skycoin/skywire/pull/1414) +- App/Services showing ports subcommand `skywire-cli visor ports` [#1412](https://github.com/skycoin/skywire/pull/1412) +- skywire app example [#1409](https://github.com/skycoin/skywire/pull/1409) +- `skywire-cli doc` command & cli documentation update [#1408](https://github.com/skycoin/skywire/pull/1408) +- fixing skywire-cli reward freezing issue [#1407](https://github.com/skycoin/skywire/pull/1407) +- Improve readme documentation [#1406](https://github.com/skycoin/skywire/pull/1406) +- Add cli command visor ping and test [#1405](https://github.com/skycoin/skywire/pull/1405) +- build ui [#1403](https://github.com/skycoin/skywire/pull/1403) +- fix `make format check` errors [#1401](https://github.com/skycoin/skywire/pull/1401) +- Fix control visor apps from hv [#1399](https://github.com/skycoin/skywire/pull/1399) +- Bug fixes for the UI [#1398](https://github.com/skycoin/skywire/pull/1398) +- run as systray flag `--systray` [#1396](https://github.com/skycoin/skywire/pull/1396) +- fix panic and datarace [#1394](https://github.com/skycoin/skywire/pull/1394) +- Printing new IP after connecting to VPN in CLI [#1393](https://github.com/skycoin/skywire/pull/1393) +- Add display node ip field to the main config [#1392](https://github.com/skycoin/skywire/pull/1392) +- re-implement setting reward address [#1391](https://github.com/skycoin/skywire/pull/1391) +- skywire-cli terminal user interface improvements [#1390](https://github.com/skycoin/skywire/pull/1390) +- improve `skywire-cli vpn` subcommand [#1389](https://github.com/skycoin/skywire/pull/1389) +- Fix transport logging [#1386](https://github.com/skycoin/skywire/pull/1386) +- fix cli config priv flags [#1384](https://github.com/skycoin/skywire/pull/1384) +- Add param customCommand for PtyUI.Handler [#1383](https://github.com/skycoin/skywire/pull/1383) +- add Info field to Service struct [#1382](https://github.com/skycoin/skywire/pull/1382) +- Add DNS to TUN, in VPN-Client [#1381](https://github.com/skycoin/skywire/pull/1381) +- Improve systray VPN button initialization [#1380](https://github.com/skycoin/skywire/pull/1380) +- fix privacyjson [#1379](https://github.com/skycoin/skywire/pull/1379) +- Update transport file logging [#1376](https://github.com/skycoin/skywire/pull/1376) +- Update LocalIPs field in model Service [#1375](https://github.com/skycoin/skywire/pull/1375) +- expose dmsghttp server [#1374](https://github.com/skycoin/skywire/pull/1374) +- Fix negative waitgroup [#1372](https://github.com/skycoin/skywire/pull/1372) +- `skywire-cli config priv` subcommand [#1369](https://github.com/skycoin/skywire/pull/1369) +- fix absence of git in makefile [#1368](https://github.com/skycoin/skywire/pull/1368) +- Fix rpc error in cli for json [#1367](https://github.com/skycoin/skywire/pull/1367) +- Fix StartVPNCient logic [#1366](https://github.com/skycoin/skywire/pull/1366) + +## 1.2.0 + +### Added +- `skywire-cil visor hv` subcommand [#1390](https://github.com/skycoin/skywire/pull/1390) +- info field to Service struct [#1382](https://github.com/skycoin/skywire/pull/1382) +- `skywire-cli` subcommand `arg` under `visor app` [#1356](https://github.com/skycoin/skywire/pull/1356) +- `log_store` field to `transport` in config [#1386](https://github.com/skycoin/skywire/pull/1386) +- `type`, `location`, `rotation_interval`, field to `log_store` inside `transport` in config [#1374](https://github.com/skycoin/skywire/pull/1374) +- transport file logging to CSV [#1374](https://github.com/skycoin/skywire/pull/1374) +- `skywire-cli config priv` & `skywire-cli visor priv` subcommands and rpc [#1369](https://github.com/skycoin/skywire/issues/1369) +- dmsghttp server [#1364](https://github.com/skycoin/skywire/issues/1364) +- `display_node_ip` field to `launcher` in config [#1392](https://github.com/skycoin/skywire/pull/1392) + +### Changed +- moved `skywire-cli visor` subcommands into `skywire-cil visor hv` [#1390](https://github.com/skycoin/skywire/pull/1390) +- use flags for `skywire-cli visor route` & `skywire-cli visor tp` [#1390](https://github.com/skycoin/skywire/pull/1390) +- moved `skywire-cli` subcommand `autoconnect` from `visor app` to `visor app arg` [#1356](https://github.com/skycoin/skywire/pull/1356) + +### Fixed +- negative waitgroup [#1372](https://github.com/skycoin/skywire/pull/1372) +- absence of git in makefile [#1368](https://github.com/skycoin/skywire/pull/1368) +- rpc error in cli for json [#1367](https://github.com/skycoin/skywire/pull/1367) +- StartVPNCient logic [#1366](https://github.com/skycoin/skywire/pull/1366) + +## 1.1.0 + +### Added + +- `skywire-cli` global flag `--json` [#1346](https://github.com/skycoin/skywire/pull/1346) +- service discovery query filtering for `skywire-cli vpn list` [#1337](https://github.com/skycoin/skywire/pull/1337) +- `skywire-cli vpn` subcommands [#1317](https://github.com/skycoin/skywire/pull/1317) +- separate systray application which uses `skywire-cli vpn` subcommands [#1317](https://github.com/skycoin/skywire/pull/1317) +- port of the autopeering system from skybian to the skywire source code. [#1309](https://github.com/skycoin/skywire/pull/1309) +- `-l --hvip` and `-m --autopeer` flags for `skywire-visor` ; connect to a hypervisor by ip address. [#1309](https://github.com/skycoin/skywire/pull/1309) +- `skywire-cli visor pk -w` flag ; http endpoint for visor public key [#1309](https://github.com/skycoin/skywire/pull/1309) +- `-y --autoconn` and `-z --ispublic` flags for `skywire-cli config gen` [#1319](https://github.com/skycoin/skywire/pull/1319) +- error packet to routes to propagate route errors [#1181](https://github.com/skycoin/skywire/issues/1181) +- `skywire-cli chvpk` subcommand to list remote hypervisor(s) a visor is currently connected to [#1306](https://github.com/skycoin/skywire/issues/1306) +- pong packet to send as a response to ping to calculate latency [#1261](https://github.com/skycoin/skywire/issues/1261) +- store UI settings per hypervisor key [#1329](https://github.com/skycoin/skywire/pull/1329) + +### Changed + +- `skywire-cli visor route add-rule` subcommands [#1346](https://github.com/skycoin/skywire/pull/1346) +- Autopeer on env `AUTOPEER=1` +- improve UI reaction while system is busy +- hide password options in UI if authentication is disabled +- fix freezing hypervisor UI on hypervisor disconnection [#1321](https://github.com/skycoin/skywire/issues/1321) +- fix route setup hooks to check if transport to remote is established [#1297](https://github.com/skycoin/skywire/issues/1297) +- rename network probe packet to ping [#1261](https://github.com/skycoin/skywire/issues/1261) +- added Value/Scan method to SWAddr for using in DB directly +- added new fields (ID, CreatedAT) to Service type for using in DB directly +- fixed entrypoint.sh for Dockerfile [#1336](https://github.com/skycoin/skywire/pull/1336) + +### Removed + +- `skywire-cli visor tp add` flag `--public` [#1346](https://github.com/skycoin/skywire/pull/1346) +- remove updater settings from UI + +### Fixed +- UI update button [#1349](https://github.com/skycoin/skywire/pull/1349) + +## 1.0.0 + +### Added + +- `skywire-cli hv` subcommands for opening the various UIs or printing links to them (HVUI, VPNUI, DMSGPTYUI) [#1270](https://github.com/skycoin/skywire/pull/1270) +- added `add-rhv` and `disable-rhv` flags to `skywire-visor` for adding remote hypervisor PK and disable remote hypervisor PK(s) on config file [#1113](https://github.com/skycoin/skywire/pull/1113) +- shorthand flags for commands [#1151](https://github.com/skycoin/skywire/pull/1151) +- blue & white color scheme with coloredcobra [#1151](https://github.com/skycoin/skywire/pull/1151) +- ascii art text modal of program name to help menus [#1151](https://github.com/skycoin/skywire/pull/1151) +- `--all` flag to skywire-cli & visor to show extra flags [#1151](https://github.com/skycoin/skywire/pull/1151) +- `skywire-cli config gen -n --stdout` write config to stdout [#1151](https://github.com/skycoin/skywire/pull/1151) +- `skywire-cli config gen -w, --hide` dont print the config to the terminal [#1151](https://github.com/skycoin/skywire/pull/1151) +- `skywire-cli config gen --print` parse test ; read config from file & print [#1151](https://github.com/skycoin/skywire/pull/1151) +- `skywire-cli config gen -a, --url` services conf (default "conf.skywire.skycoin.com") [#1151](https://github.com/skycoin/skywire/pull/1151) +- fetch service from endpoint [#1151](https://github.com/skycoin/skywire/pull/1151) +- `skywire-cli visor app` app settings command [#1132](https://github.com/skycoin/skywire/pull/1132) +- `skywire-cli visor route` view and set rules command [#1132](https://github.com/skycoin/skywire/pull/1132) +- `skywire-cli visor tp` view and set transports command [#1132](https://github.com/skycoin/skywire/pull/1132) +- `skywire-cli visor vpn` vpn interface command [#1132](https://github.com/skycoin/skywire/pull/1132) +- root permissions detection +- error on different version config / visor +- display update command on config version error +- support for piping config generated by skywire-cli to skywire-visor via stdin [#1147](https://github.com/skycoin/skywire/pull/1147) +- support for detecting skywire version when `go run` +- `run-vpnsrv` makefile directive [#1147](https://github.com/skycoin/skywire/pull/1147) +- `run-source-test` makefile directive [#1147](https://github.com/skycoin/skywire/pull/1147) +- `run-vpnsrv-test` makefile directive [#1147](https://github.com/skycoin/skywire/pull/1147) +- `run-source-dmsghttp` makefile directive [#1147](https://github.com/skycoin/skywire/pull/1147) +- `run-source-dmsghttp-test` makefile directive [#1147](https://github.com/skycoin/skywire/pull/1147) +- `run-vpnsrv-dmsghttp` makefile directive [#1147](https://github.com/skycoin/skywire/pull/1147) +- `run-vpnsrv -dmsghttp-test` makefile directive [#1147](https://github.com/skycoin/skywire/pull/1147) +- `install-system-linux` and `install-system-linux-systray` makefile directives [#1180](https://github.com/skycoin/skywire/pull/1180) +- `skywire-cli dmsgpty list` to view of connected remote visor to hypervisor [#1250](https://github.com/skycoin/skywire/pull/1250) +- `skywire-cli dmsgpty start ` to connect through dmsgpty to remote visor [#1250](https://github.com/skycoin/skywire/pull/1250) +- `make win-installer-latest` to create installer for latest version of released, not pre-release. +- `trace` log level is added +- `--log-level` flag to generate and update config by `skywire-cli` + +### Changed +- remove dsmghttp migration to skywire-visor starting +- only support current version of config +- config version reflects current visor version (`1.0.0`) +- refine and restructure help commands user interface +- shorthand flags for commands +- group skywire-cli visor subcommands +- hide excess flags +- make help text fit within default 80x24 terminal +- rename `skywire-cli config gen -r --replace` flag to `-r --regen` +- remove config path from V1 struct +- remove all instance of the visor writing to the config file except via api +- remove path to dmsghttp-config.json from config +- revise versioning +- move to skyenv +- remove transports cache from visor initialization and check them before make route +- `run-source` makefile directive write config to stdout & read config from stdin +- fixed skywire-visor uses skywire-config.json (default config name) without needing to specify +- `make win-installer` need new argument `CUSTOM_VERSION` to get make installer for this version, use for pre-releases +- changed the log levels of most of the logs making info level clutter free + +### Removed + +- inbuilt updater ; instead use packages and the system package manger for installation and updates [#1251](https://github.com/skycoin/skywire/pull/1251) + +## 0.6.0 + + +### Added + +- added `update` and `summary` as subcommand to `skywire-cli visor` +- added multiple new flag to update configuration in `skywire-cli config update` +- added shell autocompletion command to `skywire-cli` and `skywire-visor` +- added `dsmgHTTPStruct` in visorconfig pkg to usable other repos, such as `skybian` +- added `dmsghttp-config.json` which contains the `dmsg-urls` of services and info of `dmsg-servers` for both prod and test +- added `servers` filed to `dmsg` in config +- added `-d,--dmsghttp` flag to `skywire-cli config gen` +- added `dmsgdirect` client to connect to services over dmsg +- added `-f` flag to skywire-visor to configure a visor to expose hypervisor UI with default values at runtime +- added `--public-rpc` falg to `skywire-cli config gen` +- added `--vpn-server-enable` falg to `skywire-cli config gen` +- added `--os` flag to `skywire-cli config gen` +- added `--disable-apps` flag to `skywire-cli config gen` +- added `--disable-auth` and `--enable-auth` flags to `skywire-cli config gen` +- added `--best-protocol` flag to `skywire-cli config gen` +- added `skywire-cli visor vpn-ui` and `skywire-cli visor vpn-url` commands +- added dsmghttp migration to skywire-visor starting +- added network monitor PKs to skyenv + +### Changed + +- detecting OS in runtime removed +- skybian flag `-s` removed from `skywire-cli config gen` +- migrate updating logic to debian package model + +## 0.5.0 + +### Added + +- added persistent_transports field to the config and UI +- added stun_servers field to the config +- added is_public field to root section +- added public_autoconnect field to transport section +- added transport_setup_nodes field to transport section +- added MinHops field to V1Routing section of config +- added `skywire-cli config` subcommand +- added connection_duration field to `/api/visor/{pk}/apps/vpn-client/connections` + +### Changed + +- config updated to `v1.1.0` +- removed public_trusted_visor field from root section +- removed trusted_visors field from transport section +- removed authorization_file field from dmsgpty section +- changed default urls to newer shortned ones +- changed proxy_discovery_addr field to service_discovery +- updated UI +- removed `--public` flag from `skywire-cli visor add-tp` command +- removed `skywire-cli visor gen-config` and `skywire-cli visor update-config` subcommands. +- replaced stcp field to skywire-tcp in config and comments +- replaced local_address field to listening_address in config +- replaced port field to dmsg_port in config +- updated visor health status checks, no longer querying multiple external services endpoints. + +## 0.2.1 - 2020.04.07 + +### Changed + +- reverted port changes for `skysocks-client` + +## 0.2.0 - 2020.04.02 + +### Added + +- added `--retain-keys` flag to `skywire-cli visor gen-config` command +- added `--secret-key` flag to `skywire-cli visor gen-config` command +- added hypervisorUI frontend +- added default values for visor if certain fields of config are empty + +### Fixed + +- fixed deployment route finder HTTP request +- fixed /user endpoint not working when auth is disabled + +### Changed + +- changed port of hypervisorUI and applications +- replaced unix sockets for app to visor communication to tcp sockets +- reverted asynchronous sending of router packets + +## 0.1.0 - 2020.04.02 + +First release of Skywire Mainnet. + + +## COMPLETE LOG +- improve survey [#1479](https://github.com/skycoin/skywire/pull/1479) +- add key to repo for survey encryption [#1478](https://github.com/skycoin/skywire/pull/1478) +- fix for go 1.19 [#1477](https://github.com/skycoin/skywire/pull/1477) +- rebuild ui [#1476](https://github.com/skycoin/skywire/pull/1476) +- Improvements for the UI [#1471](https://github.com/skycoin/skywire/pull/1471) +- improve on survey and log collecting [#1470](https://github.com/skycoin/skywire/pull/1470) +- Hide the update options [#1469](https://github.com/skycoin/skywire/pull/1469) +- improve log collecting logic [#1466](https://github.com/skycoin/skywire/pull/1466) +- Send visor version on update uptime [#1465](https://github.com/skycoin/skywire/pull/1465) +- remove autopeering [#1463](https://github.com/skycoin/skywire/pull/1463) +- rebuild ui after updates [#1461](https://github.com/skycoin/skywire/pull/1461) +- Use Angular Material MDC components [#1460](https://github.com/skycoin/skywire/pull/1460) +- move from AppVeyor to Github Action [#1459](https://github.com/skycoin/skywire/pull/1459) +- update changelog with recently merged PRs [#1456](https://github.com/skycoin/skywire/pull/1456) +- skysocksc command [#1455](https://github.com/skycoin/skywire/pull/1455) +- add ServiceTypeProxy to servicedisc types [#1454](https://github.com/skycoin/skywire/pull/1454) +- rebuild UI [#1453](https://github.com/skycoin/skywire/pull/1453) +- Fix for the skysocks UI [#1452](https://github.com/skycoin/skywire/pull/1452) +- rebuild UI [#1450](https://github.com/skycoin/skywire/pull/1450) +- Update documentation [#1448](https://github.com/skycoin/skywire/pull/1448) +- change transport_logs folder to 755 permissions [#1447](https://github.com/skycoin/skywire/pull/1447) +- Fix warn logs [#1446](https://github.com/skycoin/skywire/pull/1446) +- move survey generation to its own goroutine [#1445](https://github.com/skycoin/skywire/pull/1445) +- rebuild UI [#1444](https://github.com/skycoin/skywire/pull/1444) +- update mainnet rules for collecting rewards under the new system [#1443](https://github.com/skycoin/skywire/pull/1443) +- UI for managing the reward addresses [#1442](https://github.com/skycoin/skywire/pull/1442) +- Fix delete reward file ; show reward address on autoconfig [#1441](https://github.com/skycoin/skywire/pull/1441) +- disable public autoconnect logic for `config gen -b` [#1440](https://github.com/skycoin/skywire/pull/1440) +- update changelog & add changelog generation script [#1439](https://github.com/skycoin/skywire/pull/1439) +- Fix GetRewardAddress API [#1438](https://github.com/skycoin/skywire/pull/1438) +- mac release issue [#1434](https://github.com/skycoin/skywire/pull/1434) +- fix Mac/Windows release issue [#1433](https://github.com/skycoin/skywire/pull/1433) +- fix release issues [#1432](https://github.com/skycoin/skywire/pull/1432) +- built tag for non-systray skywire-visor [#1429](https://github.com/skycoin/skywire/pull/1429) +- Little Change on visor test subcommand [#1428](https://github.com/skycoin/skywire/pull/1428) +- Update to Angular 15 [#1426](https://github.com/skycoin/skywire/pull/1426) +- [WIP] Hot fix on DNS [#1425](https://github.com/skycoin/skywire/pull/1425) +- update dmsg@develop [#1423](https://github.com/skycoin/skywire/pull/1423) +- Selected DMSG Server [#1422](https://github.com/skycoin/skywire/pull/1422) +- Integrated Autoconfig [#1417](https://github.com/skycoin/skywire/pull/1417) +- Update Angular to v14.2.11 [#1416](https://github.com/skycoin/skywire/pull/1416) +- skywire-cli log collecting command [#1414](https://github.com/skycoin/skywire/pull/1414) +- [WIP] App/Services showing ports subcommand `skywire-cli visor ports` [#1412](https://github.com/skycoin/skywire/pull/1412) +- Feat/skywire app example [#1409](https://github.com/skycoin/skywire/pull/1409) +- `skywire-cli doc` command & cli documentation update [#1408](https://github.com/skycoin/skywire/pull/1408) +- fixing skywire-cli reward freezing issue [#1407](https://github.com/skycoin/skywire/pull/1407) +- Improve readme documentation [#1406](https://github.com/skycoin/skywire/pull/1406) +- Add cli command visor ping and test [#1405](https://github.com/skycoin/skywire/pull/1405) +- build ui [#1403](https://github.com/skycoin/skywire/pull/1403) +- fix `make format check` errors [#1401](https://github.com/skycoin/skywire/pull/1401) +- Fix control visor apps from hv [#1399](https://github.com/skycoin/skywire/pull/1399) +- Bug fixes for the UI [#1398](https://github.com/skycoin/skywire/pull/1398) +- run as systray flag `--systray` [#1396](https://github.com/skycoin/skywire/pull/1396) +- Fix/panic and datarace [#1394](https://github.com/skycoin/skywire/pull/1394) +- Printing new IP after connecting to VPN in CLI [#1393](https://github.com/skycoin/skywire/pull/1393) +- Add display node ip field to the main config [#1392](https://github.com/skycoin/skywire/pull/1392) +- re-implement setting reward address [#1391](https://github.com/skycoin/skywire/pull/1391) +- skywire-cli terminal user interface improvements [#1390](https://github.com/skycoin/skywire/pull/1390) +- improve `skywire-cli vpn` subcommand [#1389](https://github.com/skycoin/skywire/pull/1389) +- Fix transport logging [#1386](https://github.com/skycoin/skywire/pull/1386) +- Fix/cli config priv flags [#1384](https://github.com/skycoin/skywire/pull/1384) +- Add param customCommand for PtyUI.Handler [#1383](https://github.com/skycoin/skywire/pull/1383) +- add Info field to Service struct [#1382](https://github.com/skycoin/skywire/pull/1382) +- Add DNS to TUN, in VPN-Client [#1381](https://github.com/skycoin/skywire/pull/1381) +- Improve systray VPN button initialization [#1380](https://github.com/skycoin/skywire/pull/1380) +- Fix/privacyjson [#1379](https://github.com/skycoin/skywire/pull/1379) +- Update transport file logging [#1376](https://github.com/skycoin/skywire/pull/1376) +- Update LocalIPs field in model Service [#1375](https://github.com/skycoin/skywire/pull/1375) +- Feat/expose dmsghttp server [#1374](https://github.com/skycoin/skywire/pull/1374) +- Fix negative waitgroup [#1372](https://github.com/skycoin/skywire/pull/1372) +- `skywire-cli config priv` subcommand [#1369](https://github.com/skycoin/skywire/pull/1369) +- Fix/absence of git in makefile [#1368](https://github.com/skycoin/skywire/pull/1368) +- Fix rpc error in cli for json [#1367](https://github.com/skycoin/skywire/pull/1367) +- Fix StartVPNCient logic [#1366](https://github.com/skycoin/skywire/pull/1366) +- Fix the auth problems with the UI [#1358](https://github.com/skycoin/skywire/pull/1358) +- Add app arg cli subcommand [#1356](https://github.com/skycoin/skywire/pull/1356) +- Update/Add README.md for Mac/Win build installer script [#1355](https://github.com/skycoin/skywire/pull/1355) +- Fix/cli json [#1354](https://github.com/skycoin/skywire/pull/1354) +- forgotten build-ui [#1350](https://github.com/skycoin/skywire/pull/1350) +- Fix UI update button [#1349](https://github.com/skycoin/skywire/pull/1349) +- Update to Angular 14 [#1347](https://github.com/skycoin/skywire/pull/1347) +- Feat/cli json output [#1346](https://github.com/skycoin/skywire/pull/1346) +- update appveyor.yml [#1345](https://github.com/skycoin/skywire/pull/1345) +- update golangci-lint & goimports-reviser ; fix `make format check` errors [#1343](https://github.com/skycoin/skywire/pull/1343) +- enable autopeering via environmental variable [#1342](https://github.com/skycoin/skywire/pull/1342) +- fix autopeering [#1339](https://github.com/skycoin/skywire/pull/1339) +- Update documentation [#1338](https://github.com/skycoin/skywire/pull/1338) +- service discovery query filtering [#1337](https://github.com/skycoin/skywire/pull/1337) +- Fix/dockerfile arg [#1336](https://github.com/skycoin/skywire/pull/1336) +- Modifying SWAddr and Service for Service Discovery PG Migration [#1334](https://github.com/skycoin/skywire/pull/1334) +- Fix/changelog [#1333](https://github.com/skycoin/skywire/pull/1333) +- Save data in the UI per Hypervisor PK [#1329](https://github.com/skycoin/skywire/pull/1329) +- Add changelog for various PRs [#1328](https://github.com/skycoin/skywire/pull/1328) +- Fix/vpn server client close logs [#1325](https://github.com/skycoin/skywire/pull/1325) +- fixing freezing hypervisor UI [#1323](https://github.com/skycoin/skywire/pull/1323) +- `skywire-cli config gen` flags [#1319](https://github.com/skycoin/skywire/pull/1319) +- Several improvements for the UI [#1318](https://github.com/skycoin/skywire/pull/1318) +- `skywire-cli vpn` subcommands + separate-systray [#1317](https://github.com/skycoin/skywire/pull/1317) +- Fix/disable keepalives [#1315](https://github.com/skycoin/skywire/pull/1315) +- get connected hypervisors [#1313](https://github.com/skycoin/skywire/pull/1313) +- Fix/vm naming [#1311](https://github.com/skycoin/skywire/pull/1311) +- fix `halt` command [#1310](https://github.com/skycoin/skywire/pull/1310) +- auto-peering visors to the hypervisor (skybian) [#1309](https://github.com/skycoin/skywire/pull/1309) +- Vendor [#1304](https://github.com/skycoin/skywire/pull/1304) +- Vendore new PK for network monitor [#1302](https://github.com/skycoin/skywire/pull/1302) +- Add Ping and Pong latency packets [#1300](https://github.com/skycoin/skywire/pull/1300) +- Skip auto-transport when transport available [#1299](https://github.com/skycoin/skywire/pull/1299) +- v1.0.0 [#1290](https://github.com/skycoin/skywire/pull/1290) +- fix caching issue [#1288](https://github.com/skycoin/skywire/pull/1288) +- Fix nil pointer error on dmsghttp config with offline stun server [#1285](https://github.com/skycoin/skywire/pull/1285) +- Fix/vpn server offline error [#1284](https://github.com/skycoin/skywire/pull/1284) +- fix nil pointer error for `skywire-cli config gen --all` [#1282](https://github.com/skycoin/skywire/pull/1282) +- update dmsg@develop [#1281](https://github.com/skycoin/skywire/pull/1281) +- update dmsghttp values [#1280](https://github.com/skycoin/skywire/pull/1280) +- Fix/vendor utilities [#1276](https://github.com/skycoin/skywire/pull/1276) +- Fix/systray deps [#1275](https://github.com/skycoin/skywire/pull/1275) +- fix cap problem (rootless vpn-client) [#1273](https://github.com/skycoin/skywire/pull/1273) +- New update procedure for the UI [#1271](https://github.com/skycoin/skywire/pull/1271) +- add skywire-cli subcommands [#1270](https://github.com/skycoin/skywire/pull/1270) +- Add Windows Installer Job to AppVeyor [#1269](https://github.com/skycoin/skywire/pull/1269) +- Fix/false positive app err logs [#1268](https://github.com/skycoin/skywire/pull/1268) +- fix systray xfce [#1267](https://github.com/skycoin/skywire/pull/1267) +- improve public autoconnect module [#1266](https://github.com/skycoin/skywire/pull/1266) +- Fix/dirty fix negative latency [#1263](https://github.com/skycoin/skywire/pull/1263) +- Fix single vpn-server conn issue [#1262](https://github.com/skycoin/skywire/pull/1262) +- remove setup node from archives [#1260](https://github.com/skycoin/skywire/pull/1260) +- Fix/draft prerelease [#1259](https://github.com/skycoin/skywire/pull/1259) +- Fix vpn server [#1258](https://github.com/skycoin/skywire/pull/1258) +- make build-ui changes [#1257](https://github.com/skycoin/skywire/pull/1257) +- Improve Windows Installer Script [#1253](https://github.com/skycoin/skywire/pull/1253) +- Clean logs [#1252](https://github.com/skycoin/skywire/pull/1252) +- remove updater [#1251](https://github.com/skycoin/skywire/pull/1251) +- add `dmsgpty-cli` to `skywire-cli` [#1250](https://github.com/skycoin/skywire/pull/1250) +- fix appveyor branches issue [#1249](https://github.com/skycoin/skywire/pull/1249) +- AppVeyor push tag jobs [#1248](https://github.com/skycoin/skywire/pull/1248) +- Fix/auto transport logic [#1247](https://github.com/skycoin/skywire/pull/1247) +- Remove the terminal button [#1245](https://github.com/skycoin/skywire/pull/1245) +- MacOS Installer Package [#1242](https://github.com/skycoin/skywire/pull/1242) +- Fix updater [WIP] [#1241](https://github.com/skycoin/skywire/pull/1241) +- Remove the update and restart buttons [#1239](https://github.com/skycoin/skywire/pull/1239) +- Fix dmsg tracker [#1238](https://github.com/skycoin/skywire/pull/1238) +- Fix stun client datarace [#1237](https://github.com/skycoin/skywire/pull/1237) +- Improvements for the VPN UI status [#1235](https://github.com/skycoin/skywire/pull/1235) +- update cli & visor documentation [#1232](https://github.com/skycoin/skywire/pull/1232) +- Docs/systray [#1228](https://github.com/skycoin/skywire/pull/1228) +- Fix vpn-server close err [#1227](https://github.com/skycoin/skywire/pull/1227) +- manipulate goreleaser and appveyor for release from appveyor [#1226](https://github.com/skycoin/skywire/pull/1226) +- Fix the VPN UI [#1225](https://github.com/skycoin/skywire/pull/1225) +- `--binpath` flag [#1223](https://github.com/skycoin/skywire/pull/1223) +- Fix vpn reconnecting status [#1222](https://github.com/skycoin/skywire/pull/1222) +- make build-ui for rc4 [#1218](https://github.com/skycoin/skywire/pull/1218) +- Fix wrong status [#1217](https://github.com/skycoin/skywire/pull/1217) +- Make the UI work with the new app statuses [#1215](https://github.com/skycoin/skywire/pull/1215) +- Make app-status generic [#1213](https://github.com/skycoin/skywire/pull/1213) +- Fix/vpn server close [#1212](https://github.com/skycoin/skywire/pull/1212) +- Fix/app state [#1210](https://github.com/skycoin/skywire/pull/1210) +- Fix vpn status [#1208](https://github.com/skycoin/skywire/pull/1208) +- Fix the VPN status in the UI [#1204](https://github.com/skycoin/skywire/pull/1204) +- Fix systray nil pointer and data race [#1203](https://github.com/skycoin/skywire/pull/1203) +- Fix nil pointer dereference in Proc on windows [#1201](https://github.com/skycoin/skywire/pull/1201) +- Fix config gen -x flag [#1200](https://github.com/skycoin/skywire/pull/1200) +- Build UI for RC2 [#1195](https://github.com/skycoin/skywire/pull/1195) +- Fix config fallback in cli [#1193](https://github.com/skycoin/skywire/pull/1193) +- Update changelog [#1191](https://github.com/skycoin/skywire/pull/1191) +- Get gorleaser ready for systray app [#1189](https://github.com/skycoin/skywire/pull/1189) +- Fix/vpn stats [#1184](https://github.com/skycoin/skywire/pull/1184) +- Fix Systray on Linux [#1183](https://github.com/skycoin/skywire/pull/1183) +- add `install-system-linux` makefile directives [#1180](https://github.com/skycoin/skywire/pull/1180) +- Improve Windows Installer [#1179](https://github.com/skycoin/skywire/pull/1179) +- fix visor uses default config with no arguments [#1176](https://github.com/skycoin/skywire/pull/1176) +- Fix/module error [#1175](https://github.com/skycoin/skywire/pull/1175) +- Use logging package from skycoin for retrier [#1173](https://github.com/skycoin/skywire/pull/1173) +- Add early shutdown [#1171](https://github.com/skycoin/skywire/pull/1171) +- fix permissions check [#1170](https://github.com/skycoin/skywire/pull/1170) +- Fix/close vpn conn gracefully [#1168](https://github.com/skycoin/skywire/pull/1168) +- Switch systray repo [#1166](https://github.com/skycoin/skywire/pull/1166) +- Move ut client from internal to pkg [#1164](https://github.com/skycoin/skywire/pull/1164) +- own goroutine for dmsg trackers [#1160](https://github.com/skycoin/skywire/pull/1160) +- Fix config update [#1159](https://github.com/skycoin/skywire/pull/1159) +- Add a netifc field in the UI for configuring the VPN server [#1158](https://github.com/skycoin/skywire/pull/1158) +- Fix version check [#1157](https://github.com/skycoin/skywire/pull/1157) +- fixing VPN server problem with multiple network interface [#1156](https://github.com/skycoin/skywire/pull/1156) +- Change `-p --pkg` flags for config gen and visor [#1155](https://github.com/skycoin/skywire/pull/1155) +- various small fixes [#1151](https://github.com/skycoin/skywire/pull/1151) +- Minor fixes and updates to CLI [#1148](https://github.com/skycoin/skywire/pull/1148) +- add makefile directives [#1147](https://github.com/skycoin/skywire/pull/1147) +- make exported ParseOptions fileds [#1146](https://github.com/skycoin/skywire/pull/1146) +- remove transports cache system [#1144](https://github.com/skycoin/skywire/pull/1144) +- Set Status=3 for Connecting of VPN-Client App [#1141](https://github.com/skycoin/skywire/pull/1141) +- fix dmsg imports [#1137](https://github.com/skycoin/skywire/pull/1137) +- Switch from internal `skyenv` to skywire-utilities `skyenv` [#1136](https://github.com/skycoin/skywire/pull/1136) +- Add setup node error to whitelist [#1135](https://github.com/skycoin/skywire/pull/1135) +- Group skywire-cli visor subcommands [#1132](https://github.com/skycoin/skywire/pull/1132) +- add Stop() method to public visor initialization [#1131](https://github.com/skycoin/skywire/pull/1131) +- remove migration from binary [#1129](https://github.com/skycoin/skywire/pull/1129) +- Improvements for the links in the app list [#1128](https://github.com/skycoin/skywire/pull/1128) +- Update to Angular 13 [#1127](https://github.com/skycoin/skywire/pull/1127) +- Use repo skywire-utilities [#1126](https://github.com/skycoin/skywire/pull/1126) +- Cleanup util [#1125](https://github.com/skycoin/skywire/pull/1125) +- VPN Control Buttons in Systray [#1124](https://github.com/skycoin/skywire/pull/1124) +- Fix Vendoring [#1122](https://github.com/skycoin/skywire/pull/1122) +- Refactor internal packages [#1116](https://github.com/skycoin/skywire/pull/1116) +- fix dmsghttp-config.json file path in skywire config [#1114](https://github.com/skycoin/skywire/pull/1114) +- Feature/new skywire visor flag [#1113](https://github.com/skycoin/skywire/pull/1113) +- Use retrier from the dmsg package netutil [#1111](https://github.com/skycoin/skywire/pull/1111) +- Fix logic of `-o` flag in generate config [#1108](https://github.com/skycoin/skywire/pull/1108) +- Update/config ver [#1107](https://github.com/skycoin/skywire/pull/1107) +- Add BUILDTAG | Increase version to 0.6.0 [#1104](https://github.com/skycoin/skywire/pull/1104) +- Replace prod values of dmsghttp-config file [#1103](https://github.com/skycoin/skywire/pull/1103) +- Comment out redundant release upload which breaks checksums [#1102](https://github.com/skycoin/skywire/pull/1102) +- add network monitor value to skyenv [#1101](https://github.com/skycoin/skywire/pull/1101) +- migrate to dmsghttp on binaries [#1092](https://github.com/skycoin/skywire/pull/1092) +- Fix/dmsghttp config missed [#1091](https://github.com/skycoin/skywire/pull/1091) +- Update documentation & other small fixes [#1087](https://github.com/skycoin/skywire/pull/1087) +- skywire-cli flags for vpn ui and url [#1086](https://github.com/skycoin/skywire/pull/1086) +- Add wintun.dll [#1081](https://github.com/skycoin/skywire/pull/1081) +- Fix delete inactive client log [#1078](https://github.com/skycoin/skywire/pull/1078) +- Change the API for getting the VPN IP [#1077](https://github.com/skycoin/skywire/pull/1077) +- Migrate update logic to Debian package [#1076](https://github.com/skycoin/skywire/pull/1076) +- --best-protocol flag [#1069](https://github.com/skycoin/skywire/pull/1069) +- Fix close log [#1068](https://github.com/skycoin/skywire/pull/1068) +- Fix MakeHTTPTransport [#1065](https://github.com/skycoin/skywire/pull/1065) +- remove host-keeper service [#1063](https://github.com/skycoin/skywire/pull/1063) +- Windows installer [#1060](https://github.com/skycoin/skywire/pull/1060) +- add 'run-source' makefile directive [#1058](https://github.com/skycoin/skywire/pull/1058) +- new/update flags on skywire-cli [#1052](https://github.com/skycoin/skywire/pull/1052) +- Fix header SW-PublicIP [#1049](https://github.com/skycoin/skywire/pull/1049) +- minor docker image push fix [#1048](https://github.com/skycoin/skywire/pull/1048) +- fixing docker image push [#1043](https://github.com/skycoin/skywire/pull/1043) +- upgrade chi [#1042](https://github.com/skycoin/skywire/pull/1042) +- Fix/dmsghttp public ip [#1041](https://github.com/skycoin/skywire/pull/1041) +- Fix EOF error on stratup visor [#1039](https://github.com/skycoin/skywire/pull/1039) +- Check IP before call delBindSTCPR [#1038](https://github.com/skycoin/skywire/pull/1038) +- added HostKeeper url to old configs [#1037](https://github.com/skycoin/skywire/pull/1037) +- Feature/host keeper [#1034](https://github.com/skycoin/skywire/pull/1034) +- Fix dmsghttp datarace [#1033](https://github.com/skycoin/skywire/pull/1033) +- fix rate limit error on checking for update [#1032](https://github.com/skycoin/skywire/pull/1032) +- Fix/dmsghttp eof [#1031](https://github.com/skycoin/skywire/pull/1031) +- Fix/data race [#1029](https://github.com/skycoin/skywire/pull/1029) +- Fix panic [#1028](https://github.com/skycoin/skywire/pull/1028) +- [WIP] VPN stats [#1026](https://github.com/skycoin/skywire/pull/1026) +- Update dmsg [#1025](https://github.com/skycoin/skywire/pull/1025) +- Fix panic [#1024](https://github.com/skycoin/skywire/pull/1024) +- turn off build-ui on windows appveyor (timeout) [#1022](https://github.com/skycoin/skywire/pull/1022) +- update CHANGELOG.md [#1017](https://github.com/skycoin/skywire/pull/1017) +- Start visor with hypervisor UI [#1016](https://github.com/skycoin/skywire/pull/1016) +- Fix nil pointer in vpn client [#1015](https://github.com/skycoin/skywire/pull/1015) +- Fix/syslog [#1013](https://github.com/skycoin/skywire/pull/1013) +- Autogenerate changelog on release [#1012](https://github.com/skycoin/skywire/pull/1012) +- Fix datarace on network monitor [#1011](https://github.com/skycoin/skywire/pull/1011) +- Advanced autoconnection [#1010](https://github.com/skycoin/skywire/pull/1010) +- move dmsghttp struct to pkg [#1009](https://github.com/skycoin/skywire/pull/1009) +- Put stcp at the end of the transport types list [#1008](https://github.com/skycoin/skywire/pull/1008) +- add BuildTag for MacOS [#1006](https://github.com/skycoin/skywire/pull/1006) +- Use local servers to generate config file [#1003](https://github.com/skycoin/skywire/pull/1003) +- fix(visor.summary): data race condition [#1002](https://github.com/skycoin/skywire/pull/1002) +- fix(makefile): pipe stderr to /dev/null [#1001](https://github.com/skycoin/skywire/pull/1001) +- Autocomplete [#1000](https://github.com/skycoin/skywire/pull/1000) +- Fixbug/panic on visor shutdown [#997](https://github.com/skycoin/skywire/pull/997) +- Connect to services over dmsghttp [#995](https://github.com/skycoin/skywire/pull/995) +- Update UI dependencies [#994](https://github.com/skycoin/skywire/pull/994) +- Parity between UI and CLI [#981](https://github.com/skycoin/skywire/pull/981) +- fixes dmsg showing 00000 after successful reconnection [#980](https://github.com/skycoin/skywire/pull/980) +- Add Debug log and fix retrier log [#978](https://github.com/skycoin/skywire/pull/978) +- Fix skywire verson in goreleaser [#973](https://github.com/skycoin/skywire/pull/973) +- Add the build tag to the UI [#969](https://github.com/skycoin/skywire/pull/969) +- Fix autoconnect retrial logic being too aggressive [#968](https://github.com/skycoin/skywire/pull/968) +- fixes trailing slash issue [#965](https://github.com/skycoin/skywire/pull/965) +- Make the updater work with problematic visors [#960](https://github.com/skycoin/skywire/pull/960) +- Fix/change update interval [#959](https://github.com/skycoin/skywire/pull/959) +- Release v0.5.0 [#957](https://github.com/skycoin/skywire/pull/957) +- Fix overwriting of release from AppVeyor [#956](https://github.com/skycoin/skywire/pull/956) +- Remove ui-build and lint targets from AppVeyor to increase performance [#952](https://github.com/skycoin/skywire/pull/952) +- fix app stopping error status [#949](https://github.com/skycoin/skywire/pull/949) +- Add language portuguese [#947](https://github.com/skycoin/skywire/pull/947) +- Feature/improve redialing public autoconnect [#945](https://github.com/skycoin/skywire/pull/945) +- Change test config URLs [#944](https://github.com/skycoin/skywire/pull/944) +- Improvements for the vpn client UI [#939](https://github.com/skycoin/skywire/pull/939) +- Update public autoconnect default value [#936](https://github.com/skycoin/skywire/pull/936) +- Fix/dmsgtracker test [#934](https://github.com/skycoin/skywire/pull/934) +- Health endpoint: 3 states => connecting, healthy, and unhealthy [#933](https://github.com/skycoin/skywire/pull/933) +- Fix SetPublicAutoconnect [#931](https://github.com/skycoin/skywire/pull/931) +- Update goreleaser.yml to build only armv6 [#930](https://github.com/skycoin/skywire/pull/930) +- Fix GetPersistentTransports [#929](https://github.com/skycoin/skywire/pull/929) +- Fix cli ls-apps [#928](https://github.com/skycoin/skywire/pull/928) +- Fix goreleaser [#927](https://github.com/skycoin/skywire/pull/927) +- Fix release process [#926](https://github.com/skycoin/skywire/pull/926) +- Add RPC func [#925](https://github.com/skycoin/skywire/pull/925) +- Improvements for the manager UI [#924](https://github.com/skycoin/skywire/pull/924) +- Add stcpr dependency to PublicVisor [#922](https://github.com/skycoin/skywire/pull/922) +- Fix/improve health [#919](https://github.com/skycoin/skywire/pull/919) +- Feature/debian installer [#917](https://github.com/skycoin/skywire/pull/917) +- Feature/improve health status [#916](https://github.com/skycoin/skywire/pull/916) +- Public Autoconnect [API | Summary] [#915](https://github.com/skycoin/skywire/pull/915) +- Feature/config subcommand [#914](https://github.com/skycoin/skywire/pull/914) +- remove readmegen package usage [#913](https://github.com/skycoin/skywire/pull/913) +- Feature/update config names [#912](https://github.com/skycoin/skywire/pull/912) +- add build_tag to summary API endpoint [#911](https://github.com/skycoin/skywire/pull/911) +- Bandwidth received fix [#909](https://github.com/skycoin/skywire/pull/909) +- AppStats: Connection Duration Addition to API [#908](https://github.com/skycoin/skywire/pull/908) +- Remove travis [#907](https://github.com/skycoin/skywire/pull/907) +- Add language portuguese [#906](https://github.com/skycoin/skywire/pull/906) +- Fix the discovery service URL [#903](https://github.com/skycoin/skywire/pull/903) +- Fix vpn client [#901](https://github.com/skycoin/skywire/pull/901) +- Fix/shutdown race [#897](https://github.com/skycoin/skywire/pull/897) +- Cleanup Makefile targets remove systray release targets [#894](https://github.com/skycoin/skywire/pull/894) +- Remove Transport Discovery heatbeat [#891](https://github.com/skycoin/skywire/pull/891) +- Mac installer [#889](https://github.com/skycoin/skywire/pull/889) +- Remove stcpr heartbeat [#888](https://github.com/skycoin/skywire/pull/888) +- Fix/vpn panic [#887](https://github.com/skycoin/skywire/pull/887) +- Fix nil pointer dereference [#886](https://github.com/skycoin/skywire/pull/886) +- Remove heartbeat | Add Deregister [#884](https://github.com/skycoin/skywire/pull/884) +- Dmsg delete entry on shutdown [#883](https://github.com/skycoin/skywire/pull/883) +- Improve systray icon loading [#882](https://github.com/skycoin/skywire/pull/882) +- Update Angular and fix problems [#880](https://github.com/skycoin/skywire/pull/880) +- travis: added auto deploy release on tag [#878](https://github.com/skycoin/skywire/pull/878) +- Delete vpn env test [#876](https://github.com/skycoin/skywire/pull/876) +- Fix Persistent transports cancel issue [#874](https://github.com/skycoin/skywire/pull/874) +- Update service discovery references [#872](https://github.com/skycoin/skywire/pull/872) +- Docker fix skysocks client [#871](https://github.com/skycoin/skywire/pull/871) +- Add NAT info to the UI [#870](https://github.com/skycoin/skywire/pull/870) +- Fix creating transports from the UI [#869](https://github.com/skycoin/skywire/pull/869) +- Revert base to alpine [#868](https://github.com/skycoin/skywire/pull/868) +- Revert alpine to 3.13 [#867](https://github.com/skycoin/skywire/pull/867) +- Add the persistent transports to the UI [#866](https://github.com/skycoin/skywire/pull/866) +- add dmsgpty to skywire-cli [#863](https://github.com/skycoin/skywire/pull/863) +- Is public [#859](https://github.com/skycoin/skywire/pull/859) +- Feature/refactor init [#858](https://github.com/skycoin/skywire/pull/858) +- Update mainnet_rules.md [#857](https://github.com/skycoin/skywire/pull/857) +- Add stcpr heartbeat [#856](https://github.com/skycoin/skywire/pull/856) +- AppVeyor [#854](https://github.com/skycoin/skywire/pull/854) +- Add the Skybian version to the UI [#853](https://github.com/skycoin/skywire/pull/853) +- skybian defaults from `skywire-cli visor gen-config -s` [#852](https://github.com/skycoin/skywire/pull/852) +- Fix data race [#850](https://github.com/skycoin/skywire/pull/850) +- add Skybian build version to summary of visor API and debugging [#849](https://github.com/skycoin/skywire/pull/849) +- Fix nil pointer exception [#847](https://github.com/skycoin/skywire/pull/847) +- Feature/remove redialing [#842](https://github.com/skycoin/skywire/pull/842) +- add escaping flags to `skywire-cli exec` documentation [#841](https://github.com/skycoin/skywire/pull/841) +- Fix/remove env test [#838](https://github.com/skycoin/skywire/pull/838) +- Fix/launcher discovery [#836](https://github.com/skycoin/skywire/pull/836) +- Unknown version fix [#835](https://github.com/skycoin/skywire/pull/835) +- Bugfix/panic on shutdown [#833](https://github.com/skycoin/skywire/pull/833) +- remove gateway.go [#827](https://github.com/skycoin/skywire/pull/827) +- Add stun NAT type check for sudph [#825](https://github.com/skycoin/skywire/pull/825) +- Update documentation [#824](https://github.com/skycoin/skywire/pull/824) +- Update uptime tracker and service discovery Backport [#822](https://github.com/skycoin/skywire/pull/822) +- Complete Visor Logs [#820](https://github.com/skycoin/skywire/pull/820) +- Update mainnet_rules.md [#819](https://github.com/skycoin/skywire/pull/819) +- Fix improve transport setup logic issue [#818](https://github.com/skycoin/skywire/pull/818) +- backport release config changes [#815](https://github.com/skycoin/skywire/pull/815) +- Release/v0.4.2 [#814](https://github.com/skycoin/skywire/pull/814) +- Fix stcpr transport establishment issues [#813](https://github.com/skycoin/skywire/pull/813) +- Feature/snet rewrite [#811](https://github.com/skycoin/skywire/pull/811) +- Change perm of pid and logstore [#810](https://github.com/skycoin/skywire/pull/810) +- Fix data race in hypervisor [#809](https://github.com/skycoin/skywire/pull/809) +- Fix nil pointer panic in transport setup [#807](https://github.com/skycoin/skywire/pull/807) +- Fix/recompile frontend [#805](https://github.com/skycoin/skywire/pull/805) +- Config refactor [#802](https://github.com/skycoin/skywire/pull/802) +- Remove Config Whitelist dmsgpty [#801](https://github.com/skycoin/skywire/pull/801) +- Change rt retryduration from 10s to 2s [#800](https://github.com/skycoin/skywire/pull/800) +- fixes data race on logstore [#799](https://github.com/skycoin/skywire/pull/799) +- Update service discovery update interval [#797](https://github.com/skycoin/skywire/pull/797) +- Change file perm [#796](https://github.com/skycoin/skywire/pull/796) +- Feature/docker refactorings [#794](https://github.com/skycoin/skywire/pull/794) +- Improvements for the VPN client [#792](https://github.com/skycoin/skywire/pull/792) +- [WIP] NewJSONFileWhitelist => NewConfigFileWhitelist [#789](https://github.com/skycoin/skywire/pull/789) +- Update README.md [#787](https://github.com/skycoin/skywire/pull/787) +- Fix a bug in the app list [#784](https://github.com/skycoin/skywire/pull/784) +- [WIP] Improvements for the VPN client [#782](https://github.com/skycoin/skywire/pull/782) +- Update golangci to use revive [#781](https://github.com/skycoin/skywire/pull/781) +- Add min hops manipulation endpoint [#780](https://github.com/skycoin/skywire/pull/780) +- Windows build [#779](https://github.com/skycoin/skywire/pull/779) +- Fix/shutdown data races [#777](https://github.com/skycoin/skywire/pull/777) +- Netutil fixes [#772](https://github.com/skycoin/skywire/pull/772) +- Update mainnet_rules.md [#769](https://github.com/skycoin/skywire/pull/769) +- Update mainnet_rules.md [#768](https://github.com/skycoin/skywire/pull/768) +- Add a view logs option to he UI [#766](https://github.com/skycoin/skywire/pull/766) +- Fixes for the UI code [#765](https://github.com/skycoin/skywire/pull/765) +- Setup node VM [#763](https://github.com/skycoin/skywire/pull/763) +- Systray launcher [#761](https://github.com/skycoin/skywire/pull/761) +- Refactor Summaries [#759](https://github.com/skycoin/skywire/pull/759) +- Remove discord [#756](https://github.com/skycoin/skywire/pull/756) +- Feature/makefile cleanup [#753](https://github.com/skycoin/skywire/pull/753) +- Feature/push master dockerhub [#752](https://github.com/skycoin/skywire/pull/752) +- Solve nil pointer derefrence [#750](https://github.com/skycoin/skywire/pull/750) +- push to dockerhub on push to develop or master [#749](https://github.com/skycoin/skywire/pull/749) +- Update mainnet_rules.md [#744](https://github.com/skycoin/skywire/pull/744) +- Feature/public visors advertising [#743](https://github.com/skycoin/skywire/pull/743) +- Fix a problem with the time since last update [#742](https://github.com/skycoin/skywire/pull/742) +- Update mainnet_rules.md [#741](https://github.com/skycoin/skywire/pull/741) +- Makefile updates [#739](https://github.com/skycoin/skywire/pull/739) +- Replaced go:generate with go:embed [#738](https://github.com/skycoin/skywire/pull/738) +- added armv6 support to goreleaser [#736](https://github.com/skycoin/skywire/pull/736) +- Feature/runtime logs [#735](https://github.com/skycoin/skywire/pull/735) +- Improvements for the Skychat UI [#734](https://github.com/skycoin/skywire/pull/734) +- Remove the secure setting from the skysocks config [#730](https://github.com/skycoin/skywire/pull/730) +- Add router related config to the manager [#729](https://github.com/skycoin/skywire/pull/729) +- Fix for the updater UI [#728](https://github.com/skycoin/skywire/pull/728) +- Update mainnet_rules.md [#726](https://github.com/skycoin/skywire/pull/726) +- Init refactoring [#724](https://github.com/skycoin/skywire/pull/724) +- Update mainnet_rules.md [#723](https://github.com/skycoin/skywire/pull/723) +- Travis config, Makefile cleanup [#722](https://github.com/skycoin/skywire/pull/722) +- Show the IP in the UI [#721](https://github.com/skycoin/skywire/pull/721) +- Show the correct app arguments in the UI [#720](https://github.com/skycoin/skywire/pull/720) +- Fix/travis builds visor [#718](https://github.com/skycoin/skywire/pull/718) +- Display local IP [#716](https://github.com/skycoin/skywire/pull/716) +- Increase backoff factor and limit [#715](https://github.com/skycoin/skywire/pull/715) +- update german language [#713](https://github.com/skycoin/skywire/pull/713) +- Set goreleaser draft option to true [#711](https://github.com/skycoin/skywire/pull/711) +- Add exponential backoff for VPN client reconnection [#709](https://github.com/skycoin/skywire/pull/709) +- Ignore darwin_arm64 target for release [#708](https://github.com/skycoin/skywire/pull/708) +- Replace rakyll/static with native embedding [#706](https://github.com/skycoin/skywire/pull/706) +- Add handshake timeout [#704](https://github.com/skycoin/skywire/pull/704) +- Fix deadlock in managed tp's `updateStatus` [#700](https://github.com/skycoin/skywire/pull/700) +- Improvements for the visor list [#699](https://github.com/skycoin/skywire/pull/699) +- Fixes for the modal windows bottom margin [#698](https://github.com/skycoin/skywire/pull/698) +- Feature/transport setup [#697](https://github.com/skycoin/skywire/pull/697) +- Fix bool flag config representation [#695](https://github.com/skycoin/skywire/pull/695) +- Build from vendor [#690](https://github.com/skycoin/skywire/pull/690) +- Fix remote throughput calculation [#689](https://github.com/skycoin/skywire/pull/689) +- Feature/transport labels [#686](https://github.com/skycoin/skywire/pull/686) +- Move `run` command from `vpn` to `osutil`, add `RunWithResult` [#685](https://github.com/skycoin/skywire/pull/685) +- Move `Updated` field from `Status` to `EntryWithStatus` [#684](https://github.com/skycoin/skywire/pull/684) +- Add separate timeout for /health requests done [#683](https://github.com/skycoin/skywire/pull/683) +- Remove unused func and debug logs [#681](https://github.com/skycoin/skywire/pull/681) +- Skywire v0.4.0 [#680](https://github.com/skycoin/skywire/pull/680) +- README cleanup [#679](https://github.com/skycoin/skywire/pull/679) +- Fix hanging health [#677](https://github.com/skycoin/skywire/pull/677) +- Parallelize health requests [#671](https://github.com/skycoin/skywire/pull/671) +- Call `ip` instead of `route` to fetch active network interface [#669](https://github.com/skycoin/skywire/pull/669) +- Feature/launch browser on run [#668](https://github.com/skycoin/skywire/pull/668) +- Feature/extra summary [#666](https://github.com/skycoin/skywire/pull/666) +- Allow to set a label when creating a transport with the UI [#664](https://github.com/skycoin/skywire/pull/664) +- Fix/check empty password [#663](https://github.com/skycoin/skywire/pull/663) +- Feature/add min hops config [#656](https://github.com/skycoin/skywire/pull/656) +- Improvements for the manager [#655](https://github.com/skycoin/skywire/pull/655) +- Update mainnet_rules.md [#654](https://github.com/skycoin/skywire/pull/654) +- Make the UI show the last version of the selected channel [#652](https://github.com/skycoin/skywire/pull/652) +- Systray application [#651](https://github.com/skycoin/skywire/pull/651) +- Additional app stats [#649](https://github.com/skycoin/skywire/pull/649) +- Update mainnet_rules.md [#648](https://github.com/skycoin/skywire/pull/648) +- Show an alert when openning the logs of a stopped app [#647](https://github.com/skycoin/skywire/pull/647) +- Show more info about the routes in the manager [#645](https://github.com/skycoin/skywire/pull/645) +- Improvements for how the manager gets the data [#644](https://github.com/skycoin/skywire/pull/644) +- Fix VPN client duplicates [#642](https://github.com/skycoin/skywire/pull/642) +- Swap Prometheus with Victoria Metrics [#640](https://github.com/skycoin/skywire/pull/640) +- Update mainnet_rules.md [#639](https://github.com/skycoin/skywire/pull/639) +- Fix/dup syscall portability [#638](https://github.com/skycoin/skywire/pull/638) +- Make app be restarted only once if some arg changed [#637](https://github.com/skycoin/skywire/pull/637) +- Fix app startup issues after changing the args via UI [#635](https://github.com/skycoin/skywire/pull/635) +- static compilation w/musl [#634](https://github.com/skycoin/skywire/pull/634) +- Fix panic on server shutdown [#633](https://github.com/skycoin/skywire/pull/633) +- fix update cmd [#632](https://github.com/skycoin/skywire/pull/632) +- Shared app state [#630](https://github.com/skycoin/skywire/pull/630) +- Add version field to the service discovery request. [#628](https://github.com/skycoin/skywire/pull/628) +- Mark visors with problematic services in the visor list [#626](https://github.com/skycoin/skywire/pull/626) +- Add update-config command to visor-cli. [#621](https://github.com/skycoin/skywire/pull/621) +- Feature/hypervisor new app flags [#618](https://github.com/skycoin/skywire/pull/618) +- Add the killswitch and secure options to the manager [#617](https://github.com/skycoin/skywire/pull/617) +- Fix VPN server [#616](https://github.com/skycoin/skywire/pull/616) +- Fix refreshing of state of the app. [#615](https://github.com/skycoin/skywire/pull/615) +- Fix some TODO's [#613](https://github.com/skycoin/skywire/pull/613) +- Fix/web ui terminal hypervisor [#612](https://github.com/skycoin/skywire/pull/612) +- Add killswitch flag, automatic reconnection [#608](https://github.com/skycoin/skywire/pull/608) +- Show the correct error msg in the updater [#604](https://github.com/skycoin/skywire/pull/604) +- [WIP] VPN desktop client [#603](https://github.com/skycoin/skywire/pull/603) +- Add endpoints for bulk deletes. [#602](https://github.com/skycoin/skywire/pull/602) +- Fix delays in keepalive packet tests [#601](https://github.com/skycoin/skywire/pull/601) +- Secure VPN [#598](https://github.com/skycoin/skywire/pull/598) +- Add NetworkProbe to switch case expression. [#597](https://github.com/skycoin/skywire/pull/597) +- Remove the logout option from the manager if not needed [#596](https://github.com/skycoin/skywire/pull/596) +- Add line breakers to logs in VPN client. [#595](https://github.com/skycoin/skywire/pull/595) +- Remove FillDefaults to keep hypervisor parsed settings [#594](https://github.com/skycoin/skywire/pull/594) +- Feature/allow passing hypervisor pk [#593](https://github.com/skycoin/skywire/pull/593) +- Update mainnet_rules.md [#592](https://github.com/skycoin/skywire/pull/592) +- Rebuild UI for develop [#591](https://github.com/skycoin/skywire/pull/591) +- Change how AuthGuardService works [#589](https://github.com/skycoin/skywire/pull/589) +- Increase uptime update delay, and use v3 endpoint [#587](https://github.com/skycoin/skywire/pull/587) +- package defaults with gen-config -p [#585](https://github.com/skycoin/skywire/pull/585) +- Fix a nil transport dereference [#584](https://github.com/skycoin/skywire/pull/584) +- Fix lack of dmsg information for hypervisor in the UI [#583](https://github.com/skycoin/skywire/pull/583) +- Fix locking order. [#580](https://github.com/skycoin/skywire/pull/580) +- Make the manager work with the integrated hypervisor [#577](https://github.com/skycoin/skywire/pull/577) +- Add boltdb hook [#573](https://github.com/skycoin/skywire/pull/573) +- Merge v0.4.0 into develop [#570](https://github.com/skycoin/skywire/pull/570) +- Fix nonce mismatch issues [#569](https://github.com/skycoin/skywire/pull/569) +- Remove helloworld app. [#566](https://github.com/skycoin/skywire/pull/566) +- Update README.md [#561](https://github.com/skycoin/skywire/pull/561) +- Fix JSON unmarshal issue [#560](https://github.com/skycoin/skywire/pull/560) +- Update README.md [#559](https://github.com/skycoin/skywire/pull/559) +- Fix empty request body error [#558](https://github.com/skycoin/skywire/pull/558) +- Merge develop into master [#556](https://github.com/skycoin/skywire/pull/556) +- Rebuild frontend [#555](https://github.com/skycoin/skywire/pull/555) +- Improvements for configuring the VPN from the manager [#552](https://github.com/skycoin/skywire/pull/552) +- Output hostname in Discord hook [#549](https://github.com/skycoin/skywire/pull/549) +- Add build information for deployment [#548](https://github.com/skycoin/skywire/pull/548) +- Differentiate v0.3.0 visors [#547](https://github.com/skycoin/skywire/pull/547) +- Change http.ServeMux to chi [#546](https://github.com/skycoin/skywire/pull/546) +- Fix the font used [#545](https://github.com/skycoin/skywire/pull/545) +- Make the manager work in 0.4.0 [#544](https://github.com/skycoin/skywire/pull/544) +- Update dmsg vendor [#542](https://github.com/skycoin/skywire/pull/542) +- Add Discord start/stop logs [#537](https://github.com/skycoin/skywire/pull/537) +- Run vpn server non root [#535](https://github.com/skycoin/skywire/pull/535) +- Make VPN client runnable without root [#534](https://github.com/skycoin/skywire/pull/534) +- Update dmsg vendor [#531](https://github.com/skycoin/skywire/pull/531) +- Fix router tests [#530](https://github.com/skycoin/skywire/pull/530) +- Fix a bug in the visor details page of the manager [#529](https://github.com/skycoin/skywire/pull/529) +- Implement callbacks needed for VPN client [#526](https://github.com/skycoin/skywire/pull/526) +- Rebuild frontend [#525](https://github.com/skycoin/skywire/pull/525) +- Make VPN work properly over stcpr [#523](https://github.com/skycoin/skywire/pull/523) +- UpdateAppArg removes app argument if its value is empty [#522](https://github.com/skycoin/skywire/pull/522) +- Add password options to the UI of the proxy and vpn client apps [#520](https://github.com/skycoin/skywire/pull/520) +- Fix concurrent map writes panic [#515](https://github.com/skycoin/skywire/pull/515) +- Attach started [#510](https://github.com/skycoin/skywire/pull/510) +- Adapt route encryption for old visors [#507](https://github.com/skycoin/skywire/pull/507) +- Show the update links in the manager [#506](https://github.com/skycoin/skywire/pull/506) +- Updated vendor, improved Makefile and updated compiled static files. [#505](https://github.com/skycoin/skywire/pull/505) +- Update dmsg vendor [#504](https://github.com/skycoin/skywire/pull/504) +- Mark my todos, fix one [#498](https://github.com/skycoin/skywire/pull/498) +- Fix missing port in address resolver response [#495](https://github.com/skycoin/skywire/pull/495) +- Fix rfclient retrial logic [#494](https://github.com/skycoin/skywire/pull/494) +- VPN improvements [#491](https://github.com/skycoin/skywire/pull/491) +- Update mainnet_rules.md [#489](https://github.com/skycoin/skywire/pull/489) +- Fix bug with handshake error type [#488](https://github.com/skycoin/skywire/pull/488) +- Return non-zero status code if added transport is not up [#487](https://github.com/skycoin/skywire/pull/487) +- Add an option for removing all offline transports [#486](https://github.com/skycoin/skywire/pull/486) +- Include OSX builds in TravisCI and update OSX version [#485](https://github.com/skycoin/skywire/pull/485) +- Exclude OSX build in Travis temporarily [#484](https://github.com/skycoin/skywire/pull/484) +- Rebuild frontend [#483](https://github.com/skycoin/skywire/pull/483) +- Enable linter in TravisCI [#481](https://github.com/skycoin/skywire/pull/481) +- Fix hypervisor update status check [#480](https://github.com/skycoin/skywire/pull/480) +- Allow to configure the vpn apps from the manager UI [#479](https://github.com/skycoin/skywire/pull/479) +- Standardize skywire directories [#478](https://github.com/skycoin/skywire/pull/478) +- Improvements for the updater UI [#477](https://github.com/skycoin/skywire/pull/477) +- Add release URL to update information [#475](https://github.com/skycoin/skywire/pull/475) +- Add VPN apps to config on migration from V0 to V1 [#474](https://github.com/skycoin/skywire/pull/474) +- Fix setting proxy settings [#471](https://github.com/skycoin/skywire/pull/471) +- Fix VPN client remote startup [#470](https://github.com/skycoin/skywire/pull/470) +- Make app exit on VPN server failure [#468](https://github.com/skycoin/skywire/pull/468) +- Rebuild frontend [#466](https://github.com/skycoin/skywire/pull/466) +- Add Discord hook to logger (develop) [#463](https://github.com/skycoin/skywire/pull/463) +- Add Discord hook to logger (master) [#462](https://github.com/skycoin/skywire/pull/462) +- Multiple improvements for the manager [#460](https://github.com/skycoin/skywire/pull/460) +- Backport master changes into develop [#459](https://github.com/skycoin/skywire/pull/459) +- Fix project paths after repository migration [#458](https://github.com/skycoin/skywire/pull/458) +- Remove the left menu bar from the manager [#457](https://github.com/skycoin/skywire/pull/457) +- Fix module name [#456](https://github.com/skycoin/skywire/pull/456) +- Update to Angular 10 [#455](https://github.com/skycoin/skywire/pull/455) +- Fix visor RPC timeouts [#454](https://github.com/skycoin/skywire/pull/454) +- Improvements for the update procedure [#453](https://github.com/skycoin/skywire/pull/453) +- Visor UI [#451](https://github.com/skycoin/skywire/pull/451) +- Fix health endpoint timeout [#448](https://github.com/skycoin/skywire/pull/448) +- Route encryption [#444](https://github.com/skycoin/skywire/pull/444) +- WebSocket API for updater [#443](https://github.com/skycoin/skywire/pull/443) +- Set interval to 10 sec [#442](https://github.com/skycoin/skywire/pull/442) +- Fix ARM 32-bit panics [#439](https://github.com/skycoin/skywire/pull/439) +- Improvements for the UI/UX of the manager [#436](https://github.com/skycoin/skywire/pull/436) +- Automate trusted visor functionality [#434](https://github.com/skycoin/skywire/pull/434) +- Fix SUDPH bug [#433](https://github.com/skycoin/skywire/pull/433) +- Add DMSG info to the manager [#427](https://github.com/skycoin/skywire/pull/427) +- Health checks for services [#426](https://github.com/skycoin/skywire/pull/426) +- Update the UI theme [#424](https://github.com/skycoin/skywire/pull/424) +- Refactor direct transports and address resolver client [#421](https://github.com/skycoin/skywire/pull/421) +- Ensure hypervisor PKs are added to dmsgpty whitelist on initi. [#420](https://github.com/skycoin/skywire/pull/420) +- Hypervisor dmsg tab. [#415](https://github.com/skycoin/skywire/pull/415) +- Allow to update all visors [#414](https://github.com/skycoin/skywire/pull/414) +- Setup node metrics. [#412](https://github.com/skycoin/skywire/pull/412) +- Add a copy button in the visor list [#406](https://github.com/skycoin/skywire/pull/406) +- Fix a problem with the app names in the manager [#403](https://github.com/skycoin/skywire/pull/403) +- Allow visor to start in case of address resolver or tp disc failure [#402](https://github.com/skycoin/skywire/pull/402) +- Implementation of UDP hole punch transport [#400](https://github.com/skycoin/skywire/pull/400) +- Added German Language [#399](https://github.com/skycoin/skywire/pull/399) +- Implement a UDP transport [#397](https://github.com/skycoin/skywire/pull/397) +- Rename proxy discovery to service discovery [#393](https://github.com/skycoin/skywire/pull/393) +- Adding trusted visors from config on startup [#392](https://github.com/skycoin/skywire/pull/392) +- Fix VPN apps [#390](https://github.com/skycoin/skywire/pull/390) +- Set up formatting imports using goimports-reviser [#384](https://github.com/skycoin/skywire/pull/384) +- Improve reliability and logging of setup node. [#381](https://github.com/skycoin/skywire/pull/381) +- Updating improvements [#380](https://github.com/skycoin/skywire/pull/380) +- Move buildinfo to dmsg repo [#377](https://github.com/skycoin/skywire/pull/377) +- Fix transport manager hangs and various improvements. [#376](https://github.com/skycoin/skywire/pull/376) +- Make proxy disc generic [#374](https://github.com/skycoin/skywire/pull/374) +- Appevent module implementation. [#371](https://github.com/skycoin/skywire/pull/371) +- Add package directive to Makefile [#366](https://github.com/skycoin/skywire/pull/366) +- Versioned visor configs. [#364](https://github.com/skycoin/skywire/pull/364) +- Improve visor config and startup/shutdown logic. [#360](https://github.com/skycoin/skywire/pull/360) +- Feature/retain keys [#359](https://github.com/skycoin/skywire/pull/359) +- Appserver improvements. [#357](https://github.com/skycoin/skywire/pull/357) +- VPN improvements [#356](https://github.com/skycoin/skywire/pull/356) +- Add app API docs [#353](https://github.com/skycoin/skywire/pull/353) +- Fix hypervisor disconnection issue. [#349](https://github.com/skycoin/skywire/pull/349) +- Improvements for the snackbar [#348](https://github.com/skycoin/skywire/pull/348) +- Fix 'invalid cross-device link' error [#342](https://github.com/skycoin/skywire/pull/342) +- Added "be" for sentence clarity [#341](https://github.com/skycoin/skywire/pull/341) +- Proxy discovery. [#340](https://github.com/skycoin/skywire/pull/340) +- Rebuild UI for release [#334](https://github.com/skycoin/skywire/pull/334) +- Sanitize the URLs used [#332](https://github.com/skycoin/skywire/pull/332) +- Remove unused field in hypervisor config [#331](https://github.com/skycoin/skywire/pull/331) +- rm unnecessary line [#330](https://github.com/skycoin/skywire/pull/330) +- Fix/use vendor [#329](https://github.com/skycoin/skywire/pull/329) +- Doc cleanup [#327](https://github.com/skycoin/skywire/pull/327) +- Additional features for configuring skysocks-client in the manager [#326](https://github.com/skycoin/skywire/pull/326) +- Backport changes to develop [#325](https://github.com/skycoin/skywire/pull/325) +- Fix release name template for ARM [#324](https://github.com/skycoin/skywire/pull/324) +- Fix moving files between different drives and filesystems [#322](https://github.com/skycoin/skywire/pull/322) +- Added 'stats' to proxydisc. [#320](https://github.com/skycoin/skywire/pull/320) +- Proxy discovery client. [#318](https://github.com/skycoin/skywire/pull/318) +- Improvements for the manager [#315](https://github.com/skycoin/skywire/pull/315) +- Implement a holepunch transport [#313](https://github.com/skycoin/skywire/pull/313) +- Update mainnet_rules.md [#312](https://github.com/skycoin/skywire/pull/312) +- Added app config fields to RPC.Apps call. [#311](https://github.com/skycoin/skywire/pull/311) +- Added 'is_up' to transport status CLI. [#310](https://github.com/skycoin/skywire/pull/310) +- Develop [#309](https://github.com/skycoin/skywire/pull/309) +- Change json.NewDecoder to json.Unmarshal in binaries [#308](https://github.com/skycoin/skywire/pull/308) +- Fix/skysocks client port [#307](https://github.com/skycoin/skywire/pull/307) +- Update mainnet_rules.md [#306](https://github.com/skycoin/skywire/pull/306) +- Update mainnet_rules.md [#305](https://github.com/skycoin/skywire/pull/305) +- Add mainnet rules [#304](https://github.com/skycoin/skywire/pull/304) +- Fix go.sum [#301](https://github.com/skycoin/skywire/pull/301) +- Update dmsg version [#300](https://github.com/skycoin/skywire/pull/300) +- Fix go.sum [#299](https://github.com/skycoin/skywire/pull/299) +- Merge v0.1.0 [#298](https://github.com/skycoin/skywire/pull/298) +- Backport master changes into develop [#297](https://github.com/skycoin/skywire/pull/297) +- Update dmsg version [#296](https://github.com/skycoin/skywire/pull/296) +- Comment out failing tests [#295](https://github.com/skycoin/skywire/pull/295) +- Change ports for skychat, skysocks, hypervisor API/UI [#294](https://github.com/skycoin/skywire/pull/294) +- Embed static files in hypervisor binary. [#293](https://github.com/skycoin/skywire/pull/293) +- Revert asynchronous transport handling [#292](https://github.com/skycoin/skywire/pull/292) +- Revert sending router packets asynchronously [#291](https://github.com/skycoin/skywire/pull/291) +- Rebuilt frontend [#288](https://github.com/skycoin/skywire/pull/288) +- Expose skyenv module [#287](https://github.com/skycoin/skywire/pull/287) +- Add hypervisor to goreleaser [#286](https://github.com/skycoin/skywire/pull/286) +- Fix setup node PKs [#283](https://github.com/skycoin/skywire/pull/283) +- Change default setup node PK [#282](https://github.com/skycoin/skywire/pull/282) +- Update the Spanish translation of the manager [#281](https://github.com/skycoin/skywire/pull/281) +- VPN apps [#278](https://github.com/skycoin/skywire/pull/278) +- Apply readme generator [#276](https://github.com/skycoin/skywire/pull/276) +- Fix a problem while navigating with the manager [#275](https://github.com/skycoin/skywire/pull/275) +- Make the manager work with http while using the test server [#274](https://github.com/skycoin/skywire/pull/274) +- Update the Spanish translation [#273](https://github.com/skycoin/skywire/pull/273) +- Show the visor version on the manager [#272](https://github.com/skycoin/skywire/pull/272) +- Add tests for the manager to Travis CI [#271](https://github.com/skycoin/skywire/pull/271) +- Fix panic on migration of old key pair [#267](https://github.com/skycoin/skywire/pull/267) +- Backport fixes from master to develop [#265](https://github.com/skycoin/skywire/pull/265) +- Added --secret-key,-s flag to gen-config. [#263](https://github.com/skycoin/skywire/pull/263) +- Avoid HTTP body for GET request in route finder [#259](https://github.com/skycoin/skywire/pull/259) +- Make the session cookie work with the terminal [#258](https://github.com/skycoin/skywire/pull/258) +- Fix dmsgpty in manager UI [#257](https://github.com/skycoin/skywire/pull/257) +- Generate PubKey from SecKey if only SecKey is set in Visor config [#256](https://github.com/skycoin/skywire/pull/256) +- Fix incorrectly renamed "Uptime" to "UptimeTracker" [#254](https://github.com/skycoin/skywire/pull/254) +- [READY] Add configuration options for some apps in the manager [#253](https://github.com/skycoin/skywire/pull/253) +- Make the manager open the terminal with the same protocol [#252](https://github.com/skycoin/skywire/pull/252) +- Delete config.json [#250](https://github.com/skycoin/skywire/pull/250) +- Improve the error messages the manager shows [#249](https://github.com/skycoin/skywire/pull/249) +- Use default values if required visor config fields are empty [#246](https://github.com/skycoin/skywire/pull/246) +- Fix manager UI login for HTTP hypervisor's API [#243](https://github.com/skycoin/skywire/pull/243) +- Add `--retain-keys` flag [#242](https://github.com/skycoin/skywire/pull/242) +- Remove workaround for tests [#240](https://github.com/skycoin/skywire/pull/240) +- Integrate manager UI with the hypervisor [#236](https://github.com/skycoin/skywire/pull/236) +- Backport Manager UI change [#235](https://github.com/skycoin/skywire/pull/235) +- remove docs and integration folder [#234](https://github.com/skycoin/skywire/pull/234) +- Fix a prod build problem with the manager [#232](https://github.com/skycoin/skywire/pull/232) +- Replace unix pipes with TCP sockets [#231](https://github.com/skycoin/skywire/pull/231) +- Update README.md [#229](https://github.com/skycoin/skywire/pull/229) +- Put apps in a separate directory [#228](https://github.com/skycoin/skywire/pull/228) +- Send router packets asynchronously [#223](https://github.com/skycoin/skywire/pull/223) +- Change transport type preference [#222](https://github.com/skycoin/skywire/pull/222) +- Fix go.mod [#221](https://github.com/skycoin/skywire/pull/221) +- Fix go.mod [#220](https://github.com/skycoin/skywire/pull/220) +- Merge Milestone 2 [#219](https://github.com/skycoin/skywire/pull/219) +- Improvements for the updater on the manager [#218](https://github.com/skycoin/skywire/pull/218) +- Implement endpoint for checking if visor update is available [#217](https://github.com/skycoin/skywire/pull/217) +- Add the manager UI [#216](https://github.com/skycoin/skywire/pull/216) +- Remove logging of every packet contents [#215](https://github.com/skycoin/skywire/pull/215) +- Fix update endpoint. [#214](https://github.com/skycoin/skywire/pull/214) +- Verify public key before requesting routes [#211](https://github.com/skycoin/skywire/pull/211) +- Updated hypervisor to work with TLS and updated to latest dmsg. [#208](https://github.com/skycoin/skywire/pull/208) +- Renamed `loop` to `routegroup` for hypervisor endpoints, function names, struct types and comments. [#207](https://github.com/skycoin/skywire/pull/207) +- Fix SettlementHS test [#203](https://github.com/skycoin/skywire/pull/203) +- Improved logging. [#202](https://github.com/skycoin/skywire/pull/202) +- Remove some panics [#200](https://github.com/skycoin/skywire/pull/200) +- Fix linter and tests on 32-bit architectures [#199](https://github.com/skycoin/skywire/pull/199) +- Jdknives patch 1 [#198](https://github.com/skycoin/skywire/pull/198) +- Fix route removal bug [#193](https://github.com/skycoin/skywire/pull/193) +- Split visor.Start [#191](https://github.com/skycoin/skywire/pull/191) +- Fix SettlementHS test [#190](https://github.com/skycoin/skywire/pull/190) +- Update Makefile [#189](https://github.com/skycoin/skywire/pull/189) +- Fix settlement handshake register transport logging. [#188](https://github.com/skycoin/skywire/pull/188) +- Fix a panic in pathutil [#187](https://github.com/skycoin/skywire/pull/187) +- Add a workaround for tests panic in Go 1.14 [#183](https://github.com/skycoin/skywire/pull/183) +- Fix route re-creation on rule removal through hypervisor API [#179](https://github.com/skycoin/skywire/pull/179) +- Fix restart.Context behavior [#177](https://github.com/skycoin/skywire/pull/177) +- Fix IntermediaryForwardRule panic [#169](https://github.com/skycoin/skywire/pull/169) +- Integrate m3 dsmgpty with hypervisor and various fixes. [#166](https://github.com/skycoin/skywire/pull/166) +- Update/dmsg serve [#165](https://github.com/skycoin/skywire/pull/165) +- Update dmsg to latest @mainnet-milestone2. [#162](https://github.com/skycoin/skywire/pull/162) +- Improve logging on app stop [#156](https://github.com/skycoin/skywire/pull/156) +- Rename CONTRIBUTE.md [#154](https://github.com/skycoin/skywire/pull/154) +- Updating mechanism for mainnet [#153](https://github.com/skycoin/skywire/pull/153) +- Fix rule expiration [#152](https://github.com/skycoin/skywire/pull/152) +- Delete skywire-visor [#151](https://github.com/skycoin/skywire/pull/151) +- Finish renaming Node to Visor [#150](https://github.com/skycoin/skywire/pull/150) +- Fix several app restarting issues [#149](https://github.com/skycoin/skywire/pull/149) +- Add build options to missing Makefile targets [#142](https://github.com/skycoin/skywire/pull/142) +- Version command [#140](https://github.com/skycoin/skywire/pull/140) +- Fix router tests [#139](https://github.com/skycoin/skywire/pull/139) +- Rename node to visor [#136](https://github.com/skycoin/skywire/pull/136) +- Improve route group logging, fix route group closing procedure [#135](https://github.com/skycoin/skywire/pull/135) +- Fix infinite keep alive loop [#134](https://github.com/skycoin/skywire/pull/134) +- Fix: Ensure transports are deregistered and removed when rm-tp is run. [#133](https://github.com/skycoin/skywire/pull/133) +- Document hypervisor auth states. [#131](https://github.com/skycoin/skywire/pull/131) +- Fix broken hypervisor after merging [#128](https://github.com/skycoin/skywire/pull/128) +- Hypervisor improvements [#126](https://github.com/skycoin/skywire/pull/126) +- Connect hypervisor and visor over dmsg [#124](https://github.com/skycoin/skywire/pull/124) +- Rename messaging to dmsg [#118](https://github.com/skycoin/skywire/pull/118) +- Fix dmsgpty [#117](https://github.com/skycoin/skywire/pull/117) +- fix update to uptime tracker [#116](https://github.com/skycoin/skywire/pull/116) +- [M2] Integrate the yamux version of DMSG [#115](https://github.com/skycoin/skywire/pull/115) +- Remove socket files [#113](https://github.com/skycoin/skywire/pull/113) +- Backport hypervisor fixes [#112](https://github.com/skycoin/skywire/pull/112) +- Improve app configurability via hypervisor and make it persistent [#111](https://github.com/skycoin/skywire/pull/111) +- Listen on STCP [#110](https://github.com/skycoin/skywire/pull/110) +- Backport transport deregistration logic [#109](https://github.com/skycoin/skywire/pull/109) +- Backport master fix to milestone2 [#106](https://github.com/skycoin/skywire/pull/106) +- Skysocks rename [#105](https://github.com/skycoin/skywire/pull/105) +- Remove therealssh [#101](https://github.com/skycoin/skywire/pull/101) +- Fix default visor/hypervisor start [#90](https://github.com/skycoin/skywire/pull/90) +- [M2] Fix default route group timeout [#89](https://github.com/skycoin/skywire/pull/89) +- Add keep-alive packet propagation between nodes [#87](https://github.com/skycoin/skywire/pull/87) +- Implement visor restart from hypervisor [#80](https://github.com/skycoin/skywire/pull/80) +- Dmsg Hypervisor PR [#79](https://github.com/skycoin/skywire/pull/79) +- Feature/default stcp listen [#77](https://github.com/skycoin/skywire/pull/77) +- change from slice to map [#70](https://github.com/skycoin/skywire/pull/70) +- add uptime tracker URL [#69](https://github.com/skycoin/skywire/pull/69) +- Fix timeouts for proxy client [#65](https://github.com/skycoin/skywire/pull/65) +- Fix wrong use of middleware context in hypervisor. [#63](https://github.com/skycoin/skywire/pull/63) +- Stop hypervisor StartApp from hanging. [#62](https://github.com/skycoin/skywire/pull/62) +- Added 'online' field to hypervisor get node(s) response. [#60](https://github.com/skycoin/skywire/pull/60) +- [WIP] Add the manager UI [#59](https://github.com/skycoin/skywire/pull/59) +- Remove realssh [#56](https://github.com/skycoin/skywire/pull/56) +- Remove transport from discovery on transport deregister [#54](https://github.com/skycoin/skywire/pull/54) +- Reconnect proxy if yamux session failed [#53](https://github.com/skycoin/skywire/pull/53) +- [WIP] Fix app2, router2 tests [#51](https://github.com/skycoin/skywire/pull/51) +- Milestone 2. [#49](https://github.com/skycoin/skywire/pull/49) +- Invalidate Hypervisor session after password change. [#46](https://github.com/skycoin/skywire/pull/46) +- Integration of dmsgpty in visor. [#45](https://github.com/skycoin/skywire/pull/45) +- Test stcp with nettest [#42](https://github.com/skycoin/skywire/pull/42) +- fix typos in log messages [#40](https://github.com/skycoin/skywire/pull/40) +- Add flag to select deployment and update default deployment [#38](https://github.com/skycoin/skywire/pull/38) +- Update README to include stcp config documentation. [#34](https://github.com/skycoin/skywire/pull/34) +- Fix/hypervisor endpoints [#20](https://github.com/skycoin/skywire/pull/20) +- udpated hypervisor readme [#17](https://github.com/skycoin/skywire/pull/17) +- Remove transport from discovery on transport deregister [#11](https://github.com/skycoin/skywire/pull/11) +- Feature/messaging to dmsg [#9](https://github.com/skycoin/skywire/pull/9) +- Fix production env. [#7](https://github.com/skycoin/skywire/pull/7) +- Feature/route finder single route [#4](https://github.com/skycoin/skywire/pull/4) +- Feature/dmsg hypervisor [#3](https://github.com/skycoin/skywire/pull/3) +- Mainnet milestone1 [#1](https://github.com/skycoin/skywire/pull/1) diff --git a/vendor/github.com/skycoin/skywire/Makefile b/vendor/github.com/skycoin/skywire/Makefile new file mode 100644 index 00000000..e95a5d78 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/Makefile @@ -0,0 +1,370 @@ + +.PHONY : check lint install-linters dep test +.PHONY : build clean install format bin +.PHONY : host-apps bin +.PHONY : docker-image docker-clean docker-network +.PHONY : docker-apps docker-bin docker-volume +.PHONY : docker-run docker-stop + +VERSION := $(shell git describe) +RFC_3339 := "+%Y-%m-%dT%H:%M:%SZ" +COMMIT := $(shell git rev-list -1 HEAD) + +PROJECT_BASE := github.com/skycoin/skywire +SKYWIRE_UTILITIES_BASE := github.com/skycoin/skywire-utilities +ifeq ($(OS),Windows_NT) + SHELL := pwsh + OPTS?=powershell -Command setx GO111MODULE on; + DATE := $(shell powershell -Command date -u ${RFC_3339}) + .DEFAULT_GOAL := help-windows +else + SHELL := /bin/bash + OPTS?=GO111MODULE=on + DATE := $(shell date -u $(RFC_3339)) + .DEFAULT_GOAL := help +endif + +ifeq ($(OS),Windows_NT) + SYSTRAY_CGO_ENABLED := 1 +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + SYSTRAY_CGO_ENABLED := 0 + endif + ifeq ($(UNAME_S),Darwin) + SYSTRAY_CGO_ENABLED := 1 + endif +endif + +ifeq ($(VERSION),) + VERSION = unknown +endif + +ifeq ($(COMMIT),) + COMMIT = unknown +endif + +ifeq ($(BUILDTAG),) + ifeq ($(OS),Windows_NT) + BUILDTAG = Windows + else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + BUILDTAG = Linux + endif + ifeq ($(UNAME_S),Darwin) + BUILDTAG = Darwin + endif + endif +endif + +STATIC_OPTS?= $(OPTS) CC=musl-gcc +MANAGER_UI_DIR = static/skywire-manager-src +GO_BUILDER_VERSION=v1.17 +MANAGER_UI_BUILT_DIR=pkg/visor/static + +TEST_OPTS:=-cover -timeout=5m -mod=vendor + +GOARCH:=$(shell go env GOARCH) + +ifneq (,$(findstring 64,$(GOARCH))) + TEST_OPTS:=$(TEST_OPTS) -race +endif + +BUILDINFO_PATH := $(SKYWIRE_UTILITIES_BASE)/pkg/buildinfo +BUILD_PATH := ./build/ + +BUILDINFO_VERSION := -X $(BUILDINFO_PATH).version=$(VERSION) +BUILDINFO_DATE := -X $(BUILDINFO_PATH).date=$(DATE) +BUILDINFO_COMMIT := -X $(BUILDINFO_PATH).commit=$(COMMIT) +BUILDTAGINFO := -X $(PROJECT_BASE)/pkg/visor.BuildTag=$(BUILDTAG) + +BUILDINFO?=$(BUILDINFO_VERSION) $(BUILDINFO_DATE) $(BUILDINFO_COMMIT) $(BUILDTAGINFO) +INFO?=$(VERSION) $(DATE) $(COMMIT) $(BUILDTAG) + +BUILD_OPTS?="-ldflags=$(BUILDINFO)" -mod=vendor $(RACE_FLAG) +BUILD_OPTS_DEPLOY?="-ldflags=$(BUILDINFO) -w -s" + +buildinfo: + @echo $(INFO) + +version: + @echo $(VERSION) + +date: + @echo $(DATE) + +commit: + @echo $(COMMIT) + +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/skywire.go --help + @echo + @echo "checking dmsghttp offline config gen" + @echo + go run cmd/skywire/skywire.go cli config gen --nofetch -dnw + @echo + @echo "checking offline config gen" + @echo + go run cmd/skywire/skywire.go cli config gen --nofetch -nw + @echo + @echo "config gen succeeded without error" + @echo + + +check-windows: lint-windows test-windows ## Run linters and tests on windows image + +build: clean build-merged ## 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 + +build-merged-windows: clean-windows + powershell '${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH)skywire.exe ./cmd/skywire' + +install-system-linux: build ## Install apps and binaries over those provided by the linux package - linux package must be installed first! + sudo echo "sudo cache" + sudo install -Dm755 $(BUILD_PATH)skywire /opt/skywire/bin/ + + +install-generate: ## Installs required execs for go generate. + ${OPTS} go install github.com/mjibson/esc github.com/vektra/mockery/v2@latest + + ## TO DO: it may be unnecessary to install required execs for go generate into the path. An alternative method may exist which does not require this + ## https://eli.thegreenplace.net/2021/a-comprehensive-guide-to-go-generate + +generate: ## Generate mocks and config README's + go generate ./... + +clean: ## Clean project: remove created binaries and apps + -rm -rf ./build ./local + +clean-windows: ## Clean project: remove created binaries and apps + powershell -Command "If (Test-Path ./local) { Remove-Item -Path ./local -Force -Recurse }" + powershell -Command "If (Test-Path ./build) { Remove-Item -Path ./build -Force -Recurse }" + +install: ## Install `skywire-visor`, `skywire-cli`, `setup-node` + ${OPTS} go install ${BUILD_OPTS} ./cmd/skywire + +install-windows: ## Install `skywire-visor`, `skywire-cli`, `setup-node` + powershell 'Get-ChildItem .\cmd | % { ${OPTS} go install ${BUILD_OPTS} ./ $$_.FullName }' + +install-static: ## Install `skywire-visor`, `skywire-cli`, `setup-node` + ${STATIC_OPTS} go install -trimpath --ldflags '-linkmode external -extldflags "-static" -buildid=' ./cmd/skywire + +lint: ## Run linters. Use make install-linters first + golangci-lint --version + ${OPTS} golangci-lint run -c .golangci.yml ./... + +lint-windows: ## Run linters. Use make install-linters-windows first + powershell 'golangci-lint --version' + powershell 'golangci-lint run -c .golangci.yml ./...' + +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/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 + ${OPTS} go test ${TEST_OPTS} ./internal/... ./pkg/... ./cmd/skywire-cli... ./cmd/skywire-visor... ./cmd/skywire... ./cmd/apps... + +install-linters: ## Install linters + - VERSION=latest ./ci_scripts/install-golangci-lint.sh + ${OPTS} go install golang.org/x/tools/cmd/goimports@latest github.com/incu6us/goimports-reviser/v2@latest + +install-linters-windows: ## Install linters + ${OPTS} go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest golang.org/x/tools/cmd/goimports@latest + +tidy: ## Tidies and vendors dependencies. + ${OPTS} go mod tidy -v + +format: tidy ## Formats the code. Must have goimports and goimports-reviser installed (use make install-linters). + ${OPTS} goimports -w -local ${PROJECT_BASE} ./pkg ./cmd ./internal + find . -type f -name '*.go' -not -path "./.git/*" -not -path "./vendor/*" -exec goimports-reviser -project-name ${PROJECT_BASE} {} \; + +format-windows: tidy ## Formats the code. Must have goimports and goimports-reviser installed (use make install-linters). + powershell 'Get-ChildItem -Directory | where Name -NotMatch vendor | % { Get-ChildItem $$_ -Recurse -Include *.go } | % {goimports -w -local ${PROJECT_BASE} $$_ }' + +dep: tidy ## Sorts dependencies + ${OPTS} go mod vendor -v + +snapshot: ## goreleaser --snapshot --clean --skip=publish + goreleaser --snapshot --clean --skip=publish + +snapshot-linux: ## goreleaser --snapshot --config .goreleaser-linux.yml --clean --skip=publish + goreleaser --snapshot --config .goreleaser-linux.yml --clean --skip=publish + +snapshot-clean: ## Cleans snapshot / release + rm -rf ./dist + +example-apps: ## Build example apps + ${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH)apps/ ./example/... + +# Bin +bin: fix-systray-vendor bin-fix unfix-systray-vendor + +bin-fix: ## Build `skywire` + ${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH) ./cmd/skywire + +fix-systray-vendor: + @if [ $(UNAME_S) = "Linux" ]; then\ + sed -i '/go conn.handleCall(msg)/c\conn.handleCall(msg)' ./vendor/github.com/godbus/dbus/v5/conn.go ;\ + fi + +unfix-systray-vendor: + @if [ $(UNAME_S) = "Linux" ]; then\ + sed -i '/conn.handleCall(msg)/c\ go conn.handleCall(msg)' ./vendor/github.com/godbus/dbus/v5/conn.go ;\ + fi + +build-windows: ## Build `skywire-visor` + powershell '${OPTS} go build ${BUILD_OPTS} -o $(BUILD_PATH) ./cmd/skywire' + +# Static Bin +build-static: ## Build `skywire-visor`, `skywire-cli` + ${STATIC_OPTS} go build 8 -trimpath --ldflags '-linkmode external -extldflags "-static" -buildid=' -o $(BUILD_PATH) ./cmd/skywire + +# Static Bin without Systray +build-static-wos: ## Build `skywire-visor`, `skywire-cli` + ${STATIC_OPTS} go build -tags withoutsystray -trimpath --ldflags '-linkmode external -extldflags "-static" -buildid=' -o $(BUILD_PATH)skywire-visor ./cmd/skywire + +build-deploy: ## Build for deployment Docker images + ${OPTS} go build -tags netgo ${BUILD_OPTS_DEPLOY} -o /release/skywire ./cmd/skywire + +build-race: ## Build for testing Docker images + CGO_ENABLED=1 ${OPTS} go build -tags netgo ${BUILD_OPTS} -race -o /release/skywire ./cmd/skywire + +github-prepare-release: + $(eval GITHUB_TAG=$(shell git describe --abbrev=0 --tags | cut -c 2-6)) + sed '/^## ${GITHUB_TAG}$$/,/^## .*/!d;//d;/^$$/d' ./CHANGELOG.md > releaseChangelog.md + +github-release: github-prepare-release + goreleaser --clean --config .goreleaser-linux.yml --release-notes releaseChangelog.md + +github-release-darwin: + goreleaser --clean --config .goreleaser-darwin.yml --skip=publish + $(eval GITHUB_TAG=$(shell git describe --abbrev=0 --tags)) + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-${GITHUB_TAG}-darwin-amd64.tar.gz + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-${GITHUB_TAG}-darwin-arm64.tar.gz + gh release download ${GITHUB_TAG} --repo skycoin/skywire --pattern 'checksums*' + cat ./dist/checksums.txt >> ./checksums.txt + gh release upload --repo skycoin/skywire ${GITHUB_TAG} --clobber ./checksums.txt + +github-release-windows: + .\goreleaser\goreleaser.exe --clean --config .goreleaser-windows.yml --skip=publish + $(eval GITHUB_TAG=$(shell powershell git describe --abbrev=0 --tags)) + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-${GITHUB_TAG}-windows-amd64.zip + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-${GITHUB_TAG}-windows-386.zip + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-${GITHUB_TAG}-windows-arm64.zip + gh release download ${GITHUB_TAG} --repo skycoin/skywire --pattern 'checksums*' + cat ./dist/checksums.txt >> ./checksums.txt + gh release upload --repo skycoin/skywire ${GITHUB_TAG} --clobber ./checksums.txt + +dep-github-release: + mkdir musl-data + wget -c https://more.musl.cc/10/x86_64-linux-musl/aarch64-linux-musl-cross.tgz -O aarch64-linux-musl-cross.tgz + tar -xzf aarch64-linux-musl-cross.tgz -C ./musl-data && rm aarch64-linux-musl-cross.tgz + wget -c https://more.musl.cc/10/x86_64-linux-musl/arm-linux-musleabi-cross.tgz -O arm-linux-musleabi-cross.tgz + tar -xzf arm-linux-musleabi-cross.tgz -C ./musl-data && rm arm-linux-musleabi-cross.tgz + wget -c https://more.musl.cc/10/x86_64-linux-musl/arm-linux-musleabihf-cross.tgz -O arm-linux-musleabihf-cross.tgz + tar -xzf arm-linux-musleabihf-cross.tgz -C ./musl-data && rm arm-linux-musleabihf-cross.tgz + wget -c https://more.musl.cc/10/x86_64-linux-musl/x86_64-linux-musl-cross.tgz -O x86_64-linux-musl-cross.tgz + tar -xzf x86_64-linux-musl-cross.tgz -C ./musl-data && rm x86_64-linux-musl-cross.tgz + wget -c https://more.musl.cc/10/x86_64-linux-musl/riscv64-linux-musl-cross.tgz -O riscv64-linux-musl-cross.tgz + tar -xzf riscv64-linux-musl-cross.tgz -C ./musl-data && rm riscv64-linux-musl-cross.tgz + +build-docker: ## Build docker image + ./ci_scripts/docker-push.sh -t latest -b + +# Manager UI +install-deps-ui: ## Install the UI dependencies + cd $(MANAGER_UI_DIR) && npm ci + +config: ## Create or regenerate a config with correct default app bin_path for `make build` + $(BUILD_PATH)skywire-cli config gen -irx --binpath $(BUILD_PATH)apps + +run: ## Run skywire visor with skywire-config.json, and start a browser if running a hypervisor + $(BUILD_PATH)skywire-visor -bc ./skywire-config.json + +## Prepare to run skywire from source, without compiling binaries +prepare: + test -d apps && rm -r apps || true + test -d build && rm -r build || true + mkdir -p build || true + ln ./scripts/skywire ./build/ + chmod +x ./build/* + sudo echo "sudo cache" + + +run-source: prepare ## Run skywire from source, without compiling binaries + 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/skywire.go cli config gen -ni | sudo go run ./cmd/skywire/skywire.go visor -n --systray || true + +run-vpnsrv: prepare ## Run skywire from source, without compiling binaries + go run ./cmd/skywire/skywire.go cli config gen -in --servevpn | sudo go run ./cmd/skywire/skywire.go visor -n || true + +run-source-dmsghttp: prepare ## Run skywire from source with dmsghttp config + go run ./cmd/skywire/skywire.go cli config gen -din | sudo go run ./cmd/skywire/skywire.go visor -n || true + +run-vpnsrv-dmsghttp: prepare ## Run skywire from source with dmsghttp config and vpn server + go run ./cmd/skywire/skywire.go cli config gen -din --servevpn | sudo go run ./cmd/skywire/skywire.go visor -n || true + +lint-ui: ## Lint the UI code + cd $(MANAGER_UI_DIR) && npm run lint + +build-ui: install-deps-ui ## Builds the UI + cd $(MANAGER_UI_DIR) && npm run build + mkdir -p ${PWD}/bin + rm -rf ${MANAGER_UI_BUILT_DIR} + mkdir ${MANAGER_UI_BUILT_DIR} + cp -r ${MANAGER_UI_DIR}/dist/. ${MANAGER_UI_BUILT_DIR} + +build-ui-windows: install-deps-ui ## Builds the UI on windows + cd $(MANAGER_UI_DIR) && npm run build + powershell 'Remove-Item -Recurse -Force -Path ${MANAGER_UI_BUILT_DIR}' + powershell 'New-Item -Path ${MANAGER_UI_BUILT_DIR} -ItemType Directory' + powershell 'Copy-Item -Recurse ${MANAGER_UI_DIR}\dist\* ${MANAGER_UI_BUILT_DIR}' + +installer: mac-installer ## Builds MacOS installer for skywire-visor + +mac-installer: ## Create unsigned and not-notarized application, run make mac-installer-help for more + ./scripts/mac_installer/create_installer.sh + +mac-installer-help: ## Show installer creation help + ./scripts/mac_installer/create_installer.sh -h + +mac-installer-release: mac-installer ## Upload created signed and notarized applciation to github + $(eval GITHUB_TAG=$(shell git describe --abbrev=0 --tags)) + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./skywire-installer-${GITHUB_TAG}-darwin-amd64.pkg + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./skywire-installer-${GITHUB_TAG}-darwin-arm64.pkg + +win-installer-latest: ## Build the windows .msi (installer) latest version + @powershell '.\scripts\win_installer\script.ps1 latest' + +win-installer: ## Build the windows .msi (installer) custom version + @powershell '.\scripts\win_installer\script.ps1 $(CUSTOM_VERSION)' + +windows-installer-release: + $(eval GITHUB_TAG=$(shell git describe --abbrev=0 --tags)) + make win-installer CUSTOM_VERSION=$(GITHUB_TAG) + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./skywire-installer-${GITHUB_TAG}-windows-amd64.msi + gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./skywire-installer-${GITHUB_TAG}-windows-386.msi + +# useful commands +dmsghttp-update: ## update dmsghttp config + go run cmd/skywire/skywire.go cli config update dmsghttp -p dmsghttp-config.json + +help: ## `make help` menu + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +help-windows: ## Display help for windows + @powershell 'Select-String -Pattern "windows[a-zA-Z_-]*:.*## .*$$" $(MAKEFILE_LIST) | % { $$_.Line -split ":.*?## " -Join "`t:`t" } ' diff --git a/vendor/github.com/skycoin/skywire/README.md b/vendor/github.com/skycoin/skywire/README.md new file mode 100644 index 00000000..bde281b9 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/README.md @@ -0,0 +1,551 @@ +[![Go Report Card](https://goreportcard.com/badge/github.com/skycoin/skywire)](https://goreportcard.com/report/github.com/skycoin/skywire) +![Test](https://github.com/skycoin/skywire/actions/workflows/test.yml/badge.svg) +![Deploy](https://github.com/skycoin/skywire/actions/workflows/deploy.yml/badge.svg) +![Release](https://github.com/skycoin/skywire/actions/workflows/release.yml/badge.svg) +[![GitHub release](https://img.shields.io/github/release/skycoin/skywire.svg)](https://github.com/skycoin/skywire/releases/) +[![skywire](https://img.shields.io/aur/version/skywire?color=1793d1&label=skywire&logo=arch-linux)](https://aur.archlinux.org/packages/skywire/) +[![skywire-bin](https://img.shields.io/aur/version/skywire-bin?color=1793d1&label=skywire-bin&logo=arch-linux)](https://aur.archlinux.org/packages/skywire-bin/) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/skycoin/skywire/badge)](https://api.securityscorecards.dev/projects/github.com/skycoin/skywire) +[![go.mod](https://img.shields.io/github/go-mod/go-version/skycoin/skywire.svg)](https://github.com/skycoin/skywire) +[![Telegram](https://img.shields.io/badge/Join-Telegram-blue?&logo=data:image/svg%2bxml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjUxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtOS40MTcgMTUuMTgxLS4zOTcgNS41ODRjLjU2OCAwIC44MTQtLjI0NCAxLjEwOS0uNTM3bDIuNjYzLTIuNTQ1IDUuNTE4IDQuMDQxYzEuMDEyLjU2NCAxLjcyNS4yNjcgMS45OTgtLjkzMWwzLjYyMi0xNi45NzIuMDAxLS4wMDFjLjMyMS0xLjQ5Ni0uNTQxLTIuMDgxLTEuNTI3LTEuNzE0bC0yMS4yOSA4LjE1MWMtMS40NTMuNTY0LTEuNDMxIDEuMzc0LS4yNDcgMS43NDFsNS40NDMgMS42OTMgMTIuNjQzLTcuOTExYy41OTUtLjM5NCAxLjEzNi0uMTc2LjY5MS4yMTh6IiBmaWxsPSIjMDM5YmU1Ii8+PC9zdmc+)](https://t.me/skywire) + + +Compiling Skywire requires a Golang version of at least `1.16`. + +# Skywire + +* [Commands and Subcommands](#commands-and-subcommands) +* [App documentation](#app-documentation) +* [Installing Skywire](#installing-skywire) +* [Dependencies](#dependencies) + * [Build Deps](#build-deps) + * [Runtime Deps](#runtime-deps) + * [Testing Deps](#testing-deps) +* [Testing](#testing) +* [Compiling](#compiling) +* [Config Gen](#config-gen) +* [Build docker image](#build-docker-image) +* [Skywire Configuration in\-depth](#skywire-configuration-in-depth) + * [Expose hypervisorUI](#expose-hypervisorui) + * [Add remote hypervisor](#add-remote-hypervisor) +* [Files and folders created by skywire at runtime](#files-and-folders-created-by-skywire-at-runtime) +* [Run skywire\-visor](#run-skywire-visor) +* [Run from source](#run-from-source) + * [Port forwarding over skywire](#port-forwarding-over-skywire) + * [Transport setup](#transport-setup) + * [Routing Rules](#routing-rules) + * [Using the Skywire VPN](#using-the-skywire-vpn) + * [Using the Skywire SOCKS5 proxy client](#using-the-skywire-socks5-proxy-client) +* [Skycoin Rewards](#skycoin-rewards) +* [Linux Packages](#linux-packages) +* [How to create a GitHub release](#how-to-create-a-github-release) + +## Commands and Subcommands + +Documentation of all commands and subcommands is available in the command documentation README: + +* [skywire](cmd/skywire/README.md) +* [skywire-cli](cmd/skywire-cli/README.md) +* [skywire-visor](cmd/skywire-visor/README.md) + +## Visor Native Applications + +Visor apps are not executed directly by the user, but hosted by the visor process. + +* [API](docs/skywire_app_api.md) +* [skychat](cmd/apps/skychat/README.md) +* [skysocks](cmd/apps/skysocks/README.md) +* [skysocks-client](cmd/apps/skysocks-client/README.md) +* [vpn-client](cmd/apps/vpn-client/README.md) +* [vpn-server](cmd/apps/vpn-server/README.md) +* [example-server-app](example/example-server-app/README.md) +* [example-client-app](example/example-client-app/README.md) + +Further documentation can be found in the [skywire wiki](https://github.com/skycoin/skywire/wiki). + +## Installing Skywire from Release + +Releases for windows & macOS are available from the [release section](https://github.com/skycoin/skywire/releases/) + +Install as a package on debian or arch linux: [Package Installation Guide](https://github.com/skycoin/skywire/wiki/Skywire-Package-Installation) + +[Binary Releases](https://github.com/skycoin/skywire/releases) for many platforms and architectures are provided if none of the other installation methods are preferred. + +## Dependencies + +### Build Deps + +* `golang` + +`golang` or `go` can be installed with your system package manager on most linux distributions. Alternatively, follow the procedure at [go.dev/doc/install](https://go.dev/doc/install) to install golang. + +Basic setup of the `go` environment is further described [here](https://github.com/skycoin/skycoin/blob/develop/INSTALLATION.md#setup-your-gopath). + +* `git` (optional) + +* `musl` and `kernel-headers-musl` or equivalent - _for static compilation_ + +For more information on static compilation, see [docs/static-builds.md](docs/static-builds.md). + +### Runtime Deps + +* ` glibc` or `libc6` _unless statically compiled_ + +### Testing Deps + +* `golangci-lint` +* `goimports-reviser` from github.com/incu6us/goimports-reviser/v2 +* `goimports` from golang.org/x/tools/cmd/goimports + +## Testing + +Before pushing commits to a pull request, its customary in case of edits to any of the golang source code to run the following: + +``` +make format check +``` + +`make check` will run `make test` as well. To explicitly run tests, use `make test`. + +## Compiling + +To compile skywire directly from cloned git sources: + +``` +git clone https://github.com/skycoin/skywire +cd skywire +#for the latest commits, check out the develop branch +git checkout develop +make build +``` + +To compile skywire directly from source archive, first download the latest source archive from the release section with your browser or another utility. Extract it with an archiving utility, enter the directory where the sources were extracted, and run `make build-merged` or `make build-merged-windows`. + + +`make build-merged` and `make build-merged-windows` builds a single binary containing all utilities and apps with `go build` + +the `skywire` binary will populate in the current directory. + +Build output: + +``` +└──skywire +``` + +For more options, run `make help`. + +## Config Gen + +To run skywire from this point, first generate a config. + +``` +./skywire cli config gen -birx +``` +`-b --bestproto` use the best protocol (dmsg | direct) to connect to the skywire production deployment +`-i --ishv` create a local hypervisor configuration +`-r --regen` regenerate a config which may already exist, retaining the keys +`-x --retainhv` retain any remote hypervisors which are set in the config + +More options for configuration are displayed with `./skywire cli config gen -all`. + + +## Build docker image +``` +$ ./ci_scripts/docker-push.sh -t $(git rev-parse --abbrev-ref HEAD) -b +``` +## Skywire Configuration in-depth + +The skywire visor requires a config file to run. This config is a json-formatted file produced by `skywire cli config gen`. + +The `skywire-autoconfig` script included with the skywire package handles config generation and updates for the user who installed the package. + +Examples of config generation and command / flag documentation can be found in the [cmd/skywire-cli/README.md](cmd/skywire-cli/README.md) and [cmd/skywire-visor/README.md](cmd/skywire-visor/README.md). + +The most important flags are noted below. + +### Expose hypervisorUI + +In order to expose the hypervisor UI, generate a config file with `--is-hypervisor` or `-i` flag: + +``` + skywire cli config gen -i +``` + +Docker container will create config automatically for you. To run it manually: + +``` + docker run --rm -v :/opt/skywire \ + skycoin/skywire:test skywire cli config gen -i +``` + +After starting up the visor, the UI will be exposed by default on `localhost:8000`. + +### Add remote hypervisor + +Every visor can be controlled by one or more hypervisors. To allow a hypervisor to access a visor, the PubKey of the +hypervisor needs to be specified in the configuration file. You can add a remote hypervisor to the config with: + +``` +skywire cli config update --hypervisor-pks +``` +OR: +``` +skywire cli config gen --hvpk +``` + +Or from docker image: + +``` +docker run --rm -v :/opt/skywire \ + skycoin/skywire:test skywire cli config update hypervisor-pks +``` + +Or from docker image:/* #nosec */ + +``` +docker run --rm -v :/opt/skywire \ + skycoin/skywire:latest skywire cli update-config hypervisor-pks +``` + + +## Files and folders created by skywire at runtime +_Note: not all of these files will be created by default._ +``` +├──skywire-config.json +└─┬local +  ├── apps-pid.txt + ├── node-info.json + ├── node-info.sha + ├── reward.txt +  ├── skychat +  ├── skychat_log.db +  ├── skysocks +  ├── skysocks-client +  ├── skysocks-client_log.db +  ├── skysocks_log.db +  └── transport_logs +  ├── 2023-03-06.csv +  ├── 2023-03-07.csv +  ├── 2023-03-08.csv +  ├── 2023-03-09.csv +  └── 2023-03-10.csv +``` + +Some of these files are served via the [dmsghttp logserver](https://github.com/skycoin/skywire/wiki/DMSGHTTP-logserver). + +## Run `skywire visor` + +`skywire visor` hosts apps and is an applications gateway to the Skywire network. + +`skywire visor` requires a valid configuration to be provided. + +__Note: root permissions are currently required for vpn client and server applications!__ + +Run the visor: +``` + sudo skywire visor -c skywire-config.json +``` +If the default `skywire-config.json` exists in the current dir, this can be shortened to: +``` + sudo skywire visor +``` + +Or from docker image: +``` +# with custom config mounted on docker volume +docker run --rm -p 8000:8000 -v :/opt/skywire --name=skywire skycoin/skywire:test skywire visor -c /opt/skywire/.json +# without custom config (config is automatically generated) +docker run --rm -p 8000:8000 --name=skywire skycoin/skywire:test skywire visor +``` + +`skywire visor` can be run on Windows. The setup requires additional setup steps that are specified +in [the docs](docs/windows-setup.md) if not using the windows .msi. + +## Run from source + +Running from source as outlined in this section does not write the config to disk or explicitly compile any binaries. The config is piped from skywire cli stdout to the visor stdin, and all are executed via `go run`. + +``` +git clone https://github.com/skycoin/skywire.git +cd skywire +#for the latest commits, check out the develop branch +git checkout develop +make run-source-merged +``` + +### Port forwarding over skywire + +`skywire cli fwd` is used to register and connect to http servers over the skywire connection + +- [skywire forwarding](docs/skywire_forwarding.md) + +For example, if the local application you wish to forward is running on port `8080`: +``` +skywire cli fwd -p 8080 +``` + +List forwarded ports: +``` +skywire cli fwd -l +``` + +Deregister a port / turn off forwarding: +``` +skywire cli fwd -d 8080 +``` + +To consume the skyfwd connection (i.e. reverse proxy back to localhost) use `skywire cli rev` +A different port can be specified to proxy the remote port to: +``` +skywire cli rev -p 8080 -r 8080 -k +``` + +List existing connections: +``` +skywire cli rev -l +``` + +Remove a configured connection: +``` +skywire cli rev -d +``` + +_Note: skyfwd is a new feature and could work more robustly. Issues are welcome._ + +### Transport setup + +_Note: transports should be set up automatically in most cases. The user should not need to do this manually._ + +A Transport represents a bidirectional line of communication between two Skywire Visors: +- [Transports](https://github.com/skycoin/skywire/wiki/Transports) + +Transports are automatically established when a client application connects to a server application. +Their creation is attempted in the following order: +- stcpr +- sudph +- dmsg + +Transports can be manually created. Existing suitable transports will be automatically used by client applications when they are started. + +To create a transport, first copy the public key of an online visor from the uptime tracker (or service discovery endpoints): +https://ut.skywire.skycoin.com/uptimes + +``` +skywire cli visor tp add -t +``` + +View established transports: +``` +skywire cli visor tp ls +``` + +Remove a transport: +``` +skywire cli visor tp rm +``` + +### Routing Rules + +In the current era of internet connectivity, certain direct connections between servers in different countries are throttled or may drop intermittently. It is advantageous, in these instances, to establish an indirect or multi-hop route. + +Establishing skywire routing rules brings the advantage of an anonymizing overlay to the connection. The intermediate visor handling a certain packet only knows the previous and next hop of that packet. All packets through skywire are of uniform size, stripped of their headers and fuzzed to appear no differently from noise. + +__disclaimer: this process is pending improvements & revisions!__ + +To create a route, first copy the public key of an online visor from the uptime tracker (or service discovery endpoints): +https://ut.skywire.skycoin.com/uptimes + +``` +skywire cli visor route add-rule app $(skywire cli visor pk) +``` + +To understand these arguments, observe the help menu for `skywire cli visor route add-rule`: +``` +Usage: + skywire cli visor route add-rule app \ + \ + \ + \ + \ + \ + || [flags] + +Flags: + -i, --rid string route id + -l, --lpk string local public key + -m, --lpt string local port + -p, --rpk string remote pk + -q, --rpt string remote port + +Global Flags: + --keep-alive duration timeout for rule expiration (default 30s) +``` + + and are all just integers. It's suggested to create the first route with id 1, unless another route exists with that id. + +The port numbers are similarly inconsequential. + +__Note: the skywire router is pending refactorization!__ + +### Using the Skywire VPN + +The following documentation exists for vpn server / client setup and usage: +- [Setup the Skywire VPN](https://github.com/skycoin/skywire/wiki/Skywire-VPN-Client) +- [Setup the Skywire VPN server](https://github.com/skycoin/skywire/wiki/Skywire-VPN-Server) +- [Package Installation Guide](https://github.com/skycoin/skywire/wiki/Skywire-Package-Installation) + +An example using the vpn with `skywire cli`: + +``` +skywire cli vpn list +``` +This will query the service discovery for a list of vpn server public keys. +[sd.skycoin.com/api/services?type=vpn](https://sd.skycoin.com/api/services?type=vpn) + +Sample output: +``` +02836f9a39e38120f338dbc98c96ee2b1ffd73420259d1fb134a2d0a15c8b66ceb | NL +0289a464f485ce9036f6267db10e5b6eaabd3972a25a7c2387f92b187d313aaf5e | GB +03cad59c029fc2394e564d0d328e35db17f79feee50c33980f3ab31869dc05217b | ID +02cf90f3b3001971cfb2b2df597200da525d359f4cf9828dca667ffe07f59f8225 | IT +03e540ddb3ac61385d6be64b38eeef806d8de9273d29d7eabb8daccaf4cee945ab | US +... +``` + +Select a key and start the vpn with: +``` +skywire cli vpn start +``` + +View the status of the vpn: +``` +skywire cli vpn status +``` + +Check your ip address with ip.skywire.dev. +__Note: ip.skycoin.com will only show your real ip address, not the ip address of the vpn connection.__ + +Stop the vpn: +``` +skywire cli vpn stop +``` + +### Using the Skywire SOCKS5 proxy client + + +The following wiki documentation exists on the SOCKS5 proxy: +- [Skywire SOCKS5 Proxy User Guide](https://github.com/skycoin/skywire/wiki/Skywire-SOCKS5-Proxy-User-Guide) +- [SSH over SOCKS5 Proxy](https://github.com/skycoin/skywire/wiki/SSH-over-SOCKS5-Proxy) + +The main difference between the vpn and the socks5 proxy is that the proxy is configured __per application__ while the vpn wraps the connections for the whole machine. + +The socks client usage (from `skywire cli`) is similar to the vpn, though the `skywire cli` subcommands and flags do not currently match from the one application to the other. This will be rectified. + +To use the SOCKS5 proxy client via `skywire cli`: +``` +skywire cli proxy list +``` +This will query the service discovery for a list of visor public keys which are running the proxy server. +[sd.skycoin.com/api/services?type=proxy](https://sd.skycoin.com/api/services?type=proxy) + +Sample output: +``` +031a924f5fb38d26fd8d795a498ae53f14782bc9f036f8ff283c479ac41af95ebd:3 | ID +024fdf44c126e122f09d591c8071a7355d4be9c561f85ea584e8ffe4e1ae8717f7:3 | ID +03ae05142dcf5aad70d1b58ea142476bac49874bfaa67a1369f601e0eb2f5842df:3 | US +0313a76e2c331669a0cb1a3b749930881f9881cca89b59ee52365d1c15141d9d83:3 | AU +03022fa8a0c38d20fae9335ef6aa780f5d762e1e161e607882923dc0d5a890f094:3 | SG +03e4b6326f9df0cff1372f52906a6d1ee03cf972338d532e17470e759362e45c87:3 | ID +0230689d26e5450e8c44faaba91813b7c2b00c1add3ad251e2d62ecca8041a849d:3 | MY +036ae558d5e6c5fc73cb6a329cb0006b4f659ecf9ae69c9e38996dfb65b1fb1c45:3 | ID +03a35c742ed17506834235b2256bb2b0a687de992e5ded52ca4d54fba3b00b8dbe:3 | SG +0259721a9e79e91ce8bc94bad52a6a381d50fcb05aaadc2c99201fd137fb71dfde:3 | CN +... +``` + +Select a key and start the proxy with: +``` +skywire cli proxy start --pk +``` + +View the status of the proxy: +``` +skywire cli proxy status +``` + +Check the ip address of the connection; for example, using `curl` via the socks5 proxy connection: +``` +curl -Lx socks5h://127.0.0.1:1080 http://ip.skycoin.com/ | jq +``` + +The connection may be consumed in a web browser via direct proxy configuration in browsers which support it, or using such extensions as `foxyproxy`. + +The connection may also be consumed in the terminal by setting `ALL_PROXY` environmental variable, or via the specific method used by a certain application. + +Examples of `ssh` over the socks5 proxy: + +Using `openbsd-netcat`: +``` +ssh user@host -p 22 -o "ProxyCommand=nc -X 5 -x 127.0.0.1:1080 %h %p" +``` + +Using `ncat` from `nmap`: +``` +ssh user@host -p 22 -o "ProxyCommand=ncat --proxy-type socks5 --proxy 127.0.0.1:1080 %h %p" +``` + +Stop the socks5 proxy client: +``` +skywire cli proxy stop +``` + +## Skycoin Rewards + +Running skywire on eligible hardware can earn rewards in skycoin. Currently, only package-based linux installations are supported for rewards. +Review the [mainnet rules](/mainnet_rules.md) article for the details. + +Set a reward address: +``` +skywire cli reward +``` +Visors meeting uptime and eligability requirements will recieve daily skycoin rewards for up to 8 visors per location / ip address. + +## Linux Packages + +Built Debian packages are maintained for skywire, as well as several build variants for archlinux. All packages provide a virtually identical installation, regardless of the distro. + +Consider the [PKGBUILD](https://github.com/skycoin/AUR/blob/main/skywire/PKGBUILD) as a reference for building and installing skywire on any linux distribution. + +Installing [skywire-bin](https://aur.archlinux.org/packages/skywire-bin) from the AUR will install the release binaries provided by the release section of this repository: +``` +yay -S skywire-bin +``` + +To build the debian packages using the release binaries: +``` +yay --mflags " -p cc.deb.PKGBUILD " -S skywire-bin +``` + +Installing [skywire](https://aur.archlinux.org/packages/skywire) from the AUR will compile binaries using the source archive for the latest version release: +``` +yay -S skywire +``` + +Build from git sources to the develop branch: +``` +yay --mflags " -p git.PKGBUILD " -S skywire +``` + +## How to create a GitHub release + +1. Make sure that `git` and [goreleaser](https://goreleaser.com/install) are installed. +2. Checkout to a commit you would like to create a release against. +3. Run `go mod vendor` and `go mod tidy`. +4. Make sure that `git status` is in clean state. Commit all vendor changes and source code changes. +5. Uncomment `draft: true` in `.goreleaser.yml` if this is a test release. +6. Create a `git` tag with desired release version and release name: `git tag -a 0.1.0 -m "First release"`, + where `0.1.0` is release version and `First release` is release name. +5. Push the created tag to the repository: `git push origin 0.1.0`, where `0.1.0` is release version. +6. [ ̶I̶s̶s̶u̶e̶ ̶a̶ ̶p̶e̶r̶s̶o̶n̶a̶l̶ ̶G̶i̶t̶H̶u̶b̶ ̶a̶c̶c̶e̶s̶s̶ ̶t̶o̶k̶e̶n̶.̶](https://github.com/settings/tokens) +7. ̶R̶u̶n̶ ̶`̶G̶I̶T̶H̶U̶B̶_̶T̶O̶K̶E̶N̶=̶y̶o̶u̶r̶_̶t̶o̶k̶e̶n̶ ̶m̶a̶k̶e̶ ̶g̶i̶t̶h̶u̶b̶-̶r̶e̶l̶e̶a̶s̶e̶`̶ +8. [Check the created GitHub release.](https://github.com/skycoin/skywire/releases/) diff --git a/vendor/github.com/skycoin/skywire/REWARDS.md b/vendor/github.com/skycoin/skywire/REWARDS.md new file mode 100644 index 00000000..4ad0bbf3 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/REWARDS.md @@ -0,0 +1,150 @@ +# Skycoin Reward System + +Skycoin rewards are the primary incentive for participation in the skywire network. + +This document details the administration of the reward system and distribution of rewards for the skywire network. + +User-facing details of this system can be found in the [mainnet rules article](mainnet_rules.md) + +This system replaces the [skywire whitelisting interface](https://whitelist.skycoin.com), and enables the daily distribution of rewards. + +### User Participation + +Eligible skywire visors based on the criteria outlined in the [mainnet rules](mainnet_rules.md) may receive rewards when the user sets a reward address; either from the hypervisor UI or from the CLI with: + +``` +skywire-cli reward +``` + +**NOTE: in order for the setting to persist updates for package-based linux installations, it is recommended to set the reward address in /etc/skywire.conf and run `skywire-autoconfig` to update the setting** + +### System Survey `node-info.json` + +The reward address is set in a text file called reward.txt inside the local folder specified in the visor's config. + +It is possible to view the survey that would be generated with + +``` +skywire cli survey +``` + +**Setting the reward address will generate a system survey** inside the local folder called node-info.json. + +It should be noted that the system survey generation requires root for many of its fields, but no essential field currently requires root + + +### Log & Survey Collection + +The log collection and [reward processing](#reward-processing) happens hourly via [skywire-reward.service](/scripts/rewards/services/skywire-reward.service) - triggered to run hourly by [skywire-reward.timer](/scripts/rewards/services/skywire-reward.timer). + +The log collection run can be viewed here: +https://fiber.skywire.dev/log-collection + +The surveys and transport logs are collected with + +``` +skywire cli log -s +``` + +The surveys are only permitted to be collected by `survey_whitelist` keys which are specified in the visor's config. + +These `survey_whitelist` keys are specified by the [conf service](https://conf.skywwire.skycoin.com) and are fetched / included in the visor's config when the config is generated. + +The collected surveys are then checked and backed up. + +The following scripts are used by the reward system: + +[`getlogs.sh`](/scripts/rewards/getlogs.sh) - a wrapper script for survey and transport bandwidth log collection via `skywire cli log` +[`reward.sh`](/scripts/rewards/reward.sh) - a wrapper script for reward calculation via `skywire cli rewards` +[`gettps.sh`](/scripts/rewards/gettps.sh) - a wrapper script for collecting responses to transport setup-node requests via `skywire svc tps ls` +[`testproxies.sh`](/scripts/rewards/testproxies.sh) - WIP - a wrapper script for testing curl response time over the skywire socks5 proxy (not used for reward calculation) + +### Reward Processing + +The rewards are calculated by `skywire cli rewards calc` with the aid of [`reward.sh`](scripts/rewards/reward.sh) to produce the reward distribution data for the previous day's uptime. + +### Per-IP reward limit + +The total share of rewards for any given ip address is limited to 8, or one share per visor which met uptime and other requirements. + +If there are more than 8 visors which meet uptime and other requirements,the reward shares are divided among those skycoin addresses set in the survey for the reward eligible visors at that ip address + +### MAC Address reward limit + +To avoid a user running multiple instances of skywire on virtual machines, the MAC addresses from the surveys are compared to the mac addresses in all other surveys. If any two visors list the same mac address for the first interface after `lo` these are considered the same machine and 1 reward share is divided evenly between all the visors which list the same MAC address. + +## Automation via systemd service + +Automation of the hourly log & survey collection is accomplished via systemd service and timer + +/etc/systemd/system/[`skywire-reward.service`](/scripts/rewards/services/skywire-reward.service) + +**Note: change the user and working directory in the above systemd service** + +This service is called by a timer which triggers it to run hourly + +/etc/systemd/system/[`skywire-reward.timer`](/scripts/rewards/services/skywire-reward.timer). + + +## fiber.skywire.dev + +The 'frontend' of the reward system, is currently running at [fiber.skywire.dev](https://fiber.skywire.dev) and is reliant upon on the output of certain cli commands ~~and some scripts~~ + +[`skywire cli rewards ui`](cmd/skywire-cli/commands/rewards/ui.go) serves the reward system frontend or user interface - via http and dmsghttp. + +The service which runs the reward system UI: +/etc/systemd/system/[`fiberreward.service`](/scripts/rewards/services/fiberreward.service) + +A wrapper script [`getlogs.sh`](scripts/rewards/getlogs.sh) is used to redirect the output of `skywire cli log` to a file, which is displayed at: + +https://fiber.skywire.dev/log-collection + +The above endpoint will live-update via streamed html / chunked transfer encoding when the hourly survey and log collection run is ongoing + +Here shows links to the reward calculations and distribution data by day: + +https://fiber.skywire.dev/skycoin-rewards + +on each linked page, the distribution data is displayed with a link to the explorer for that transaction if it was broadcast. Also displayed are the public keys and their reward shares, or the reason why they were not rewarded + +The frontend may be run either with flags or by using a conf file such as the following: +fr.conf +``` +WEBPORT=80 +#DMSGPORT=80 +REWARDPKS=('02114054bc4678537e1d07b459ca334a7515315676136dcedeb1fe99eadc4a52bf' '02b390f82db10067b05828b847ddbbf267c7bfb66046e2eb9b01ad81e097da7675' '026ccef9d8c87259579bc002ce1ffcf27ddd0ab1b6c08b39ad842b25e9da321c4f' '026ccef9d8c87259579bc002ce1ffcf27ddd0ab1b6c08b39ad842b25e9da321c4f' '03362e132beb963260cc4ccc5e13b611c30b6f143d53dc3fbcd1fed2247873dcc6') +DMSGHTTP_SK= + +``` + +`REWARDPKS` are public keys permitted to access the non public data generated & collected by the reward system; these keys are permitted as well to `POST` the raw transaction to be distributed. + + + +### Reward distribution transaction + +The reward system UI is served over dmsghttp. Keys which are whitelisted by the reward system are able to view the collected system surveys and other non-public reward system data. Additionally, these whitelisted keys are permitted to `POST` a signed raw transaction to the reward system, which will be broadcast by the reward system. In this way, it is possible to avoid having funds on the same machine as is running the reward system. + +This is accomplished by the following script: + +``` +#!/usr/bin/bash +source sendrewards.conf +skycoin-cli status ; [[ $? -ne 0 ]] && echo 'Skycoin wallet not running ; exiting' && exit 1 +skywire dmsg curl $REWARD_SYS_URL/reward -d "$(skycoin-cli createRawTransaction $WALLET_FILE -a $FROM_ADDRESS --csv <(skywire dmsg curl $REWARD_SYS_URL/$(skywire dmsg curl $REWARD_SYS_URL/skycoin-rewards/csv -s $REWARD_WL_SK) -s $REWARD_WL_SK | tr -d ' ' | awk -F, '{printf "%s,%.3f\n", $1, int($2*1000)/1000}' | grep -v '^,0.000$'))" -s $REWARD_WL_SK +``` + +The script sources a `.conf` file of the following format + +``` +WALLET_FILE="$HOME/.skycoin/wallets/.wlt" +FROM_ADDRESS="" +REWARD_WL_SK= +REWARD_SYS_URL="dmsg://:80" +``` + +before the script is run and the transaction is attempted to be broadcast, it's crucial to check that the hourly [log collection and reward calculation](https://fiber.skywire.dev/log-collection) is not ongoing. + +### Reward Notifications + +When the transaction is broadcast by the reward system, it's transaction ID is recorded by appending a file which is monitored by the reward telegram bot. The telegram bot will then generate a notification in https://t.me/skywire_reward when a change to that file is detected. **Note: this will eventually be supplemented with or replaced by a notification via skychat.** diff --git a/vendor/github.com/skycoin/skywire/dmsghttp-config.json b/vendor/github.com/skycoin/skywire/dmsghttp-config.json new file mode 100644 index 00000000..b9d54bdc --- /dev/null +++ b/vendor/github.com/skycoin/skywire/dmsghttp-config.json @@ -0,0 +1,76 @@ +{ + "test": { + "dmsg_servers": [ + { + "static": "024716428e6315d954356e9ad72bea32bb2b41aab5a54a9b5cb4313964016e64d8", + "server": { + "address": "139.144.183.24:30080" + } + }, + { + "static": "0228af3fd99c8d86a882495c8e0202bdd4da78c69e013065d8634286dd4a0ac098", + "server": { + "address": "139.162.55.79:30084" + } + }, + { + "static": "03d5b55d1133b26485c664cf8b95cff6746d1e321c34e48c9fed293eff0d6d49e5", + "server": { + "address": "170.187.228.44:30083" + } + } + ], + "dmsg_discovery": "dmsg://022e607e0914d6e7ccda7587f95790c09e126bbd506cc476a1eda852325aadd1aa:80", + "transport_discovery": "dmsg://02703cf828ea11d25b2c8eb0796132ecc7e53b22325b20ce3674ce5cd8693e4fb6:80", + "address_resolver": "dmsg://030eb7d8cf6eac40c19bbc433de6d6b9bb7a47f2e1d7095c6a01aa676471670ad2:80", + "route_finder": "dmsg://02ece5b69eaee13ef967b7eb67ca93f1dfddad3a51c9cb1808c4bd0d8d8aa32053:80", + "uptime_tracker": "dmsg://022c788cca11f208cdfd83ed0c2a8c7b661221736c461adc7c6738a2c1b041c7f8:80", + "service_discovery": "dmsg://038f751df4af75fb3d51f6693602bfe8289145e633ffdd1e67d686bea595f84d55:80" + }, + "prod": { + "dmsg_servers": [ + { + "static": "0371ab4bcff7b121f4b91f6856d6740c6f9dc1fe716977850aeb5d84378b300a13", + "server": { + "address": "139.162.160.227:30087" + } + }, + { + "static": "030c83534af1041aee60c2f124b682a9d60c6421876db7c67fc83a73c5effdbd96", + "server": { + "address": "188.121.99.59:8081" + } + }, + { + "static": "0326978f5a53aff537dbb47fed58b1f123af3b00132d365f1309a14db4168dcff7", + "server": { + "address": "70.121.23.42:9083" + } + }, + { + "static": "0281a102c82820e811368c8d028cf11b1a985043b726b1bcdb8fce89b27384b2cb", + "server": { + "address": "139.162.160.227:30086" + } + }, + { + "static": "03d5b55d1133b26485c664cf8b95cff6746d1e321c34e48c9fed293eff0d6d49e5", + "server": { + "address": "170.187.228.44:30083" + } + }, + { + "static": "0228af3fd99c8d86a882495c8e0202bdd4da78c69e013065d8634286dd4a0ac098", + "server": { + "address": "170.187.228.178:30084" + } + } + ], + "dmsg_discovery": "dmsg://022e607e0914d6e7ccda7587f95790c09e126bbd506cc476a1eda852325aadd1aa:80", + "transport_discovery": "dmsg://02b307aee5c8ce1666c63891f8af25ad2f0a47a243914c963942b3ba35b9d095ae:80", + "address_resolver": "dmsg://03234b2ee4128d1f78c180d06911102906c80795dfe41bd6253f2619c8b6252a02:80", + "route_finder": "dmsg://039d89c5eedfda4a28b0c58b0b643eff949f08e4f68c8357278081d26f5a592d74:80", + "uptime_tracker": "dmsg://022c424caa6239ba7d1d9d8f7dab56cd5ec6ae2ea9ad97bb94ad4b48f62a540d3f:80", + "service_discovery": "dmsg://0204890f9def4f9a5448c2e824c6a4afc85fd1f877322320898fafdf407cc6fef7:80" + } + } diff --git a/vendor/github.com/skycoin/skywire/mainnet_rules.md b/vendor/github.com/skycoin/skywire/mainnet_rules.md new file mode 100644 index 00000000..da4f7733 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/mainnet_rules.md @@ -0,0 +1,434 @@ +![skywire logo](https://user-images.githubusercontent.com/26845312/32426764-3495e3d8-c282-11e7-8fe8-8e60e90cb906.png) + +# Skywire Reward Eligibility Rules + +**We have transitioned to a new system with daily reward distribution** + + +* The rules in this article may change at any time, depending on if there are problems +* We will attempt to address any issues reported via [@skywire](https://t.me/skywire) Telegram channel +* Reward corrections are not possible after the rewards for a day have been distributed. + +The required minimum Skywire version will be incremented periodically. + +#### Table of Contents +* [Introduction](#introduction) +* [Uptime Reward Pool](#uptime-reward-pool) +* [Rules & Requirements](#rules--requirements) +* [Exceptions](#exceptions-for-deployment-changes-with-dmsghttp-config-chinese-users) +* [Verifying Requirements & Eligibility](#verifying-requirements--eligibility) + * [Version](#version) + * [Deployment](#deployment) + * [Uptime](#uptime) + * [Deployment](#deployment) + * [Skycoin Address](#skycoin-address) + * [Connection to DMSG network](#connection-to-dmsg-network) + * [Verifying other requirements](#verifying-other-requirements) +* [Reward System Overview](#reward-system-overview) +* ~~[Hardware](#hardware)~~ + +## Introduction + +
Updates to this article will be followed by a notification via the official Skywire PSA channel on Telegram. +
+
+ +All information about rewards will be published here. Please ask for clarification in the [@skywire](https://t.me/skywire) Telegram channel if some things appear to not be covered. Please join [@SkywirePSA](https://t.me/SkywirePSA) for public service announcements (PSA) regarding the skywire network, update notices, changes to this article, etc. + +Reward distribution notifications are on telegram [@skywire_reward](https://t.me/skywire_reward). + +Information about reward distribution as well as other metrics for the skywire network can be found at [fiber.skywire.dev](https://fiber.skywire.dev) + +# Uptime Reward Pool + +408000 Skycoin are distributed annually to those visors which meet the mimimum uptime and the other requirements listed below. + +The reward amount for a day is evenly divided among those eligible participants on the basis of having met uptime and other requirements, for the previous day. + +A total of up to ~1117.808 Skycoin are distributed daily in non leap-years. + +A total of up to ~1114.754 Skycoin are distributed daily in leap-years. + +## Rules & Requirements + +To receive Skycoin rewards for running skywire, the following requirements must be met: + + +* 1) **Minimum skywire version v1.3.25** - Cutoff September 1st 2024 + +* 2) **75% [uptime](#uptime) per day** minimum is required to be eligible to receive rewards + +* 3) The visor must be an **ARM or RISC architecture SBC** ~running on approved [hardware](#hardware)~ + +* 4) Visors must be running on **[the skywire production deployment](#deployment)** with a config that is updated on every version. No default keys or addresses of this configuration may be removed - but you can add keys where applicable. + +* 5) **Only 1 (one) visor per machine** + +* 6) **Up to 8 (eight) visors may each receive 1 (one) reward share per location (ip address)** + +* 7) **A valid [skycoin address](#skycoin-address)** must be set for the visor + +* 8) The visor must be **[connected to the DMSG network](#connection-to-dmsg-network)** + +* 9) **[Transports](#transportability) can be established to the visor** + +* 10) **The visor responds to [Transport Setup-Node requests](#transport-setup-node)** + +* 11) **The visor responds to [pings](#ping-latency-metric)** - needed for latency-based rewards + +* 12) **The visor produces [transport bandwidth logs](#transport-bandwidth-logs)** - needed for bandwidth-based rewards + +* 13) **The visor produces a [survey](#survey)** when queried over dmsg by any keys in the survey_whitelist array by default + + +### Exceptions for Deployment Changes with dmsghttp-config (Chinese users) + +All the production deployment services may be accessed by the visor over the dmsg network when the visor runs with a dmsghttp config. + +This type of config is generated automatically based on region (via `skywire cli config gen -b --bestproto`), to circumvent ISP blocking of http requests. + +In order to bootstrap the visor's to connection to the dmsg network (via TCP connection to an individual dmsg server) the `dmsghttp-config.json` is provided with the skywire binary release. + +In the instance that the skywire production deployment changes - specifically the dmsg servers - it will be necessary to update to the next version or package release which fixes the dmsg servers - or else to manually update the `dmsghttp-config.json` which is provided by your skywire installation. + +Currently, **there is no mechanism for updating the dmsghttp-config.json which does not require an http request** ; a request which may be blocked depending on region. + +In this instance, the visor will not connect to any service because it is not connected to the dmsg network, so it will not be possible for the visor to accumulate uptime or for the reward system to collect the survey, which are prerequisite for reward eligibility. + +As a consequence of this; any visors running a dmsghttp-config, and hence any visors running in regions such as China, the minimum version requirement for obtaining rewards is not only the latest available version, but __the latest release of the package__ unless the dmsghttp-config.json is updated manually. + +## Verifying Requirements & Eligibility + +### Version + +View the version of skywire you are running with: +``` +skywire cli -v +skywire visor -v +``` + +The update deadlines specify the version of software required as of (i.e. on or before) the specified date in order to maintain reward eligibility: + +**Reward eligibility after 7-1-2024 requires Skywire v1.3.23** + +Requirement established 6-25-2024 + +Rewards Cutoff date for updating 7-1-2024 + +**Reward eligibility after 9-1-2024 requires Skywire v1.3.25** + +Requirement established 8-21-2024 + +Rewards Cutoff date for updating 9-1-2024 + + +### Deployment + +The deployment your visor is running on can be verified by comparing the services configured in the visor's `.json` config against [conf.skywire.skycoin.com](https://conf.skywire.skycoin.com) + +``` +cat /opt/skywire/skywire.json +``` + +The service configuration will be automatically updated any time a config is generated or regenerated. + +For those visors in china or those running a dmsghttp-config, compare the dmsghttp-config of your current installation with the dmsghttp-config on the develop branch of [github.com/skycoin/skywire](https://github.com/skycoin/skywire) + + +### Uptime + +Daily uptime statistics for all visors may be accessed via the +- [uptime tracker](https://ut.skywire.skycoin.com/uptimes?v=v2) +or using skywire cli +- `skywire cli ut -n0 -k ` + +### Skycoin Address + +The skycoin address to be rewarded can be set from the cli: + +``` +skywire cli reward +``` + +![image](https://user-images.githubusercontent.com/36607567/213941582-f57213b8-2acd-4c9a-a2c0-9089a8c2604e.png) + + +or via the hypervisor UI. + +![image](https://user-images.githubusercontent.com/36607567/213941478-34c81493-9c3c-40c2-ac22-e33e3683a16f.png) + +the example above shows the genesis address for the skycoin blockchain. **Please do not use the genesis address.** + +It is __highly recommended__ to set the reward address in the file `/etc/skywire.conf` by adding this line to the file: + +``` +REWARDSKYADDR=('') +``` + +Add your skycoin address there and run `skywire-autoconfig` on linux (assumes you have installed the package) + +If this file does not exist for you, it can be created with `skywire cli config gen -q | tee /etc/skywire.conf` + +**If you do this, please uncomment `PKGENV=true` before saving the file** + +### Connection to DMSG network + +For any given visor, the system hardware survey, transport setup-node survey, and transport bandwidth logs are collected **hourly** by the reward system over dmsg. + +This can be verified by examining the visor's logging: + +![image](https://github.com/skycoin/skywire/assets/36607567/eb66bca1-fc9e-4c80-a38a-e00a73f675d0) + +The collected surveys and transport bandwidth log files should be visible in the survey index here: + +[fiber.skywire.dev/log-collection/tree](https://fiber.skywire.dev/log-collection/tree) + +An example of one such entry: +``` +├─┬025e3e4e324a3ac2771e32b798ca3d8859e585ac36938b15a31d20982de6aa31fc +│ ├──2024-05-02.csv +│ ├──2024-05-03.csv +│ ├──2024-05-04.csv +│ ├──2024-05-05.csv +│ ├──2024-05-06.csv +│ ├──2024-05-07.csv +│ ├──health.json Age: 13m5s {"build_info":{"version":"v1.3.21","commit":"5131943","date":"2024-04-13T15:03:26Z"},"started_at":"2024-05-07T08:52:09.895919222Z"} +│ ├──node-info.json "v1.3.21" +│ └──tp.json Age: 6m56s [] +``` + +Note: the transport bandwidth logging CSV files will only exist if it was generated; i.e. if there were transports to that visor which handled traffic. + +Note: the system survey (node-info.json) will only exist if the reward address is set. + +If your visor is not generating such logging or errors are indicated, please reach out to us on telegram [@skywire](https://t.me/skywire) for assistance + +### Transportability + +It is not required that a visor run any service, such as a vpn or socks5 proxy server, whichpermitsdirect access tothe internet from yor ip address. However, it is required that the visor is able to act as a hop along a route. A module is active at runtime which checks that transports may be established to that visor - the visor crates a dmsg transport to itself every few minutes to ensure transportability. If it's not possible to create a dmsg transport to the same visor after three attempts,the visor will shut down automatically. **It is expected that the visor will be restarted by a process control mechanism if the visor shuts down for any reason.** In the officially supported linux packages, systemd will restart the visor if it stops; regardless of the exit status of the process. + +### Transport setup node + +Previously, the transport setup node was run continuously as part of the reward system to ensure that visors were responding as expected to transport setup-node requests. However, there were intermittent issues with reliability of the results ; because there is no caching mechanism for responsiveness to transport setup-node requests as there exists for uptime. + +Currently, the transport setup-nodes which are configured for the visor are included in the survey and verified as an eligibility requirement for rewards by the reward system. + +### Ping Latency metric + +Not yet implemented + +### Transport bandwidth logs + +The visor will only produce transport bandwidth logs in response to transports being established to them. These are collected, along with the system survey, and are displayed on the reward system [here](https://fiber.skywire.dev/log-collection/tplogs) + +In the future, it is anticipated that the transport bandwidth logs and ping metric will be collected by the transport discovery automatically. + +### Survey + +On setting the skycoin reward address, the visor will generate and serve a sysytem survey over dmsg. Only keys which are whitelisted in the survey_whitelist array of the visor's config will have access to collect the survey. + +To print the survey (approximately) as it would be served, one can use `skywire cli survey` + +**The purpose of the survey is strictly for checking [eligibility requirements](#rules--requirements) numbers 3 through 7.** + +### Verifying other requirements + +If the visor is not able to meet the [eligibility requirements](#rules--requirements) numbers 8 through 13, that is usually not the fault of the user - nor is it something the user is expected to troubleshoot on their own at this time. Please ask for assistance on telegram [@skywire](https://t.me/skywire) + +## Reward System overview + +The skycoin reward address may be set for each visor using `skywire cli` or for all visors connected to a hypervisor from the hypervisor UI + +The skycoin reward address is in a text file contained in the "local" folder (local_path in the skywire config file) i.e `local/reward.txt`. + +The skycoin reward address is also included with the [system hardware survey](https://github.com/skycoin/skywire/tree/develop/cmd/skywire/README.md#survey) and served, along with transport logs, via dmsghttp. + +The system survey (`local/node-info.json`) is fetched hourly by the reward system via `skywire cli log`; along with transport bandwidth logs. + +A survey of transports which have been set by transport setup-nodes are also collected hourly, from all visors which have had surveys collected + +The index of the collected files may be viewed at [fiber.skywire.dev/log-collection/tree](https://fiber.skywire.dev/log-collection/tree) + +Once collected from the nodes, the surveys for those visors which met uptime are checked to verify hardware and other requirements, etc. + +The system survey is only made available to those keys which are whitelisted for survey collection, but is additionally available to any `hypervisor` or `dmsgpty_whitelist` keys set in the config for a given visor. + +**Setting a skycoin address is considered as consent for collecting the survey.** + +The public keys which require to be whitelisted in order to collect the surveys, for the purpose of reward eligibility verification, should populate in the visor's config automatically when the config is generated. + +## Reward System Funding & Distributions + +The reward system is funded on a monthly basis. Sometimes there are unexpected or unavoidable delays in the funding. In these instances, rewards will be distributed based on the data generated wen the system is funded + +## Deployment Outages + +While we do our best to maintain the skywire production deployment, there have been instances of issues or outages in the past. We attempt to correct these outages as soon as possible and avoid recurrant disruptions. + +The policy for handling rewards in the instance of a deployment outage is to repeat the distribution for the last day where uptime was unaffected by the outage; for the duration of the outage. + +## Hardware + +**Virtual Machines, servers, and personal computers are currently not eligible to collect rewards** + +_NOTE: this list of hardware was used with the initial implementation of the reward system - which required an application with pictures to be submitted. This no longer applies. The new reward system does not differentiate hardware except by architecture - only x86_64 / amd64 hardware is excluded from rewards currently. Every visor will receive the same reward amount, regardless of the hardware specs. It should be noted that the main difference between using cheap or low-end hardware and high-end hardware is the ease of maintenance and speed of updates for the node operator._ + +The following hardware is eligible for rewards: + +#### Orange Pi + - Prime + - 2G-IOT + - 4G-IOT + - i96 + - Lite + - Lite2 + - One + - One-Plus + - PC + - PC-Plus + - PC2 + - Plus + - Plus2 + - Plus2E + - RK3399 + - Win + - Win-Plus + - Zero + - Zero LTS + - Zero-Plus + - Zero-Plus2 + - 3 + +#### Raspberry Pi + - 1-Model-A+ + - 1-Model-B+ + - 2-Model-B + - 3-Model-B + - 3-Model-B+ + - 4-Model-B + - Compute Module 3 + - Compute Module 4 + - Zero-W + - Zero + +#### Asus + - Tinkerboard + +#### Banana Pi + - BPI-D1 + - BPI-G1 + - BPI-M1 + - BPI-M1+ + - BPI-M2 + - BPI-M2+ + - BPI-M2-Berry + - BPI-M2M + - BPI-M2U + - BPI-M64 + - BPI-R2 + - BPI-R3 + - BPI-Zero + +#### Beelink + - X2 + +#### Cubieboard + - Cubietruck + - Cubietruck-Plus + - 1 + - 2 + - 4 + +#### Geniatech + - Developer Board IV + +#### Helios + - 4 + +#### Libre Computer + - Le-Potato-AML-S905X-CC + - Renegade-ROC-RK3328-CC + - Tritium-ALL-H3-CC + +#### MQMaker + - MiQi + +#### NanoPi + - NanoPi + - 2 + - 2-Fire + - A64 + - K2 + - M1 + - M1-plus + - M2 + - M2A + - M3 + - M4 + - NEO + - NEO-Air + - NEO-Core + - NEO-Core2 + - NEO2 + - NEO2-Black + - S2 + - Smart4418 + +#### Odroid + - C2 + - C4 + - HC1 + - HC2 + - MC1 + - XU4 + +#### Olimex + - Lime1 + - Lime2 + - Lime2-eMMC + - LimeA33 + - Micro + +#### Pine + - Pine-A64 + - Pinebook-A64 + - Sopine-A64 + - Rock64 + - ROCKPro64 + +#### ROCKPI + - Rockpi 4 + - Rockpi S + - Rockpi E + - Rockpi N10 + +#### SolidRun + - CuBox-i + - CuBox-Pulse + - Humming-Board + - Humming-Board-Pulse + - ClearCloud-8K + - ClearFog-A38 + - ClearFog-GT-8K + +#### Udoo + - Blu + - Bricks + - Dual + - Neo + - Quad + - X86 + +#### X96 Android TV Box + - X96 mini + +#### Dolamee + - A95X F1 Smart TV Box + +#### Radxa + - ROCK Pi S + +#### ZTE + - ZXV10 B860H + +**If you would like to use other boards please contact the team first for approval ; only the boards on the list are guaranteed to be eligible for rewards.** diff --git a/vendor/github.com/skycoin/skywire/services-config.json b/vendor/github.com/skycoin/skywire/services-config.json new file mode 100644 index 00000000..7dea1122 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/services-config.json @@ -0,0 +1,92 @@ +{ + "test": { + "conf": "http://conf.skywire.dev", + "dmsg_discovery": "http://dmsgd.skywire.dev", + "transport_discovery": "http://tpd.skywire.dev", + "address_resolver": "http://ar.skywire.dev", + "route_finder": "http://rf.skywire.dev", + "route_setup_nodes": [ + "026c2a3e92d6253c5abd71a42628db6fca9dd9aa037ab6f4e3a31108558dfd87cf" + ], + "transport_setup": [ + "03530b786c670fc7f5ab9021478c7ec9cd06a03f3ea1416c50c4a8889ef5bba80e", + "03271c0de223b80400d9bd4b7722b536a245eb6c9c3176781ee41e7bac8f9bad21", + "03a792e6d960c88c6fb2184ee4f16714c58b55f0746840617a19f7dd6e021699d9", + "0313efedc579f57f05d4f5bc3fbf0261f31e51cdcfde7e568169acf92c78868926", + "025c7bbf23e3441a36d7e8a1e9d717921e2a49a2ce035680fec4808a048d244c8a", + "030eb6967f6e23e81db0d214f925fc5ce3371e1b059fb8379ae3eb1edfc95e0b46", + "02e582c0a5e5563aad47f561b272e4c3a9f7ac716258b58e58eb50afd83c286a7f", + "02ddc6c749d6ed067bb68df19c9bcb1a58b7587464043b1707398ffa26a9746b26", + "03aa0b1c4e23616872058c11c6efba777c130a85eaf909945d697399a1eb08426d", + "03adb2c924987d8deef04d02bd95236c5ae172fe5dfe7273e0461d96bf4bc220be" + ], + "uptime_tracker": "http://ut.skywire.dev", + "service_discovery": "http://sd.skywire.dev", + "stun_servers": [ + "139.162.12.30:3478", + "170.187.228.181:3478", + "172.104.161.184:3478", + "170.187.231.137:3478", + "143.42.74.91:3478", + "170.187.225.78:3478", + "143.42.78.123:3478", + "139.162.12.244:3478" + ], + "dns_server": "1.1.1.1", + "survey_whitelist": [ + "02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637", + "03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3", + "020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9", + "027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1", + "031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65", + "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a", + "03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4" + ] + }, + "prod": { + "conf": "http://conf.skywire.skycoin.com", + "dmsg_discovery": "http://dmsgd.skywire.skycoin.com", + "transport_discovery": "http://tpd.skywire.skycoin.com", + "address_resolver": "http://ar.skywire.skycoin.com", + "route_finder": "http://rf.skywire.skycoin.com", + "route_setup_nodes": [ + "0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557", + "024fbd3997d4260f731b01abcfce60b8967a6d4c6a11d1008812810ea1437ce438", + "03b87c282f6e9f70d97aeea90b07cf09864a235ef718725632d067873431dd1015" + ], + "transport_setup": [ + "03530b786c670fc7f5ab9021478c7ec9cd06a03f3ea1416c50c4a8889ef5bba80e", + "03271c0de223b80400d9bd4b7722b536a245eb6c9c3176781ee41e7bac8f9bad21", + "03a792e6d960c88c6fb2184ee4f16714c58b55f0746840617a19f7dd6e021699d9", + "0313efedc579f57f05d4f5bc3fbf0261f31e51cdcfde7e568169acf92c78868926", + "025c7bbf23e3441a36d7e8a1e9d717921e2a49a2ce035680fec4808a048d244c8a", + "030eb6967f6e23e81db0d214f925fc5ce3371e1b059fb8379ae3eb1edfc95e0b46", + "02e582c0a5e5563aad47f561b272e4c3a9f7ac716258b58e58eb50afd83c286a7f", + "02ddc6c749d6ed067bb68df19c9bcb1a58b7587464043b1707398ffa26a9746b26", + "03aa0b1c4e23616872058c11c6efba777c130a85eaf909945d697399a1eb08426d", + "03adb2c924987d8deef04d02bd95236c5ae172fe5dfe7273e0461d96bf4bc220be" + ], + "uptime_tracker": "http://ut.skywire.skycoin.com", + "service_discovery": "http://sd.skycoin.com", + "stun_servers": [ + "139.162.30.112:3478", + "192.53.118.31:3478", + "192.53.118.61:3478", + "170.187.228.44:3478", + "170.187.228.178:3478", + "139.162.30.129:3478", + "192.53.118.134:3478", + "192.53.118.209:3478" + ], + "dns_server": "1.1.1.1", + "survey_whitelist": [ + "02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637", + "03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3", + "020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9", + "027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1", + "031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65", + "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a", + "03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4" + ] + } +} diff --git a/vendor/github.com/skycoin/skywire/skywire.go b/vendor/github.com/skycoin/skywire/skywire.go new file mode 100644 index 00000000..ac53ec55 --- /dev/null +++ b/vendor/github.com/skycoin/skywire/skywire.go @@ -0,0 +1,98 @@ +// Package skywire skywire.go +package skywire + +import ( + _ "embed" + "encoding/json" + "log" + + "github.com/skycoin/skywire-utilities/pkg/cipher" +) + +/* +Embedded Deployment Defaults + +Change the contents of services-config.json and / or dmsghttp-config.json to embed updated values +*/ + +// ServicesJSON is the embedded services-config.json file +// +//go:embed services-config.json +var ServicesJSON []byte + +// DmsghttpJSON is the embedded dmsghttp-config.json file +// +//go:embed dmsghttp-config.json +var DmsghttpJSON []byte + +// EnvServices is the wrapper struct for the outer JSON - i.e. 'prod' or 'test' deployment config +type EnvServices struct { + Test json.RawMessage `json:"test"` + Prod json.RawMessage `json:"prod"` +} + +// Services are URLs, IP addresses, and public keys of the skywire services as deployed +type Services struct { + DmsgDiscovery string `json:"dmsg_discovery,omitempty"` + TransportDiscovery string `json:"transport_discovery,omitempty"` + AddressResolver string `json:"address_resolver,omitempty"` + RouteFinder string `json:"route_finder,omitempty"` + RouteSetupNodes []cipher.PubKey `json:"route_setup_nodes,omitempty"` + TransportSetupPKs []cipher.PubKey `json:"transport_setup,omitempty"` + UptimeTracker string `json:"uptime_tracker,omitempty"` + ServiceDiscovery string `json:"service_discovery,omitempty"` + StunServers []string `json:"stun_servers,omitempty"` + DNSServer string `json:"dns_server,omitempty"` + SurveyWhitelist []cipher.PubKey `json:"survey_whitelist,omitempty"` +} + +// Conf is the configuration URL for the deployment which may be fetched on `skywire cli config gen` +type Conf struct { + Conf string `json:"conf,omitempty"` +} + +// Prod is the production deployment services +var Prod Services + +// ProdConf is the service configuration address / URL for the skywire production deployment +var ProdConf Conf + +// Test is the test deployment services +var Test Services + +// TestConf is the service configuration address / URL for the skywire test deployment +var TestConf Conf + +// initialize the embedded files into variables +func init() { + var js interface{} + err := json.Unmarshal([]byte(ServicesJSON), &js) + if err != nil { + log.Panic("services-config.json ", err) + } + err = json.Unmarshal([]byte(DmsghttpJSON), &js) + if err != nil { + log.Panic("dmsghttp-config.json ", err) + } + var envServices EnvServices + err = json.Unmarshal(ServicesJSON, &envServices) + if err != nil { + log.Panic(err) + } + err = json.Unmarshal(envServices.Prod, &Prod) + if err != nil { + log.Panic(err) + } + err = json.Unmarshal(envServices.Prod, &ProdConf) + if err != nil { + log.Panic(err) + } + err = json.Unmarshal(envServices.Test, &Test) + if err != nil { + log.Panic(err) + } + err = json.Unmarshal(envServices.Test, &TestConf) + if err != nil { + log.Panic(err) + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index a2ac751b..f6a4f40f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -457,7 +457,7 @@ github.com/rs/cors ## explicit; go 1.13 github.com/sirupsen/logrus github.com/sirupsen/logrus/hooks/syslog -# github.com/skycoin/dmsg v1.3.26-0.20240910062314-dc25f3d9ea6c +# github.com/skycoin/dmsg v1.3.26-0.20240922174815-ced25b343ec5 ## explicit; go 1.21 github.com/skycoin/dmsg/internal/servermetrics github.com/skycoin/dmsg/pkg/direct @@ -481,8 +481,9 @@ github.com/skycoin/skycoin/src/cipher/ripemd160 github.com/skycoin/skycoin/src/cipher/secp256k1-go github.com/skycoin/skycoin/src/cipher/secp256k1-go/secp256k1-go2 github.com/skycoin/skycoin/src/util/logging -# github.com/skycoin/skywire v1.3.25-beta +# github.com/skycoin/skywire v1.3.26-0.20240922162315-789cef41c9a1 ## explicit; go 1.21 +github.com/skycoin/skywire github.com/skycoin/skywire/cmd/setup-node/commands github.com/skycoin/skywire/internal/httpauth github.com/skycoin/skywire/internal/packetfilter