From fc9e62da3689dde44aba3f59d6e0654644f935f7 Mon Sep 17 00:00:00 2001 From: Mohammed Date: Sun, 25 Aug 2024 23:56:54 +0000 Subject: [PATCH 1/4] update dmsg and skywire-utilites at v1.3.25 --- go.mod | 4 ++-- go.sum | 8 +++---- .../cmd/dmsg-server/commands/start/root.go | 3 --- .../skycoin/dmsg/pkg/dmsg/server.go | 21 +------------------ .../skycoin/dmsg/pkg/dmsgtest/env.go | 1 - .../skywire-utilities/pkg/skyenv/values.go | 5 ++--- vendor/modules.txt | 4 ++-- 7 files changed, 11 insertions(+), 35 deletions(-) diff --git a/go.mod b/go.mod index aba04b9d3d..3de8028270 100644 --- a/go.mod +++ b/go.mod @@ -30,11 +30,11 @@ 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.24 + github.com/skycoin/dmsg v1.3.25 github.com/skycoin/skycoin v0.27.1 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/skywire-utilities v1.3.25 github.com/skycoin/systray v1.10.0 github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 github.com/spf13/cobra v1.7.0 diff --git a/go.sum b/go.sum index 1cf0fb71e6..ba44ef8241 100644 --- a/go.sum +++ b/go.sum @@ -682,8 +682,8 @@ 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.24 h1:aDa36UucXcWQCnHri1q5UKAVydomGDg28osBWlpUoOI= -github.com/skycoin/dmsg v1.3.24/go.mod h1:72MC0HFDxKYqMLZ2RWGY/ZDNFq6965SP1PIrKlYqaiQ= +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/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= @@ -692,8 +692,8 @@ github.com/skycoin/skycoin-service-discovery v0.0.0-20240627171358-7f59a951fa29 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/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= github.com/skycoin/systray v1.10.0/go.mod h1:/i17Eni5GxFiboIZceeamY5LktDSFFRCvd3fBMerQ+4= github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 h1:TG/diQgUe0pntT/2D9tmUCz4VNwm9MfrtPr0SU2qSX8= diff --git a/vendor/github.com/skycoin/dmsg/cmd/dmsg-server/commands/start/root.go b/vendor/github.com/skycoin/dmsg/cmd/dmsg-server/commands/start/root.go index 306cc33724..d691d623e0 100644 --- a/vendor/github.com/skycoin/dmsg/cmd/dmsg-server/commands/start/root.go +++ b/vendor/github.com/skycoin/dmsg/cmd/dmsg-server/commands/start/root.go @@ -28,13 +28,11 @@ import ( var ( sf cmdutil.ServiceFlags - limitIP int authPassphrase string ) func init() { sf.Init(RootCmd, "dmsg_srv", dmsgserver.DefaultConfigPath) - RootCmd.Flags().IntVar(&limitIP, "limit-ip", 15, "set limitation of IPs want connect to specific dmsg-server, default value is 15") RootCmd.Flags().StringVar(&authPassphrase, "auth", "", "auth passphrase as simple auth for official dmsg servers registration") } @@ -94,7 +92,6 @@ var RootCmd = &cobra.Command{ srvConf := dmsg.ServerConfig{ MaxSessions: conf.MaxSessions, UpdateInterval: conf.UpdateInterval, - LimitIP: limitIP, AuthPassphrase: authPassphrase, } srv := dmsg.NewServer(conf.PubKey, conf.SecKey, disc.NewHTTP(conf.Discovery, &http.Client{}, log), &srvConf, m) diff --git a/vendor/github.com/skycoin/dmsg/pkg/dmsg/server.go b/vendor/github.com/skycoin/dmsg/pkg/dmsg/server.go index 1245d2e53b..9c8c461d70 100644 --- a/vendor/github.com/skycoin/dmsg/pkg/dmsg/server.go +++ b/vendor/github.com/skycoin/dmsg/pkg/dmsg/server.go @@ -4,7 +4,6 @@ package dmsg import ( "context" "net" - "strings" "sync" "time" @@ -20,7 +19,6 @@ import ( type ServerConfig struct { MaxSessions int UpdateInterval time.Duration - LimitIP int AuthPassphrase string } @@ -52,10 +50,6 @@ type Server struct { maxSessions int - limitIP int - ipCounter map[string]int - ipCounterLocker sync.RWMutex - authPassphrase string } @@ -82,8 +76,6 @@ func NewServer(pk cipher.PubKey, sk cipher.SecKey, dc disc.APIClient, conf *Serv s.delSessionCallback = func(ctx context.Context) error { return s.updateServerEntry(ctx, s.AdvertisedAddr(), s.maxSessions, conf.AuthPassphrase) } - s.ipCounter = make(map[string]int) - s.limitIP = conf.LimitIP s.authPassphrase = conf.AuthPassphrase return s } @@ -162,21 +154,10 @@ func (s *Server) Serve(lis net.Listener, addr string) error { WithField("remote_tcp", conn.RemoteAddr()). Debug("Max sessions is reached, but still accepting so clients who delegated us can still listen.") } - connIP := strings.Split(conn.RemoteAddr().String(), ":")[0] - s.ipCounterLocker.Lock() - if s.ipCounter[connIP] >= s.limitIP { - log.Warnf("Maximum client per IP for %s reached.", connIP) - s.ipCounterLocker.Unlock() - continue - } - s.ipCounter[connIP]++ - s.ipCounterLocker.Unlock() + s.wg.Add(1) go func(conn net.Conn) { defer func() { - s.ipCounterLocker.Lock() - s.ipCounter[connIP]-- - s.ipCounterLocker.Unlock() err := recover() if err != nil { log.Warnf("panic in handleSession: %+v", err) diff --git a/vendor/github.com/skycoin/dmsg/pkg/dmsgtest/env.go b/vendor/github.com/skycoin/dmsg/pkg/dmsgtest/env.go index 97520be36f..9a294ea849 100644 --- a/vendor/github.com/skycoin/dmsg/pkg/dmsgtest/env.go +++ b/vendor/github.com/skycoin/dmsg/pkg/dmsgtest/env.go @@ -90,7 +90,6 @@ func (env *Env) newServer(ctx context.Context, updateInterval time.Duration) (*d conf := dmsg.ServerConfig{ MaxSessions: maxSessions, UpdateInterval: updateInterval, - LimitIP: 200, } srv := dmsg.NewServer(pk, sk, env.d, &conf, nil) env.s[pk] = srv diff --git a/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values.go b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values.go index e432b2c234..e46632cee1 100644 --- a/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values.go +++ b/vendor/github.com/skycoin/skywire-utilities/pkg/skyenv/values.go @@ -5,7 +5,7 @@ package skyenv const ( ServiceConfAddr = "http://conf.skywire.skycoin.com" TpDiscAddr = "http://tpd.skywire.skycoin.com" - DmsgDiscAddr = "http://dmsgd.skywire.dev" + DmsgDiscAddr = "http://dmsgd.skywire.skycoin.com" ServiceDiscAddr = "http://sd.skycoin.com" RouteFinderAddr = "http://rf.skywire.skycoin.com" UptimeTrackerAddr = "http://ut.skywire.skycoin.com" @@ -21,7 +21,7 @@ const ( const ( TestServiceConfAddr = "http://conf.skywire.dev" TestTpDiscAddr = "http://tpd.skywire.dev" - TestDmsgDiscAddr = "http://dmsgd.skywire.skycoin.com" + TestDmsgDiscAddr = "http://dmsgd.skywire.dev" TestServiceDiscAddr = "http://sd.skywire.dev" TestRouteFinderAddr = "http://rf.skywire.dev" TestUptimeTrackerAddr = "http://ut.skywire.dev" @@ -31,7 +31,6 @@ const ( TestNetworkMonitorPKs = "0380ea88f0ad0aa4d93c330ba5f97aabca1d892190b94db69eee140b549d2817dd,0283bddb4357e2c4de0d470032cd809966aec65ce57e1188143ab32c7b589b38b6,02f4e33b75307267229b0c3d679d08dd23374333f558288cfcb114311a52199358,02090f03cb26c71779b8327067e2e37314d2db3e31dfe4f8f3cdd8e088a98eb7ec,03ff8dc39ed8d84be17a15b6a243edbcef1a5fd425209243fd7a9a28f0d23ddbea,02b9aa8276907db6f6ea8626d5d26aa6e119dd89d88bb222ce868376c5367d7b4c" TestSurveyWhitelistPKs = "0327e2cf1d2e516ecbfdbd616a87489cc92a73af97335d5c8c29eafb5d8882264a,03abbb3eff140cf3dce468b3fa5a28c80fa02c6703d7b952be6faaf2050990ebf4,02b5ee5333aa6b7f5fc623b7d5f35f505cb7f974e98a70751cf41962f84c8c4637,03714c8bdaee0fb48f47babbc47c33e1880752b6620317c9d56b30f3b0ff58a9c3,020d35bbaf0a5abc8ec0ba33cde219fde734c63e7202098e1f9a6cf9daaeee55a9,027f7dec979482f418f01dfabddbd750ad036c579a16422125dd9a313eaa59c8e1,031d4cf1b7ab4c789b56c769f2888e4a61c778dfa5fe7e5cd0217fc41660b2eb65" TestRewardSystemPKs = "036a70e6956061778e1883e928c1236189db14dfd446df23d83e45c321b330c91f" - ) // GetStunServers gives back default Stun Servers diff --git a/vendor/modules.txt b/vendor/modules.txt index baa6152033..e28f82090e 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.24 +# github.com/skycoin/dmsg v1.3.25 ## explicit; go 1.21 github.com/skycoin/dmsg/cmd/dmsg-discovery/commands github.com/skycoin/dmsg/cmd/dmsg-server/commands @@ -576,7 +576,7 @@ github.com/skycoin/skywire-services/pkg/transport-discovery/store github.com/skycoin/skywire-services/pkg/transport-setup/api github.com/skycoin/skywire-services/pkg/transport-setup/config github.com/skycoin/skywire-services/pkg/vpn-monitor/api -# github.com/skycoin/skywire-utilities v1.3.18-0.20240624172427-aeaf6f14fbdc +# github.com/skycoin/skywire-utilities v1.3.25 ## explicit; go 1.21 github.com/skycoin/skywire-utilities/pkg/buildinfo github.com/skycoin/skywire-utilities/pkg/cipher From ec74a3c721d66b922d89cd54e35fbad9df511798 Mon Sep 17 00:00:00 2001 From: Mohammed Date: Mon, 26 Aug 2024 00:02:18 +0000 Subject: [PATCH 2/4] fix and update dmsghttp-config values --- dmsghttp-config.json | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/dmsghttp-config.json b/dmsghttp-config.json index 8416bbc335..b9d54bdc64 100644 --- a/dmsghttp-config.json +++ b/dmsghttp-config.json @@ -29,24 +29,6 @@ }, "prod": { "dmsg_servers": [ - { - "static": "02a2d4c346dabd165fd555dfdba4a7f4d18786fe7e055e562397cd5102bdd7f8dd", - "server": { - "address": "139.144.183.24:30082" - } - }, - { - "static": "02a49bc0aa1b5b78f638e9189be4ed095bac5d6839c828465a8350f80ac07629c0", - "server": { - "address": "139.144.183.24:30081" - } - }, - { - "static": "03717576ada5b1744e395c66c2bb11cea73b0e23d0dcd54422139b1a7f12e962c4", - "server": { - "address": "139.144.183.24:30083" - } - }, { "static": "0371ab4bcff7b121f4b91f6856d6740c6f9dc1fe716977850aeb5d84378b300a13", "server": { @@ -70,9 +52,21 @@ "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://024a7b9b7db1626d46777e5c665333afa57f48934b57652305fc7a2b19dc4c65d4:80", + "dmsg_discovery": "dmsg://022e607e0914d6e7ccda7587f95790c09e126bbd506cc476a1eda852325aadd1aa:80", "transport_discovery": "dmsg://02b307aee5c8ce1666c63891f8af25ad2f0a47a243914c963942b3ba35b9d095ae:80", "address_resolver": "dmsg://03234b2ee4128d1f78c180d06911102906c80795dfe41bd6253f2619c8b6252a02:80", "route_finder": "dmsg://039d89c5eedfda4a28b0c58b0b643eff949f08e4f68c8357278081d26f5a592d74:80", From 845e06da39af010716b9dc62dae3ad0ad8d6be1b Mon Sep 17 00:00:00 2001 From: Mohammed Date: Mon, 26 Aug 2024 00:04:31 +0000 Subject: [PATCH 3/4] update service-config.json values --- services-config.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/services-config.json b/services-config.json index 40e813962d..e8ae80f4df 100644 --- a/services-config.json +++ b/services-config.json @@ -43,7 +43,7 @@ ] }, "prod": { - "dmsg_discovery": "http://dmsgd.skywire.dev", + "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", @@ -67,14 +67,14 @@ "uptime_tracker": "http://ut.skywire.skycoin.com", "service_discovery": "http://sd.skycoin.com", "stun_servers": [ - "192.53.117.238:3478", + "139.162.30.112:3478", + "192.53.118.31:3478", + "192.53.118.61:3478", "170.187.228.44:3478", - "192.53.117.237:3478", - "192.53.117.146:3478", - "192.53.117.60:3478", - "192.53.117.124:3478", "170.187.228.178:3478", - "170.187.225.246:3478" + "139.162.30.129:3478", + "192.53.118.134:3478", + "192.53.118.209:3478" ], "dns_server": "1.1.1.1", "survey_whitelist": [ From 8822b2d16e94ae5e206716f9adb26af865a1f3d2 Mon Sep 17 00:00:00 2001 From: Mohammed Date: Mon, 26 Aug 2024 00:06:00 +0000 Subject: [PATCH 4/4] update v1.3.25 release version on windows installer --- scripts/win_installer/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/win_installer/Product.wxs b/scripts/win_installer/Product.wxs index 176a626d83..bf387f5152 100644 --- a/scripts/win_installer/Product.wxs +++ b/scripts/win_installer/Product.wxs @@ -11,7 +11,7 @@