Move relay & autonat to connectivity folder (#769)
This commit is contained in:
parent
72abe822c0
commit
5e7e009445
|
@ -1,6 +1,6 @@
|
|||
import chronos, stew/byteutils
|
||||
import ../libp2p,
|
||||
../libp2p/protocols/relay/[relay, client]
|
||||
../libp2p/protocols/connectivity/relay/[relay, client]
|
||||
|
||||
# Helper to create a circuit relay node
|
||||
proc createCircuitRelaySwitch(r: Relay): Switch =
|
||||
|
|
|
@ -26,8 +26,8 @@ import
|
|||
switch, peerid, peerinfo, stream/connection, multiaddress,
|
||||
crypto/crypto, transports/[transport, tcptransport],
|
||||
muxers/[muxer, mplex/mplex, yamux/yamux],
|
||||
protocols/[identify, secure/secure, secure/noise, autonat],
|
||||
protocols/relay/[relay, client, rtransport],
|
||||
protocols/[identify, secure/secure, secure/noise],
|
||||
protocols/connectivity/[autonat, relay/relay, relay/client, relay/rtransport],
|
||||
connmanager, upgrademngrs/muxedupgrade,
|
||||
nameresolving/nameresolver,
|
||||
errors, utility
|
||||
|
|
|
@ -14,13 +14,13 @@ else:
|
|||
|
||||
import std/[options, sets, sequtils]
|
||||
import chronos, chronicles, stew/objects
|
||||
import ./protocol,
|
||||
../switch,
|
||||
../multiaddress,
|
||||
../multicodec,
|
||||
../peerid,
|
||||
../utils/semaphore,
|
||||
../errors
|
||||
import ../protocol,
|
||||
../../switch,
|
||||
../../multiaddress,
|
||||
../../multicodec,
|
||||
../../peerid,
|
||||
../../utils/semaphore,
|
||||
../../errors
|
||||
|
||||
logScope:
|
||||
topics = "libp2p autonat"
|
|
@ -20,10 +20,10 @@ import ./relay,
|
|||
./messages,
|
||||
./rconn,
|
||||
./utils,
|
||||
../../peerinfo,
|
||||
../../switch,
|
||||
../../multiaddress,
|
||||
../../stream/connection
|
||||
../../../peerinfo,
|
||||
../../../switch,
|
||||
../../../multiaddress,
|
||||
../../../stream/connection
|
||||
|
||||
|
||||
logScope:
|
|
@ -14,8 +14,8 @@ else:
|
|||
|
||||
import options, macros, sequtils
|
||||
import stew/objects
|
||||
import ../../peerinfo,
|
||||
../../signed_envelope
|
||||
import ../../../peerinfo,
|
||||
../../../signed_envelope
|
||||
|
||||
# Circuit Relay V1 Message
|
||||
|
|
@ -14,7 +14,7 @@ else:
|
|||
|
||||
import chronos
|
||||
|
||||
import ../../stream/connection
|
||||
import ../../../stream/connection
|
||||
|
||||
type
|
||||
RelayConnection* = ref object of Connection
|
|
@ -19,16 +19,16 @@ import chronos, chronicles
|
|||
import ./messages,
|
||||
./rconn,
|
||||
./utils,
|
||||
../../peerinfo,
|
||||
../../switch,
|
||||
../../multiaddress,
|
||||
../../multicodec,
|
||||
../../stream/connection,
|
||||
../../protocols/protocol,
|
||||
../../transports/transport,
|
||||
../../errors,
|
||||
../../utils/heartbeat,
|
||||
../../signed_envelope
|
||||
../../../peerinfo,
|
||||
../../../switch,
|
||||
../../../multiaddress,
|
||||
../../../multicodec,
|
||||
../../../stream/connection,
|
||||
../../../protocols/protocol,
|
||||
../../../transports/transport,
|
||||
../../../errors,
|
||||
../../../utils/heartbeat,
|
||||
../../../signed_envelope
|
||||
|
||||
# TODO:
|
||||
# * Eventually replace std/times by chronos/timer. Currently chronos/timer
|
|
@ -19,9 +19,9 @@ import chronos, chronicles
|
|||
import ./client,
|
||||
./rconn,
|
||||
./utils,
|
||||
../../switch,
|
||||
../../stream/connection,
|
||||
../../transports/transport
|
||||
../../../switch,
|
||||
../../../stream/connection,
|
||||
../../../transports/transport
|
||||
|
||||
logScope:
|
||||
topics = "libp2p relay relay-transport"
|
|
@ -17,7 +17,7 @@ import options
|
|||
import chronos, chronicles
|
||||
|
||||
import ./messages,
|
||||
../../stream/connection
|
||||
../../../stream/connection
|
||||
|
||||
logScope:
|
||||
topics = "libp2p relay relay-utils"
|
|
@ -3,7 +3,7 @@ import chronos, chronicles, stew/byteutils
|
|||
import helpers
|
||||
import ../libp2p
|
||||
import ../libp2p/[daemon/daemonapi, varint, transports/wstransport, crypto/crypto]
|
||||
import ../libp2p/protocols/relay/[relay, client, utils]
|
||||
import ../libp2p/protocols/connectivity/relay/[relay, client, utils]
|
||||
|
||||
type
|
||||
SwitchCreator = proc(
|
||||
|
|
|
@ -3,7 +3,7 @@ import chronos
|
|||
import
|
||||
../libp2p/[
|
||||
builders,
|
||||
protocols/autonat
|
||||
protocols/connectivity/autonat
|
||||
],
|
||||
./helpers
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import stublogger
|
|||
|
||||
import helpers, commoninterop
|
||||
import ../libp2p
|
||||
import ../libp2p/crypto/crypto, ../libp2p/protocols/relay/[relay, client]
|
||||
import ../libp2p/crypto/crypto, ../libp2p/protocols/connectivity/relay/[relay, client]
|
||||
|
||||
proc switchMplexCreator(
|
||||
ma: MultiAddress = MultiAddress.init("/ip4/127.0.0.1/tcp/0").tryGet(),
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
import options, bearssl, chronos
|
||||
import stew/byteutils
|
||||
import ../libp2p/[protocols/relay/relay,
|
||||
protocols/relay/client,
|
||||
protocols/relay/messages,
|
||||
protocols/relay/utils,
|
||||
protocols/relay/rtransport,
|
||||
import ../libp2p/[protocols/connectivity/relay/relay,
|
||||
protocols/connectivity/relay/client,
|
||||
protocols/connectivity/relay/messages,
|
||||
protocols/connectivity/relay/utils,
|
||||
protocols/connectivity/relay/rtransport,
|
||||
multiaddress,
|
||||
peerinfo,
|
||||
peerid,
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
import bearssl, chronos, options
|
||||
import ../libp2p
|
||||
import ../libp2p/[protocols/relay/relay,
|
||||
protocols/relay/messages,
|
||||
protocols/relay/utils,
|
||||
protocols/relay/client]
|
||||
import ../libp2p/[protocols/connectivity/relay/relay,
|
||||
protocols/connectivity/relay/messages,
|
||||
protocols/connectivity/relay/utils,
|
||||
protocols/connectivity/relay/client]
|
||||
import ./helpers
|
||||
import std/times
|
||||
import stew/byteutils
|
||||
|
|
Loading…
Reference in New Issue