* Configure protocolVersion for Identify protocol
Allows the protocolVersion field of the Idenfity protocol to be
configured on the host. The current value is fixed for what appears to
be for backwards compatibility with IPFS which makes it difficult for
non-IPFS protocols to use the library.
References:
- https://github.com/libp2p/go-libp2p/issues/714
- https://github.com/libp2p/go-libp2p/pull/1137
- 6855ab943b/protocols/identify/src/identify.rs (L125-L127)
* Fix protocol version assignment
Fix an issue where the protocolVersion string for the Identify protocol
was wrongly being assigned the agentVersion string.
* Delete trailing whitespace
* feat: add `DisableReuseport` option
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
* fix: `TestStatelessReset/reuseport_off` test
close listener underlying connection when reuseport is disabled and the close
method called
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
* fix: skip `DisableReuseport` option on `TestHolePunching`
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
* fix: don't prefer local ports from other addresses when dialing
This address may already be in-use (on that other address) somewhere
else.
Thanks to @schomatis for figuring this out.
fixes#1611
* chore: document reuseport dialer logic
This updates the core/crypto/secp256k1 code to make use of the
dcrec/secp256k1/v4 module directly instead of using btcec/v2 which
itself is just a shim around dcrec/secp256k1/v4 anyway.
This has the benefit of removing the additional
github.com/btcsuite/btcd/chaincfg/chainhash dependency since
dcrec/secp256k1/v4 is its own module and does rely on it.
It also updates to the latest v4.1.0 release which implements direct key
generation and has some other nice optimizations that speed up signature
verification as compared to the v4.0.1 release.
* 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>