config

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultStoreDir     = ".snare/captures"
	DefaultCADir        = ".snare"
	DefaultMockFile     = ".snare/mocks.json"
	DefaultInterceptDir = ".snare/intercept"
)

Variables

This section is empty.

Functions

func CADir

func CADir() string

func ConfigFilePath

func ConfigFilePath() string

func DBPath added in v2.6.0

func DBPath() string

func InterceptDir

func InterceptDir() string

func MockFile

func MockFile() string

func StoreDir

func StoreDir() string

Types

type FileConfig

type FileConfig struct {
	Port             string   `yaml:"port"`
	Bind             string   `yaml:"bind"`
	NoMITM           bool     `yaml:"no_mitm"`
	Verbose          bool     `yaml:"verbose"`
	MaxCaptures      int      `yaml:"max_captures"`
	UpstreamProxy    string   `yaml:"upstream_proxy"`
	RewriteHost      []string `yaml:"rewrite_host"`
	AddHeader        []string `yaml:"add_header"`
	RemoveHeader     []string `yaml:"remove_header"`
	MockFile         string   `yaml:"mock_file"`
	Intercept        string   `yaml:"intercept"`
	InterceptTimeout string   `yaml:"intercept_timeout"`
	OnCapture        string   `yaml:"on_capture"`
	Mode             string   `yaml:"mode"`
	Target           string   `yaml:"target"`
	Ignore           []string `yaml:"ignore"`
	MapRemote        []string `yaml:"map_remote"`
	RewriteBody      []string `yaml:"rewrite_body"`
	MaxBodySize      int64    `yaml:"max_body_size"`
	Delay            string   `yaml:"delay"`
	Chaos            float64  `yaml:"chaos"`
	Shadow           []string `yaml:"shadow"`
	Plugins          []string `yaml:"plugins"`
	Web              bool     `yaml:"web"`
	WebPort          string   `yaml:"web_port"`
}

func LoadFileConfig

func LoadFileConfig() (*FileConfig, error)

Jump to

Keyboard shortcuts

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