Fix log level issue

This commit is contained in:
wjsjwr 2025-11-02 19:30:17 +08:00
parent 2e467440d9
commit 88159fc77b

View File

@ -28,6 +28,8 @@ import (
"golang.org/x/sys/windows/registry"
)
const AppVersion = "2.2"
type Config struct {
DomainsOfInterest []string `toml:"domains_of_interest"`
DictFile string `toml:"dict_file"`
@ -75,7 +77,7 @@ func main() {
setConsoleUTF8()
}
fmt.Println("MITM Proxy Server v2.0")
fmt.Println("MITM Proxy Server v" + AppVersion)
// Load configuration
config, err := loadConfig("config.toml")
@ -330,7 +332,7 @@ func (p *ProxyServer) setupHandlers() {
}
}
if p.verbose || p.isDomainOfInterest(ctx.Req.Host) {
if p.verbose || (p.debugMode && p.isDomainOfInterest(ctx.Req.Host)) {
fmt.Printf(
"[%s][INFO][Interest=%v] HTTP Response: %s %s\n",
time.Now().Format("20060102T15:04:05.000000"),