此脚本基于https://hub.docker.com/r/ellermister/nginx-mtproxy和https://github.com/ellermister/mtproxy和原脚本仓库修改
使用脚本前请确认curl已安装
bash <(curl -sSL "https://raw.githubusercontent.com/MatrixLau/nginx-mtproxy/main/mtp.sh")
或者
bash <(curl -sSL "https://cdn.jsdelivr.net/gh/MatrixLau/nginx-mtproxy@main/mtp.sh")
不保证可以成功使用,推荐进入docker内修改/etc/nginx/ip_white.conf 内容
bash <(curl -sSL "https://raw.githubusercontent.com/MatrixLau/nginx-mtproxy/main/mtp2.sh")
由上面脚本中抽离出清理的内容,配置crontab实现定时清理白名单
curl -sSL "https://raw.githubusercontent.com/MatrixLau/nginx-mtproxy/main/mtp_auto_clean.sh" > mtp_auto_clean.sh
docker stop nginx-mtproxy
docker start nginx-mtproxy
docker restart nginx-mtproxy
docker rm nginx-mtproxy
docker update --restart=always nginx-mtproxy