Marco Munizaga
2fe6600ca4
websocket: Don't limit message sizes in the websocket reader ( #2193 )
...
* Don't limit message sizes in the websocket reader
* Remove fmt.println
* Update p2p/transport/websocket/listener.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
* Update p2p/transport/websocket/listener.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-03-16 16:43:20 -07:00
Marco Munizaga
27cce4fa78
websocket: Replace gorilla websocket transport with nhooyr websocket transport ( #1982 )
...
* Replace gorilla websocket transport with nhooyr websocket transport
* Bound read retry attempts
* Nit
* Go mod tidy
* Add comment
2023-02-06 19:35:07 -08:00
Marco Munizaga
753e48e5ce
rcmgr: *: Always close connscope ( #2037 )
...
* rcmgr: Fix connection accounting
* Always close conn scope in the case of errors
* circuitv2: fix resource accounting when connection upgrading fails
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-02-01 09:59:30 -08:00
Marten Seemann
14ca991a41
transports: expose the name of the transport in the ConnectionState ( #1911 )
2022-11-21 17:34:02 -08: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
Marco Munizaga
3eb35223a7
Pass endpoint information to resource manager's OpenConnection ( #1633 )
...
* Move mux testsuite to here
* Update OpenConnection call sites to pass in endpoint information
* Go mod update
* Use proper versions for deps
2022-07-01 15:43:42 -07:00
Adin Schmahmann
4dd3b0758f
feat: allow dialing wss peers using DNS multiaddrs
2022-06-20 11:45:35 -04:00
Marten Seemann
292e430e58
add an option to use encrypted websockets for listening
2022-02-17 11:48:34 +04:00
Marten Seemann
3384493ce8
introduce a constructor for the listener
2022-02-17 11:48:34 +04:00
Marten Seemann
c6eb1b47c1
only initialize the ws multiaddr component once
2022-02-17 11:48:34 +04:00
Marten Seemann
571798514e
remove unused origin function parameteter in wrapListener
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
b074ba4328
unexport WebsocketTransport.Upgrader
2022-01-18 09:57:14 +04:00
Marten Seemann
081817c978
use the transport.Upgrader interface
2022-01-04 12:48:32 +04:00
Marten Seemann
75dda2b07a
update deps and fix deprecated calls
2022-01-02 16:06:23 +04:00
Marten Seemann
6957d57824
remove deprecated type
2021-07-22 21:35:44 +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
M. Hawn
94f5bc4aa6
Dependancy: Remove depricated multiaddr-net
...
Switch to multiaddr/net
2020-10-21 00:37:13 -06:00
Steven Allen
d0bf192109
fix: restrict dials to IP + TCP
...
That is, forbid DNS. See https://github.com/libp2p/go-libp2p/issues/841
2020-04-02 22:13:30 -07:00
Alex Browne
a7676729b1
Implement bare bones Wasm support (needs to be cleaned up)
2019-09-30 16:59:39 -07:00
Steven Allen
6de8743b2b
dep: update and switch to go-multiaddr-fmt
2019-09-18 18:41:46 -07:00
Steven Allen
7b972a034c
move multiaddr protocol definitions to go-multiaddr
...
That way, users don't need to import the transport just to parse a websocket
multiaddr.
2019-09-18 18:15:32 -07:00
Raúl Kripalani
3255249d4e
migrate to consolidated types. ( #45 )
2019-05-26 17:34:01 +01: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
f455930653
fix requests from other origins
...
We don't care about origins and *want* any code running on any origin to be able
to connect to any peer.
fixes ipfs/go-ipfs#4202
2017-09-05 14:56:26 -07:00
dignifiedquire
84a5d64f5a
refactor: simplify and split into multiple files
2017-07-09 21:04:38 +02:00
dignifiedquire
fd70584011
gx unwrite
2017-07-05 19:30:09 +02:00
dignifiedquire
be25e2eccb
another import fix
2017-07-05 18:10:17 +02:00
dignifiedquire
661ec220fd
use more pointers
2017-07-05 17:25:15 +02:00
dignifiedquire
f5d0996f7a
more cr fixes
2017-07-04 22:50:03 +02:00
dignifiedquire
32c4c20ddd
first round of cr fixes
2017-07-04 22:47:16 +02:00
dignifiedquire
0cb827d19b
gxified gorilla/websocket
2017-07-04 22:39:10 +02:00
dignifiedquire
398fcd59b4
feat: upgrade to use gorilla/websocket
...
Closes #12
2017-07-01 23:11:20 +02:00
Jeromy
fa8d0d27d1
gx publish 1.4.0
2016-10-04 19:24:36 -07:00
Jeromy
f5f0af8297
update libp2p-transport
2016-09-25 01:29:29 -07:00
Jeromy
b80c12878c
gx publish v1.2.0
2016-09-15 22:24:15 -07:00
Friedel Ziegelmayer
598f265e6f
fix: use binary frames instead of text frames
...
This fixes websocket interop with js-ipfs
2016-09-15 10:06:05 +02:00
Jeromy
f87a8406e9
gx publish version 1.0.5, use builtin context
2016-08-24 09:27:17 -07:00
Jeromy
10b6a10746
some cleanup
2016-08-23 22:04:22 -07:00
Jeromy
6cb2231c24
gx publish version 1.0.3
2016-08-23 19:21:43 -07:00
Jeromy
5d09bed16b
gx publish version 1.0.2
2016-08-23 17:31:26 -07:00
Jeromy
83015ba5dc
complete parsers
2016-05-16 15:17:21 -07:00
Jeromy
f928ecce2f
first working commit
2016-05-16 12:29:11 -07:00