Files
Xbox-Mitm-Proxy/mitmproxy/docker-compose.yml
2026-04-23 17:22:20 +08:00

65 lines
1.7 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: "3.8"
services:
mitmproxy:
image: mitmproxy/mitmproxy:latest
container_name: mitmproxy
restart: unless-stopped
ports:
- "31280:8080" # HTTP/HTTPS 代理入口 (客户端走这个端口当代理)
- "18081:8081" # mitmweb 控制台(带密码)
command:
- mitmweb
- "--listen-host"
- "0.0.0.0"
- "--web-host"
- "0.0.0.0"
- "--set"
- "web_password=8130899"
- "--set"
- "block_global=false" # 允许外部客户端接入
- "--set"
- "connection_strategy=lazy"
- "--set"
- "http2=false" # 关 http2方便改请求头/请求体
- "--proxyauth=hbxnlsy:8130899" # 代理验证 用户名:密码
- "-s"
- "/addons/mitm_xbox_addon.py" # 你的主脚本(含自动发 Telegram 通知)
volumes:
- /opt/1panel/docker/compose/mitmproxy/addons:/addons
- /opt/1panel/docker/compose/mitmproxy/mitm-data:/home/mitmproxy/.mitmproxy
environment:
- TZ=Asia/Shanghai
logging:
options:
max-size: "10m"
max-file: "3"
xboxbot:
build:
context: ./xboxbot
dockerfile: Dockerfile
container_name: xboxbot
restart: unless-stopped
environment:
- TELEGRAM_BOT_TOKEN=8293676109:AAG3f6GnZNxJiwxwyGh_OtTU4wGn6-ypg_4
- TELEGRAM_ALLOWED_USER_ID=1732587552,7935041828
- STATE_PATH=/shared/state.json
- MITM_MARKET_LOCALE=en-ng
- MITM_MARKET_CODE=NG
volumes:
# 让 bot 跟 mitmproxy 共享同一份 state.json
- /opt/1panel/docker/compose/mitmproxy/mitm-data:/shared:rw
depends_on:
- mitmproxy
logging:
options:
max-size: "5m"
max-file: "3"