How to Set Up a Proxy in Shadowsocks

Post Time: Jul 27, 2025
Update Time: Jul 28, 2025

Shadowsocks is an open-source proxy tool that provides a secure means for browsing the web anonymously. It is primarily used to circumvent online censorship and improve privacy. Below is a step-by-step guide on how to configure a proxy in Shadowsocks, both on the server and the client.

shadowsocks proxy settings

Prerequisites

  • A server running Shadowsocks (can be on a VPS or dedicated server).
  • Administrator access to the server to install Shadowsocks.
  • A client device (such as a PC, mobile phone, or tablet) to configure the proxy.

Step 1: Installing Shadowsocks on the Server

1.1 Installing Shadowsocks on a Linux Server

To configure Shadowsocks on the server, follow these steps. Here we'll be using a Debian-based distribution (such as Ubuntu), but the process is similar for other Linux distributions.

1. Update the system repositories:

bash Copy
1sudo apt update
2sudo apt upgrade
3
4

2. Install Shadowsocks: To install Shadowsocks, we use pip, the Python package manager:

bash Copy
1sudo apt install python3-pip
2sudo pip3 install shadowsocks
3
4

3. Configure Shadowsocks: Create a configuration file for Shadowsocks in the /etc/shadowsocks/ directory:

bash Copy
1sudo mkdir /etc/shadowsocks
2sudo nano /etc/shadowsocks/config.json
3
4

The configuration file must have the following format:

json Copy
1{
2"server": "0.0.0.0", // Server IP (can be the server IP) VPS)
3"server_port": 8388, // Server port
4"local_address": "127.0.0.1", // Local address
5"local_port": 1080, // Local port (can be any port)
6"password": "my_secure_password", // Password for the connection
7"timeout": 300,
8"method": "aes-256-cfb" // Encryption method
9}
10
11

Save and close the file.

4. Start Shadowsocks: You can now start Shadowsocks using the following command:

bash Copy
1sudo ssserver -c /etc/shadowsocks/config.json
2
3

5. Configure the Firewall: Make sure the port configured in server_port (for example, 8388) is open in the firewall:

bash Copy
1sudo ufw allow 8388/tcp
2sudo ufw enable
3
4

Step 2: Installing Shadowsocks on the Client

Once the server is configured, you can configure the client on your device.

2.1 Configuring the Client on Windows

  1. Download Shadowsocks for Windows: Visit the official Shadowsocks website at https://github.com/shadowsocks/shadowsocks-windows and download the latest stable version.

  2. Install the Client: Run the downloaded installer and follow the instructions to complete the installation.

  3. Configure the Client:

  • Open the Shadowsocks client.
  • Right-click the Shadowsocks icon in the system tray and select "Configure."
  • Enter the server's IP address and the port Shadowsocks is listening on (by default, 8388).
  • Enter the password you configured on the server.
  • Select the same encryption method you configured on the server (for example, aes-256-cfb).
  • Click "OK" to save the settings.
  1. Connect to the Server: After configuring the client, right-click the Shadowsocks icon and select "Connect." Your connection will now be protected through the Shadowsocks proxy.

2.2 Client Configuration on Android

  1. Download the Shadowsocks App: You can download the official Shadowsocks app from the Google Play store.

  2. Configure the App:

  • Open the app and tap the "+" icon to add a new configuration.
  • Enter your server details: IP address, port, password, and encryption method.
  • Tap "Save" and then select "Connect".

2.3 Client Configuration on iOS

  1. Download the Shadowsocks App: The official Shadowsocks app is also available on the iOS App Store. Search for and install it.

  2. Configure the App:

  • Open the app and tap "Add Server".
  • Enter the server's IP address, port, password, and encryption method.
  • Tap "Save" and then connect to the server.

Step 3: Verify the Connection

Once you've configured both the server and the client, it's important to verify that the connection is working properly. You can do this in the following ways:

  1. Verify IP: You can visit a website like https://www.whatismyip.com to verify that your IP address has changed and is now being routed through the Shadowsocks server.

  2. Check the Connection on the Client: On the Windows, Android, or iOS client, if you see a "Connected" indicator, then your proxy is working properly.

Step 4: Advanced Configuration (Optional)

  1. Configure a Local Proxy: If you want your web traffic to pass through the Shadowsocks proxy, configure your browser to use the local port you configured (by default, 1080). This can be done in your browser's proxy settings.

  2. Automate Shadowsocks Startup: To have Shadowsocks start automatically on your server, you can configure it as a service in Linux using systemd. Create a service file and enable it to start with the system.

Conclusion

Shadowsocks is a powerful tool for protecting your online privacy and bypassing internet censorship. With these steps, you can easily set up a Shadowsocks proxy on your server and client device. Be sure to follow security best practices, such as using strong passwords and keeping your software up to date, to ensure your connection is secure and reliable.

Related articles

Consent Preferences