Commit Graph

33 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
julian88110
7465a509d0 noise: use Noise Extension to negotiate the muxer during the handshake (#1813)
* Muxer early selection over Noise protocol

* Address review points round 2

* Muxer selection according responder's preference

* Address some review points again.

* noise: regenerate the protobuf

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-10-25 10:11:19 -07:00
Marten Seemann
c0a0aa010e rcmgr: make it possible to embed the NullResourceManager 2022-10-24 13:24:04 +01:00
Marco Munizaga
3e156d0813 websocket: set the HTTP host header in WSS(#1834)
* Send host header

Co-authored-by: Thibault Meunier <thibault@cloudflare.com>

* Add comment and use splithostport

* Return error

* Defer the close

Co-authored-by: Thibault Meunier <thibault@cloudflare.com>
2022-10-20 02:51:05 -07:00
Marco Munizaga
fa70f6ea48 websocket: fix nil pointer in tlsClientConf (#1770) 2022-09-21 12:37:29 -07: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
4623690009 switch from github.com/libp2p/go-libp2p-core to core 2022-08-17 17:13:02 +03:00
web3-bot
eff72c4afa sync: update CI config files (#1678)
* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* run gofmt -s

* update .github/workflows/go-test.yml

* update .github/workflows/go-check.yml

* stop using the deprecated io/ioutil package

Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-08-17 01:05:51 -07:00
Marten Seemann
64cfca6beb switch from github.com/libp2p/go-libp2p-testing/suites/transport to p2p/transport/testsuite 2022-05-18 13:25:53 +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
94ce988fbb use yamux instead of mplex in tests (#1456)
* use yamux in TCP transport tests

* use yamux in websocket tests
2022-04-26 03:19:06 -07:00
Marten Seemann
292e430e58 add an option to use encrypted websockets for listening 2022-02-17 11:48:34 +04:00
Alex Browne
a55402dd29 add support for wss dialing 2022-02-14 12:26:23 +04:00
Marten Seemann
2d53c8f4eb remove wasm support (#114) 2022-02-13 22:40:52 -08:00
Marten Seemann
abde7f483b use the resource manager 2022-01-18 09:57:29 +04:00
Marten Seemann
081817c978 use the transport.Upgrader interface 2022-01-04 12:48:32 +04:00
web3-bot
96471694fe sync: update CI config files (#106) 2021-08-17 14:46:37 +00:00
Marten Seemann
cdd2cf7e46 chore: update go-libp2p-transport-upgrader and go-libp2p-core 2021-07-24 21:01:20 +02:00
Steven Allen
9cbaa8d2f0 chore: various cleanups required to get vet/staticcheck/test to pass
Importantly: this removes WsCodec (was exported). But it's deprecated
and nobody references it anyways (we register it locally).
2021-07-14 19:03:11 -07:00
Marten Seemann
bc54bc258f pass a context to OpenStream in tests 2020-12-19 11:47:58 +07:00
Alex Browne
486168bb29 Make it possible to run browser tests with a single go test command 2019-09-30 16:59:41 -07:00
Alex Browne
a7676729b1 Implement bare bones Wasm support (needs to be cleaned up) 2019-09-30 16:59:39 -07:00
Raúl Kripalani
3255249d4e migrate to consolidated types. (#45) 2019-05-26 17:34:01 +01:00
Steven Allen
b7f9522391 dep: import go-smux-* into the libp2p org 2019-05-21 19:22:52 -07:00
Steven Allen
16e9eb2bb0 modernize request handling
I believe this was written before request hijacking was a thing. We no longer
need to hold the `ServeHTTP` function open.
2019-04-03 23:17:58 -07:00
Steven Allen
42780280b4 fixup for transport refactor
Also, use the now standardized transport tests (and fix bugs around closing the
listener).
2018-06-04 19:03:26 -07:00
Steven Allen
a88b185db2 Add write-zero test.
Just to be thorough.
2017-09-05 12:25:29 -07:00
Steven Allen
b863f44dab test concurrent connection closing 2017-09-05 12:12:21 -07:00
Jeromy
cb1cddaeb6 fix review and tests 2017-09-04 22:27:51 -07:00
dignifiedquire
84a5d64f5a refactor: simplify and split into multiple files 2017-07-09 21:04:38 +02:00