#替换成你的文件所在路径
source /root/hypixel-proxy/webapp/venv/bin/activate

sudo sysctl -w net.core.default_qdisc=fq
sudo sysctl -w net.ipv4.tcp_congestion_control=bbr
sudo sysctl -w net.ipv4.tcp_autocorking=0
sudo sysctl -w net.ipv4.tcp_fastopen=3
sudo sysctl -w net.ipv4.tcp_low_latency=1
CONF_FILE="/etc/sysctl.conf"
sudo sed -i '/net.core.default_qdisc/d' $CONF_FILE
sudo sed -i '/net.ipv4.tcp_congestion_control/d' $CONF_FILE
sudo sed -i '/net.ipv4.tcp_autocorking/d' $CONF_FILE
sudo sed -i '/net.ipv4.tcp_fastopen/d' $CONF_FILE
sudo sed -i '/net.ipv4.tcp_low_latency/d' $CONF_FILE
echo "net.core.default_qdisc=fq" | sudo tee -a $CONF_FILE
echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee -a $CONF_FILE
echo "net.ipv4.tcp_autocorking=0" | sudo tee -a $CONF_FILE
echo "net.ipv4.tcp_fastopen=3" | sudo tee -a $CONF_FILE
echo "net.ipv4.tcp_low_latency=1" | sudo tee -a $CONF_FILE
sudo sysctl -p

systemctl start nginx

#替换成你的文件所在路径
nohup gunicorn \
    --workers 1 \
    --worker-class uvicorn.workers.UvicornWorker \
    --forwarded-allow-ips='*' \
    --bind 127.0.0.1:5000 \
    --chdir /root/hypixel-proxy/webapp \
    --access-logfile /root/hypixel-proxy/webapp/logs/access.log \
    --error-logfile /root/hypixel-proxy/webapp/logs/error.log \
    app:app &