If you need to access Chinese websites and services while abroad, deploying a Shadowsocks proxy on a Tencent Cloud server is a reliable solution. This guide walks you through the process, starting with a clean Debian 11 installation, then installing Docker, and finally setting up Shadowsocks-libev with v2ray-plugin.
1. Prepare Your Tencent Cloud Server
Tencent Cloud's default images often have issues, so it's best to reinstall with a clean Debian 11 using a DD script. However, Tencent Cloud includes components that block DD installation. You must disable and remove them first.
systemctl stop tat_agent
systemctl disable tat_agent
rm -rf /etc/systemd/system/tat_agent.service
rm -fr /usr/local/qcloud
ps -A | grep agent
# Check if any Tencent Cloud components remain
# kill the process if found
After removing all Tencent Cloud components, you can proceed with DD installation. I recommend using the hiCasper script, which I've reviewed and found safe.
# Install required dependencies
apt-get install -y xz-utils openssl gawk file curl wget
wget --no-check-certificate -O AutoReinstall.sh "https://cdn.jsdelivr.net/gh/hiCasper/Shell/AutoReinstall.sh" && bash AutoReinstall.sh
# Manually select your OS; I chose Debian 11
# After selection, the process is fully automatic
After about 10 minutes (depending on your VPS performance), you'll have a fresh Debian 11 installation. SSH into your VPS (remember to change the SSH port and disable password login).
Username: root
Default password: Pwd@Linux
2. Install Docker
Use the official Docker installation script with a Aliyun mirror for faster download in China.
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
3. Deploy Shadowsocks-libev with v2ray-plugin (WebSocket, No Domain Required)
Follow these steps to set up the proxy without needing a domain name.
3.1 Create Configuration File
mkdir /etc/shadowsocks-libev
cd /etc/shadowsocks-libev
vim config.json
# Add the following configuration:
{
"server":"0.0.0.0",
"server_port":9000,
"method":"aes-256-gcm",
"timeout":300,
"password":"password0",
"fast_open":false,
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"v2ray-plugin",
"plugin_opts":"server"
}
# Save and exit
Note: Keep
serveras0.0.0.0. For more options, refer to the official documentation. If you set"plugin_opts":"server;mux=0", you can use Quantumult X to add the node.
3.2 Run Docker Container
docker run -d --name ss-libev --restart always -p 9000:9000 -p 9000:9000/udp -v /etc/shadowsocks-libev:/etc/shadowsocks-libev teddysun/shadowsocks-libev
Explanation:
-druns in background;--nameassigns a name;--restart alwaysauto-restarts;-pmaps ports (TCP and UDP);-vmounts the config directory;teddysun/shadowsocks-libevis the Docker image.
Check if the container is running:
docker ps -as
You should see ss-libev in the list.
4. Configure Client
For Shadowrocket (iOS), use the China-return rules to proxy only traffic to Chinese sites.
Your proxy is now ready. Connect your client using the server IP, port 9000, password you set, and method aes-256-gcm with v2ray-plugin (WebSocket).
文章评论