Top Related Projects
A platform for building proxies to bypass network restrictions.
An unidentifiable mechanism that helps you bypass GFW.
A Quantum-Safe Secure Tunnel based on QPP, KCP, FEC, and N:M multiplexing.
Lantern官方版本下载 蓝灯 翻墙 代理 科学上网 外网 加速器 梯子 路由 - Быстрый, надежный и безопасный доступ к открытому интернету - lantern proxy vpn censorship-circumvention censorship gfw accelerator پراکسی لنترن، ضدسانسور، امن، قابل اعتماد و پرسرعت
A simple proxy client
Quick Overview
Shadowsocks is a fast, secure SOCKS5 proxy designed to protect your Internet traffic. It is an open-source project that helps users bypass internet censorship and access restricted content. Shadowsocks uses encryption to secure data transmission between the client and server.
Pros
- Strong encryption for enhanced security and privacy
- Fast and efficient, with low latency and overhead
- Cross-platform support (Windows, macOS, Linux, Android, iOS)
- Easy to set up and use
Cons
- Requires a server to run the Shadowsocks service
- Can be blocked by sophisticated firewalls if detected
- May require technical knowledge for optimal configuration
- Limited built-in features compared to some VPN solutions
Code Examples
# Creating a Shadowsocks server
from shadowsocks import eventloop, tcprelay, udprelay, asyncdns
server = tcprelay.TCPRelay(config, dns_resolver=dns_resolver)
loop = eventloop.EventLoop()
dns_resolver.add_to_loop(loop)
loop.add_periodic(server.handle_periodic)
# Configuring Shadowsocks server
config = {
'server': '0.0.0.0',
'server_port': 8388,
'password': 'mypassword',
'method': 'aes-256-gcm'
}
# Starting the Shadowsocks server
def run_server():
server = tcprelay.TCPRelay(config, dns_resolver=dns_resolver)
loop = eventloop.EventLoop()
dns_resolver.add_to_loop(loop)
loop.add_periodic(server.handle_periodic)
loop.run()
Getting Started
To get started with Shadowsocks, follow these steps:
-
Install Shadowsocks:
pip install shadowsocks
-
Create a configuration file
config.json
:{ "server": "0.0.0.0", "server_port": 8388, "password": "your_password", "method": "aes-256-gcm" }
-
Start the Shadowsocks server:
ssserver -c /path/to/config.json
-
Install and configure a Shadowsocks client on your device, using the server details from step 2.
-
Connect to the Shadowsocks server using the client to start browsing securely.
Competitor Comparisons
A platform for building proxies to bypass network restrictions.
Pros of v2ray-core
- More advanced protocol support, including VMess, VLESS, and Trojan
- Enhanced security features and obfuscation techniques
- Flexible routing capabilities for complex network configurations
Cons of v2ray-core
- Steeper learning curve due to increased complexity
- Higher resource consumption compared to Shadowsocks
- More challenging to set up and configure for beginners
Code Comparison
Shadowsocks (Python implementation):
from shadowsocks import encrypt, decrypt
def handle_connection(sock, remote):
try:
encrypt(sock, remote)
finally:
sock.close()
remote.close()
v2ray-core (Go implementation):
import (
"v2ray.com/core"
"v2ray.com/core/app/proxyman"
)
func startV2Ray() (*core.Instance, error) {
config := &core.Config{
Inbound: []*core.InboundHandlerConfig{
{
ReceiverSettings: serial.ToTypedMessage(&proxyman.ReceiverConfig{}),
ProxySettings: serial.ToTypedMessage(&vmess.ServerConfig{}),
},
},
}
return core.New(config)
}
The code snippets demonstrate the basic setup for handling connections in Shadowsocks and v2ray-core. Shadowsocks uses a simpler encryption approach, while v2ray-core offers more complex configuration options and protocol support.
An unidentifiable mechanism that helps you bypass GFW.
Pros of Trojan
- More resistant to deep packet inspection (DPI) and active probing
- Mimics HTTPS traffic more effectively, making it harder to detect
- Simpler protocol design, potentially leading to better performance
Cons of Trojan
- Less widespread adoption compared to Shadowsocks
- Fewer client implementations available across different platforms
- May require more complex server setup, especially for multi-user scenarios
Code Comparison
Shadowsocks (Python implementation):
def encrypt(self, data):
return self.cipher.encrypt(data)
def decrypt(self, data):
return self.cipher.decrypt(data)
Trojan (C++ implementation):
void ServerSession::in_recv(const string &data) {
trojan::AtyParser::parse(data, config.get_atyp_parser());
// Further processing...
}
The code snippets show that Shadowsocks focuses on simple encryption/decryption operations, while Trojan emphasizes parsing and handling of ATYP (address type) data, reflecting its design to mimic HTTPS traffic more closely.
Both projects aim to provide secure and undetectable internet access, but Trojan's approach of imitating HTTPS traffic may offer better resistance against sophisticated censorship systems. However, Shadowsocks remains more widely adopted and has a larger ecosystem of clients and plugins.
A Quantum-Safe Secure Tunnel based on QPP, KCP, FEC, and N:M multiplexing.
Pros of kcptun
- Utilizes KCP protocol for improved network performance, especially in high-latency or lossy environments
- Offers more advanced congestion control and faster packet retransmission
- Provides additional encryption and obfuscation options
Cons of kcptun
- Higher CPU and bandwidth usage due to the nature of the KCP protocol
- More complex setup and configuration compared to Shadowsocks
- May not be as widely supported or compatible with various platforms
Code Comparison
Shadowsocks (Python implementation):
encryptor = encrypt.Encryptor(key, method)
data = encryptor.encrypt(data)
self._write_to_sock(data, self._remote_sock)
kcptun:
block, _ := kcp.NewAESBlockCrypt(pass)
kcpconn, _ := kcp.NewConn(remoteaddr, block, dataShards, parityShards, conn)
kcpconn.SetStreamMode(true)
kcpconn.SetWriteDelay(false)
Both projects aim to provide secure and efficient data transmission, but they use different approaches. Shadowsocks focuses on simple and lightweight proxying, while kcptun emphasizes improved network performance through the KCP protocol. The code snippets highlight the different encryption methods and connection setup processes used by each project.
Lantern官方版本下载 蓝灯 翻墙 代理 科学上网 外网 加速器 梯子 路由 - Быстрый, надежный и безопасный доступ к открытому интернету - lantern proxy vpn censorship-circumvention censorship gfw accelerator پراکسی لنترن، ضدسانسور، امن، قابل اعتماد و پرسرعت
Pros of Lantern
- User-friendly interface with easy setup and configuration
- Built-in censorship detection and automatic protocol switching
- Supports peer-to-peer connections for improved performance
Cons of Lantern
- Less customizable than Shadowsocks
- Potential privacy concerns due to centralized infrastructure
- May be easier for censors to detect and block
Code Comparison
Lantern (Go):
func (c *Client) dialDirect(addr string) (net.Conn, error) {
conn, err := net.DialTimeout("tcp", addr, 10*time.Second)
if err != nil {
return nil, err
}
return conn, nil
}
Shadowsocks (Python):
def encrypt(self, data):
return self.encryptor.encrypt(data)
def decrypt(self, data):
return self.encryptor.decrypt(data)
The code snippets demonstrate different approaches:
- Lantern focuses on direct TCP connections with timeout handling
- Shadowsocks emphasizes encryption and decryption of data
Both projects aim to provide censorship circumvention, but Lantern offers a more user-friendly approach with automatic features, while Shadowsocks provides greater flexibility and customization options for advanced users. The choice between them depends on the user's technical expertise and specific requirements for bypassing internet restrictions.
A simple proxy client
Pros of Netch
- More comprehensive networking tool with support for multiple protocols
- User-friendly GUI for easier configuration and management
- Active development with frequent updates and new features
Cons of Netch
- Larger codebase and more complex setup compared to Shadowsocks
- May have higher resource usage due to additional features
- Less focused on a single protocol, potentially sacrificing simplicity
Code Comparison
Shadowsocks (Python implementation):
def encrypt(self, data):
return self.cipher.encrypt(data)
def decrypt(self, data):
return self.cipher.decrypt(data)
Netch (C# implementation):
public byte[] Encrypt(byte[] plaintext)
{
return EncryptorBase.Encrypt(plaintext, _encryptIV);
}
public byte[] Decrypt(byte[] ciphertext)
{
return EncryptorBase.Decrypt(ciphertext, _decryptIV);
}
Both projects implement encryption and decryption methods, but Netch's implementation is part of a larger, more complex codebase with additional features and protocols.
Shadowsocks focuses on simplicity and efficiency for its specific protocol, while Netch offers a more versatile toolset for various networking needs. The choice between the two depends on the user's requirements for simplicity versus feature richness.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Removed according to regulations.
Top Related Projects
A platform for building proxies to bypass network restrictions.
An unidentifiable mechanism that helps you bypass GFW.
A Quantum-Safe Secure Tunnel based on QPP, KCP, FEC, and N:M multiplexing.
Lantern官方版本下载 蓝灯 翻墙 代理 科学上网 外网 加速器 梯子 路由 - Быстрый, надежный и безопасный доступ к открытому интернету - lantern proxy vpn censorship-circumvention censorship gfw accelerator پراکسی لنترن، ضدسانسور، امن، قابل اعتماد و پرسرعت
A simple proxy client
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot