Fix log level issue
This commit is contained in:
parent
2e467440d9
commit
88159fc77b
6
main.go
6
main.go
@ -28,6 +28,8 @@ import (
|
|||||||
"golang.org/x/sys/windows/registry"
|
"golang.org/x/sys/windows/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const AppVersion = "2.2"
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
DomainsOfInterest []string `toml:"domains_of_interest"`
|
DomainsOfInterest []string `toml:"domains_of_interest"`
|
||||||
DictFile string `toml:"dict_file"`
|
DictFile string `toml:"dict_file"`
|
||||||
@ -75,7 +77,7 @@ func main() {
|
|||||||
setConsoleUTF8()
|
setConsoleUTF8()
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("MITM Proxy Server v2.0")
|
fmt.Println("MITM Proxy Server v" + AppVersion)
|
||||||
|
|
||||||
// Load configuration
|
// Load configuration
|
||||||
config, err := loadConfig("config.toml")
|
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(
|
fmt.Printf(
|
||||||
"[%s][INFO][Interest=%v] HTTP Response: %s %s\n",
|
"[%s][INFO][Interest=%v] HTTP Response: %s %s\n",
|
||||||
time.Now().Format("20060102T15:04:05.000000"),
|
time.Now().Format("20060102T15:04:05.000000"),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user