Skip to content

Commit 5e2bf32

Browse files
authored
start proxy by default (#139)
* start proxy by default * update instructions
1 parent 4a20e90 commit 5e2bf32

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

docs/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The first step in reconnaissance is enumerating the available targets for a give
4242
*Learn how to set up Reaper's proxy [using this guide](proxy_certs.md).*
4343

4444
Capture traffic by following these steps:
45-
1. Switch the `Proxy on` toggle at the top of the page Explore page in Reaper.
45+
1. The proxy is on by default. It can be stopped and restarted using the `Proxy on/off` toggle at the top of the page Explore page.
4646
2. Configure your browser or other client to route requests through the proxy at `localhost:8080` for both HTTP and HTTPS.
4747
3. Browse through your target app, targeting any interactions or workflows you want to test for vulnerabilities.
4848
4. The Explore page in Reaper will show an inventory of hosts and endpoints captured by the proxy.

internal/handlers/handler.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package handlers
22

33
import (
4+
"log"
5+
46
"gorm.io/gorm"
57

68
ws "github.com/ghostsecurity/reaper/internal/handlers/websocket"
@@ -16,9 +18,16 @@ type Handler struct {
1618
}
1719

1820
func NewHandler(pool *ws.Pool, db *gorm.DB) *Handler {
21+
proxy := proxy.NewProxy(pool, db)
22+
// start proxy by default
23+
err := proxy.Start()
24+
if err != nil {
25+
log.Fatalf("error starting proxy: %v", err)
26+
}
1927
return &Handler{
20-
pool: pool,
21-
db: db,
28+
proxy: proxy,
29+
pool: pool,
30+
db: db,
2231
}
2332
}
2433

0 commit comments

Comments
 (0)