Add experimental nfqueue interception backend
This commit adds a new experimental nfqueue interception backed based on github.com/florianl/go-nfqueue. It should add more stability to the interception of network packets and also eliminates the CGO and the runtime dependency on libnetfilter_queue. Note that this commit does not remove the old nfqueue backend yet but adds a --experimental-nfqueue flag to portmaster-core.
This commit is contained in:
@@ -66,6 +66,11 @@ func NewNFQueue(qid uint16) (nfq *NFQueue, err error) {
|
||||
return nfq, nil
|
||||
}
|
||||
|
||||
// PacketChannel returns a packet channel
|
||||
func (nfq *NFQueue) PacketChannel() <-chan packet.Packet {
|
||||
return nfq.Packets
|
||||
}
|
||||
|
||||
func (nfq *NFQueue) init() error {
|
||||
var err error
|
||||
if nfq.h, err = C.nfq_open(); err != nil || nfq.h == nil {
|
||||
|
||||
Reference in New Issue
Block a user