diff --git a/go.mod b/go.mod index eb21a0da5..d9521ba1b 100644 --- a/go.mod +++ b/go.mod @@ -29,10 +29,10 @@ require ( github.com/pterm/pterm v0.12.66 github.com/robert-nix/ansihtml v1.0.1 github.com/sirupsen/logrus v1.9.3 - github.com/skycoin/dmsg v1.3.22-0.20240624173430-27926d97ea3f + github.com/skycoin/dmsg v1.3.22-0.20240627165206-e8cd649ecc88 github.com/skycoin/skycoin v0.27.1 - github.com/skycoin/skycoin-service-discovery v0.0.0-20240624174514-b0fc35086c3c - github.com/skycoin/skywire-services v0.0.0-20240624175050-7c26af2eca3e + github.com/skycoin/skycoin-service-discovery v0.0.0-20240627171358-7f59a951fa29 + github.com/skycoin/skywire-services v0.0.0-20240627171623-87edf49d9025 github.com/skycoin/skywire-utilities v1.3.18-0.20240624172427-aeaf6f14fbdc github.com/skycoin/systray v1.10.0 github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 diff --git a/go.sum b/go.sum index 143bdab99..94df63527 100644 --- a/go.sum +++ b/go.sum @@ -682,16 +682,16 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf 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.22-0.20240624173430-27926d97ea3f h1:Cq9cqZGYvOXe/hC4YzecW6EqqkTADCrA2SZlsS94yMc= -github.com/skycoin/dmsg v1.3.22-0.20240624173430-27926d97ea3f/go.mod h1:v56TVWnlz18J4qrVFxjOyjzg153XSuay9Y76AUb35ac= +github.com/skycoin/dmsg v1.3.22-0.20240627165206-e8cd649ecc88 h1:ENFkdPTq1Um9uoYXAh3h0WTUpJjDHhVZZevsbbP2fyw= +github.com/skycoin/dmsg v1.3.22-0.20240627165206-e8cd649ecc88/go.mod h1:v56TVWnlz18J4qrVFxjOyjzg153XSuay9Y76AUb35ac= 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/skycoin-service-discovery v0.0.0-20240624174514-b0fc35086c3c h1:AE5wVxIf9RE32kA6zvJzs/vnCXppiaLmSIJWxD+4cso= -github.com/skycoin/skycoin-service-discovery v0.0.0-20240624174514-b0fc35086c3c/go.mod h1:cidPb7mQW0CsTYYu7XSziuIoFVrFE8wwPab9vq4lyg8= -github.com/skycoin/skywire-services v0.0.0-20240624175050-7c26af2eca3e h1:RFDCii8Jpo5MDFHyok8TagWIV4AUvxQzztlxM3yziho= -github.com/skycoin/skywire-services v0.0.0-20240624175050-7c26af2eca3e/go.mod h1:CaQby+q5UmKzJ/ZPQmhkPntELXNf94ztN232/u7Dvus= +github.com/skycoin/skycoin-service-discovery v0.0.0-20240627171358-7f59a951fa29 h1:Y7EJVrs41zHGLHvqTH69Lx2Rc39s+umxIlZ439osBeA= +github.com/skycoin/skycoin-service-discovery v0.0.0-20240627171358-7f59a951fa29/go.mod h1:v2r2hqtBsF9rb1wBoJWn21YCiGm0EmGgnhrwD4c54yY= +github.com/skycoin/skywire-services v0.0.0-20240627171623-87edf49d9025 h1:48nukMj8f8VsUlNuGfJP/49wqfzqfJshoKXkjKf4Qyc= +github.com/skycoin/skywire-services v0.0.0-20240627171623-87edf49d9025/go.mod h1:007npHSDcpTeQiG7e3h36W5IMl2+YT8N6nUB0pwtSYs= github.com/skycoin/skywire-utilities v1.3.18-0.20240624172427-aeaf6f14fbdc h1:VCsz6iF8Eah3D+wHuSWT+Veb8C4XsYMQx+e0WtS6AAY= github.com/skycoin/skywire-utilities v1.3.18-0.20240624172427-aeaf6f14fbdc/go.mod h1:yFKWpL1bDRPKU3uK+cTF4PnYUMe+eyIj5N2bk4sF5Cw= github.com/skycoin/systray v1.10.0 h1:fQZJHMylpVvfmOOTLvUssfyHVDoC8Idx6Ba2BlLEuGg= diff --git a/vendor/github.com/skycoin/dmsg/cmd/dmsgweb/commands/dmsgweb.go b/vendor/github.com/skycoin/dmsg/cmd/dmsgweb/commands/dmsgweb.go index ca2ce14c9..8f74616a5 100644 --- a/vendor/github.com/skycoin/dmsg/cmd/dmsgweb/commands/dmsgweb.go +++ b/vendor/github.com/skycoin/dmsg/cmd/dmsgweb/commands/dmsgweb.go @@ -177,15 +177,19 @@ dmsgweb conf file detected: ` + dmsgwebconffile if err != nil { pk, sk = cipher.GenerateKeyPair() } - dmsgWebLog.Info("dmsg client pk: %v", pk.String()) - + dmsgWebLog.Info("dmsg client pk: ", pk.String()) if len(resolveDmsgAddr) > 0 { + dialPK = make([]cipher.PubKey, len(resolveDmsgAddr)) + dmsgPorts = make([]uint, dmsgSessions) for i, dmsgaddr := range resolveDmsgAddr { + dmsgWebLog.Info("dmsg address to dial: ", dmsgaddr) dmsgAddr = strings.Split(dmsgaddr, ":") - err = dialPK[i].Set(dmsgAddr[0]) + var setpk cipher.PubKey + err := setpk.Set(dmsgAddr[0]) if err != nil { log.Fatalf("failed to parse dmsg
: : %v", err) } + dialPK[i] = setpk if len(dmsgAddr) > 1 { dport, err := strconv.ParseUint(dmsgAddr[1], 10, 64) if err != nil { @@ -197,6 +201,7 @@ dmsgweb conf file detected: ` + dmsgwebconffile } } } + dmsgWebLog.Info("test") dmsgC, closeDmsg, err := startDmsg(ctx, pk, sk) if err != nil { dmsgWebLog.WithError(err).Fatal("failed to start dmsg") @@ -347,19 +352,31 @@ func proxyHTTPConn(n int) { }) wg.Add(1) go func() { - dmsgWebLog.Debug(fmt.Sprintf("Serving http on: http://127.0.0.1:%v", webPort)) - r.Run(":" + fmt.Sprintf("%v", webPort)) //nolint - dmsgWebLog.Debug(fmt.Sprintf("Stopped serving http on: http://127.0.0.1:%v", webPort)) + var thiswebport uint + if n == -1 { + thiswebport = webPort[0] + } else { + thiswebport = webPort[n] + } + dmsgWebLog.Debug(fmt.Sprintf("Serving http on: http://127.0.0.1:%v", thiswebport)) + r.Run(":" + fmt.Sprintf("%v", thiswebport)) //nolint + dmsgWebLog.Debug(fmt.Sprintf("Stopped serving http on: http://127.0.0.1:%v", thiswebport)) wg.Done() }() } func proxyTCPConn(n int) { - listener, err := net.Listen("tcp", fmt.Sprintf(":%d", webPort[n])) + var thiswebport uint + if n == -1 { + thiswebport = webPort[0] + } else { + thiswebport = webPort[n] + } + listener, err := net.Listen("tcp", fmt.Sprintf(":%v", thiswebport)) if err != nil { - log.Fatalf("Failed to start TCP listener on port %d: %v", webPort[n], err) + dmsgWebLog.Fatalf("Failed to start TCP listener on port %v: %v", thiswebport, err) } defer listener.Close() //nolint - log.Printf("Serving TCP on 127.0.0.1:%d", webPort[n]) + log.Printf("Serving TCP on 127.0.0.1:%v", thiswebport) for { conn, err := listener.Accept() diff --git a/vendor/github.com/skycoin/dmsg/cmd/dmsgweb/commands/root.go b/vendor/github.com/skycoin/dmsg/cmd/dmsgweb/commands/root.go index 37643db7e..091a31233 100644 --- a/vendor/github.com/skycoin/dmsg/cmd/dmsgweb/commands/root.go +++ b/vendor/github.com/skycoin/dmsg/cmd/dmsgweb/commands/root.go @@ -171,7 +171,14 @@ func scriptExecBoolSlice(s, envfile string) []bool { y, err := script.Exec(fmt.Sprintf(`bash -c 'SKYENV=%s ; if [[ $SKYENV != "" ]] && [[ -f $SKYENV ]] ; then source $SKYENV ; fi ; for _i in %s ; do echo "$_i" ; done'`, envfile, s)).Slice() if err == nil { for _, item := range y { - result = append(result, item != "") + switch strings.ToLower(item) { + case "true": + result = append(result, true) + case "false": + result = append(result, false) + default: + result = append(result, false) + } } return result } diff --git a/vendor/modules.txt b/vendor/modules.txt index 9acaa47cb..20782479a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -486,7 +486,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.22-0.20240624173430-27926d97ea3f +# github.com/skycoin/dmsg v1.3.22-0.20240627165206-e8cd649ecc88 ## explicit; go 1.21 github.com/skycoin/dmsg/cmd/dmsg-discovery/commands github.com/skycoin/dmsg/cmd/dmsg-server/commands @@ -527,14 +527,14 @@ 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/skycoin-service-discovery v0.0.0-20240624174514-b0fc35086c3c +# github.com/skycoin/skycoin-service-discovery v0.0.0-20240627171358-7f59a951fa29 ## explicit; go 1.21 github.com/skycoin/skycoin-service-discovery/cmd/service-discovery/commands github.com/skycoin/skycoin-service-discovery/internal/pg github.com/skycoin/skycoin-service-discovery/internal/sdmetrics github.com/skycoin/skycoin-service-discovery/pkg/service-discovery/api github.com/skycoin/skycoin-service-discovery/pkg/service-discovery/store -# github.com/skycoin/skywire-services v0.0.0-20240624175050-7c26af2eca3e +# github.com/skycoin/skywire-services v0.0.0-20240627171623-87edf49d9025 ## explicit; go 1.21 github.com/skycoin/skywire-services/cmd/address-resolver/commands github.com/skycoin/skywire-services/cmd/config-bootstrapper/commands