From 723cbece96ac139a91c9766dd8af846c13681dba Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Tue, 13 Oct 2026 20:44:39 +0300 Subject: feat: socks5 proxy --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 0293439..0b39f0a 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ This project implements a simple autonomous coding agent that can interact with - `webgrep`: Search for keywords within the markdownified content of a URL. - **Reasoning Loop**: Uses a recursive loop to process tasks, analyze results, and determine the next step until a final response is reached. - **Context Management**: Estimates the token count of the conversation and automatically squashes (summarizes) older history when it approaches the model's context size limit, keeping the most recent messages intact. +- **SOCKS5 Proxy Support**: API queries (and `webgrep` fetches) can be routed through a SOCKS5 proxy. - **Logging**: Logs interactions to `thoughts.log` for debugging and analysis. ## Requirements @@ -23,6 +24,7 @@ This project implements a simple autonomous coding agent that can interact with - `openai` Python library - `tldr` CLI installed on the system - An API key for the Aalto LLM Gateway (or a compatible OpenAI-style API) +- `socksio` Python package (only needed when using a SOCKS5 proxy) ## Setup @@ -56,6 +58,11 @@ This project implements a simple autonomous coding agent that can interact with - `--min-history N`: Minimum amount of most recent messages to keep intact when summarising the history to keep the context short enough (default: 3). - `--model-context-size N`: Context size supported by the model (defaults to `LLM_CONTEXT_SIZE`, or 1048576). - `--trust-level LEVEL`: The trust level of the agent (defaults to 2). Determines which actions require manual approval. +- `--socks5-proxy URL`: Route API queries (and `webgrep` fetches) through a SOCKS5 proxy (defaults to `LLM_SOCKS5_PROXY` environment variable). + ```bash + python3 llm.py --socks5-proxy socks5://user:pass@proxy.example.com:1080 + ``` + Use `socks5h://` as the scheme to also resolve DNS hostnames through the proxy. This requires the `socksio` package to be installed in the virtualenv (`pip install socksio`). ## How it Works -- cgit v1.3.1