Versions in this module Expand all Collapse all v0 v0.3.1 Oct 19, 2026 v0.3.0 Oct 19, 2026 Changes in this version + const ICMPDisabled + const ICMPNotPermitted + const ICMPPingSocketOnly + const ICMPUnsupported + var ErrDestinationDenied = fmt.Errorf("%w: the destination opted out", ErrDenied) + var ErrUntagged = errors.New("not tagged on this executor") + func DestinationKey(destination string) string + func MatchesPrefix(prefix netip.Prefix, address netip.Addr) bool + func RefreshICMP() (reason string, err error) + func ValidateEgressGrant(g *pb.EgressGrant) error + type Egress struct + func NewEgress(g *pb.EgressGrant) *Egress + func (e *Egress) Charge(n int) error + func (e *Egress) CheckAddress(address netip.Addr) error + func (e *Egress) Connect(address netip.Addr) error + func (e *Egress) Wrap(conn net.Conn) net.Conn type Operator + func (o Operator) WithRevocations(r *Revocations) Operator type Policy + func (p *Policy) Egress() *Egress + func (p *Policy) RefusesIPv6() bool + func (p *Policy) Revoked(remote string) bool + func (p *Policy) WatchRevocations(run string, closeRevoked func() int) (stop func()) + type Revocations struct + func NewRevocations() *Revocations + func (r *Revocations) DenialObservations() (refusedAdmissions, revokedSockets uint64) + func (r *Revocations) Update(destinations []string, replace bool) []Revoked + type Revoked struct + Run string + Sockets int type Run + Egress *Egress + RefuseIPv6 bool v0.3.0-rc.1 Oct 6, 2026 v0.2.0 Sep 27, 2026 Changes in this version + var ErrDenied = errors.New("denied by the operator network policy") + var ErrNotInPolicy = errors.New("outside the job's destination policy") + var ErrTransportUnavailable = errors.New("transport unavailable") + var ICMPPermitted = sync.OnceValue(probeICMP) + func Normalize(addr netip.Addr) netip.Addr + type Destination struct + Addrs []netip.AddrPort + Key string + ServerName string + func (d Destination) CheckSocket(network, address string) error + func (d Destination) DialAddresses() []string + type Match struct + Key string + type Operator struct + func Parse(spec Spec) (Operator, error) + func (o Operator) CheckAddr(addr netip.Addr) error + func (o Operator) CheckHost(name string) error + func (o Operator) CheckPort(port int) error + func (o Operator) DeniedHosts() []string + func (o Operator) Enabled(t Transport) bool + type Option func(*Policy) + func WithICMPProbe(probe func() error) Option + func WithResolver(resolver Resolver) Option + type Policy struct + func New(op Operator, run Run, options ...Option) *Policy + func (p *Policy) AdmitAddr(ctx context.Context, t Transport, addr netip.AddrPort) (Match, error) + func (p *Policy) AdmitDestination(ctx context.Context, t Transport, target string) (Destination, error) + func (p *Policy) Available(t Transport) error + func (p *Policy) AvailableListener(t Transport) error + type Resolver interface + LookupNetIP func(ctx context.Context, network, host string) ([]netip.Addr, error) + type Run struct + Addresses []string + ListenSCION bool + ListenTCP bool + ListenUDP bool + RequireICMP bool + type Spec struct + DeniedDestinations string + ICMP bool + Inbound bool + LocalTargets bool + PermittedPorts string + SCION bool + TCP bool + TLS bool + UDP bool + func Defaults() Spec + type Transport uint8 + const ICMP + const Inbound + const SCION + const TCP + const TLS + const UDP + func (t Transport) String() string v0.2.0-rc.3 Sep 26, 2026 v0.2.0-rc.2 Sep 26, 2026 v0.2.0-rc.1 Sep 25, 2026