Skip to content
/ capo Public

Reverse Proxy with Basic Authentication

License

Notifications You must be signed in to change notification settings

caido/capo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capo

Reverse Proxy with Basic Authentication

Usage

Start it with:

$ go build
$ cat >> config.yaml <<EOL
users:
  - username: admin
    password: pass
EOL
$ ./capo start

Use it like:

$ curl http://localhost:6634/
Unauthorized
$ curl http://admin:pass@localhost:6634/
{
  "args": {},
  "headers": {
    "Accept": "*/*",
    "Accept-Encoding": "gzip",
    "Authorization": "Basic dGVzdDp0ZXN0MQ==",
    "Host": "httpbin.org",
    "User-Agent": "curl/8.4.0",
    "X-Amzn-Trace-Id": "Root=1-65f8675b-7f79a49a4d55a63170385c81"
  },
  "origin": "142.122.13.19",
  "url": "https://httpbin.org/get"
}

Docker

You can also use it with Docker:

$ docker pull ghcr.io/caido/capo:latest
$ cat >> config.yaml <<EOL
users:
  - username: admin
    password: pass
EOL
$ docker run --rm -v $(PWD)/config.yaml:/etc/capo/config.yaml -p 6634:6634 ghcr.io/caido/capo:latest