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
- Download the latest release from the release page
- Extract the zip file to a directory of your choice
- Run
Shadowsocks.exe
From Source
-
Clone the repository:
git clone https://github.com/shadowsocks/shadowsocks-windows.git cd shadowsocks-windows -
Open
shadowsocks-csharp.slnin Visual Studio 2019 -
Build the solution:
- Select "Build" → "Build Solution" (Ctrl+Shift+B)
- Ensure the build configuration is set to "Release"
-
The compiled binary will be in the
bin\Releasedirectory
Configuration
Server Configuration
- Right-click the Shadowsocks icon in the notification tray
- Select "Servers" → "Edit Servers"
- Click "Add" to add a new server configuration
- 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
- Open the solution in Visual Studio 2019
- Set the build configuration to "Debug" for development
- Press F5 to start debugging, or Ctrl+F5 to run without debugging
Production
- Build the solution in "Release" mode
- Copy the contents of the
bin\Releasedirectory to your deployment location - 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
- Copy the release build to a directory on your Windows machine
- Create a shortcut to
Shadowsocks.exein your startup folder for auto-start - Run the application as administrator if you need to configure system proxy
Portable Deployment
- Copy the release build to a USB drive or portable storage
- No installation required - the application is self-contained
- Ensure the Visual C++ 2015 Redistributable is installed on target machines
Multiple Instances
To manage multiple servers with different tools:
- Copy the entire Shadowsocks directory to a new location
- Edit
gui-config.jsonto change the local port - 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-gcmchacha20-ietf-poly1305,xchacha20-ietf-poly1305
"Connection timed out"
Solution:
- Verify server IP and port are correct
- Check firewall settings
- Test connection with ping or telnet
"PAC file not working"
Solution:
- Check
gui-config.jsonfor PAC configuration - Verify internet connection for PAC file updates
- For Windows Store apps, run:
netsh winhttp import proxy source=ieas administrator
Debug Mode
Enable verbose logging for troubleshooting:
- Right-click the Shadowsocks icon
- Select "Verbose Logging" to enable detailed logging
- Check the log file in the application directory
Performance Issues
High CPU usage
Solution:
- Check for multiple instances running
- Reduce the number of servers in the list
- Disable "Auto Check Updates" if not needed
Slow connection
Solution:
- Use the "Server Auto Switching" feature to find the best server
- Enable "Availability Statistics" to monitor server performance
- 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.