Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Kcptun | 13,259 | 2 | 16 days ago | 11 | April 01, 2021 | 104 | mit | Go | ||
A Stable & Secure Tunnel based on KCP with N:M multiplexing and FEC. Available for ARM, MIPS, 386 and AMD64。N:M 多重化と FEC を備えた KCP に基づく安定した安全なトンネル。 N:M 다중화 및 FEC를 사용하는 KCP 기반의 안정적이고 안전한 터널입니다. Un tunnel stable et sécurisé basé sur KCP avec multiplexage N:M et FEC. | ||||||||||
Kcp | 12,848 | a day ago | 165 | mit | C | |||||
:zap: KCP - A Fast and Reliable ARQ Protocol | ||||||||||
Gost | 11,480 | 4 | 5 | 13 days ago | 4 | March 24, 2021 | 230 | mit | Go | |
GO Simple Tunnel - a simple tunnel written in golang | ||||||||||
Dog Tunnel | 2,030 | a year ago | January 31, 2018 | 54 | mit | Go | ||||
p2p tunnel,(udp mode work with kcp,https://github.com/skywind3000/kcp) | ||||||||||
Fuso | 1,316 | 2 months ago | 11 | gpl-3.0 | Rust | |||||
一款体积小, 快速, 稳定, 高效, 轻量的内网穿透, 端口转发工具 支持多连接,级联代理,传输加密 (A small volume, fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption) | ||||||||||
Gost | 1,066 | 1 | 2 days ago | 6 | March 15, 2022 | 38 | mit | Go | ||
GO Simple Tunnel - a simple tunnel written in golang | ||||||||||
Xkcptun | 408 | 3 years ago | 17 | gpl-3.0 | C | |||||
xkcptun is kcp tunnel for OpenWRT&LEDE, implemented in c language | ||||||||||
Nysocks | 71 | 4 years ago | 26 | September 27, 2018 | bsd-3-clause | C++ | ||||
Nysocks binds kcp and libuv to provide an aggressive tcp tunnel in nodejs. | ||||||||||
Ap Kcp | 65 | 2 years ago | mit | Rust | ||||||
用于穿透恶劣网络环境的高性能可靠传输协议,基于 KCP 优化和修改,使用 Rust 实现 | ||||||||||
P2p_tun | 31 | 3 years ago | 2 | June 03, 2020 | 1 | Go | ||||
a p2p tunnel based on kcptun |
xkcptun主要应用于LEDE,openwrt中,其原理如图:
xkcptun依赖libevent2
安装libevent2库后 (apt-get install libevent-dev)
git clone https://github.com/liudf0716/xkcptun.git
cd xkcptun
mkdir build && cd build
cmake .. (camke -DBUILD_STATIC_LINK=yes .. //静态链接)
make
生成xkcp_client, xkcp_server, xkcp_spy
编译及安装请参考 openwrt-xkcptun
为方便理解和使用,我们将使用场景放在同一台pc上,pc使用ubuntu系统,我们通过xkcptun来访问本机的http server
假设pc的 eth0 ip 为 192.168.199.18, http server的监听端口为80端口,xkcptun的server和client配置分别如下:
server.json 如下:
{
"localinterface": "eth0",
"localport": 9089,
"remoteaddr": "192.168.199.18",
"remoteport": 80,
"key": "14789632a",
"crypt": "none",
"mode": "fast3",
"mtu": 1350,
"sndwnd": 1024,
"rcvwnd": 1024,
"datashard": 10,
"parityshard": 3,
"dscp": 0,
"nocomp": true,
"acknodelay": false,
"nodelay": 0,
"interval": 20,
"resend": 2,
"nc": 1,
"sockbuf": 4194304,
"keepalive": 10
}
client.json如下:
{
"localinterface": "eth0",
"localport": 9088,
"remoteaddr": "192.168.199.18",
"remoteport": 9089,
"key": "14789632a",
"crypt": "none",
"mode": "fast3",
"mtu": 1350,
"sndwnd": 1024,
"rcvwnd": 1024,
"datashard": 10,
"parityshard": 3,
"dscp": 0,
"nocomp": true,
"acknodelay": false,
"nodelay": 0,
"interval": 20,
"resend": 2,
"nc": 1,
"sockbuf": 4194304,
"keepalive": 10
}
分别运行:
xkcp_server -c server.json -f -d 7
xkcp_client -c client.json -f -d 7
[注] 以上命令都是运行在debug和前台运行模式,正式部署的时候要把 -f 去掉, -d 0 如: xkcp_server -c server.json -d 0
curl http://192.168.199.18:9088
其执行效果与curl http://192.168.199.18 等同
xkcp_spy -h 192.168.199.18 -s -t status
查看服务器端的情况
xkcp_spy -h 192.168.199.18 -c -t status
查看客户端的情况
Compatible with kcptun
欢迎大家给本项目提供意见和贡献,提供意见的方法可以在本项目的Issues提,更加欢迎给项目提PULL REQUEST,具体提交PR的方法请参考CONTRIBUTING
QQ群 : 331230369