This is a Java implementation of the Shadowsocks protocol, a secure proxy designed to protect your internet traffic. This implementation includes both client and server components.
- SOCKS5 protocol support
- Multiple encryption methods:
- AES-128-GCM
- AES-256-GCM
- ChaCha20-Poly1305
- Command-line interface for both client and server
- Built with Netty for high-performance networking
- Java 21 or higher
- Maven 3.6 or higher
To build the project, run the following command in the project root directory:
mvn clean package
This will compile the code and create executable JAR files for both the client and server components in their respective target
directories.
After building the project, you can run the server with:
java -jar server/target/server-1.0-SNAPSHOT.jar --password <your-password> --method <encryption-method>
Or using Maven:
cd server
mvn exec:java
-p, --password
: (Required) The password used for encryption-m, --method
: (Required) The encryption method to use (AES_128_GCM, AES_256_GCM, CHACHA20_POLY1305)-l, --listen
: (Optional) The port to listen on (default: 8388)-h, --help
: Show help message-V, --version
: Display version information
After building the project, you can run the client with:
java -jar client/target/client-1.0-SNAPSHOT.jar --server <server-address:port> --password <your-password> --method <encryption-method>
Or using Maven:
cd client
mvn exec:java
-s, --server
: (Required) The server address in the format 'host:port' (e.g., 127.0.0.1:8388)-p, --password
: (Required) The password used for encryption-m, --method
: (Required) The encryption method to use (AES_128_GCM, AES_256_GCM, CHACHA20_POLY1305)-l, --listen
: (Optional) The local port to listen on (default: 1080)-h, --help
: Show help message-V, --version
: Display version information
-
Start the server:
java -jar server/target/server-1.0-SNAPSHOT.jar --password mySecretPassword --method AES_256_GCM --listen 8388
-
Start the client:
java -jar client/target/client-1.0-SNAPSHOT.jar --server example.com:8388 --password mySecretPassword --method AES_256_GCM --listen 1080
-
Configure your applications to use the SOCKS5 proxy at 127.0.0.1:1080
client/
: The Shadowsocks client implementationserver/
: The Shadowsocks server implementationcommon/
: Shared code between client and server (encryption, protocol handling, etc.)
To contribute to the project, you can import it as a Maven project in your favorite IDE.
mvn test