Add stateless DNS hijack
This commit is contained in:
parent
1ba7d79118
commit
79084fa798
5 changed files with 113 additions and 6 deletions
|
|
@ -291,6 +291,13 @@ func (d *ForwardDispatcher) judgeAndInstall(key flowKey, packet *forwardPacket,
|
|||
case ActionDrop:
|
||||
d.installSimple(key, ActionDrop, packet.protocol, now)
|
||||
return true
|
||||
case ActionHijackDNS:
|
||||
if packet.protocol == uint8(header.UDPProtocolNumber) {
|
||||
d.hijackDNSPacket(packet)
|
||||
return true
|
||||
}
|
||||
d.installSimple(key, ActionAccept, packet.protocol, now)
|
||||
return false
|
||||
default:
|
||||
d.installSimple(key, ActionAccept, packet.protocol, now)
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue