windowskext

package
v1.6.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

Package windowskext provides network interception capabilities on windows via the Portmaster Kernel Extension.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearCache

func ClearCache() error

Clears the internal connection cache.

func GetKextHandle

func GetKextHandle() windows.Handle

func GetKextServiceHandle

func GetKextServiceHandle() windows.Handle

func Handler

func Handler(ctx context.Context, packets chan packet.Packet, bandwidthUpdate chan *packet.BandwidthUpdate)

Handler transforms received packets to the Packet interface.

func Init

func Init(path string) error

func RecvVerdictRequest

func RecvVerdictRequest() (*kextinterface.Info, error)

RecvVerdictRequest waits for the next verdict request from the kext. If a timeout is reached, both *VerdictRequest and error will be nil.

func SendBandwidthStatsRequest

func SendBandwidthStatsRequest() error

func SendCleanEndedConnection

func SendCleanEndedConnection() error

func SendLogRequest

func SendLogRequest() error

Send request for logs of the kext.

func SendPrintMemoryStatsCommand

func SendPrintMemoryStatsCommand() error

func SetVerdict

func SetVerdict(pkt *Packet, verdict kextinterface.KextVerdict) error

SetVerdict sets the verdict for a packet and/or connection.

func Start

func Start() error

Start intercepting.

func Stop

func Stop() error

Stop intercepting.

func UpdateVerdict

func UpdateVerdict(conn *network.Connection) error

Updates a specific connection verdict.

Types

type Packet

type Packet struct {
	packet.Base
	// contains filtered or unexported fields
}

Packet represents an IP packet.

func (*Packet) Accept

func (pkt *Packet) Accept() error

Accept accepts the packet.

func (*Packet) Block

func (pkt *Packet) Block() error

Block blocks the packet.

func (*Packet) Drop

func (pkt *Packet) Drop() error

Drop drops the packet.

func (*Packet) ExpectInfo

func (pkt *Packet) ExpectInfo() bool

ExpectInfo returns whether the next packet is expected to be informational only.

func (*Packet) FastTrackedByIntegration

func (pkt *Packet) FastTrackedByIntegration() bool

FastTrackedByIntegration returns whether the packet has been fast-track accepted by the OS integration.

func (*Packet) InfoOnly

func (pkt *Packet) InfoOnly() bool

InfoOnly returns whether the packet is informational only and does not represent an actual packet.

func (*Packet) LoadPacketData

func (pkt *Packet) LoadPacketData() error

GetPayload returns the full raw packet.

func (*Packet) PermanentAccept

func (pkt *Packet) PermanentAccept() error

PermanentAccept permanently accepts connection (and the current packet).

func (*Packet) PermanentBlock

func (pkt *Packet) PermanentBlock() error

PermanentBlock permanently blocks connection (and the current packet).

func (*Packet) PermanentDrop

func (pkt *Packet) PermanentDrop() error

PermanentDrop permanently drops connection (and the current packet).

func (*Packet) RerouteToNameserver

func (pkt *Packet) RerouteToNameserver() error

RerouteToNameserver permanently reroutes the connection to the local nameserver (and the current packet).

func (*Packet) RerouteToTunnel

func (pkt *Packet) RerouteToTunnel() error

RerouteToTunnel permanently reroutes the connection to the local tunnel entrypoint (and the current packet).

type VersionInfo

type VersionInfo struct {
	Major    uint8
	Minor    uint8
	Revision uint8
	Build    uint8
}

func GetVersion

func GetVersion() (*VersionInfo, error)

Returns the kext version.

func (*VersionInfo) String

func (v *VersionInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL