From 28d542e347bffd60e69cac74172e4ccaae07449c Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Tue, 22 Mar 2022 15:55:21 +0430 Subject: [PATCH] switch from internal skyenv to skywire-utilities/pkg/skyenv --- cmd/apps/skychat/chat.go | 2 +- cmd/apps/skysocks-client/skysocks-client.go | 2 +- cmd/apps/skysocks/skysocks.go | 2 +- cmd/apps/vpn-client/vpn-client.go | 2 +- cmd/apps/vpn-server/vpn-server.go | 2 +- cmd/skywire-cli/commands/config/gen.go | 2 +- cmd/skywire-cli/commands/mdisc/root.go | 2 +- cmd/skywire-cli/commands/rtfind/root.go | 2 +- go.mod | 2 +- go.sum | 3 ++- internal/gui/gui.go | 2 +- internal/skysocks/client.go | 2 +- internal/skysocks/common.go | 2 +- internal/skysocks/server.go | 2 +- internal/vpn/client.go | 2 +- pkg/app/appdisc/factory.go | 2 +- pkg/app/appserver/proc.go | 2 +- pkg/router/router.go | 2 +- pkg/router/routerclient/client.go | 2 +- pkg/setup/node.go | 2 +- pkg/setup/setupclient/client.go | 2 +- pkg/transport/managed_transport.go | 2 +- pkg/transport/manager.go | 2 +- pkg/transport/setup/visor.go | 2 +- pkg/visor/api.go | 2 +- pkg/visor/dmsgtracker/dmsg_tracker.go | 2 +- pkg/visor/dmsgtracker/dmsg_tracker_test.go | 2 +- pkg/visor/hypervisor.go | 2 +- pkg/visor/hypervisorconfig/config.go | 2 +- pkg/visor/init.go | 2 +- pkg/visor/rpc_client.go | 2 +- pkg/visor/visorconfig/config.go | 2 +- pkg/visor/visorconfig/parse.go | 2 +- pkg/visor/visorconfig/v1_test.go | 2 +- .../desktop-deinstaller/deinstaller.go | 2 +- .../skywire-utilities/pkg/skyenv/dmsgpty.go | 1 + .../pkg/skyenv/dmsgpty_unix.go | 14 ++++++++++++ .../pkg/skyenv/dmsgpty_windows.go | 18 +++++++++++++++ .../skywire-utilities/pkg}/skyenv/values.go | 22 +++++++++---------- .../pkg}/skyenv/values_darwin.go | 0 .../pkg}/skyenv/values_linux.go | 0 .../pkg}/skyenv/values_windows.go | 0 vendor/modules.txt | 3 ++- 43 files changed, 81 insertions(+), 48 deletions(-) create mode 100644 vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty.go create mode 100644 vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty_unix.go create mode 100644 vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty_windows.go rename {pkg => vendor/github.com/skycoin/skywire-utilities/pkg}/skyenv/values.go (95%) rename {pkg => vendor/github.com/skycoin/skywire-utilities/pkg}/skyenv/values_darwin.go (100%) rename {pkg => vendor/github.com/skycoin/skywire-utilities/pkg}/skyenv/values_linux.go (100%) rename {pkg => vendor/github.com/skycoin/skywire-utilities/pkg}/skyenv/values_windows.go (100%) diff --git a/cmd/apps/skychat/chat.go b/cmd/apps/skychat/chat.go index b6e2f56989..8c3d32be1f 100644 --- a/cmd/apps/skychat/chat.go +++ b/cmd/apps/skychat/chat.go @@ -23,10 +23,10 @@ import ( "github.com/skycoin/skywire-utilities/pkg/buildinfo" "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/netutil" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app" "github.com/skycoin/skywire/pkg/app/appnet" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" ) const ( diff --git a/cmd/apps/skysocks-client/skysocks-client.go b/cmd/apps/skysocks-client/skysocks-client.go index ac753691c5..d98fc04864 100644 --- a/cmd/apps/skysocks-client/skysocks-client.go +++ b/cmd/apps/skysocks-client/skysocks-client.go @@ -16,11 +16,11 @@ import ( "github.com/skycoin/skywire-utilities/pkg/buildinfo" "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/netutil" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/internal/skysocks" "github.com/skycoin/skywire/pkg/app" "github.com/skycoin/skywire/pkg/app/appnet" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" ) const ( diff --git a/cmd/apps/skysocks/skysocks.go b/cmd/apps/skysocks/skysocks.go index 53eb71a7bf..6b39e47466 100644 --- a/cmd/apps/skysocks/skysocks.go +++ b/cmd/apps/skysocks/skysocks.go @@ -14,11 +14,11 @@ import ( "github.com/sirupsen/logrus" "github.com/skycoin/skywire-utilities/pkg/buildinfo" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/internal/skysocks" "github.com/skycoin/skywire/pkg/app" "github.com/skycoin/skywire/pkg/app/appnet" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" ) const ( diff --git a/cmd/apps/vpn-client/vpn-client.go b/cmd/apps/vpn-client/vpn-client.go index 2e61ab5016..b1b81d7a78 100644 --- a/cmd/apps/vpn-client/vpn-client.go +++ b/cmd/apps/vpn-client/vpn-client.go @@ -12,10 +12,10 @@ import ( ipc "github.com/james-barrow/golang-ipc" "github.com/skycoin/skywire-utilities/pkg/cipher" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/internal/vpn" "github.com/skycoin/skywire/pkg/app" "github.com/skycoin/skywire/pkg/app/appevent" - "github.com/skycoin/skywire/pkg/skyenv" ) var ( diff --git a/cmd/apps/vpn-server/vpn-server.go b/cmd/apps/vpn-server/vpn-server.go index 54066cffe5..b340d74e88 100644 --- a/cmd/apps/vpn-server/vpn-server.go +++ b/cmd/apps/vpn-server/vpn-server.go @@ -10,11 +10,11 @@ import ( "github.com/sirupsen/logrus" "github.com/skycoin/skywire-utilities/pkg/cipher" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/internal/vpn" "github.com/skycoin/skywire/pkg/app" "github.com/skycoin/skywire/pkg/app/appnet" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" ) const ( diff --git a/cmd/skywire-cli/commands/config/gen.go b/cmd/skywire-cli/commands/config/gen.go index 712e0aa195..b9f585118d 100644 --- a/cmd/skywire-cli/commands/config/gen.go +++ b/cmd/skywire-cli/commands/config/gen.go @@ -14,8 +14,8 @@ import ( "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/netutil" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/launcher" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/visor/visorconfig" ) diff --git a/cmd/skywire-cli/commands/mdisc/root.go b/cmd/skywire-cli/commands/mdisc/root.go index 9959d5d043..aa48645931 100644 --- a/cmd/skywire-cli/commands/mdisc/root.go +++ b/cmd/skywire-cli/commands/mdisc/root.go @@ -12,8 +12,8 @@ import ( "github.com/skycoin/skycoin/src/util/logging" "github.com/spf13/cobra" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/cmd/skywire-cli/internal" - "github.com/skycoin/skywire/pkg/skyenv" ) var mdAddr string diff --git a/cmd/skywire-cli/commands/rtfind/root.go b/cmd/skywire-cli/commands/rtfind/root.go index ae89560fe1..1c7799b903 100644 --- a/cmd/skywire-cli/commands/rtfind/root.go +++ b/cmd/skywire-cli/commands/rtfind/root.go @@ -9,10 +9,10 @@ import ( "golang.org/x/net/context" "github.com/skycoin/skywire-utilities/pkg/cipher" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/cmd/skywire-cli/internal" "github.com/skycoin/skywire/pkg/routefinder/rfclient" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" ) var frAddr string diff --git a/go.mod b/go.mod index 5b11375159..db414c425f 100644 --- a/go.mod +++ b/go.mod @@ -49,7 +49,7 @@ require ( require ( github.com/go-chi/chi/v5 v5.0.8-0.20220103230436-7dbe9a0bd10f github.com/james-barrow/golang-ipc v0.0.0-20210227130457-95e7cc81f5e2 - github.com/skycoin/skywire-utilities v0.0.0-20220308074734-3ac20b7c3254 + github.com/skycoin/skywire-utilities v0.0.0-20220321002722-7d4b15ff5211 ) require ( diff --git a/go.sum b/go.sum index a59f931bf9..0d05d2f395 100644 --- a/go.sum +++ b/go.sum @@ -493,8 +493,9 @@ github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6 h1:1Nc5EBY6pjfw1kwW0 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-utilities v0.0.0-20220308074734-3ac20b7c3254 h1:0DGKXYfz4pMupdvyxDraibNsHAaS4rsuKTYnkQKyL/E= github.com/skycoin/skywire-utilities v0.0.0-20220308074734-3ac20b7c3254/go.mod h1:7l3pPv/3lGaa9mdni0wvXxSOLql36u3i2SDXhZOi78s= +github.com/skycoin/skywire-utilities v0.0.0-20220321002722-7d4b15ff5211 h1:iEQL310u/j/cljfyI7m9WjBycPiRiTl5auLRWljlpyk= +github.com/skycoin/skywire-utilities v0.0.0-20220321002722-7d4b15ff5211/go.mod h1:9fOsut+rqCBd33NPF3cuolXrw8uQESYshSvdYMaZNEo= github.com/skycoin/yamux v0.0.0-20200803175205-571ceb89da9f h1:A5dEM1OE9YhN3LciZU9qPjo7fJ46JeHNi3JCroDkK0Y= github.com/skycoin/yamux v0.0.0-20200803175205-571ceb89da9f/go.mod h1:48cleOxgkiLbgv322LOg2Vrxtu180Mb8GG1HbuhmFYM= github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 h1:TG/diQgUe0pntT/2D9tmUCz4VNwm9MfrtPr0SU2qSX8= diff --git a/internal/gui/gui.go b/internal/gui/gui.go index b1b0fb3ac2..52ddfcb620 100644 --- a/internal/gui/gui.go +++ b/internal/gui/gui.go @@ -19,7 +19,7 @@ import ( "github.com/skycoin/skycoin/src/util/logging" "github.com/toqueteos/webbrowser" - "github.com/skycoin/skywire/pkg/skyenv" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/visor/visorconfig" ) diff --git a/internal/skysocks/client.go b/internal/skysocks/client.go index eb137eb345..a3db8a21f3 100644 --- a/internal/skysocks/client.go +++ b/internal/skysocks/client.go @@ -12,8 +12,8 @@ import ( "github.com/skycoin/skycoin/src/util/logging" "github.com/skycoin/yamux" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/router" - "github.com/skycoin/skywire/pkg/skyenv" ) // Log is skysocks package level logger, it can be replaced with a different one from outside the package diff --git a/internal/skysocks/common.go b/internal/skysocks/common.go index f8fe17e46e..725cf78870 100644 --- a/internal/skysocks/common.go +++ b/internal/skysocks/common.go @@ -5,7 +5,7 @@ import ( ipc "github.com/james-barrow/golang-ipc" - "github.com/skycoin/skywire/pkg/skyenv" + "github.com/skycoin/skywire-utilities/pkg/skyenv" ) func listenIPC(ipcClient *ipc.Client, appName string, onClose func()) { diff --git a/internal/skysocks/server.go b/internal/skysocks/server.go index ece5dee5dc..635d1a8ee3 100644 --- a/internal/skysocks/server.go +++ b/internal/skysocks/server.go @@ -12,7 +12,7 @@ import ( "github.com/sirupsen/logrus" "github.com/skycoin/yamux" - "github.com/skycoin/skywire/pkg/skyenv" + "github.com/skycoin/skywire-utilities/pkg/skyenv" ) // Server implements multiplexing proxy server using yamux. diff --git a/internal/vpn/client.go b/internal/vpn/client.go index e13d85181a..010f822d64 100644 --- a/internal/vpn/client.go +++ b/internal/vpn/client.go @@ -18,10 +18,10 @@ import ( "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/netutil" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app" "github.com/skycoin/skywire/pkg/app/appnet" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" ) const ( diff --git a/pkg/app/appdisc/factory.go b/pkg/app/appdisc/factory.go index af38b73378..6f6b6425a5 100644 --- a/pkg/app/appdisc/factory.go +++ b/pkg/app/appdisc/factory.go @@ -7,9 +7,9 @@ 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/skywire/pkg/app/appcommon" "github.com/skycoin/skywire/pkg/servicedisc" - "github.com/skycoin/skywire/pkg/skyenv" ) // Factory creates appdisc.Updater instances based on the app name. diff --git a/pkg/app/appserver/proc.go b/pkg/app/appserver/proc.go index bb5accebfb..fa3897e4c9 100644 --- a/pkg/app/appserver/proc.go +++ b/pkg/app/appserver/proc.go @@ -16,10 +16,10 @@ import ( ipc "github.com/james-barrow/golang-ipc" "github.com/skycoin/skycoin/src/util/logging" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/appcommon" "github.com/skycoin/skywire/pkg/app/appdisc" "github.com/skycoin/skywire/pkg/app/appnet" - "github.com/skycoin/skywire/pkg/skyenv" ) var ( diff --git a/pkg/router/router.go b/pkg/router/router.go index c85d23087b..06c814e920 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -17,10 +17,10 @@ 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/skywire/pkg/routefinder/rfclient" "github.com/skycoin/skywire/pkg/routing" "github.com/skycoin/skywire/pkg/setup/setupclient" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport" "github.com/skycoin/skywire/pkg/transport/network" ) diff --git a/pkg/router/routerclient/client.go b/pkg/router/routerclient/client.go index 252eccd7f7..1108fdd9bf 100644 --- a/pkg/router/routerclient/client.go +++ b/pkg/router/routerclient/client.go @@ -10,8 +10,8 @@ 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/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport/network" ) diff --git a/pkg/setup/node.go b/pkg/setup/node.go index 555d01837a..e2a7cf4fc4 100644 --- a/pkg/setup/node.go +++ b/pkg/setup/node.go @@ -13,10 +13,10 @@ 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/skywire/pkg/router/routerclient" "github.com/skycoin/skywire/pkg/routing" "github.com/skycoin/skywire/pkg/setup/setupmetrics" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport/network" ) diff --git a/pkg/setup/setupclient/client.go b/pkg/setup/setupclient/client.go index 0958d1f188..07a5b82b89 100644 --- a/pkg/setup/setupclient/client.go +++ b/pkg/setup/setupclient/client.go @@ -10,8 +10,8 @@ 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/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" ) const rpcName = "RPCGateway" diff --git a/pkg/transport/managed_transport.go b/pkg/transport/managed_transport.go index 2d693b1056..5196d8fa6c 100644 --- a/pkg/transport/managed_transport.go +++ b/pkg/transport/managed_transport.go @@ -16,9 +16,9 @@ import ( "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/httputil" "github.com/skycoin/skywire-utilities/pkg/netutil" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/appevent" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport/network" ) diff --git a/pkg/transport/manager.go b/pkg/transport/manager.go index 541e05150d..de311c527d 100644 --- a/pkg/transport/manager.go +++ b/pkg/transport/manager.go @@ -13,9 +13,9 @@ 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/skywire/pkg/app/appevent" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport/network" "github.com/skycoin/skywire/pkg/transport/network/addrresolver" ) diff --git a/pkg/transport/setup/visor.go b/pkg/transport/setup/visor.go index a33cfca8f0..f9825d4655 100644 --- a/pkg/transport/setup/visor.go +++ b/pkg/transport/setup/visor.go @@ -10,7 +10,7 @@ import ( "github.com/skycoin/skycoin/src/util/logging" "github.com/skycoin/skywire-utilities/pkg/cipher" - "github.com/skycoin/skywire/pkg/skyenv" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport" "github.com/skycoin/skywire/pkg/visor/visorconfig" ) diff --git a/pkg/visor/api.go b/pkg/visor/api.go index 9164eab4e3..ad79e72ee0 100644 --- a/pkg/visor/api.go +++ b/pkg/visor/api.go @@ -18,10 +18,10 @@ import ( "github.com/skycoin/skywire-utilities/pkg/buildinfo" "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/netutil" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/appserver" "github.com/skycoin/skywire/pkg/app/launcher" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport" "github.com/skycoin/skywire/pkg/transport/network" "github.com/skycoin/skywire/pkg/util/updater" diff --git a/pkg/visor/dmsgtracker/dmsg_tracker.go b/pkg/visor/dmsgtracker/dmsg_tracker.go index ac4f359bde..be02bd447a 100644 --- a/pkg/visor/dmsgtracker/dmsg_tracker.go +++ b/pkg/visor/dmsgtracker/dmsg_tracker.go @@ -14,7 +14,7 @@ import ( "github.com/skycoin/skycoin/src/util/logging" "github.com/skycoin/skywire-utilities/pkg/cipher" - "github.com/skycoin/skywire/pkg/skyenv" + "github.com/skycoin/skywire-utilities/pkg/skyenv" ) // Default values for DmsgTrackerManager diff --git a/pkg/visor/dmsgtracker/dmsg_tracker_test.go b/pkg/visor/dmsgtracker/dmsg_tracker_test.go index e193e5d702..e77444d96d 100644 --- a/pkg/visor/dmsgtracker/dmsg_tracker_test.go +++ b/pkg/visor/dmsgtracker/dmsg_tracker_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/require" "github.com/skycoin/skywire-utilities/pkg/cipher" - "github.com/skycoin/skywire/pkg/skyenv" + "github.com/skycoin/skywire-utilities/pkg/skyenv" ) const ( diff --git a/pkg/visor/hypervisor.go b/pkg/visor/hypervisor.go index 3ae71b9354..ca36869077 100644 --- a/pkg/visor/hypervisor.go +++ b/pkg/visor/hypervisor.go @@ -26,10 +26,10 @@ import ( "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/skyenv" "github.com/skycoin/skywire/pkg/app/appcommon" "github.com/skycoin/skywire/pkg/app/launcher" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport" "github.com/skycoin/skywire/pkg/util/updater" "github.com/skycoin/skywire/pkg/visor/dmsgtracker" diff --git a/pkg/visor/hypervisorconfig/config.go b/pkg/visor/hypervisorconfig/config.go index ba1fc8f066..f8f24a0dac 100644 --- a/pkg/visor/hypervisorconfig/config.go +++ b/pkg/visor/hypervisorconfig/config.go @@ -11,7 +11,7 @@ import ( "time" "github.com/skycoin/skywire-utilities/pkg/cipher" - "github.com/skycoin/skywire/pkg/skyenv" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/util/pathutil" ) diff --git a/pkg/visor/init.go b/pkg/visor/init.go index 3b9ae535c3..12aac7403b 100644 --- a/pkg/visor/init.go +++ b/pkg/visor/init.go @@ -25,6 +25,7 @@ import ( "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire-utilities/pkg/netutil" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/internal/utclient" "github.com/skycoin/skywire/internal/vpn" "github.com/skycoin/skywire/pkg/app/appdisc" @@ -36,7 +37,6 @@ import ( "github.com/skycoin/skywire/pkg/router" "github.com/skycoin/skywire/pkg/servicedisc" "github.com/skycoin/skywire/pkg/setup/setupclient" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport" "github.com/skycoin/skywire/pkg/transport/network" "github.com/skycoin/skywire/pkg/transport/network/addrresolver" diff --git a/pkg/visor/rpc_client.go b/pkg/visor/rpc_client.go index 0534b4dba8..59592b2209 100644 --- a/pkg/visor/rpc_client.go +++ b/pkg/visor/rpc_client.go @@ -18,12 +18,12 @@ import ( "github.com/skycoin/skywire-utilities/pkg/buildinfo" "github.com/skycoin/skywire-utilities/pkg/cipher" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/appcommon" "github.com/skycoin/skywire/pkg/app/appserver" "github.com/skycoin/skywire/pkg/app/launcher" "github.com/skycoin/skywire/pkg/router" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport" "github.com/skycoin/skywire/pkg/transport/network" "github.com/skycoin/skywire/pkg/util/cipherutil" diff --git a/pkg/visor/visorconfig/config.go b/pkg/visor/visorconfig/config.go index 86df3d1dd6..b770fef0a2 100644 --- a/pkg/visor/visorconfig/config.go +++ b/pkg/visor/visorconfig/config.go @@ -5,11 +5,11 @@ 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/skywire/pkg/app/launcher" "github.com/skycoin/skywire/pkg/dmsgc" "github.com/skycoin/skywire/pkg/restart" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" "github.com/skycoin/skywire/pkg/transport/network" "github.com/skycoin/skywire/pkg/visor/hypervisorconfig" ) diff --git a/pkg/visor/visorconfig/parse.go b/pkg/visor/visorconfig/parse.go index a89a3bb53d..73b3ebd0dd 100644 --- a/pkg/visor/visorconfig/parse.go +++ b/pkg/visor/visorconfig/parse.go @@ -8,9 +8,9 @@ import ( "github.com/skycoin/skycoin/src/util/logging" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/launcher" "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/skyenv" ) var ( diff --git a/pkg/visor/visorconfig/v1_test.go b/pkg/visor/visorconfig/v1_test.go index 1cb0304103..9f66cd66eb 100644 --- a/pkg/visor/visorconfig/v1_test.go +++ b/pkg/visor/visorconfig/v1_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/assert" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/app/launcher" - "github.com/skycoin/skywire/pkg/skyenv" ) func Test_updateStringArg(t *testing.T) { diff --git a/scripts/mac_installer/desktop-deinstaller/deinstaller.go b/scripts/mac_installer/desktop-deinstaller/deinstaller.go index 1477f3eb28..52dc36e79e 100644 --- a/scripts/mac_installer/desktop-deinstaller/deinstaller.go +++ b/scripts/mac_installer/desktop-deinstaller/deinstaller.go @@ -11,7 +11,7 @@ import ( "github.com/skycoin/skycoin/src/util/logging" - "github.com/skycoin/skywire/pkg/skyenv" + "github.com/skycoin/skywire-utilities/pkg/skyenv" "github.com/skycoin/skywire/pkg/util/osutil" ) diff --git a/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty.go b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty.go new file mode 100644 index 0000000000..b77c903009 --- /dev/null +++ b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty.go @@ -0,0 +1 @@ +package skyenv diff --git a/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty_unix.go b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty_unix.go new file mode 100644 index 0000000000..a8e4346e5d --- /dev/null +++ b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty_unix.go @@ -0,0 +1,14 @@ +//go:build !windows +// +build !windows + +package skyenv + +import ( + "os" + "path/filepath" +) + +// DefaultCLIAddr gets the default cli address (temp address) +func DefaultCLIAddr() string { + return filepath.Join(os.TempDir(), "dmsgpty.sock") +} diff --git a/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty_windows.go b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty_windows.go new file mode 100644 index 0000000000..ede2e6ec13 --- /dev/null +++ b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/dmsgpty_windows.go @@ -0,0 +1,18 @@ +//go:build windows +// +build windows + +package skyenv + +import ( + "os" + "path/filepath" +) + +// DefaultCLIAddr gets the default cli address +func DefaultCLIAddr() string { + homedir, err := os.UserHomeDir() + if err != nil { + homedir = os.TempDir() + } + return filepath.Join(homedir, "dmsgpty.sock") +} diff --git a/pkg/skyenv/values.go b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values.go similarity index 95% rename from pkg/skyenv/values.go rename to vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values.go index 5512828d99..da4408394e 100644 --- a/pkg/skyenv/values.go +++ b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values.go @@ -4,8 +4,6 @@ import ( "path/filepath" "time" - "github.com/skycoin/dmsg/dmsgpty" - "github.com/skycoin/skywire-utilities/pkg/cipher" ) @@ -45,7 +43,7 @@ const ( TestUptimeTrackerAddr = "http://ut.skywire.dev" TestAddressResolverAddr = "http://ar.skywire.dev" TestSetupPK = "026c2a3e92d6253c5abd71a42628db6fca9dd9aa037ab6f4e3a31108558dfd87cf" - TestNetworkMonitorPKs = "" + TestNetworkMonitorPKs = "0218905f5d9079bab0b62985a05bd162623b193e948e17e7b719133f2c60b92093" ) // Dmsg port constants. @@ -76,7 +74,7 @@ const ( // DefaultDmsgPtyCLIAddr determines default CLI address per each platform func DefaultDmsgPtyCLIAddr() string { - return dmsgpty.DefaultCLIAddr() + return DefaultCLIAddr() } // Default skywire app constants. @@ -222,13 +220,13 @@ func MustPK(pk string) cipher.PubKey { // GetStunServers gives back deafault Stun Servers func GetStunServers() []string { return []string{ - "45.118.133.242:3478", - "192.53.173.68:3478", - "192.46.228.39:3478", - "192.53.113.106:3478", - "192.53.117.158:3478", - "192.53.114.142:3478", - "139.177.189.166:3478", - "192.46.227.227:3478", + "172.104.188.139:3478", + "172.104.59.235:3478", + "172.104.183.187:3478", + "139.162.54.63:3478", + "172.105.115.97:3478", + "172.104.188.39:3478", + "172.104.188.140:3478", + "172.104.40.88:3478", } } diff --git a/pkg/skyenv/values_darwin.go b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values_darwin.go similarity index 100% rename from pkg/skyenv/values_darwin.go rename to vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values_darwin.go diff --git a/pkg/skyenv/values_linux.go b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values_linux.go similarity index 100% rename from pkg/skyenv/values_linux.go rename to vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values_linux.go diff --git a/pkg/skyenv/values_windows.go b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values_windows.go similarity index 100% rename from pkg/skyenv/values_windows.go rename to vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values_windows.go diff --git a/vendor/modules.txt b/vendor/modules.txt index e4df24044a..e5d78dda1a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -178,7 +178,7 @@ 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-utilities v0.0.0-20220308074734-3ac20b7c3254 +# github.com/skycoin/skywire-utilities v0.0.0-20220321002722-7d4b15ff5211 ## explicit; go 1.17 github.com/skycoin/skywire-utilities/pkg/buildinfo github.com/skycoin/skywire-utilities/pkg/cipher @@ -187,6 +187,7 @@ github.com/skycoin/skywire-utilities/pkg/geo github.com/skycoin/skywire-utilities/pkg/httputil github.com/skycoin/skywire-utilities/pkg/metricsutil github.com/skycoin/skywire-utilities/pkg/netutil +github.com/skycoin/skywire-utilities/pkg/skyenv # github.com/skycoin/yamux v0.0.0-20200803175205-571ceb89da9f ## explicit; go 1.13 github.com/skycoin/yamux