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 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-15 16:46:24 +01:00
parent a7f0246dac
commit 6e591a85b2
2 changed files with 3 additions and 2 deletions

View File

@@ -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"]

View File

@@ -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