Marten Seemann
c5cfb13007
close all UDP connections when the reuse is closed
3 years ago
Steven Allen
75a6c48ffc
fix: cleanup transport suite
3 years ago
Marten Seemann
6957d57824
remove deprecated type
3 years ago
Marten Seemann
2750bef9b5
simplify reuse gc
3 years ago
Masih H. Derkani
6ebf948a1a
Address `go vet` and `saticcheck` issues
Run `go mod tidy`
Resolve staticcheck issues:
- SA2002 `t.Fatal` must be called in the same goroutine as the test
- U1000 unused struct
- ST1005 error string should not be capitalized
The `go vet` issues were the same as the ones reported by `saticcheck`.
Relates to:
- https://github.com/orgs/ipfs/projects/12#card-58209321
3 years ago
Steven Allen
3864f33341
test: disable wasm test on windows
Doesn't work.
3 years ago
Marten Seemann
e520e28c09
start collecting RTT and bandwidth metrics when Collect is calleed
3 years ago
Steven Allen
7a30929513
ci: make the "tools" directory a valid go package
3 years ago
Marten Seemann
40bda4a141
use conn.Close() to remove closed connections from tracer
3 years ago
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).
3 years ago
Steven Allen
15dab89d35
fix: avoid logging "invalid argument" errors when setting keepalive
This can happen if, e.g., the connection is already dead. I think?
See https://discuss.ipfs.io/t/tcp-keepalive-and-setsockopt-invalid-argument/11725
Really, I don't know _what_ was causing this, but there's nothing we can
do about it.
3 years ago
Marten Seemann
c4c5e0fcf1
collect metrics in a separate go routine
3 years ago
Marten Seemann
2cef5be872
implement a Transport.Close that waits for the reuse's GC to finish
3 years ago
Marten Seemann
8c7dcf7567
remove unused function parameters for the reuse struct
3 years ago
Marten Seemann
5ce0d8c8c6
don't compare peer IDs when hole punching
3 years ago
vyzo
4ff2d36c67
add hole punching support ( #194 )
3 years ago
Aaron Bieber
4eb467a724
Skip SetKeepAlivePeriod call on OpenBSD
OpenBSD does not have a user-settable per-socket TCP keepalives. This changes
tryKeepAlive to skip attempting set it when on OpenBSD.
https://github.com/golang/go/blob/master/src/net/tcpsockopt_openbsd.go#L13-L14
This prevents thousands of `log.Errorf("Failed set keepalive period: %s",
err)`'s from happening.
3 years ago
Marten Seemann
8e713b4ea3
update quic-go, enable QUIC v1 (RFC 9000)
When dialing connections, we still use draft-29, but QUIC v1 is now enabled
on the server side. Once a large enough fraction of the network has upgraded,
we can switch to v1 for dialing as well.
3 years ago
Marten Seemann
cc611a6881
update quic-go to v0.21.0-rc2
4 years ago
Dennis Trautwein
d1d34d8802
Defer closing stream for reading
4 years ago
Marten Seemann
ff00d9c72b
use log.Warn instead of log.Warning
4 years ago
Marten Seemann
7fae0d63c6
add bandwidth-related metrics (for Linux and OSX)
4 years ago
Marten Seemann
0006048d37
use a fork of mikioh/tcp
4 years ago
Marten Seemann
3cf9d581c9
expose some Prometheus metrics
4 years ago
Marten Seemann
282be49060
correctly export version negotiation failures to Prometheus
4 years ago
Marten Seemann
f1cfac9df2
increase test timeout to reduce flakiness of test on Windows
4 years ago
Marten Seemann
e262838650
update quic-go to v0.20.1
4 years ago
Marten Seemann
84acfa12b6
rename metrics to adhere to naming conventions
4 years ago
Marten Seemann
26f5509e94
expose some Prometheus metrics
4 years ago
Marten Seemann
781356a858
update quic-go to v0.20.0
4 years ago
Marten Seemann
c585e14f87
rename the lingerListener to tcpListener
4 years ago
Marten Seemann
6f26698586
reduce the zstd window size from 8 MB to 32 KB
Benchmarks using sample qlog files show that this achieves in improvement in
both compression efficiency and compression speed.
More importantly, it prevents us from allocating a 8 MB every time a QUIC
connection is closed.
4 years ago
Marten Seemann
2f74f82607
enable TCP keepalives
4 years ago
Marten Seemann
d9fec436cd
stop using the deprecated go-multiaddr-net package
4 years ago
Marten Seemann
593727b654
use defers to close files
4 years ago
Marten Seemann
e888974d0e
compress qlogs when the QUIC connection is closed
4 years ago
Marten Seemann
89dffadb02
switch from gzip to zstd for qlog compression
4 years ago
Marten Seemann
bc54bc258f
pass a context to OpenStream in tests
4 years ago
Marten Seemann
ee958afaf3
change OpenStream to accept a context
4 years ago
Marten Seemann
59f8133627
pass contexts to OpenStream in tests
4 years ago
Marten Seemann
728d351233
update quic-go to v0.19.0
4 years ago
Marten Seemann
f9838545ca
don't call InterceptAccept when dialing
4 years ago
Marten Seemann
773d8f0108
pass a conn that can be type asserted to a net.UDPConn to quic-go
4 years ago
Marten Seemann
81afd82a00
fix reuseConn counting when creating the quic.Listener errors
4 years ago
Marten Seemann
f3091f346a
don't blackhole packets when gating via InterceptAccept
4 years ago
Marten Seemann
73961f0e83
use GoMock to generate a mock connection gater
4 years ago
Marten Seemann
3b88f7bbcc
use a dedicated error code when a connection is gated
0x47415445 is GATE in ASCII.
4 years ago
M. Hawn
a0f24eb802
go fmt
4 years ago
M. Hawn
94f5bc4aa6
Dependancy: Remove depricated multiaddr-net
Switch to multiaddr/net
4 years ago
M. Hawn
5a6d40c1ee
Update for go 1.14 Wasm changes
4 years ago