Documentation
¶
Overview ¶
Package config defines pano's on-disk layout under ~/.pano and its configuration file (config.toml), with defaults that are safe out of the box.
Index ¶
- Variables
- func Save(p Paths, cfg Config) error
- func WriteAtomic(path string, b []byte, mode os.FileMode) error
- type Breakpoints
- type Capture
- type Config
- type Decrypt
- type Duration
- type Limits
- type MCP
- type Paths
- func (p Paths) AuditLog() string
- func (p Paths) CACert() string
- func (p Paths) CAKey() string
- func (p Paths) CertCache() string
- func (p Paths) ConfigFile() string
- func (p Paths) Ensure() error
- func (p Paths) LeafKey() string
- func (p Paths) LogFile() string
- func (p Paths) PIDFile() string
- func (p Paths) RulesFile() string
- func (p Paths) SimulatorState() string
- func (p Paths) Socket() string
- func (p Paths) SysProxyState() string
- func (p Paths) Token() string
- func (p Paths) UpdateState() string
- type Proxy
- type Redaction
- type SystemProxy
- type Updates
- type Views
Constants ¶
This section is empty.
Variables ¶
var DefaultNever = []string{
"*.push.apple.com", "*.icloud.com", "*.icloud-content.com", "*.apple-cloudkit.com", "*.ls.apple.com",
}
DefaultNever lists the hosts that are never decrypted out of the box: the macOS daemons that pin certificates and visibly break under interception (push notifications, iCloud sync, CloudKit, Maps). Deliberately minimal — anything else that pins shows up under "rejected" for the user to decide.
Functions ¶
Types ¶
type Breakpoints ¶
type Breakpoints struct {
HoldTimeout Duration `toml:"hold_timeout"`
}
Breakpoints configures held-request behaviour.
type Capture ¶
type Capture struct {
Enabled bool `toml:"enabled"`
MaxBodyBytes int64 `toml:"max_body_bytes"`
MaxInflightBytes int64 `toml:"max_inflight_bytes"`
WebSocketFrames bool `toml:"websocket_frames"`
RingSize int `toml:"ring_size"`
}
Capture configures what is recorded. Everything captured is held in memory only: RingSize bounds how many flows are kept (oldest evicted) and nothing survives a daemon restart.
type Config ¶
type Config struct {
Proxy Proxy `toml:"proxy"`
Decrypt Decrypt `toml:"decrypt"`
Capture Capture `toml:"capture"`
Redaction Redaction `toml:"redaction"`
Views Views `toml:"views"`
Breakpoints Breakpoints `toml:"breakpoints"`
MCP MCP `toml:"mcp"`
SystemProxy SystemProxy `toml:"system_proxy"`
Limits Limits `toml:"limits"`
Updates Updates `toml:"updates"`
}
Config is the full pano configuration. Zero values are replaced by Default() before use; the TOML file only needs to list overrides.
func Load ¶
Load reads config.toml over Default(). A missing file is not an error. Deprecated keys are migrated in memory (see LoadWithWarnings).
func LoadWithWarnings ¶
LoadWithWarnings is Load plus one human-readable line per migrated or deprecated key, for the daemon log and `pano config get`.
type Decrypt ¶
type Decrypt struct {
Mode string `toml:"mode"`
Only []string `toml:"only"`
Never []string `toml:"never"`
}
Decrypt says which HTTPS tunnels are TLS-terminated. Never wins in every mode; Only is consulted only when Mode is "only". Entries are hosts (which also cover their subdomains) or globs.
type Duration ¶
Duration is a time.Duration that marshals as a human string ("7d", "90s").
func (Duration) MarshalText ¶
MarshalText renders the duration.
func (*Duration) UnmarshalText ¶
UnmarshalText parses durations, accepting a trailing "d" for days.
type Paths ¶
type Paths struct {
Dir string
}
Paths locates pano's files. All live under Dir (default ~/.pano, override with $PANO_HOME).
func (Paths) SimulatorState ¶ added in v0.1.1
SimulatorState is the record of which iOS Simulators pano's CA has been installed into (and which asked not to be suggested again).
func (Paths) SysProxyState ¶
SysProxyState is the system proxy snapshot.
func (Paths) UpdateState ¶
UpdateState caches the last release check (internal/update).
type Proxy ¶
type Proxy struct {
Port int `toml:"port"`
MCPPort int `toml:"mcp_port"`
Bind string `toml:"bind"`
// Bypass is the pre-[decrypt] name of Decrypt.Never. Load migrates it and
// Save never writes it back.
Bypass []string `toml:"bypass,omitempty"`
}
Proxy configures the listening proxy.
type Redaction ¶
type Redaction struct {
Enabled bool `toml:"enabled"`
ExtraPatterns []string `toml:"extra_patterns"`
ExtraHeaders []string `toml:"extra_headers"`
}
Redaction controls secret masking in views.
type SystemProxy ¶
type SystemProxy struct {
RestoreOnExit bool `toml:"restore_on_exit"`
}
SystemProxy configures macOS system proxy integration.