From f530708bb03e2d2bc6016b2d5f92eed91b7cb468 Mon Sep 17 00:00:00 2001 From: Vladislav Yarmak Date: Wed, 20 May 2020 01:00:59 +0300 Subject: [PATCH] doc: auth --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a2b54c..06be94f 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Dumbiest HTTP proxy ever. * Cross-platform (Windows/Mac OS/Linux/Android (via shell)/\*BSD) * Zero-configuration * Supports CONNECT method and forwarding of HTTPS connections +* Supports `Basic` proxy authentication ## Installation @@ -25,7 +26,22 @@ go install ## 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