This commit is contained in:
2026-04-23 20:36:37 +03:00
parent 4ecc8973bf
commit 840d7d8e3b
19 changed files with 758 additions and 0 deletions

25
internal/config/config.go Normal file
View File

@@ -0,0 +1,25 @@
package config
import "flag"
type Config struct {
ListenAddr string
OutputDir string
CertPath string
KeyPath string
}
func ParseFlags() Config {
listenAddr := flag.String("listen", ":1199", "proxy listen address")
outputDir := flag.String("out-dir", "./captures/images", "directory for captured image responses")
certPath := flag.String("cert", "./cert.pem", "MITM CA certificate path (PEM)")
keyPath := flag.String("key", "./key.pem", "MITM CA private key path (PEM)")
flag.Parse()
return Config{
ListenAddr: *listenAddr,
OutputDir: *outputDir,
CertPath: *certPath,
KeyPath: *keyPath,
}
}