Documentation
¶
Index ¶
- type AuthStatus
- func (s *AuthStatus) AddPeer(ctx context.Context, peerID peer.ID, name, alias string, confirmed bool, ...) error
- func (s *AuthStatus) AuthStreamHandler(stream network.Stream)
- func (s *AuthStatus) BackgroundExchangeStatusInfo(ctx context.Context)
- func (s *AuthStatus) BackgroundRetryAuthRequests(ctx context.Context)
- func (s *AuthStatus) BlockPeer(peerID peer.ID, name string)
- func (s *AuthStatus) ExchangeNewStatusInfo(ctx context.Context, remotePeerID peer.ID, knownPeer config.KnownPeer) error
- func (s *AuthStatus) ExchangeStatusInfoWithAllKnownPeers(ctx context.Context)
- func (s *AuthStatus) GetIngoingAuthRequests() map[string]protocol.AuthPeer
- func (s *AuthStatus) SendAuthRequest(ctx context.Context, peerID peer.ID, req protocol.AuthPeer) error
- func (s *AuthStatus) StatusStreamHandler(stream network.Stream)
- type P2p
- type SOCKS5
- func (s *SOCKS5) Close()
- func (s *SOCKS5) ListAvailableProxies() []entity.AvailableProxy
- func (s *SOCKS5) ProxyStreamHandler(stream network.Stream)
- func (s *SOCKS5) ServeConns(ctx context.Context)
- func (s *SOCKS5) SetProxyPeerID(peerID string)
- func (s *SOCKS5) SetProxyingLocalhostEnabled(enabled bool)
- type Tunnel
- type VpnPeer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthStatus ¶
type AuthStatus struct {
// contains filtered or unexported fields
}
func NewAuthStatus ¶
func (*AuthStatus) AuthStreamHandler ¶
func (s *AuthStatus) AuthStreamHandler(stream network.Stream)
func (*AuthStatus) BackgroundExchangeStatusInfo ¶
func (s *AuthStatus) BackgroundExchangeStatusInfo(ctx context.Context)
func (*AuthStatus) BackgroundRetryAuthRequests ¶
func (s *AuthStatus) BackgroundRetryAuthRequests(ctx context.Context)
func (*AuthStatus) ExchangeNewStatusInfo ¶
func (*AuthStatus) ExchangeStatusInfoWithAllKnownPeers ¶
func (s *AuthStatus) ExchangeStatusInfoWithAllKnownPeers(ctx context.Context)
func (*AuthStatus) GetIngoingAuthRequests ¶
func (s *AuthStatus) GetIngoingAuthRequests() map[string]protocol.AuthPeer
func (*AuthStatus) SendAuthRequest ¶
func (*AuthStatus) StatusStreamHandler ¶
func (s *AuthStatus) StatusStreamHandler(stream network.Stream)
type P2p ¶
type P2p interface {
ConnectPeer(ctx context.Context, peerID peer.ID) error
IsConnected(peerID peer.ID) bool
NewStream(ctx context.Context, id peer.ID, proto libp2pProtocol.ID) (network.Stream, error)
NewStreamWithDedicatedConn(ctx context.Context, id peer.ID, proto libp2pProtocol.ID) (network.Stream, error)
SubscribeConnectionEvents(onConnected, onDisconnected func(network.Network, network.Conn))
RecordPeerLatency(id peer.ID, rtt time.Duration)
}
type SOCKS5 ¶ added in v0.12.0
type SOCKS5 struct {
// contains filtered or unexported fields
}
func (*SOCKS5) ListAvailableProxies ¶ added in v0.12.0
func (s *SOCKS5) ListAvailableProxies() []entity.AvailableProxy
func (*SOCKS5) ProxyStreamHandler ¶ added in v0.12.0
func (*SOCKS5) ServeConns ¶ added in v0.12.0
func (*SOCKS5) SetProxyPeerID ¶ added in v0.12.0
func (*SOCKS5) SetProxyingLocalhostEnabled ¶ added in v0.12.0
SetProxyingLocalhostEnabled is created for tests and not intended for real usage.
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
func (*Tunnel) HandleReadPackets ¶ added in v0.15.0
HandleReadPackets for successfully handled packets it sets packet in slice as nil
func (*Tunnel) RefreshPeersList ¶
func (t *Tunnel) RefreshPeersList()
func (*Tunnel) StreamHandler ¶
Click to show internal directories.
Click to hide internal directories.