capo

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 10 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL