mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-22 00:15:37 +01:00
Simple lie test (#427)
This commit is contained in:
@@ -57,6 +57,14 @@ func (c *Control) GetFromUDP(block bool) *UdpPacket {
|
||||
return c.f.outside.Get(block)
|
||||
}
|
||||
|
||||
func (c *Control) GetUDPTxChan() <-chan *UdpPacket {
|
||||
return c.f.outside.txPackets
|
||||
}
|
||||
|
||||
func (c *Control) GetTunTxChan() <-chan []byte {
|
||||
return c.f.inside.(*Tun).txPackets
|
||||
}
|
||||
|
||||
// InjectUDPPacket will inject a packet into the udp side of nebula
|
||||
func (c *Control) InjectUDPPacket(p *UdpPacket) {
|
||||
c.f.outside.Send(p)
|
||||
@@ -90,3 +98,7 @@ func (c *Control) InjectTunUDPPacket(toIp net.IP, toPort uint16, fromPort uint16
|
||||
|
||||
c.f.inside.(*Tun).Send(buffer.Bytes())
|
||||
}
|
||||
|
||||
func (c *Control) GetUDPAddr() string {
|
||||
return c.f.outside.addr.String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user