docs: remove default proxy environment

This commit is contained in:
ShukeBta
2026-05-29 09:40:45 +08:00
parent 7b2241ffeb
commit 12e12bfa28
3 changed files with 13 additions and 57 deletions
+6 -25
View File
@@ -247,12 +247,7 @@ MEDIASTATION_MEDIA_CONTAINER_DIR=/vol1/1000/Docker/moviepilot-v2/media
MEDIASTATION_DOWNLOAD_DIR=/vol1/1000/qBittorrent/downloads
MEDIASTATION_DOWNLOAD_CONTAINER_DIR=/vol1/1000/qBittorrent/downloads
# 可选:如果 TMDB / M-Team / Bangumi 等外网 API 超时,填入 v2rayA HTTP 代理。
# qBittorrent 走 172.17.0.1:8085,本地网段必须放入 NO_PROXY,避免绕远或失败。
HTTP_PROXY=
HTTPS_PROXY=
ALL_PROXY=
NO_PROXY=127.0.0.1,localhost,172.17.0.1,192.168.0.0/16,10.0.0.0/8
# 如果 NAS 已使用 v2rayA redirect / 透明代理,不要在这里额外配置 HTTP_PROXY,避免叠加代理。
TZ=Asia/Shanghai
PUID=1000
@@ -500,10 +495,6 @@ MEDIASTATION_MEDIA_DIR=/vol1/1000/Docker/moviepilot-v2/media
MEDIASTATION_MEDIA_CONTAINER_DIR=/vol1/1000/Docker/moviepilot-v2/media
MEDIASTATION_DOWNLOAD_DIR=/vol1/1000/qBittorrent/downloads
MEDIASTATION_DOWNLOAD_CONTAINER_DIR=/vol1/1000/qBittorrent/downloads
HTTP_PROXY=
HTTPS_PROXY=
ALL_PROXY=
NO_PROXY=127.0.0.1,localhost,172.17.0.1,192.168.0.0/16,10.0.0.0/8
TZ=Asia/Shanghai
PUID=1000
PGID=1000
@@ -598,29 +589,19 @@ MEDIASTATION_DOWNLOAD_DIR=/vol1/1000/qBittorrent/downloads
容器内媒体库建议添加 `/media/电影` 和 `/media/电视剧` 两个根目录;整理后会自动进入 `/media/电影/动画电影`、`/media/电视剧/国产剧` 等分类目录。下载器保存根目录填写 `/downloads`,订阅下载会自动落到 `/downloads/动画电影`、`/downloads/国产剧` 等分类目录。
### 外网 API 代理怎么填
### 外网访问与 v2rayA 说明
如果站点或刮削接口出现 `TLS handshake timeout`、`context deadline exceeded`,而 NAS 使用 v2rayA,请给 MediaStationGo 容器显式传入代理环境变量。只在 `.env` 写还不够,`docker-compose.yml` 的 `environment` 里也必须引用这些变量;仓库模板已经内置。
如果 NAS 已经开启 v2rayA 的 `redirect` / 透明代理,并使用大陆白名单分流,MediaStationGo 通常不需要额外配置 `HTTP_PROXY` / `HTTPS_PROXY`。
常见 v2rayA HTTP 代理端口是 `20171`,请按你的 v2rayA 实际端口修改:
不建议在 `docker-compose.yml` 或 `.env` 中重复配置代理环境变量,因为这会让容器网络和 Docker 拉镜像路径叠加代理,反而可能导致 GHCR、M-Team、TMDB 等访问异常。
```env
HTTP_PROXY=http://172.17.0.1:20171
HTTPS_PROXY=http://172.17.0.1:20171
ALL_PROXY=
NO_PROXY=127.0.0.1,localhost,172.17.0.1,192.168.0.0/16,10.0.0.0/8
```
> `NO_PROXY` 很重要:qBittorrent 地址 `http://172.17.0.1:8085`、NAS 局域网地址和本机地址不应该走外网代理。
容器内验证代理是否生效:
排查外网链路时,先从容器内直接测试:
```bash
docker exec -it mediastation-go sh -lc 'env | grep -i proxy'
docker exec -it mediastation-go sh -lc 'wget -S -O- --timeout=20 https://api.m-team.cc/api/torrent/search'
```
如果第二条能快速返回 HTTP 状态码,而不是卡在 `Connecting` 或 TLS 握手阶段,就说明链路已经通了。
如果这里仍然卡在 TLS 阶段,应优先检查 v2rayA 的 redirect 规则、Docker 网桥流量是否被透明代理接管,而不是给 Docker daemon 或 compose 叠加 `HTTP_PROXY`。
### qBittorrent 连接怎么填
+7 -18
View File
@@ -236,10 +236,7 @@ MEDIASTATION_MEDIA_DIR=/vol1/1000/Docker/moviepilot-v2/media
MEDIASTATION_MEDIA_CONTAINER_DIR=/vol1/1000/Docker/moviepilot-v2/media
MEDIASTATION_DOWNLOAD_DIR=/vol1/1000/qBittorrent/downloads
MEDIASTATION_DOWNLOAD_CONTAINER_DIR=/vol1/1000/qBittorrent/downloads
HTTP_PROXY=
HTTPS_PROXY=
ALL_PROXY=
NO_PROXY=127.0.0.1,localhost,172.17.0.1,192.168.0.0/16,10.0.0.0/8
# If the NAS already uses v2rayA redirect / transparent proxy, do not add HTTP_PROXY here.
TZ=Asia/Shanghai
PUID=1000
PGID=1000
@@ -418,28 +415,20 @@ MEDIASTATION_DOWNLOAD_DIR=/vol1/1000/qBittorrent/downloads
Inside MediaStationGo, add `/media/电影` and `/media/电视剧` as media library roots. Organized files will land in category folders such as `/media/电影/动画电影` and `/media/电视剧/国产剧`. Use `/downloads` as the download root; subscriptions will save to folders such as `/downloads/动画电影` and `/downloads/国产剧`.
### External API Proxy
### External Access and v2rayA
If sites or scraping APIs fail with `TLS handshake timeout` or `context deadline exceeded`, and the NAS uses v2rayA, pass proxy variables into the MediaStationGo container. Writing them only in `.env` is not enough unless `docker-compose.yml` also references them; the repository template already does.
If the NAS already uses v2rayA `redirect` / transparent proxy with routing rules, MediaStationGo usually does not need explicit `HTTP_PROXY` / `HTTPS_PROXY` variables.
Adjust the port to your v2rayA HTTP proxy port; `20171` is common:
Avoid stacking proxy variables in `.env`, `docker-compose.yml`, or the Docker daemon unless you intentionally use an application-level HTTP proxy. Stacked proxies can break GHCR pulls and site APIs.
```env
HTTP_PROXY=http://172.17.0.1:20171
HTTPS_PROXY=http://172.17.0.1:20171
ALL_PROXY=
NO_PROXY=127.0.0.1,localhost,172.17.0.1,192.168.0.0/16,10.0.0.0/8
```
`NO_PROXY` is important: qBittorrent at `http://172.17.0.1:8085`, NAS LAN addresses, and localhost should not go through the external proxy.
Verify inside the container:
Test from inside the container first:
```bash
docker exec -it mediastation-go sh -lc 'env | grep -i proxy'
docker exec -it mediastation-go sh -lc 'wget -S -O- --timeout=20 https://api.m-team.cc/api/torrent/search'
```
If it still hangs during TLS, check v2rayA redirect rules and whether Docker bridge traffic is covered by the transparent proxy instead of adding another `HTTP_PROXY` layer.
### qBittorrent Connection
If qBittorrent runs on the same NAS/host, do not use `127.0.0.1` from MediaStationGo; inside the container it means the MediaStationGo container itself. In Download Clients, use:
-14
View File
@@ -122,20 +122,6 @@ services:
# 日志级别:debug / info / warn / error。
MEDIASTATION_LOGGING_LEVEL: ${MEDIASTATION_LOGGING_LEVEL:-info}
# 外网 API 代理。TMDB / M-Team / Bangumi 等站点访问慢或 TLS handshake timeout 时配置。
# v2rayA 常见 HTTP 代理端口为 20171,示例:
# HTTP_PROXY=http://172.17.0.1:20171
# HTTPS_PROXY=http://172.17.0.1:20171
# qBittorrent / NAS / 局域网地址不要走代理,务必放入 NO_PROXY。
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
ALL_PROXY: ${ALL_PROXY:-}
NO_PROXY: ${NO_PROXY:-127.0.0.1,localhost,172.17.0.1,192.168.0.0/16,10.0.0.0/8}
http_proxy: ${HTTP_PROXY:-}
https_proxy: ${HTTPS_PROXY:-}
all_proxy: ${ALL_PROXY:-}
no_proxy: ${NO_PROXY:-127.0.0.1,localhost,172.17.0.1,192.168.0.0/16,10.0.0.0/8}
# 转码配置。留空表示自动/软件转码;硬件加速见下方 Intel/NVIDIA 示例。
MEDIASTATION_TRANSCODER_ENCODER: ${MEDIASTATION_TRANSCODER_ENCODER:-}
MEDIASTATION_TRANSCODER_MAX_HEIGHT: ${MEDIASTATION_TRANSCODER_MAX_HEIGHT:-1080}