Using this project, you can run a docker-based shadowsocks proxy by its v2ray plugin.
It comes originally from here with some extra elaboration and changes.
1-Docker
https://docs.docker.com/engine/install/ubuntu/
2- A domain
git clone https://github.com/Zi4Sec/shadowsocks-v2ray-tls.git
cd shadowsocks-v2ray-tls
mkdir certs
sudo apt-add-repository ppa:certbot/certbot
apt update
apt install certbot -y
certbot --version
- change YOUR_EMAIL_ADDRESS and DOMAIN_NAME to your own.
certbot certonly --standalone --preferred-challenges http --non-interactive --agree-tos --email <YOUR_EMAIL_ADDRESS> -d <DOMAIN_NAME>
then, copy pem files in certs directory.
cp /etc/letsencrypt/live/<DOMAIN_NAME>/fullchain.pem certs
cp /etc/letsencrypt/live/<DOMAIN_NAME>/privkey.pem certs
- change DOMAIN_NAME to your own
- change PASSWORD to your own
- It is better to run the service as a non-root user.
sudo adduser vpn
- remember to restrict this user to login through ssh (you can add list of users who can just ssh to the server
sudo vi /etc/ssh/sshd_config
- press i and add
AllowUsers user1 user2
to end of the file, but not add this non-root user. then make vpn user the owner of required files
chown -R vpn:vpn shadowsocks-v2ray-tls
chmod 755 -R shadowsocks-v2ray-tls
docker compose up -d
docker ps -a
In order to you the service in client-side, you need to get appropriate files from below links: