netproxy

package
v0.4.12 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package netproxy is the HTTP proxy that gives sandboxed commands network access to approved hosts and ports on public internet addresses that are not this machine's own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asker

type Asker func(ctx context.Context, host, port string, covered func() bool, accept func(Decision) bool) (Decision, error)

type Decision

type Decision int
const (
	DecisionDeny Decision = iota
	DecisionOnce
	DecisionSession
)

type Owner

type Owner struct {
	// contains filtered or unexported fields
}

func (*Owner) Close

func (o *Owner) Close()

func (*Owner) Refusals

func (o *Owner) Refusals() []Refusal

func (*Owner) Register

func (o *Owner) Register(local netip.AddrPort) error

type Refusal

type Refusal struct {
	Host   string
	Port   string
	Reason string
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(allow []string) (*Server, error)

func (*Server) NewOwner

func (s *Server) NewOwner(ask Asker) *Owner

func (*Server) Refusals

func (s *Server) Refusals() []Refusal

func (*Server) Start

func (s *Server) Start() (string, error)

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

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