:3
Everything is barely weeks. Everything is days. We have minutes to live.
- about me
- Github: @r1bb1t-h0l3
Everything is barely weeks. Everything is days. We have minutes to live.
Posted
This will be a general overview of what shadowsocks proxy is, who it is for and how to install and configure it. This is not a super detailed play-by play as everyoneâs system will be slightly different and you will likely need to troubleshoot here and there. As a disclaimer – I am not an expert in any of this, and all of the following is the result of many hours of googling around and troubleshooting, so potentially to be take the following info with a dollop of salt.
Shadowsocks is a secure split proxy based on SOCKS5. SOCKS5 is not quite as comprehensive as a VPN as it does not encrypt all traffic, but Shadowsocks is generally faster as the encryption is focused on speed, rather than complete security.
SOCKS5 (Socket Secure version 5) is a network protocol that facilitates the routing of network traffic between a client and a server through a proxy server. It operates at the session layer (Layer 5) of the OSI model and is generally used to bypass internet restrictions, protect privacy, and anonymise traffic.
Shadowsocks might be useful for:
Step one – buy a VPS server. It doesnât need to be super powerful, 1 GB RAM is enough. I used aeza.net, who are pretty cheap and have a nifty telegram bot to keep track of your servers, but you can use whatever company strikes your fancy.
I chose Ubuntu 22.04 as my OS, but this depends on your preference.
Pay for your server and wait to receive your login details and password to your email.
Once your server is up and running here is what you need to do server-side:
{
"server": "your_server_ip",
"server_port": 8388,
"local_address": "127.0.0.1",
"local_port": 1080,
"password": "your_password",
"timeout": 300,
"method": "aes-256-gcm"
}
sudo systemctl start shadowsocks-libev
for me all of this was painless and fast.
Now to the client-side settings. Here is where I had some issues because I was using an unstable Debian build. For most people this stage should be totally fine too.
sudo systemctl start shadowsocks-libev
{
"server": "your_server_ip",
"server_port": 8388,
"local_address": "127.0.0.1",
"local_port": 1080,
"password": "your_password",
"timeout": 300,
"method": "aes-256-gcm"
}
snap run shadowsocks-libev.ss-local -c /path/to/your/config.json
sudo nano /etc/systemd/system/shadowsocks-client.service
and an example of the service file:
[Unit]
Description=Shadowsocks Client Service
After=network.target
[Service]
ExecStart=/usr/bin/snap run shadowsocks-libev.ss-local -c /home/youruser/snap/shadowsocks-libev/common/config.json
Restart=always
User=root
[Install]
WantedBy=multi-user.target
sudo systemctl enable shadowsocks-client.service
sudo systemctl start shadowsocks-client.service
No, of course we donât just hope – we check to make sure our service is up and running and here is how:
netstat
to make sure that the local port is listening:netstat -tuln | grep 1080
sudo systemctl status shadowsocks-client.service
*originally my client-side config.json was placed in a /home/user/location/ or somewhere like that, and AppArmor was restricting shadowsocks(ss-local process) from accessing the file. Here is the approximate kind of error I received:
AppArmor="DENIED" operation="open" class="file" profile="snap.shadowsocks-libev.ss-local"
name="/home/user/Desktop/shadowsocks-libev/debian/config.json" pid=432819 comm="ss-local"
requested_mask="r" denied_mask="râ
I moved config.json to my snap-specific directory:
/home/sasha/snap/shadowsocks-libev/common/
Since this directory is within the allowed paths that AppArmor grants access to, Shadowsocks was able to finally read it correctly without encountering AppArmor restrictions.
sudo journalctl -xe
*when my client was failing to connect i also used this command to check status
sudo systemctl status shadowsocks-client.service
*AppArmor Denied Access: I resolved this by enabling the AppArmor service and moving the config file to an accessible location.
*Failed to Start Service: I reviewed logs with journalctl, which helped identify the cause (usually dodgy permissions settings or incorrect paths).
While setting up my shadowsocks server I also found this very helpful blogpost
, some great info there, a bit more to the point, a bit less rambly than my one hah.
Next step for me is figuring out how to configure fake DNS, as my IP is being cloaked successfully, but my DNS shows up as being geographically different, which trips some websitesâ security protocols.
âtill then!