Commit Graph

1559 Commits

Author SHA1 Message Date
vyzo
122cdf31a6 turn off stupid codecov annotations 2020-09-14 19:35:21 +03:00
vyzo
868f975b78 gomod: go-datastore dependency 2020-09-14 15:58:25 +03:00
vyzo
fd7f51887b add test 2020-09-14 15:56:50 +03:00
vyzo
9b78ee25e4 fix typos, add comment 2020-09-14 15:56:43 +03:00
vyzo
d4be9c8028 add methods to list blocked entities 2020-09-14 15:25:46 +03:00
vyzo
9ca5c11a9e add support for persistence to datastore 2020-09-14 15:14:22 +03:00
vyzo
aa8de6189d basic implementation of connection gater 2020-09-14 14:48:48 +03:00
Adin Schmahmann
fb3179e617 chore: update go-multiaddr v0.11.0 2020-08-25 15:32:03 -04:00
Steven Allen
b95d6ae6fd Merge pull request #990 from fouge/feat/mdns-ipv6
Added parsing of IPv6 addresses for incoming mDNS requests
2020-08-20 09:55:50 -07:00
Cyril Fougeray
16d314cf30 Deduplicating code when parsing ipv4/ipv6 address; from the comment on the PR 2020-08-20 18:36:07 +02:00
Steven Allen
c24d028099 Merge pull request #972 from libp2p/feat/default-transports
Switch from SECIO to Noise
2020-08-19 11:23:35 -07:00
Steven Allen
db5f196114 feat: switch from SECIO to Noise as the default security transport
This is a backwards incompatible change and will require a major version bump
plus an announcement. Users can choose to re-enable SECIO by passing
`libp2p.Security(secio.ID, secio.New)` to the constructor.
2020-08-19 11:15:02 -07:00
Steven Allen
35c2dbd600 Merge pull request #995 from libp2p/fix/tests
fix tests
2020-08-19 11:14:42 -07:00
Steven Allen
de10591dd8 fix tests
1. Fix tests on go 1.15 by avoiding `string(i)`.
2. Fix the autorelay test by making relays announce fake "public" addresses. I'm
not sure how this worked before.
2020-08-19 11:03:55 -07:00
Adin Schmahmann
6b509be0eb chore: update deps 2020-08-19 02:54:41 -04:00
Cyril Fougeray
3fa37a3452 Added parsing of IPv6 addresses for incomming mDNS requests 2020-08-11 15:04:54 +02:00
Raúl Kripalani
eb4cca1b04 go mod tidy. v0.10.3 2020-08-04 10:25:36 +01:00
Will
7cfc4e645e Bump Autonat version & validate fixed call loop in .Addrs (#988)
* add test for host address with attached autonat
* bump autonat release
2020-08-03 14:33:21 -04:00
Steven Allen
fa07fcf03b Merge pull request #987 from libp2p/fix/use-correct-ext-addr
fix: use the correct external address when NAT port-mapping
2020-08-03 10:50:59 -07:00
Steven Allen
717d9e7574 fix: use the correct external address when NAT port-mapping
Previously, we'd construct addresses like `/ip4/.../udp/...` instead of
`/ip4/.../udp/.../quic` because we'd use mapped addr (ip + transport + port)
instead of the full external address (ip + transport + port + other
transports...).
2020-08-03 10:29:26 -07:00
Raúl Kripalani
aae9c77cd8 upgrade go-libp2p-circuit to v0.3.1. (#986) v0.10.2 2020-07-30 13:03:22 +01:00
Raúl Kripalani
a5786f0415 upgrade deps + interoperable uvarint delimited writer/reader. (#985) v0.10.1 2020-07-30 12:42:57 +01:00
Will
147acc7bf7 Merge pull request #983 from sandmanhome/feat/fix-host-lost-AutoNat-PublicAddr
fix host can be dialed by autonat public addr, but lost the public addr to announce
2020-07-24 14:57:25 -07:00
sandman
d9a4e38ac4 fix to call PublicAddr interface of AutoNat 2020-07-24 10:12:58 +08:00
sandman
a55891f71b add AutoNat PublicAddr when host can be dialed but not get public addr by net.InterfaceAddrs() 2020-07-23 15:19:47 +08:00
Steven Allen
9cd6aaa9ea Fix address advertisement bugs (#974)
* fix: use all interface addresses when we can't find the default route
* fix: don't add advertise unspecified addresses
* fix: resolve addresses before looking up observed addresses
* fix: only advertise global unicast
* fix: filter link-local addresses from advertisement
* test: fix basic host addr tests
2020-07-07 16:41:45 -07:00
Steven Allen
6a3b138a57 Merge pull request #971 from libp2p/fix/close-deadlock
fix: avoid a close deadlock in the natmanager
2020-06-23 10:21:59 -07:00
Steven Allen
72770db2f6 fix: avoid a close deadlock in the natmanager
Before, we would:

1. Receive a "listen close" event from an event handler, after the teardown started.
2. Try to add a child process to handle the event. This would block because we
were in the teardown.
3. In the teardown, try to unregister the event handler and deadlock

I've now:

* Removed the teardown.
* Switched to a single event loop.

Ideally, we'd remove goprocess entirely. But we'd need to refactor natmgr.

fixes #933
2020-06-22 16:33:19 -07:00
Raúl Kripalani
985120b6f9 upgrade swarm; add ID() on mock conns and streams. (#970) v0.10.0 2020-06-16 19:45:28 +01:00
Adin Schmahmann
14f4ff5e06 Merge pull request #966 from libp2p/fix/nat-port-mapping
fix(nat): use the right addresses when nat port mapping
v0.9.6
2020-06-09 19:05:57 -04:00
Steven Allen
f90bff546b Merge pull request #967 from libp2p/chore/update-deps
chore: update deps
2020-06-09 15:59:43 -07:00
Steven Allen
1180b6fa1e fix(nat): use the right addresses when nat port mapping
We switched `listenAddrs` from the _interface_ addresses to the raw addresses we
were listening on. Unfortunately, we needed the resolved addresses later in the
function when resolving port mappings.
2020-06-09 15:55:15 -07:00
Steven Allen
a5b6745ff9 chore: update deps
* Updates yamux to reduce lock contention.
* Updates the peerstore to remove an issue where we'd forget our peer's addresses instead of extending the TTL.
2020-06-09 15:37:17 -07:00
Steven Allen
ed4bd39dda Merge pull request #965 from libp2p/fix/panic
Fix peer handler race
v0.9.5
2020-06-05 10:45:03 -07:00
Steven Allen
34e67e019e Fix peer handler race
Alternative to #963. Instead of using atomics, this patch ensures that all state
changes are performed on the main thread. It also:

* Threads the context through explicitly to make sure fields changed by the main
thread are never read by the handler goroutines. This isn't strictly necessary
but it makes it easier to reason about.
* Uses a callback to signal "on done". There may be cleaner ways to do this (I
hate callbacks), but this nicely decouples the peer handler from the main loop.

fixes #963
2020-06-05 10:20:28 -07:00
Steven Allen
5bfaf4df24 Merge pull request #960 from libp2p/fix/obs-perf
optimize numInbound count
2020-06-04 15:08:01 -07:00
Steven Allen
5ae0888629 fix(id): document observation struct 2020-06-04 14:57:07 -07:00
Steven Allen
a03403fa64 fix: optimize numInbound count
We call this _very_ frequently when computing our local addresses.
2020-06-04 14:55:17 -07:00
Steven Allen
1e4ce46ca7 test(id): fix nits 2020-06-04 14:55:17 -07:00
Steven Allen
1dd7a8c4d4 fix: count observations with at least one inbound connection as inbound
We prefer addresses from inbound connections. We don't want outbound connections
to hide these perfectly good addresses.
2020-06-04 14:55:13 -07:00
Steven Allen
6ca83309d2 fix(mocknet): set inbound/outbound on the right link 2020-06-04 14:55:13 -07:00
Steven Allen
a0813d7292 fix: make address observation types private
We don't use and/or expose these anyways. Making them private makes it easier to
reason about their state.
2020-06-04 14:55:10 -07:00
Steven Allen
94e5e1e8a9 Merge pull request #962 from libp2p/gomod/update
update go-libp2p-circuit
2020-06-04 09:46:01 -07:00
vyzo
2ca365a944 gomod: update go-libp2p-circuit 2020-06-04 14:42:53 +03:00
Steven Allen
67eb8b1e93 Merge pull request #958 from libp2p/feat/signed-records-chunking
Chunking large Identify responses with Signed Records
v0.9.4
2020-06-03 16:11:53 -07:00
Steven Allen
b22add866a fix: remove more field
We no longer need it now that we keep reading till the stream closes.
2020-06-03 15:41:08 -07:00
Aarsh Shah
513e13d0d2 changes as per review 2020-06-03 15:27:03 -07:00
Aarsh Shah
c4a1e220ac test large push msgs 2020-06-03 15:27:02 -07:00
Aarsh Shah
60b52f10ae more protocol strings 2020-06-03 15:27:02 -07:00
Aarsh Shah
1b36fd8697 first draft 2020-06-03 15:27:01 -07:00