https://github.com/hhhizzz/libshadesocks
c++ implementation of Shadowsocks, which use libuv and CryptoPP
https://github.com/hhhizzz/libshadesocks
Last synced: about 1 month ago
JSON representation
c++ implementation of Shadowsocks, which use libuv and CryptoPP
- Host: GitHub
- URL: https://github.com/hhhizzz/libshadesocks
- Owner: hhhizzz
- Created: 2019-08-08T15:59:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-17T14:48:49.000Z (over 5 years ago)
- Last Synced: 2025-03-29T05:13:44.492Z (2 months ago)
- Language: CMake
- Homepage:
- Size: 826 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# LibShadesocks

## build command
```bash
# make sure the submodule is loaded
git submodule update --init --recursivemkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
```
## usage
add `add_subdirectory("libshadesocks")` in `CMakeLists.txt`
```cpp
#include "ss.h"auto loop = shadesocks::Loop::getDefault();
auto tcp = loop->create_tcp_handle();
try {
tcp->bind("0.0.0.0", 1080);
tcp->listen();
loop->run();
} catch (shadesocks::UvException& uvException) {
LOG(ERROR) << uvException.what();
}
```## Thanks
Without the following repository, there could not be such a project.[nodejs/node](https://github.com/nodejs/node)
[libuv/libuv](https://github.com/libuv/libuv)
[cryptopp/releases](https://github.com/weidai11/cryptopp/releases)
[noloader/cryptopp-cmake](https://github.com/noloader/cryptopp-cmake)
[skypjack/uvw](https://github.com/skypjack/uvw)