cd
rm -rf proxy proxy-linux-amd64.tar.gz
wget -q https://ghproxy.fsou.cc/https://github.com/snail007/goproxy/releases/download/v11.3/proxy-linux-amd64.tar.gz
mkdir proxy
tar xf proxy-linux-amd64.tar.gz -C proxy

public_ip=$(curl -s -4 ip.sb)
sudo sed -i "1i\/home/ubuntu/proxy/proxy socks -t tcp -p '0.0.0.0:38080' -g '${public_ip}'" /etc/rc.local
sudo sed -i '1i\#!/bin/sh -e' /etc/rc.local

echo "deploy success"

sudo reboot