Will Scott
f5386bdf79
autorelay triggers on NAT events
better use of the event bus between these two
5 years ago
Steven Allen
7ba322244e
emit identify events and avoid advertising localhost
* fix(identify): announce localhost as long as one side of the connection is local (#742 )
* identify: emit events on completion/failure. (#660 )
* identify: Update addr advertise logic to exclude localhost addrs… (#657 )
This is a rollup of the stabilize fixes.
Co-authored-by: bigs <cole@protocol.ai>
Co-authored-by: Raúl Kripalani <raul@protocol.ai>
5 years ago
Steven Allen
9ee9d94ea2
chore(ci): fix a flaky test ( #787 )
Timing tests never work well in CI.
5 years ago
optman
3f43dfe646
enable non-public address port mapping announcement
5 years ago
Steven Allen
9073eaaf8f
fix: demote stream deadline errors to debug logs
Otherwise, we spam an error every time we try to negotiate a protocol on a
closed stream (e.g., when the underlying connection closes on us).
5 years ago
Steven Allen
e5d28696f5
feat(host): recursively resolve addresses
We currently only resolve /dnsaddr addresses once. This patch resolves up to 32
dnsaddr addresses per dial.
fixes https://github.com/libp2p/go-libp2p/issues/744
5 years ago
Hector Sanjuan
7e49c66219
Identify: Make activation threshold configurable
Also: fix the comments and try to explain how the activation/aliveness of
addresses happen (and write the correct defaults).
5 years ago
Steven Allen
94d7efc58e
chore(dep): update libp2p-core and protobuf
* Enforces 2048 bit RSA keys when using OpenSSL
* Updates go-multiaddr-dns for /dns support.
* Update gogo/protobuf and regenerate all protobufs.
5 years ago
vyzo
9cd56c0bab
use a global variable for default relays
and rename DefaultRelays option to DefaultStaticRelays.
5 years ago
Steven Allen
1938505f5a
dep: update go-multiaddr
for https://github.com/multiformats/go-multiaddr/issues/108
5 years ago
Raúl Kripalani
9cf6af474b
add godocs.
5 years ago
vyzo
235848850e
options to configure known relays for autorelay
5 years ago
Steven Allen
e337633824
set a default client-version using go modules
This should help us improve network stats on who's using libp2p.
5 years ago
Steven Allen
d73a51776e
new: allow overriding the user-agent with an option
Instead of using a global variable.
This also:
* Adds an option to the identify service to set the user agent.
* Removes the ability to pass an identify service to NewHost as any reasonable
Identify service already needs to be constructed with an instance of the host.
5 years ago
Cole Brown
c261182d50
Adjust test timings for Ed25519
5 years ago
Cole Brown
a80fc34f3a
Update deps, mocknet tests
5 years ago
vyzo
b3085753dc
autorelay: ensure candidate relays can hop
5 years ago
Christian Muehlhaeuser
c73d2b9c8e
Added missing error check in test ( #683 )
5 years ago
Christian Muehlhaeuser
169f2d4139
Avoid unnecessary conversions ( #685 )
No need to convert these types.
5 years ago
Christian Muehlhaeuser
038cff7946
Simplify increments ( #684 )
5 years ago
Christian Muehlhaeuser
0603b30056
Make use of time.Until & time.Since ( #681 )
No need to manually subtract timestamps.
5 years ago
Christian Muehlhaeuser
40cb489097
Fixed typos ( #680 )
Just a few nit-picky typo fixes.
5 years ago
Christian Muehlhaeuser
a7ce9cc593
Removed ineffectual assignments
We don't use `cs` here, drop it.
5 years ago
Steven Allen
554a8e7bed
mdns: always use interface addresses
We don't want to use the transformed/munged host addresses for local
announcements. Ideally, we'd take a more scientific approach to this (i.e.,
"host, please give me addresses relative to X") but we can't do that yet.
5 years ago
Raúl Kripalani
1cec1b9191
remove superfluous goroutine; avoid t.Fatal from goroutines.
5 years ago
Raúl Kripalani
8e4bc2ee2c
fix #672 : wait until done; fix ponger response.
5 years ago
Raúl Kripalani
9797b07de4
TestStreamsStress: reduce node count, increase stream density.
5 years ago
Steven Allen
3755b9afd6
test: full-close streams in stream stress test
5 years ago
Steven Allen
4c28cc75df
test: fix test fallout from notify push
5 years ago
Steven Allen
3a41aa03ac
test: mark helpers
5 years ago
Steven Allen
97f639055e
test: ensure double-closing the host doesn't cause any issues
5 years ago
Steven Allen
428d7135a5
doc: ensure nobody tries to add teardown logic to the host close function again
5 years ago
Steven Allen
2f06021e0c
fix: use the goprocess for closing
fixes #668
5 years ago
Raúl Kripalani
e69d17141c
integrate the event bus, handle protocol update events, make identify emit deltas ( #659 )
5 years ago
Steven Allen
1449765980
basic_host: ensure we close correctly when the context is canceled
As long as we _accept_ a context, we need to obey it.
5 years ago
Raúl Kripalani
d87f89314c
Consolidate abstractions and core types into go-libp2p-core ( #601 )
6 years ago
Steven Allen
192e96f186
test: increase delay for backpressure
CI is really slow.
6 years ago
Steven Allen
97d03a46b4
test: add a small delay to deal with write coalescing
6 years ago
vyzo
3437213b5f
close connection manager
6 years ago
vyzo
70c4f155e7
advertise for relay services every 30min
6 years ago
vyzo
0a221500fd
update use of discovery.FindPeers for new interface
6 years ago
Steven Allen
1b9cf3e2cb
test: disable flaky autorelay test in CI
This keeps breaking travis.
6 years ago
Steven Allen
d0ab45164c
ping: simplify ping loop
6 years ago
Steven Allen
d3d5351d81
ping: return a stream of results
Otherwise, we can't return errors. This is a breaking change but unlikely to
have a large impact on anyone but go-ipfs.
Part of https://github.com/ipfs/go-ipfs/issues/6298
6 years ago
vyzo
b8616c65b3
use cancelable background context in identify
6 years ago
vyzo
ba00011d34
avoid intermediate allocation in relayAddrs
now that we have the lock for the duration of the method, we don't need the intermediate
relays array. This removes it, and also extends the pre-allocation of the result array
by 2 so that it can cover two localhost and two private address bindings.
6 years ago
vyzo
97f1e71e86
cache relayAddrs for a short period of time
6 years ago
vyzo
abfb4c8901
fix bug in findRelaysOnce: it connects to all relays
6 years ago
Steven Allen
776a53a370
autorelay: break findRelays into multiple functions and avoid the goto
(@stebalien is picky and opinionated...)
6 years ago
vyzo
8d073cec9e
kill the parallel query logic in selectRelays; let it be random
the presence of stashed query results from discovery in the peerstore _biases_ the
selection towards fully DHT nodes, which penalizes dedicated relays.
6 years ago