https://github.com/robinka/shadowsocks-zig
Implementations of Shadowsocks 2022 written in Zig
https://github.com/robinka/shadowsocks-zig
native proxy shadowsocks shadowsocks-2022 shadowsocks-client shadowsocks-server vpn zig
Last synced: 11 months ago
JSON representation
Implementations of Shadowsocks 2022 written in Zig
- Host: GitHub
- URL: https://github.com/robinka/shadowsocks-zig
- Owner: RobinKa
- License: mit
- Created: 2022-12-25T18:09:53.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T09:51:35.000Z (over 3 years ago)
- Last Synced: 2025-07-01T02:11:32.547Z (11 months ago)
- Topics: native, proxy, shadowsocks, shadowsocks-2022, shadowsocks-client, shadowsocks-server, vpn, zig
- Language: Zig
- Homepage:
- Size: 108 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shadowsocks written in Zig
Client and server implementation of [Shadowsocks 2022](https://github.com/Shadowsocks-NET/shadowsocks-specs/blob/main/2022-1-shadowsocks-2022-edition.md) written in [Zig](https://ziglang.org).
Shadowsocks 2022 is an encrypted proxy protocol utilizing a pre-shared key and was designed to be hard to detect to avoid government censorship.
## Features
The main function will run a server. The first argument will be used for the path to the json config (see the [configs directory](configs/) for examples). If no argument is passed, the environment variables `SHADOWSOCKS_PORT`, `SHADOWSOCKS_KEY` and `SHADOWSOCKS_METHOD` will be used and all need to be set.
The client is currently just a struct with an interface similar to sockets, see the [tests](src/shadowsocks/tests.zig) for how to use it.
The following encryption methods are currently supported:
- Blake3Aes128Gcm
- Blake3Aes256Gcm
- Blake3ChaCha8Poly1305
- Blake3ChaCha12Poly1305
- Blake3ChaCha20Poly1305
UDP is not yet supported.