* Add SNI and HTTP_libp2p_token to Noise extensions
* Initial libp2phttp work
* Remove custom response writer
* Initial self review
* Add client for PingHTTP
* Support using a different sni from host
* Add WIP auth support
* Revert "Add WIP auth support"
This reverts commit 8a648d94f7. Since
current spec doesn't use libp2p-noise-?X auth anymore.
* Remove libp2p-noise auth (removed from spec)
* wip notes
* Fix ordering of header writes
* Change api to have the host do more
* Add options
* Use stream host from option instead of parameter
* Nits
* Add AddPeerMetadata
* Add CustomRootHandler option
* Remove old todos
* Undo Noise changes
* Add comments
* Implement CloseIdleConnections to protect from surprising behavior
* Add todo
* Add ServerMustAuthenticatePeerID option
* WIP work on recent roundtripper logic
* Remove recentHTTPAddrs. We don't need it
* Move http ping to separate package
* Hide internal constants
* HTTPHost has a valid zero-value. Remove constructor and options
* Add https test
* Rename to following naming convention
* Add flag for insecure http
* Return after error
* Rename Rm to Remove
* Rename
* Refactor to always call closeAllListeners
* Rename
* Rename
* Automatically strip prefix when using SetHTTPHandler*
* Hide streamHostListen
* Cleanup public types and add docs
* Fix interface rename
* Remove debug
* PR comments
* Add examples
* Fix example name
* Cleanup unused example
* Add more examples
* Add well known handler example
* Handle empty path
* Fix typo
* Make RoundTripperOption public so users can allocate a slice of options
* Rename HTTPHost to Host
* Make the host.WellKnownHandler public
* Make Add merge PeerMetadata. Introduce SetPeerMetadata
* Rename AddProtocolMapping to AddProtocolMeta. Expand comment
* Expand comment on DefaultClientRoundTripper
And don't use the http.DefaultRoundTripper and cast
* Remove todo
Covered by https://github.com/libp2p/go-libp2p/issues/2511
* Fix comment typo
* Fix comment typo
* Create helper init fn
* Rename NewRoundTripper to NewConstrainedRoundTripper
* Use pointer for Host.ServeMux
* Don't ignore err
* json decode from reader
* Nits
* Move setupListeners to method
* Add comment for streamReadCloser
* Add more comments
* Add todo
* Defer connect until the round trip
* Rebase gostream
* Update p2p/http/libp2phttp.go
Co-authored-by: Andrew Gillis <gammazero@users.noreply.github.com>
---------
Co-authored-by: Andrew Gillis <gammazero@users.noreply.github.com>
* chore: bump go.mod to Go 1.20 and run go fix
* chore: bump go.mod to Go 1.20 and run go fix
* chore: bump go.mod to Go 1.20 and run go fix
* chore: bump go.mod to Go 1.20 and run go fix
* chore: bump go.mod to Go 1.20 and run go fix
* fix: stop using the deprecated io/ioutil package
* chore: bump go.mod to Go 1.20 and run go fix
* chore: revert go fixes to go generated files
* chore: add or force update .github/workflows/go-test.yml
* chore: add or force update .github/workflows/go-check.yml
* chore: add or force update .github/workflows/releaser.yml
* chore: add or force update .github/workflows/release-check.yml
* chore: add or force update .github/workflows/tagpush.yml
* chore: restore modifications introduced during review
---------
Co-authored-by: galargh <piotr.galar@gmail.com>
* Add deadline test
* Test read/write deadlines
* Add SetDeadline test
* Skip mplex test for now
* Rename fake proto
* Sleep for an hour
* Add comment
* Update Yamux dep
* Skip WebSocket
* Skip WebSocket and Yamux
* Cleanup
* Bump timings up
* Close nodes. Remove mplex
* Use net.Error cast