()
| 411 | } |
| 412 | |
| 413 | func (p *HTTPProxy) Start() { |
| 414 | go func() { |
| 415 | var err error |
| 416 | |
| 417 | strip := tui.Yellow("enabled") |
| 418 | if !p.Stripper.Enabled() { |
| 419 | strip = tui.Dim("disabled") |
| 420 | } |
| 421 | |
| 422 | p.Info("started on %s (sslstrip %s)", p.Server.Addr, strip) |
| 423 | |
| 424 | if p.isTLS { |
| 425 | err = p.httpsWorker() |
| 426 | } else { |
| 427 | err = p.httpWorker() |
| 428 | } |
| 429 | |
| 430 | if err != nil && err.Error() != "http: Server closed" { |
| 431 | p.Fatal("%s", err) |
| 432 | } |
| 433 | }() |
| 434 | } |
| 435 | |
| 436 | func (p *HTTPProxy) Stop() error { |
| 437 | if p.Script != nil { |
nothing calls this directly
no test coverage detected