Documentation ¶
Overview ¶
Package windowskext provides network interception capabilities on windows via the Portmaster Kernel Extension.
Index ¶
- Constants
- Variables
- func GetPayload(packetID uint32, packetSize uint32) ([]byte, error)
- func Handler(packets chan packet.Packet)
- func Init(dllPath, driverPath string) error
- func SetVerdict(pkt *Packet, verdict network.Verdict) error
- func Start() error
- func Stop() error
- type Packet
- func (pkt *Packet) Accept() error
- func (pkt *Packet) Block() error
- func (pkt *Packet) Drop() error
- func (pkt *Packet) FastTrackedByIntegration() bool
- func (pkt *Packet) LoadPacketData() error
- func (pkt *Packet) PermanentAccept() error
- func (pkt *Packet) PermanentBlock() error
- func (pkt *Packet) PermanentDrop() error
- func (pkt *Packet) RerouteToNameserver() error
- func (pkt *Packet) RerouteToTunnel() error
- type VerdictRequest
- type WinKext
Constants ¶
const ( // VerdictRequestFlagFastTrackPermitted is set on packets that have been // already permitted by the kernel extension and the verdict request is only // informational. VerdictRequestFlagFastTrackPermitted = 1 // VerdictRequestFlagSocketAuth indicates that the verdict request is for a // connection that was intercepted on an ALE layer instead of in the network // stack itself. Thus, no packet data is available. VerdictRequestFlagSocketAuth = 2 )
Variables ¶
var ( ErrKextNotReady = errors.New("the windows kernel extension (driver) is not ready to accept commands") ErrNoPacketID = errors.New("the packet has no ID, possibly because it was fast-tracked by the kernel extension") )
Package errors
Functions ¶
func GetPayload ¶
GetPayload returns the payload of a packet.
func SetVerdict ¶
SetVerdict sets the verdict for a packet and/or connection.
Types ¶
type Packet ¶
Packet represents an IP packet.
func (*Packet) FastTrackedByIntegration ¶ added in v0.6.12
FastTrackedByIntegration returns whether the packet has been fast-track accepted by the OS integration.
func (*Packet) LoadPacketData ¶ added in v0.6.9
GetPayload returns the full raw packet.
func (*Packet) PermanentAccept ¶
PermanentAccept permanently accepts connection (and the current packet).
func (*Packet) PermanentBlock ¶
PermanentBlock permanently blocks connection (and the current packet).
func (*Packet) PermanentDrop ¶
PermanentDrop permanently drops connection (and the current packet).
func (*Packet) RerouteToNameserver ¶
RerouteToNameserver permanently reroutes the connection to the local nameserver (and the current packet).
func (*Packet) RerouteToTunnel ¶
RerouteToTunnel permanently reroutes the connection to the local tunnel entrypoint (and the current packet).
type VerdictRequest ¶
type VerdictRequest struct {
// contains filtered or unexported fields
}
VerdictRequest is the request structure from the Kext.
func RecvVerdictRequest ¶
func RecvVerdictRequest() (*VerdictRequest, error)
RecvVerdictRequest waits for the next verdict request from the kext. If a timeout is reached, both *VerdictRequest and error will be nil.