Skip to main content

config

import "redn3t.com/odirscan/config"

Index

type MullvadConfig

MullvadConfig holds all Mullvad VPN configuration.

type MullvadConfig struct {
RelayURL string `json:"relay_url"` // Mullvad wireguard relay list API endpoint
DataFile string `json:"data_file"` // path to the cached relay list on disk
MetaFile string `json:"meta_file"` // path to the cached relay list metadata on disk
ProxyPort int `json:"proxy_port"` // SOCKS5 port on Mullvad relay hosts
UpdateInterval time.Duration `json:"update_interval"` // how often to refresh the relay list
}

func DefaultMullvadConfig

func DefaultMullvadConfig() MullvadConfig

DefaultMullvadConfig returns a MullvadConfig with sensible defaults.

type OrchestratorConfig

type OrchestratorConfig struct {
NatsURL string `json:"nats_url"`
PostgresDSN string `json:"pstgres_dsn"`
RedisAddr string `json:"redis_addr"`
WorkerPoolSize int `json:"worker_pool_size"`
RoutingTTL time.Duration `json:"routing_ttl"`
TTLRefreshInterval time.Duration `json:"ttl_refresh_interval"`
Scanner ScannerConfig `json:"scanner"`
Mullvad MullvadConfig `json:"mullvad"`
}

func DefaultOrchestratorConfig

func DefaultOrchestratorConfig() OrchestratorConfig

type ScannerConfig

type ScannerConfig struct {
Parallelism int `json:"parallelism"`
RequestTimeout time.Duration `json:"request_timeout"`
ProxyCount int `json:"proxy_count"`
MaxRelayWeight int `json:"max_relay_weight"`
SkipMimePrefixes []string `json:"skip_mime_prefixes"`
SkipSubdirKeywords []string `json:"skip_subdir_keywords"`
}

func DefaultScannerConfig

func DefaultScannerConfig() ScannerConfig

type WebConfig

type WebConfig struct {
ListenAddr string `json:"listen_addr"`
NatsURL string `json:"nats_url"`
PostgresDSN string `json:"postgres_dsn"`
RedisAddr string `json:"redis_addr"`
}

func DefaultWebConfig

func DefaultWebConfig() WebConfig

Generated by gomarkdoc