All Projects → liudf0716 → Xkcptun

liudf0716 / Xkcptun

Licence: gpl-3.0
xkcptun is kcp tunnel for OpenWRT&LEDE, implemented in c language

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Xkcptun

Openmptcprouter
OpenMPTCProuter is an open source solution to aggregate multiple internet connections using Multipath TCP (MPTCP) on OpenWrt
Stars: ✭ 652 (+55.61%)
Mutual labels:  shadowsocks, openwrt, lede
Libuhttpd
A very flexible, lightweight and fully asynchronous HTTP server library based on libev and http-parser for Embedded Linux.
Stars: ✭ 302 (-27.92%)
Mutual labels:  openwrt, lede, embedded
Openwrt Shadowsocks
Shadowsocks-libev for OpenWrt/LEDE
Stars: ✭ 3,091 (+637.71%)
Mutual labels:  openwrt, lede
Openclash
A Clash Client For OpenWrt
Stars: ✭ 4,680 (+1016.95%)
Mutual labels:  shadowsocks, openwrt
Ansible Openwisp2
Ansible role that installs and upgrades OpenWISP.
Stars: ✭ 403 (-3.82%)
Mutual labels:  openwrt, lede
gost
GO Simple Tunnel - a simple tunnel written in golang
Stars: ✭ 8,395 (+1903.58%)
Mutual labels:  shadowsocks, kcp
YAOF
OpenWrt for Nanopi R2C/R2S/R4S/X86
Stars: ✭ 1,442 (+244.15%)
Mutual labels:  openwrt, shadowsocks
Openwrt Shadowsocksr Libev Full
ShadowsocksR-libev-full for OpenWrt
Stars: ✭ 406 (-3.1%)
Mutual labels:  openwrt, lede
firmware-core
nodewatcher firmware.
Stars: ✭ 26 (-93.79%)
Mutual labels:  openwrt, lede
Asuswrt Merlin Transparent Proxy
transparent proxy base on ss, v2ray, ipset, iptables, chinadns on asuswrt merlin.
Stars: ✭ 367 (-12.41%)
Mutual labels:  shadowsocks, openwrt
Actions Openwrt
A template for building OpenWrt with GitHub Actions | 使用 GitHub Actions 云编译 OpenWrt
Stars: ✭ 4,742 (+1031.74%)
Mutual labels:  openwrt, lede
Netjsonconfig
Network configuration management library based on NetJSON DeviceConfiguration
Stars: ✭ 372 (-11.22%)
Mutual labels:  openwrt, lede
scale-network
SCaLE's on-site expo network configurations, wifi, tooling, and scripts
Stars: ✭ 13 (-96.9%)
Mutual labels:  openwrt, lede
scal
System Configuration Abstraction Layer
Stars: ✭ 14 (-96.66%)
Mutual labels:  openwrt, lede
openwrt-dnsmasq-extra
Anti Pollution/ADs DNS for OpenWrt/LEDE
Stars: ✭ 34 (-91.89%)
Mutual labels:  openwrt, lede
gost
GO Simple Tunnel - a simple tunnel written in golang
Stars: ✭ 154 (-63.25%)
Mutual labels:  shadowsocks, kcp
Openwisp Controller
Network and WiFi controller: provisioning, configuration management and updates, (pull via openwisp-config or push via SSH), x509 PKI management and more. Mainly OpenWRT, but designed to work also on other systems.
Stars: ✭ 377 (-10.02%)
Mutual labels:  openwrt, lede
ansible-nnxx
Ansible configurations for the nnxx infrastructure
Stars: ✭ 11 (-97.37%)
Mutual labels:  openwrt, lede
OpenWrts
OPENWRT 固件(Raspberry Pi4B/3B+,NanoPi R4S,Orange Pi R1Plus,x86) 依源码更新自动编译
Stars: ✭ 100 (-76.13%)
Mutual labels:  openwrt, lede
Zerotier Openwrt
A OpenWrt package for ZeroTier One - Pull requests are welcome!
Stars: ✭ 326 (-22.2%)
Mutual labels:  openwrt, lede

xkcptun

Build Status Powered license PRs Welcome Issue Welcome OpenWRT KunTeng

xkcptun 基于kcp和libevent2库,用c语言实现的kcptun

xkcptun主要应用于LEDE,openwrt中,其原理如图:

kcptun

Compile

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

参考文档

1, 安装libjson c的问题

2, bbr vs kcp 优化http下载性能对比报告

3, 如何在centos上部署xkcptun server

OpenWrt

编译及安装请参考 openwrt-xkcptun

QuickStart

为方便理解和使用,我们将使用场景放在同一台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

查看客户端的情况

Todo

Compatible with kcptun kcptun

How to contribute our project(给本项目做贡献)

欢迎大家给本项目提供意见和贡献,提供意见的方法可以在本项目的Issues提,更加欢迎给项目提PULL REQUEST,具体提交PR的方法请参考CONTRIBUTING

Contact me

QQ群 : 331230369

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].