Commit Graph

38 Commits

Author SHA1 Message Date
Marten Seemann
04a43b13a9 upgrader: absorb the muxer_multistream.Transport into the upgrader (#1885) 2022-11-16 14:09:21 -08:00
Marten Seemann
cbe50095f3 config: use fx to construct security transports 2022-11-10 10:09:45 +00:00
Marten Seemann
30e59560d3 upgrader: simplify the constructor 2022-11-10 10:07:17 +00:00
Marco Munizaga
f654b4bd69 Add Resolver interface to transport (#1719)
* Add Resolver interface to transport

* Move resolve test to swarm_dial_test

* Use proper peer id in test

* Only import go-multiaddr once

* Cleanup

* Use SNI in websocket

* Update go-multiaddr

* Update p2p/net/swarm/swarm.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* PR comments on websocket.go

* Use unresolved/resolved map

* Set sni

* Refactor websocket multiaddr parsing code, add server test

* Delete superflous helpers

* Update callsites

* Fix typo in p2p/transport/websocket/websocket.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-09-13 09:36:26 -07:00
Marten Seemann
d4e64c727f stop using go-libp2p-testing peer ID generation functions 2022-08-17 17:37:24 +03:00
Marten Seemann
4623690009 switch from github.com/libp2p/go-libp2p-core to core 2022-08-17 17:13:02 +03:00
Marten Seemann
ab634d2ba1 switch from github.com/libp2p/go-libp2p-peerstore to p2p/host/peerstore 2022-08-15 12:29:16 +03:00
Marco Munizaga
e6379f54a8 identify: Fix flaky tests (#1555)
* Fix flaky timing dependent tests

* Update go-libp2p-peerstore dependency

* Register notifiee synchronously

* Only a single connection

* Remove WaitForDisconnectNotification hack since notifs are now synchronous

* Add debug logging to identify tests

* Close chan once
2022-06-02 13:30:51 -07:00
Marten Seemann
6fa91535bc switch from github.com/libp2p/go-stream-muxer-multistream to p2p/muxer/muxer-multistream 2022-05-20 12:41:52 +02:00
Marten Seemann
9dc18edc26 switch from github.com/libp2p/go-libp2p-transport-upgrader to p2p/net/upgrader 2022-04-27 01:46:40 +02:00
Marten Seemann
de5875fd9c switch from github.com/libp2p/go-conn-security-multistream to p2p/net/conn-security-multistream 2022-04-26 13:23:15 +01:00
Marten Seemann
43e4e51b74 rename the yamux package (#1452) 2022-04-25 12:03:16 -07:00
Marten Seemann
f3bdb4b53c switch from github.com/libp2p/go-libp2p-yamux to p2p/muxer/yamux 2022-04-22 18:10:16 +01:00
Marten Seemann
4810afb293 switch from github.com/libp2p/go-libp2p-quic-transport to p2p/transport/quic 2022-04-22 16:34:30 +01:00
Marten Seemann
dfc3a3f24a switch from github.com/libp2p/go-tcp-transport to p2p/transport/tcp 2022-04-22 14:48:25 +01:00
Marten Seemann
3effab121a switch from github.com/libp2p/go-libp2p-swarm to p2p/net/swarm 2022-04-21 13:35:04 +01:00
Marten Seemann
9df9700062 add support for the resource manager 2022-01-18 11:40:40 +04:00
Marten Seemann
74f9203514 use the transport.Upgrader interface 2022-01-04 13:03:53 +04:00
Marten Seemann
f545ea34aa add constructor options for timeout, stop using transport.DialTimeout 2021-12-19 19:41:03 +04:00
Gus Eggert
8707662663 feat: plumb contexts through from peerstore (#290) 2021-11-09 10:44:28 -05:00
Marten Seemann
c3cd06d61c update go-tcp-transport to v0.4.0 2021-10-18 18:28:27 +02:00
Marten Seemann
96eb4c7e1c add an error return value to the constructor 2021-09-08 17:58:30 +01:00
Marten Seemann
c2439b03ed convert the metrics reporter to an option 2021-09-08 17:34:09 +01:00
Marten Seemann
21c4486060 use functional options to configure the swarm 2021-09-08 17:33:47 +01:00
Marten Seemann
a872d26b7c use testing.Cleanup to shut down peerstore and revert most test changes 2021-09-08 17:25:49 +01:00
Marten Seemann
782897ea41 stop using goprocess to control teardown 2021-09-08 17:25:48 +01:00
Marten Seemann
fc08179d1c add a test case for the testing package 2021-08-27 11:54:25 +01:00
Marten Seemann
67f91a0be9 run connection gating tests on both TCP and QUIC
Also disables one test that doesn't work with QUIC, as we always
complete the handshake before gating there.
2021-04-23 10:25:57 +07:00
Aarsh Shah
0432da356d Enable QUIC in Test Swarm (#235)
* add quic to swarm testing

* update go
2021-01-29 00:23:57 +05:30
Steven Allen
4bd32948e1 slim down dependencies
Removes secio, quic, and circuit dependencies. We were using them for testing
but we don't actually need them.
2020-06-24 10:38:00 -07:00
Aarsh Shah
fba72557b3 configure private key for test swarm 2020-06-02 15:45:59 +05:30
Aarsh Shah
dc499b7e07 implement connection gating support: intercept peer, address dials, upgraded conns (#201) 2020-05-15 14:26:21 +01:00
Steven Allen
9b8dbb7982 fix: avoid calling AddChild after the process may shutdown. 2020-04-22 17:52:32 -07:00
Steven Allen
11ed2c35c6 test: close peerstore when closing the test swarm 2019-09-13 13:37:04 -07:00
Raúl Kripalani
e132f6af3f migrate to consolidated types; remove CircleCI config (#127) 2019-05-26 15:55:50 +01:00
Steven Allen
cf873f59f6 dep: import go-smux-* into the libp2p org 2019-05-21 19:33:31 -07:00
Steven Allen
602f9d4cef gx: update go-libp2p-peerstore 2018-09-07 22:05:41 -07:00
Steven Allen
4e39954ac9 refactor for new transports
Removes:

* go-libp2p-conn logic (moved to transports)
* go-libp2p-peerstream (moved here)

Changes:

* New transport interface.
* Explicit over implicit (the implicit automagic now all lives in go-libp2p):
  * No more default transports, muxers, etc.
  * No more fallback dialer. Transports are now *required*.
* Stream opening:
  * Connection picking logic (instead of just picking the first).
  * Tries harder to open a stream of some connections happen to be closed.
* Stream closing:
  * No longer treats half-closed streams as fully closed. Users *must* read the
    an EOF or reset the stream for it to be garbage collected.
* No more polling for dead connections.
* Multiplexers are now *non-optional*. Really, they haven't been optional for a
  while but we still pretended that they were.
* No more Network type alias. It added a bunch of code and didn't really provide
  anything but an alternative set of methods that do the same thing.
* Notifications:
  * New guarantee: connection open notifications will complete before connection
    close notifications begin.
  * Given that, notifications are now delivered in parallel. No more
    notification backlogs blocking connection closing/opening.
2018-06-04 19:19:48 -07:00