From 6e591a85b2d32a60141312f0d3fda18dd7f75c82 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 15 Feb 2026 16:46:24 +0100 Subject: [PATCH] fix: use host networking for container proxy access Bridge networking can't reach the host's loopback. Switch to network_mode: host so the container shares the host network stack and can reach the SOCKS5 proxy at 127.0.0.1:1080. Revert proxy address back to 127.0.0.1. Co-Authored-By: Claude Opus 4.6 --- docker-compose.yml | 3 ++- src/derp/http.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 070320c..e7ae898 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,10 +4,11 @@ services: context: . dockerfile: Containerfile container_name: derp + network_mode: host restart: unless-stopped volumes: - ./src:/app/src:ro,Z - ./plugins:/app/plugins:ro,Z - ./config/derp.toml:/app/config/derp.toml:ro,Z - ./data:/app/data:Z - command: ["--verbose"] + command: ["--verbose", "--cprofile", "/app/data/derp.prof"] diff --git a/src/derp/http.py b/src/derp/http.py index e8fa8fa..315e53f 100644 --- a/src/derp/http.py +++ b/src/derp/http.py @@ -9,7 +9,7 @@ import socks from socks import SOCKS5 from sockshandler import SocksiPyConnectionS, SocksiPyHandler -_PROXY_ADDR = "192.168.129.11" +_PROXY_ADDR = "127.0.0.1" _PROXY_PORT = 1080