Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move go-tcp-transport here #1418

Merged
merged 85 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
7c54aa9
extract tcp transport from go-libp2p-transport
whyrusleeping Sep 25, 2016
8df46c8
fix: use DialContext of go-reuseport
Kubuxu Oct 3, 2016
aa9e1d0
fix(govet): correct fmt for bool is %t
Kubuxu Oct 3, 2016
1b26b1f
Merge pull request #3 from libp2p/fit/govet/one
whyrusleeping Oct 3, 2016
8f3e533
Merge remote-tracking branch 'origin/master' into feat/dep/go-reuseport
Kubuxu Oct 3, 2016
0cf5a54
Merge pull request #2 from libp2p/feat/dep/go-reuseport
whyrusleeping Oct 3, 2016
9532d3f
update deps
whyrusleeping Oct 5, 2016
e377041
fix ip4 vs ip6 dial failures
whyrusleeping Mar 21, 2017
cfef65c
allow nil for dialer laddr
whyrusleeping Mar 22, 2017
59530f2
clean up reusedial and remove go-libp2p-logging
whyrusleeping Mar 22, 2017
53da0c0
fix panic when reuseport was no available
whyrusleeping Mar 24, 2017
af1302a
fix source address not being set in non REUSEPORT dialer
Kubuxu Jul 26, 2017
aaf9fcb
be explicit about the interfaces implemented
marten-seemann Apr 8, 2017
d29927f
replace tpt.ConnWrap by a tcpConn
marten-seemann Apr 8, 2017
d7cda66
remove the timeoutOpt
marten-seemann Sep 6, 2017
21fd167
use the renamed transport interfaces
marten-seemann Sep 6, 2017
3c94e56
Merge pull request #8 from marten-seemann/master
Stebalien Sep 7, 2017
a7ae57b
Revert "use the renamed transport interfaces"
Stebalien Oct 20, 2017
f4deba0
remove reference to SingleStreamConn
Stebalien Oct 20, 2017
7ead9fd
Merge pull request #11 from libp2p/revert/conn-interfaces
Stebalien Oct 24, 2017
0553274
update go-reuseport
Stebalien Nov 9, 2017
11a8aa1
Merge pull request #9 from libp2p/fix/source-address
Stebalien Nov 9, 2017
afd5a6e
Merge pull request #13 from libp2p/feat/update-reuseport
Stebalien Nov 9, 2017
5ec6564
gx publish 1.2.6
Stebalien Dec 4, 2017
ec33afb
Revert "fix source address not being set in non REUSEPORT dialer"
Stebalien Dec 28, 2017
69b7572
set the source IP, but not port, when not using the reuseport dialer
Stebalien Dec 28, 2017
1d47d21
Merge pull request #20 from libp2p/fix/19
Stebalien Dec 28, 2017
4784a35
refactor for transport interface changes
Stebalien Jan 19, 2018
df410f8
Merge pull request #23 from libp2p/feat/refactor
Stebalien Jun 6, 2018
bd1a6b0
add a TCP connect timeout
Stebalien Jun 8, 2018
e8b9e0d
Deprecate IPFS_REUSEPORT, use LIBP2P_TCP_REUSEPORT
cannium Oct 30, 2018
a2176a3
Merge pull request #27 from cannium/master
Stebalien Oct 30, 2018
87f331a
set linger to 0 for both inbound and outbound connections
Stebalien Apr 4, 2019
2785529
Merge pull request #36 from libp2p/fix/linger
Stebalien Apr 4, 2019
a517f4d
chore: remove inline interface
Stebalien Apr 4, 2019
7972f88
Merge pull request #38 from libp2p/fix/remove-inline-interface
Stebalien Apr 4, 2019
b06b0e6
dep: import go-libp2p-mplex into the libp2p org
Stebalien May 22, 2019
e083cfd
Merge pull request #39 from libp2p/dep/import-smux
Stebalien May 22, 2019
ed7828c
migrate to consolidated types (#40)
raulk May 26, 2019
cea811c
use new insecure transport constructor
yusefnapora Jul 25, 2019
70f680f
Merge pull request #42 from libp2p/feat/plaintext-2
yusefnapora Aug 2, 2019
503a78e
fix: don't allow dialing DNS addresses
Stebalien Apr 3, 2020
4dbbc0a
Merge pull request #61 from libp2p/fix/no-dns
Stebalien Apr 3, 2020
d9fec43
stop using the deprecated go-multiaddr-net package
marten-seemann Feb 16, 2021
7bdb8a4
Merge pull request #72 from libp2p/stop-using-deprecated-go-multiaddr…
marten-seemann Feb 16, 2021
2f74f82
enable TCP keepalives
marten-seemann Feb 16, 2021
c585e14
rename the lingerListener to tcpListener
marten-seemann Feb 24, 2021
e5e4091
Merge pull request #73 from libp2p/keep-alives
marten-seemann Feb 24, 2021
3cf9d58
expose some Prometheus metrics
marten-seemann Mar 27, 2021
0006048
use a fork of mikioh/tcp
marten-seemann Apr 6, 2021
cae447e
Merge pull request #75 from libp2p/prometheus
marten-seemann Apr 8, 2021
7fae0d6
add bandwidth-related metrics (for Linux and OSX)
marten-seemann Apr 12, 2021
769c219
Merge pull request #76 from libp2p/bandwidth-metrics
marten-seemann Apr 13, 2021
ff00d9c
use log.Warn instead of log.Warning
marten-seemann Apr 23, 2021
ed9ea79
Merge pull request #77 from libp2p/fix-staticcheck
Stebalien Apr 23, 2021
4eb467a
Skip SetKeepAlivePeriod call on OpenBSD
qbit Jun 23, 2021
464f1b3
Merge pull request #80 from qbit/openbsd_keepalive
marten-seemann Jun 24, 2021
c4c5e0f
collect metrics in a separate go routine
marten-seemann Jul 10, 2021
15dab89
fix: avoid logging "invalid argument" errors when setting keepalive
Stebalien Jul 14, 2021
2537847
Merge pull request #83 from libp2p/fix/noisy-log
Stebalien Jul 14, 2021
40bda4a
use conn.Close() to remove closed connections from tracer
marten-seemann Jul 14, 2021
e520e28
start collecting RTT and bandwidth metrics when Collect is calleed
marten-seemann Jul 14, 2021
66cb18e
Merge pull request #82 from libp2p/fix-unbounded-state
marten-seemann Jul 15, 2021
302c1b5
chore: update go-libp2p-transport-upgrader and go-reuseport-transport
marten-seemann Jul 24, 2021
501872d
Merge pull request #84 from libp2p/update-deps
Stebalien Jul 25, 2021
873a3c5
sync: update CI config files (#90)
web3-bot Aug 17, 2021
8296ce3
disable metrics collection on Windows
marten-seemann Aug 31, 2021
3a5db3b
Merge pull request #93 from libp2p/disable-metrics-on-windows
marten-seemann Sep 7, 2021
a738e01
simplify dial timeout context
marten-seemann Sep 18, 2021
6e206c6
Merge pull request #94 from libp2p/simplify-dial-context
marten-seemann Sep 19, 2021
650b013
chore: update go-log to v2
marten-seemann Sep 20, 2021
35074ee
Merge pull request #97 from libp2p/update-go-log
marten-seemann Sep 25, 2021
e9c99b7
use the assigned role when upgrading a sim open connection
marten-seemann Sep 19, 2021
a054232
Merge pull request #95 from libp2p/sim-open
marten-seemann Sep 25, 2021
79d3f04
use a config option to disable reuseport
marten-seemann Sep 25, 2021
edff896
add an option for the TCP connection timeout
marten-seemann Sep 25, 2021
7fa06d3
remove the deprecated IPFS_REUSEPORT command line flag
marten-seemann Sep 27, 2021
cd2c3d8
Merge pull request #104 from libp2p/remove-deprecated-ipfs-reuseport
marten-seemann Sep 29, 2021
c747de3
use the transport.Upgrader interface
marten-seemann Jan 2, 2022
69d3c45
Merge pull request #111 from libp2p/upgrader-interface
marten-seemann Jan 4, 2022
7d5a5f8
use the ResourceManager
marten-seemann Dec 22, 2021
ece76e8
Merge pull request #110 from libp2p/rcmgr
marten-seemann Jan 18, 2022
9d3f10b
fix: drop raw EINVAL (from keepalives) errors as well (#115)
Stebalien Feb 6, 2022
e2ceabf
move go-tcp-transport here
marten-seemann Apr 22, 2022
dfc3a3f
switch from github.com/libp2p/go-tcp-transport to p2p/transport/tcp
marten-seemann Apr 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package config
import (
"testing"

"github.com/libp2p/go-libp2p/p2p/transport/tcp"

"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/transport"
"github.com/libp2p/go-tcp-transport"

"github.com/stretchr/testify/require"
)
Expand Down
6 changes: 4 additions & 2 deletions defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ package libp2p
import (
"crypto/rand"

"github.com/libp2p/go-libp2p/p2p/net/connmgr"
"github.com/libp2p/go-libp2p/p2p/transport/tcp"

"github.com/libp2p/go-libp2p-core/crypto"

noise "github.com/libp2p/go-libp2p-noise"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
quic "github.com/libp2p/go-libp2p-quic-transport"
rcmgr "github.com/libp2p/go-libp2p-resource-manager"
tls "github.com/libp2p/go-libp2p-tls"
yamux "github.com/libp2p/go-libp2p-yamux"
"github.com/libp2p/go-libp2p/p2p/net/connmgr"
"github.com/libp2p/go-tcp-transport"
ws "github.com/libp2p/go-ws-transport"
"github.com/multiformats/go-multiaddr"
)
Expand Down
14 changes: 8 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
github.com/libp2p/go-libp2p-asn-util v0.1.0
github.com/libp2p/go-libp2p-circuit v0.6.0
github.com/libp2p/go-libp2p-core v0.15.1
github.com/libp2p/go-libp2p-mplex v0.5.0
github.com/libp2p/go-libp2p-nat v0.1.0
github.com/libp2p/go-libp2p-noise v0.4.0
github.com/libp2p/go-libp2p-peerstore v0.6.0
Expand All @@ -28,16 +29,20 @@ require (
github.com/libp2p/go-libp2p-yamux v0.9.1
github.com/libp2p/go-msgio v0.2.0
github.com/libp2p/go-netroute v0.2.0
github.com/libp2p/go-reuseport v0.1.0
github.com/libp2p/go-reuseport-transport v0.1.0
github.com/libp2p/go-stream-muxer-multistream v0.4.0
github.com/libp2p/go-tcp-transport v0.5.1
github.com/libp2p/go-ws-transport v0.6.0
github.com/libp2p/zeroconf/v2 v2.1.1
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b
github.com/multiformats/go-multiaddr v0.5.0
github.com/multiformats/go-multiaddr-dns v0.3.1
github.com/multiformats/go-multiaddr-fmt v0.1.0
github.com/multiformats/go-multihash v0.1.0
github.com/multiformats/go-multistream v0.3.0
github.com/multiformats/go-varint v0.0.6
github.com/prometheus/client_golang v1.12.1
github.com/raulk/go-watchdog v1.2.0
github.com/stretchr/testify v1.7.0
github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9
Expand Down Expand Up @@ -78,20 +83,18 @@ require (
github.com/libp2p/go-libp2p-blankhost v0.3.0 // indirect
github.com/libp2p/go-libp2p-pnet v0.2.0 // indirect
github.com/libp2p/go-libp2p-swarm v0.10.2 // indirect
github.com/libp2p/go-mplex v0.4.0 // indirect
github.com/libp2p/go-nat v0.1.0 // indirect
github.com/libp2p/go-openssl v0.0.7 // indirect
github.com/libp2p/go-reuseport v0.1.0 // indirect
github.com/libp2p/go-reuseport-transport v0.1.0 // indirect
github.com/libp2p/go-tcp-transport v0.5.1 // indirect
github.com/libp2p/go-yamux/v3 v3.1.1 // indirect
github.com/lucas-clemente/quic-go v0.27.0 // indirect
github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect
github.com/marten-seemann/qtls-go1-17 v0.1.1 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.1 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/miekg/dns v1.1.48 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
Expand All @@ -106,7 +109,6 @@ require (
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.33.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
Expand Down
6 changes: 4 additions & 2 deletions libp2p_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ import (
"sync"
"testing"

"github.com/libp2p/go-libp2p/p2p/transport/tcp"

"github.com/libp2p/go-libp2p-core/connmgr"
"github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/transport"

noise "github.com/libp2p/go-libp2p-noise"
"github.com/libp2p/go-tcp-transport"
ma "github.com/multiformats/go-multiaddr"

ma "github.com/multiformats/go-multiaddr"
"github.com/stretchr/testify/require"
)

Expand Down
Empty file added p2p/net/mock/log2.txt
Empty file.
8 changes: 5 additions & 3 deletions p2p/net/swarm/dial_worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"
"github.com/libp2p/go-libp2p/p2p/transport/tcp"

csms "github.com/libp2p/go-conn-security-multistream"
"github.com/libp2p/go-libp2p-core/peerstore"
"github.com/libp2p/go-libp2p-core/sec/insecure"
"github.com/libp2p/go-libp2p-core/transport"

csms "github.com/libp2p/go-conn-security-multistream"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
quic "github.com/libp2p/go-libp2p-quic-transport"
tnet "github.com/libp2p/go-libp2p-testing/net"
tptu "github.com/libp2p/go-libp2p-transport-upgrader"
yamux "github.com/libp2p/go-libp2p-yamux"
msmux "github.com/libp2p/go-stream-muxer-multistream"
tcp "github.com/libp2p/go-tcp-transport"
ma "github.com/multiformats/go-multiaddr"

"github.com/stretchr/testify/require"
)

func makeSwarm(t *testing.T) *Swarm {
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/swarm/testing/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"time"

"github.com/libp2p/go-libp2p/p2p/net/swarm"
"github.com/libp2p/go-libp2p/p2p/transport/tcp"

"github.com/libp2p/go-libp2p-core/connmgr"
"github.com/libp2p/go-libp2p-core/control"
Expand All @@ -15,7 +16,6 @@ import (
"github.com/libp2p/go-libp2p-core/peerstore"
"github.com/libp2p/go-libp2p-core/sec/insecure"
"github.com/libp2p/go-libp2p-core/transport"
"github.com/libp2p/go-tcp-transport"

csms "github.com/libp2p/go-conn-security-multistream"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
Expand Down
2 changes: 1 addition & 1 deletion p2p/protocol/circuitv2/relay/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
swarmt "github.com/libp2p/go-libp2p/p2p/net/swarm/testing"
"github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/client"
"github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/relay"
"github.com/libp2p/go-libp2p/p2p/transport/tcp"

"github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/host"
Expand All @@ -23,7 +24,6 @@ import (
"github.com/libp2p/go-libp2p-core/transport"

"github.com/libp2p/go-libp2p-peerstore/pstoremem"
"github.com/libp2p/go-tcp-transport"
ma "github.com/multiformats/go-multiaddr"
)

Expand Down
Loading