# README
DeP2P
DeP2P(Decentralized peer-to-peer) 去中心化对等网络,是用 Go(golang)编写的一种 P2P 对等网络的便捷实现。
该项目目前正在积极开发中,处于 Alpha 状态。
这是一个完全独立的版本,将在底层架构进行更深层的内聚,更好的满足 web3.0 对于去中心化网络基础设施的需求。
文档
该文档正在编写中……
# Functions
AddrsFactory configures dep2p to use the given address factory.
AutoNATServiceRateLimit changes the default rate limiting configured in helping other peers determine their reachability status.
BandwidthReporter configures dep2p to use the given bandwidth reporter.
ChainOptions chains multiple options into a single option.
ConnectionGater configures dep2p to use the given ConnectionGater to actively reject inbound/outbound connections based on the lifecycle stage of the connection.
ConnectionManager configures dep2p to use the given connection manager.
DialRanker configures dep2p to use d as the dial ranker.
DisableMetrics configures dep2p to disable prometheus metrics.
DisableRelay configures dep2p to disable the relay transport.
EnableAutoRelay configures dep2p to enable the AutoRelay subsystem.
EnableAutoRelayWithPeerSource configures dep2p to enable the AutoRelay subsystem using the provided PeerSource callback to get more relay candidates.
EnableAutoRelayWithStaticRelays configures dep2p to enable the AutoRelay subsystem using the provided relays as relay candidates.
Experimental EnableHolePunching enables NAT traversal by enabling NATT'd peers to both initiate and respond to hole punching attempts to create direct/NAT-traversed connections with other peers.
EnableNATService configures dep2p to provide a service to peers for determining their reachability status.
EnableRelay configures dep2p to enable the relay transport.
EnableRelayService configures dep2p to run a circuit v2 relay, if we detect that we're publicly reachable.
ForceReachabilityPrivate overrides automatic reachability detection in the AutoNAT subsystem, forceing the local node to believe it is behind a NAT and not reachable externally.
ForceReachabilityPublic overrides automatic reachability detection in the AutoNAT subsystem, forcing the local node to believe it is reachable externally.
Identity configures dep2p to use the given private key to identify itself.
ListenAddrs configures dep2p to listen on the given addresses.
ListenAddrStrings configures dep2p to listen on the given (unparsed) addresses.
MultiaddrResolver sets the dep2p dns resolver.
Muxer configures dep2p to use the given stream multiplexer.
NATManager will configure dep2p to use the requested NATManager.
NATPortMap configures dep2p to use the default NATManager.
New constructs a new dep2p node with the given options, falling back on reasonable defaults.
NewWithoutDefaults constructs a new dep2p node with the given options but *without* falling back on reasonable defaults.
Peerstore configures dep2p to use the given peerstore.
Ping will configure dep2p to support the ping service; enable by default.
PrivateNetwork configures dep2p to use the given private network protector.
PrometheusRegisterer configures dep2p to use reg as the Registerer for all metrics subsystems.
ProtocolVersion sets the protocolVersion string required by the dep2p Identify protocol.
No description provided by the author
ResourceManager configures dep2p to use the given ResourceManager.
Routing will configure dep2p to use routing.
Security configures dep2p to use the given security transport (or transport constructor).
SetDefaultServiceLimits sets the default limits for bundled dep2p services.
SwarmOpts configures dep2p to use swarm with opts.
Transport configures dep2p to use the given transport (or transport constructor).
UserAgent sets the dep2p user-agent sent along with the identify protocol.
No description provided by the author
# Variables
DefaultConnectionManager creates a default connection manager.
DefaultEnableRelay enables relay dialing and listening by default.
DefaultListenAddrs configures dep2p to use default listen address.
DefaultMultiaddrResolver creates a default connection manager.
DefaultMuxers configures dep2p to use the stream connection multiplexers.
DefaultPeerstore configures dep2p to use the default peerstore.
DefaultPrivateTransports are the default dep2p transports when a PSK is supplied.
DefaultPrometheusRegisterer configures dep2p to use the default registerer.
No description provided by the author
Defaults configures dep2p to use the default options.
DefaultSecurity is the default security option.
DefaultTransports are the default dep2p transports.
FallbackDefaults applies default options to the dep2p node if and only if no other relevant options have been applied.
NoListenAddrs will configure dep2p to not listen by default.
NoSecurity is an option that completely disables all transport security.
NoTransports will configure dep2p to not enable any transports.
RandomIdentity generates a random identity.