Skip to main content
In enterprises with strict network policies, all egress traffic to external services must go through an HTTP proxy. By the end of this tutorial, you will have an HTTP proxy running locally and the Kosli CLI configured to use it.
If you already have an HTTP proxy running, skip to Use the HTTP proxy with Kosli CLI.

Prerequisites

Start the HTTP proxy

We will use Tinyproxy running in Docker as our HTTP proxy. Create a minimal Tinyproxy configuration and start it:
You should see Tinyproxy log output in the terminal, confirming it is listening on port 8888.

Use the HTTP proxy with Kosli CLI

In a new terminal, verify the setup by listing environments from the public cyber-dojo demo org:
Your request is routed through the proxy and forwarded to Kosli. You should see output similar to:

Persist the proxy configuration

Rather than passing --http-proxy on every command, save it to your Kosli config:
All subsequent CLI commands will now route through the proxy automatically.

What you’ve accomplished

You have set up Tinyproxy as an HTTP proxy and configured the Kosli CLI to route all traffic through it. This pattern works with any HTTP proxy — replace http://localhost:8888 with your organisation’s proxy URL and run kosli config --http-proxy=<your-proxy-url> to apply it globally.
Last modified on March 10, 2026