← Back to shadowsocks/shadowsocks-windows

How to Deploy & Use shadowsocks/shadowsocks-windows

Shadowsocks for Windows - Deploy/Usage Guide

Prerequisites

  • Runtime: .NET Framework 4.8 or higher
  • Dependencies: Microsoft Visual C++ 2015 Redistributable (x86)
  • Build Tools: Visual Studio 2019 with .NET Framework 4.8 SDK

Installation

From Release

  1. Download the latest release from the release page
  2. Extract the zip file to a directory of your choice
  3. Run Shadowsocks.exe

From Source

  1. Clone the repository:

    git clone https://github.com/shadowsocks/shadowsocks-windows.git
    cd shadowsocks-windows
    
  2. Open shadowsocks-csharp.sln in Visual Studio 2019

  3. Build the solution:

    • Select "Build" → "Build Solution" (Ctrl+Shift+B)
    • Ensure the build configuration is set to "Release"
  4. The compiled binary will be in the bin\Release directory

Configuration

Server Configuration

  1. Right-click the Shadowsocks icon in the notification tray
  2. Select "Servers" → "Edit Servers"
  3. Click "Add" to add a new server configuration
  4. Fill in the required fields:
    • Server IP or hostname
    • Server port
    • Password
    • Encryption method (select from available options)

PAC Configuration

The PAC rules are generated from the geosite database. By default, the application uses whitelist mode with Chinese domains excluded from the proxy.

To modify PAC behavior, edit the gui-config.json file:

{
  "geositePreferDirect": false
}
  • false: Whitelist mode (default)
  • true: Blacklist mode

User-defined Rules

Create or modify the user-rule.txt file in the application directory to add custom PAC rules.

Build & Run

Development

  1. Open the solution in Visual Studio 2019
  2. Set the build configuration to "Debug" for development
  3. Press F5 to start debugging, or Ctrl+F5 to run without debugging

Production

  1. Build the solution in "Release" mode
  2. Copy the contents of the bin\Release directory to your deployment location
  3. Run Shadowsocks.exe

Command Line Options

The application can be started with command line arguments:

Shadowsocks.exe --config "path\to\config.json"

Deployment

Local Deployment

  1. Copy the release build to a directory on your Windows machine
  2. Create a shortcut to Shadowsocks.exe in your startup folder for auto-start
  3. Run the application as administrator if you need to configure system proxy

Portable Deployment

  1. Copy the release build to a USB drive or portable storage
  2. No installation required - the application is self-contained
  3. Ensure the Visual C++ 2015 Redistributable is installed on target machines

Multiple Instances

To manage multiple servers with different tools:

  1. Copy the entire Shadowsocks directory to a new location
  2. Edit gui-config.json to change the local port
  3. Run multiple instances from different directories

Troubleshooting

Common Issues

"Unable to start" or "System proxy configuration failed"

Solution: Run as administrator to configure system proxy settings.

"Encryption method not supported"

Solution: Ensure the server uses one of the supported encryption methods:

  • none, plain, aes-256-gcm, aes-192-gcm, aes-128-gcm
  • chacha20-ietf-poly1305, xchacha20-ietf-poly1305

"Connection timed out"

Solution:

  1. Verify server IP and port are correct
  2. Check firewall settings
  3. Test connection with ping or telnet

"PAC file not working"

Solution:

  1. Check gui-config.json for PAC configuration
  2. Verify internet connection for PAC file updates
  3. For Windows Store apps, run: netsh winhttp import proxy source=ie as administrator

Debug Mode

Enable verbose logging for troubleshooting:

  1. Right-click the Shadowsocks icon
  2. Select "Verbose Logging" to enable detailed logging
  3. Check the log file in the application directory

Performance Issues

High CPU usage

Solution:

  1. Check for multiple instances running
  2. Reduce the number of servers in the list
  3. Disable "Auto Check Updates" if not needed

Slow connection

Solution:

  1. Use the "Server Auto Switching" feature to find the best server
  2. Enable "Availability Statistics" to monitor server performance
  3. Try different encryption methods for better performance

Configuration Backup

The configuration is stored in gui-config.json. Backup this file to preserve your settings when updating or reinstalling.