All Projects → maxlv7 → LightSocks-cxx

maxlv7 / LightSocks-cxx

Licence: other
⚡️一个轻巧的网络混淆代理🌏

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to LightSocks-cxx

lightsocks-c
🌐 Light SOCKS5 proxy
Stars: ✭ 56 (+154.55%)
Mutual labels:  libevent, lightsocks
okdbc
A fast, light-weight key/value store with http & memcache(TCP/UDP) interface.
Stars: ✭ 28 (+27.27%)
Mutual labels:  libevent
yastack
YAStack: User-space network-stack based on DPDK, FreeBSD TCP/IP Stack, EnvoyProxy
Stars: ✭ 90 (+309.09%)
Mutual labels:  libevent
developkit set
2021年最新总结,值得推荐的c/c++开源框架与库。持续更新中。
Stars: ✭ 654 (+2872.73%)
Mutual labels:  libevent
pegasocks
A lightweight proxy client written in C, intends to support multiple protocols(trojan etc.)
Stars: ✭ 112 (+409.09%)
Mutual labels:  libevent
Evpp
A modern C++ network library for developing high performance network services in TCP/UDP/HTTP protocols.
Stars: ✭ 2,850 (+12854.55%)
Mutual labels:  libevent
Stairspeedtest Reborn
Proxy performance batch tester based on Shadowsocks(R) and V2Ray
Stars: ✭ 2,501 (+11268.18%)
Mutual labels:  libevent
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+15150%)
Mutual labels:  libevent
Libwebsockets
canonical libwebsockets.org networking library
Stars: ✭ 3,314 (+14963.64%)
Mutual labels:  libevent
rpcsrv
JSON-RPC server based on C++11 and libevent
Stars: ✭ 28 (+27.27%)
Mutual labels:  libevent
libevent
<Libevent深入浅出>本书要求有一定的服务并发编程基础,了解select和epoll等多路I/O复用机制。
Stars: ✭ 363 (+1550%)
Mutual labels:  libevent
Fanqiang
翻墙-科学上网
Stars: ✭ 23,428 (+106390.91%)
Mutual labels:  lightsocks

Lightsocks-c++

新项目预告:超轻量级网络加密代理(名称未定)

具有以下特性:

  1. 使用轻量级单线程reactor框架tohka(?)
  2. 代码结构简单

通过本项目您可以学到:

  1. 如何构建单线程reactor框架
  2. 如何以简易的目光正视shoadowsocks,v2ray等软件
  3. 如何进行网络编程的开发

一个轻量级网络混淆代理,基于 SOCKS5 协议,可用来代替 Shadowsocks(?)。

  • 只专注于混淆,用最简单高效的混淆算法达到目的;
  • 使用c++ 11,基于高效的libevent网络库;
  • 使用cmake构建,方便实现跨平台

本项目为 你也能写个 Shadowsocks 的 c++ 实现 作者实现了 GO 版本 Lightsocks

c++初学者,代码写的不好,多多海涵~

编译

CMake (Windows)

Install CMake: https://www.cmake.org 针对windows的编译安装,我已经提供了libevent2.1.11的64位编译版本,位于lib/event

$ md build && cd build
$ cmake -G "Visual Studio 16 2019" -A x64 ..   
$ cmake --build . --config Release 

CMake (Linux)

请先安装libevent2.1.11 https://github.com/libevent/libevent

如果你使用的是ubuntu18.04 or later,也可以直接apt install libevent-dev直接安装libevent库

其它Linux:克隆本项目https://github.com/maxlv7/LightSocks-cxx.git,进入项目主目录。

$ mkdir build && cd build 
$ cmake ..
$ make

如果不出意外的话,将会在当前目录下生成两个可执行文件:LightSocks-clientLightSocks-server

使用

客户端使用

直接运行生成的可执行文件,程序会自动读取当前目录下的config.json 如果没有config.json文件,那么程序会在当前目录下自动生成config.json 其各字段含义如下:

{
  "ip": "23.102.255.234", //远程服务器地址
  "remote_port": 7009, //远程服务器端口
  "listen_port": 7878, //监听的本地地址
  "password": "******" //密码
}

如果一切配置无误,那么启动程序就会看到:

[2020-04-02 14:55:25.967] [info] 成功加载配置文件[config.json]
[2020-04-02 14:55:25.968] [info] 读取到IP:23.102.255.234
[2020-04-02 14:55:25.968] [info] 读取到密码:******
[2020-04-02 14:55:25.968] [info] 读取到本地端口:7878
[2020-04-02 14:55:25.968] [info] 读取到远程端口:7009
[2020-04-02 14:55:25.969] [info] 成功监听地址-->socks5://127.0.0.1:7878

服务端使用

直接运行生成的可执行文件,程序会自动读取当前目录下的config_server.json 如果没有config_server.json文件,那么程序会在当前目录下自动生成默认的config_server.json 其各字段含义如下:

{
  "listen_port": 7009, //监听的本地地址
  "password": "******" //密码
}

如果一切配置无误,那么启动程序就会看到:

[2020-04-12 16:25:28.212] [info] 成功加载配置文件[config_server.json]
[2020-04-12 16:25:28.213] [info] 读取到监听地址:[::]:7009
[2020-04-12 16:25:28.213] [info] 读取到密码:nq9Bib/tgSfiVvrRPjWUU9PCcRnmBKBiLSkF3brP9PnwxH5lDYymyd+7zB7hKKg6nypHSI37vFTjrYPXWAn9iuTvZqm9sR9tW6IsTzzVsEpXkRQBLtyVcxrn+EP+QpaX6wOOUPak26Px1CE22CIHC6XKrg8xAIa589rlzaclThAwFXmHMjOEmCZG2ZxfwUSS6qx6aXhgbvfgqky2cFWba5DpyIUdxQw7OS9kG2rWBn+Pi4KyAkB3P7j1UfxJiG8gtxhsNwo0DscrzrPuOKGZq3VLJJqTXF59XXLyWXydY+xoEcN26BwXI4BSy7XGEwj/Ft6+PRJ0Z3vARdJN0FphtA==
[2020-04-12 16:25:28.214] [info] 监听在: 127.0.0.1:7009

特别感谢

https://github.com/libevent/libevent

https://github.com/gwuhaolin/lightsocks

https://github.com/linw1995/lightsocks-python

https://github.com/ReneNyffenegger/cpp-base64

https://github.com/bblanchon/ArduinoJson

https://github.com/LeeReindeer/lightsocks-c

https://github.com/gabime/spdlog

已知问题

  1. server端内存泄漏(原因不明)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].