/m_kcptun

[DEPRECATE] A Secure Tunnel Base on KCP with N:M Multiplexing, multi-UDP path, support Linux/MacOS/FreeBSD/Window

Primary LanguageC++MIT LicenseMIT

Powered MIT licensed Build Status

DEPRECATE

suggest BBR congestion control algorithm instead.

About

m_kcptun was a cross platform secure TCP tunnel with M:N multiplexing base on KCP, m_net and m_foundation.

Support Linux/MacOS/FreeBSD/Windows

Features

  • support RC4 crypto
  • support TCP multiplexing
  • support KCP tunning, simplify with fast mode
  • support Reed-Solomon erasure codes, default RS(11, 2)
  • support multiple UDP transport path
  • little memory footsprint
  • using kqueue/epoll/select underlying

QuickStart

Download precompiled Release.

Compile & Running

  1. in MacOS/Linux, first compile the source
# git clone https://github.com/lalawue/m_kcptun.git
# cd m_kcptun
# git submodule update --init --recursive
# make release

in Windows, using VS2017 under vc dir, the .vcxproj just ready for client side.

in FreeBSD, using gmake.

  1. run remote & local
# ./local_kcp.out  -l 'TCP_LOCAL_IP:6782' -r 'KCP_SERVER_IP:3234' -fast 3 -key '65423187'  # in local
# ./remote_kcp.out -l 'KCP_SERVER_IP:3234' -r 'TCP_REMOTE_IP:6783' -fast 3 -key '65423187' # in server

it will establish a TCP <-> UDP(KCP) <-> TCP conneciton like this:

Local <-> Client (tcp_in:6782, udp_out:ANY) <-> Server (udp_in:3234, tcp_out:ANY) <-> Remote (tcp_in:6783)