doc: auth

This commit is contained in:
Vladislav Yarmak 2020-05-20 01:00:59 +03:00
parent d1e4c310d8
commit f530708bb0
1 changed files with 17 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Dumbiest HTTP proxy ever.
* Cross-platform (Windows/Mac OS/Linux/Android (via shell)/\*BSD) * Cross-platform (Windows/Mac OS/Linux/Android (via shell)/\*BSD)
* Zero-configuration * Zero-configuration
* Supports CONNECT method and forwarding of HTTPS connections * Supports CONNECT method and forwarding of HTTPS connections
* Supports `Basic` proxy authentication
## Installation ## Installation
@ -25,7 +26,22 @@ go install
## Usage ## Usage
Just run program and it'll start accepting connections on port 8080 (default) Just run program and it'll start accepting connections on port 8080 (default).
Example: run proxy on port 1234 with `Basic` authentication with username `admin` and password `123456`:
```sh
dumbproxy -bind-address :1234 -auth 'static://?username=admin&password=123456'
```
## Authentication
Authentication parameters are passed as URI via `-auth` parameter. Scheme of URI defines authentication metnod and query parameters define parameter values for authentication provider.
* `none` - no authentication. Example: `none://`. This is default.
* `static` - basic authentication for single login and password pair. Example: `static://?username=admin&password=123456`. Parameters:
* `username` - login
* `password` - password
## Synopsis ## Synopsis