Documentation ¶
Index ¶
- Constants
- type Engine
- func (e *Engine) EnableDHT() error
- func (e *Engine) EnableMdns() error
- func (e *Engine) HandlePeerFound(info peer.AddrInfo)
- func (e *Engine) RoutineRouteTableWriter()
- func (e *Engine) RoutineTUNReader()
- func (e *Engine) RoutineTUNWriter()
- func (e *Engine) Run() error
- func (e *Engine) SearchNode(ctx context.Context, id peer.ID) <-chan peer.AddrInfo
- func (e *Engine) VPNHandler(stream network.Stream)
- type PacketChan
- type Payload
Constants ¶
View Source
const ( BuffSize = 1500 ChanSize = 15000 VPNStreamProtocol = "/NetHive/vpn" )
View Source
const (
DHTRetryInterval = 5 * time.Minute
)
View Source
const (
MDNSRetryInterval = 5 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) EnableMdns ¶
func (*Engine) HandlePeerFound ¶
func (*Engine) RoutineRouteTableWriter ¶
func (e *Engine) RoutineRouteTableWriter()
RoutineRouteTableWriter loop sending the data packet to the corresponding channel according to the routing table
func (*Engine) RoutineTUNReader ¶
func (e *Engine) RoutineTUNReader()
RoutineTUNReader loop to read packets from TUN
func (*Engine) RoutineTUNWriter ¶
func (e *Engine) RoutineTUNWriter()
RoutineTUNWriter loop writing packets to TUN
func (*Engine) SearchNode ¶
func (*Engine) VPNHandler ¶
type PacketChan ¶
type PacketChan chan *Payload
Source Files ¶
Click to show internal directories.
Click to hide internal directories.