Commit Graph

2011 Commits

Author SHA1 Message Date
Steven Allen c07f74fd44 fix: skip variadic params in constructors
We use them for "options". Ideally we'd be able to forward options
through, but that would require real dependency injection.
2021-09-26 11:51:19 +01:00
Marten Seemann eba91ac63e
Merge pull request #1191 from libp2p/fix-flaky-end-to-end-sim-connect-test
fix flaky TestEndToEndSimConnect holepunching test
2021-09-25 15:49:44 +01:00
Marten Seemann 4028c3c578 remove goprocess from the NATManager 2021-09-25 15:15:35 +01:00
Marten Seemann 4975f0abe5 remove dependency on github.com/ipfs/go-detect-race 2021-09-25 14:29:26 +01:00
vyzo 22b62cfd65
autorelay support for circuitv2 relays (#1198)
* move host/relay to host/autorelay

* move autorelay wrapper host to package

* support v2 relays in autorelay

* test autorelay with both v1 and v2 relays

* fix test race

* go mod tidy examples/pubsub/chat

static checker complains; sigh.

* refactor reservation refresh loop

* merge background and refresh goroutines

* handle pushes synchronously from reservation refresh failures

* make connmanager tag a package level constant

* dont sleep to wait for identify, use IdentifyWait

* make relay protocol ids package-level constants

* add comment about v1 relays not having reservations

* use errgrp instead of WaitGroup with atomic int

* fix variable capture bug

* go get x/sync
2021-09-25 05:47:39 -07:00
Marten Seemann 7fa07a4aac close all connections in the TestFastDisconnect test 2021-09-24 18:49:40 +01:00
Marten Seemann 6eada787d9 fix flaky TestFastDisconnect identify test 2021-09-24 16:16:16 +01:00
Marten Seemann 4650ccd21b
Merge pull request #1199 from libp2p/protect-nonsensical-expiration
reject circuitv2 reservations with nonsensical expiration times
2021-09-24 15:04:04 +01:00
Marten Seemann 7ecefa8cba reject circuitv2 reservations with nonsensical expiration times 2021-09-24 14:43:22 +01:00
vyzo 8a70f70fbb
Merge pull request #1188 from libp2p/feat/relay-tags
Tag relay hops in relay implementations
2021-09-21 13:51:50 +03:00
vyzo 9674b5cda5 make hop tags and values private 2021-09-21 13:38:50 +03:00
vyzo 0d8a1852cf make tag value fixed, tagged in first circuit, untagged in last. 2021-09-21 13:37:41 +03:00
vyzo 369df59523 fix tag increment 2021-09-21 13:37:41 +03:00
vyzo 3df061d90e tag relay hops in relay implementations 2021-09-21 13:37:40 +03:00
vyzo d1e26810a0
Add standalone implementation of v1 Relay (#1186)
* add circuitv1 protobuf

* add implementation of v1 circuit relay

Intended to be used by standalone daemons and tests

* remove references to go-libp2p-circuit from production code

* update tests to use the in-tree v1 Relay

* use go-log/v2 in relay v1 impl

* use in-tree v1 relay in relay example

* remove go-libp2p-circuit dep from examples go.mod, go mod tidy
2021-09-20 00:29:42 -07:00
Marten Seemann af24f73bb3 fix flaky TestEndToEndSimConnect holepunching test 2021-09-20 08:20:02 +01:00
Marten Seemann 621eafcecd
Merge pull request #1190 from libp2p/bye-context
remove the context from the libp2p and the Host constructor
2021-09-18 22:39:10 +02:00
Marten Seemann b7bee3855c remove the context from the libp2p and from the Host contructor 2021-09-18 14:06:56 +02:00
Marten Seemann 29da01af70 update go-libp2p-core to v0.10.0 2021-09-17 18:50:15 +02:00
Marten Seemann a5f982ff01
Merge pull request #1185 from libp2p/circuit-shutdown
don't use a context to shut down the circuitv2
2021-09-17 18:23:41 +02:00
Marten Seemann 729386c495 don't use a context to shut down the circuitv2 2021-09-17 11:37:28 +02:00
Marten Seemann 7cb03db315
Merge pull request #1189 from libp2p/fix/remove-v1-log-dep
fix: remove v1 go-log dep
2021-09-17 10:16:50 +02:00
Steven Allen 2c69c99b23 fix: remove v1 go-log dep 2021-09-15 20:01:07 +02:00
Marten Seemann 9d3fd8bc46
Merge pull request #1184 from libp2p/relay-shutdown
don't use the context to shut down the relay
2021-09-13 14:24:28 +02:00
Marten Seemann f3acea0d61 don't use the context to shut down the relay 2021-09-10 11:30:27 +01:00
vyzo 79d995404c
Use circuitv2 code (#1183)
* move circuitv2 to p2p/protocol

* update circuitv2 imports

* RIP circuit v2; use circuitv2

* fix autorelay test

* fix holepunch test

* fix relay example
2021-09-10 02:43:58 -07:00
Marten Seemann 0c5978beb2
Merge pull request #1179 from libp2p/cleanup-badges
clean up badges in README
2021-09-09 14:45:01 +01:00
Marten Seemann 2229f69c7b clean up badges in README 2021-09-09 12:39:41 +01:00
Marten Seemann d541a8b497
Merge pull request #1180 from libp2p/go-module-proxy
remove recommendation about Go module proxy from README
2021-09-09 12:27:56 +01:00
Marten Seemann a9ff9b98df remove recommendation about Go module proxy from README 2021-09-08 23:08:08 +01:00
Marten Seemann 3c25b386d9 merge branch 'hole-punching' 2021-09-08 18:23:13 +01:00
Marten Seemann 8206fcda76
signalling for hole punching (#1168)
* hole punching protocol

* implement the new retry logic (opening a new stream per hole punch)

* rename the holepunch.HolePunchService to holepunch.Service

* remove stream handler when closing

* remove misleading comment from protobuf, add link to spec

* remove unnecessary netNotifiee.HolePunchService

* simplify receiving from the timer channel

* don't defer the closing of the hole punching stream

* only accept hole punch streams from relayed peers

* refactor error logging

* fix incorrect counting of incoming hole punch attempts

* rename HolePunch to DirectConnect

* fix usage of the wait group to close the hole punch service

* use a gc to the garbage collect the holepunch tracer

* check directionality of connection when accepting the hole punch stream

* add comment why we only call Connect once

* move deduplication logic to the holepunch service

Co-authored-by: aarshkshah1992 <aarshkshah1992@gmail.com>
2021-09-08 09:41:48 -07:00
Marten Seemann 0797df7cbc
Merge pull request #1175 from libp2p/id-service-shutdown
don't use a context for closing the ObservedAddrManager
2021-09-07 14:30:40 +01:00
Marten Seemann 964880b872
Merge pull request #1174 from libp2p/circuitv2
move the circuit v2 code here
2021-09-07 14:24:30 +01:00
Marten Seemann 659ded50e1
Merge pull request #1128 from libp2p/quic-default-transport
make QUIC a default transport
2021-09-07 14:21:11 +01:00
Marten Seemann 9342776c9c allow concurrent calls to Close and SetTTL in the ObservedAddrManager 2021-09-07 13:48:07 +01:00
Steven Allen bf26124791
Merge pull request #1176 from libp2p/no-go-cienv
stop using jbenet/go-cienv
2021-09-05 21:31:54 +02:00
Marten Seemann b25e0b1274 stop using jbenet/go-cienv 2021-09-05 19:12:58 +01:00
Marten Seemann 2cf1c457d5 don't use a context for closing the ObservedAddrManager 2021-09-05 18:30:11 +01:00
Marten Seemann 07dbdf262f remove unnecessary sync.Once from the identify service 2021-09-05 18:07:10 +01:00
Marten Seemann 2d07a0d973 chore: update go-libp2p-autonat to v0.5.0 2021-08-30 10:57:52 +01:00
Marten Seemann 8cc74d3aa8 Merge pull request #109 from libp2p/clean-shutdown
remove context from constructor, implement a proper Close method
2021-08-30 10:39:42 +01:00
Marten Seemann 8961023073 remove unused context form autoNATService 2021-08-30 10:31:07 +01:00
Marten Seemann ab4509652c add Close method to interface, fix closing of StaticAutoNAT 2021-08-29 17:33:35 +01:00
Marten Seemann 9002f311d3 remove context from constructor, implement a proper Close method 2021-08-29 16:17:07 +01:00
Marten Seemann e86c4ed31f make QUIC a default transport 2021-08-28 15:25:35 +01:00
Steven Allen fd4d2a47e2
Merge pull request #1172 from libp2p/fix-flaky-obsaddr-test
fix flaky TestObsAddrSet test
2021-08-27 12:37:55 -07:00
Steven Allen 15993ee9ba
Merge pull request #1169 from libp2p/clean-up-send-identify-resp
clean up messy defer logic in IDService.sendIdentifyResp
2021-08-27 10:52:51 -07:00
Marten Seemann 6e75f7e767 fix flaky TestObsAddrSet test 2021-08-27 11:26:10 +01:00
Marten Seemann a507d12bd4 clean up messy defer logic in IDService.sendIdentifyResp 2021-08-27 09:52:08 +01:00