From 5b93408c6ee38df63dffb93acec026b929905d3b Mon Sep 17 00:00:00 2001 From: Zack Date: Mon, 29 Jul 2024 12:20:22 -0700 Subject: [PATCH] chore: update deps, change multicast address --- go.mod | 2 +- go.sum | 4 ++-- src/croc/croc.go | 11 +++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 1a0dc4ffc..61ecb49ad 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/schollz/mnemonicode v1.0.2-0.20190421205639-63fa713ece0d github.com/schollz/pake/v3 v3.0.5 github.com/schollz/peerdiscovery v1.7.3 - github.com/schollz/progressbar/v3 v3.14.4 + github.com/schollz/progressbar/v3 v3.14.5 github.com/stretchr/testify v1.9.0 golang.org/x/crypto v0.25.0 golang.org/x/net v0.27.0 diff --git a/go.sum b/go.sum index f3cde7f66..e8e2b25a3 100644 --- a/go.sum +++ b/go.sum @@ -52,8 +52,8 @@ github.com/schollz/pake/v3 v3.0.5 h1:MnZVdI987lkjln9BSx/zUb724TZISa2jbO+dPj6BvgQ github.com/schollz/pake/v3 v3.0.5/go.mod h1:OGbG6htRwSKo6V8R5tg61ufpFmZM1b/PrrSp6g2ZLLc= github.com/schollz/peerdiscovery v1.7.3 h1:/pt1G0rZ80fSPoI/FgGC5P7MxpkRXD6u0pe6PJbYcIE= github.com/schollz/peerdiscovery v1.7.3/go.mod h1:mVlPNJ5DWbMi52VzpXxGbqXKdFANx3qw0Jsp3EQMCrE= -github.com/schollz/progressbar/v3 v3.14.4 h1:W9ZrDSJk7eqmQhd3uxFNNcTr0QL+xuGNI9dEMrw0r74= -github.com/schollz/progressbar/v3 v3.14.4/go.mod h1:aT3UQ7yGm+2ZjeXPqsjTenwL3ddUiuZ0kfQ/2tHlyNI= +github.com/schollz/progressbar/v3 v3.14.5 h1:97RrSxbBASxQuZN9yemnyGrFZ/swnG6IrEe2R0BseX8= +github.com/schollz/progressbar/v3 v3.14.5/go.mod h1:Nrzpuw3Nl0srLY0VlTvC4V6RL50pcEymjy6qyJAaLa0= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= diff --git a/src/croc/croc.go b/src/croc/croc.go index 672524aab..dd16cc32b 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -585,6 +585,8 @@ func (c *Client) broadcastOnLocalNetwork(useipv6 bool) { } if useipv6 { settings.IPVersion = peerdiscovery.IPv6 + } else { + settings.MulticastAddress = "255.255.255.255" } discoveries, err := peerdiscovery.Discover(settings) @@ -854,10 +856,11 @@ func (c *Client) Receive() (err error) { go func() { defer wgDiscovery.Done() ipv4discoveries, err1 := peerdiscovery.Discover(peerdiscovery.Settings{ - Limit: 1, - Payload: []byte("ok"), - Delay: 20 * time.Millisecond, - TimeLimit: 200 * time.Millisecond, + Limit: 1, + Payload: []byte("ok"), + Delay: 20 * time.Millisecond, + TimeLimit: 200 * time.Millisecond, + MulticastAddress: "255.255.255.255", }) if err1 == nil && len(ipv4discoveries) > 0 { dmux.Lock()