mirror of
https://github.com/schollz/croc.git
synced 2024-11-23 15:44:16 +03:00
chore: update deps, change multicast address
This commit is contained in:
parent
dccd6fe395
commit
5b93408c6e
2
go.mod
2
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
|
||||
|
4
go.sum
4
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=
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user