Docker容器推荐

> nginx-mtproxy

该镜像集成了 nginx、mtproxy+tls 实现对流量的伪装，并采用白名单模式来应对防火墙的检测。

Copy
secret=$(head -c 16 /dev/urandom | xxd -ps)
tag="12345678901234567890121231231231"
domain="XXXX.com"
docker run --name nginx-mtproxy -d -e tag="$tag" -e secret="$secret" -e domain="$domain" -e ip_white_list="OFF" -p 80:80 -p 443:443 ellermister/nginx-mtproxy:latest

ip_white_list 可选参数为:

IP 允许单个 IP 访问

IPSEG 允许 IP 段访问

OFF 允许所有 IP 访问

详细配置见 Docker 链接

> Koishi 机器人

Copy
docker run --name koishi -d -v /home/docker/koishi:/koishi -e TZ=Asia/Shanghai -p 5140:5140 koishijs/koishi

设置反向代理时，需同时设置 websocket

Copy
location /
{
proxy_pass http://127.0.0.1:5140;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;

#持久化连接配置
proxy_connect_timeout 30s;
proxy_read_timeout 86400s;
proxy_send_timeout 30s;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

add_header X-Cache $upstream_cache_status;

#Set Nginx Cache

add_header Cache-Control no-cache;
}