docs: explain HTTP proxy address when AstrBot runs in Docker - #10162
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/en/deploy/astrbot/docker.md" line_range="139" />
<code_context>
+
+Set the HTTP proxy in the WebUI under `Settings → Network → Proxy & Dependency Sources → HTTP Proxy`. AstrBot reaches that address **from inside its own container**, so `http://127.0.0.1:7890` points at the AstrBot container itself rather than the host or another container.
+
+If the proxy runs on the host, or in another container with the port published to the host:
+
+- Mac / Windows (Docker Desktop): `http://host.docker.internal:7890`
+- Linux: `http://172.17.0.1:7890` (replace `172.17.0.1` with your docker0 gateway if it differs)
+
+If AstrBot and the proxy share a Docker network, use the proxy container name, for example `http://clash:7890`.
+
+Clash-style clients commonly use HTTP on `7890` and SOCKS on `7891`. Use `http://` or `socks5://` to match the protocol. Publish the proxy port to the host, and avoid binding it only to `127.0.0.1` (`127.0.0.1:7890:7890` is unreachable from other containers via the gateway).
</code_context>
<issue_to_address>
**issue:** When the proxy runs directly on the host but listens only on `127.0.0.1`, the documented host-gateway addresses cannot reach it from the AstrBot container, so proxy requests fail with a connection error.
**Triggers:** When a host-installed Clash-style proxy uses its common localhost-only binding.
**Suggested fix:** State that a host-installed proxy must listen on a host interface reachable from Docker, such as `0.0.0.0` or the Docker gateway interface, rather than only `127.0.0.1`.
```suggestion
Clash-style clients commonly use HTTP on `7890` and SOCKS on `7891`. Use `http://` or `socks5://` to match the protocol. For a host-installed proxy, it must listen on a host interface reachable from Docker, such as `0.0.0.0` or the Docker gateway interface, rather than only `127.0.0.1`; publish the proxy port to the host.
```
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: docs/en/deploy/astrbot/docker.md:139
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Soulter
approved these changes
Sep 21, 2026
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The HTTP proxy field currently documents
http://localhost:7890. That address is correct for a host process, but AstrBot applieshttp_proxyinside its own process. When AstrBot runs in Docker,127.0.0.1/localhostpoints at the AstrBot container, not a proxy on the host or in another container.This PR documents the addresses that are reachable from the AstrBot container:
http://host.docker.internal:7890http://172.17.0.1:7890(or the docker0 gateway)http://clash:7890It also notes that publishing
127.0.0.1:7890:7890keeps the proxy unreachable from other containers.Docs
docs/zh/deploy/astrbot/docker.mdanddocs/en/deploy/astrbot/docker.md: new section after the existing Docker network tipdocs/zh/dev/astrbot-config.mdanddocs/en/dev/astrbot-config.md:http_proxypoints to the Docker guidedocs/zh/use/webui.mdanddocs/en/use/webui.md: Network settings link to the Docker guideWebUI path checked against current copy:
Settings → Network → Proxy & Dependency Sources → HTTP Proxy.Verification
cd docs && npm run docs:build(VitePress 1.6.4). Build completed in 27.07s with no errors.http_proxyconfig, and WebUI system settings pages in zh and en.Summary by Sourcery
Clarify Docker-compatible HTTP proxy configuration across the AstrBot documentation.
Enhancements:
Documentation: