All Projects → gnbdev → gnb_udp_over_tcp

gnbdev / gnb_udp_over_tcp

Licence: AGPL-3.0 license
gnb_udp_over_tcp 是一个为GNB开发的通过tcp链路中转UDP分组转发的服务

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to gnb udp over tcp

packetdrill
packetdrill with UDPLite and SCTP support and bug fixes for FreeBSD
Stars: ✭ 37 (+15.63%)
Mutual labels:  freebsd, openbsd, tcp, udp
opengnb
GNB is open source de-centralized VPN to achieve layer3 network via p2p with the ultimate capability of NAT Traversal.GNB是一个开源的去中心化的具有极致内网穿透能力的通过P2P进行三层网络交换的VPN。
Stars: ✭ 440 (+1275%)
Mutual labels:  freebsd, openbsd, tcp, udp
Gnb
GNB is open source de-centralized VPN to achieve layer3 network via p2p with the ultimate capability of NAT Traversal.GNB是一个开源的去中心化的具有极致内网穿透能力的通过P2P进行三层网络交换的VPN。
Stars: ✭ 225 (+603.13%)
Mutual labels:  freebsd, openbsd, tcp, udp
AndroidNetMonitor
This project aims to collect and analyze traffic information of Android.(采集手机发送和接收的报文简要信息,并且根据socket记录每个报文对应哪个手机app)
Stars: ✭ 25 (-21.87%)
Mutual labels:  socket, tcp, udp
T Io
解决其它网络框架没有解决的用户痛点,让天下没有难开发的网络程序
Stars: ✭ 1,331 (+4059.38%)
Mutual labels:  socket, tcp, udp
Goproxy
🔥 Proxy is a high performance HTTP(S) proxies, SOCKS5 proxies,WEBSOCKET, TCP, UDP proxy server implemented by golang. Now, it supports chain-style proxies,nat forwarding in different lan,TCP/UDP port forwarding, SSH forwarding.Proxy是golang实现的高性能http,https,websocket,tcp,socks5代理服务器,支持内网穿透,链式代理,通讯加密,智能HTTP,SOCKS5代理,黑白名单,限速,限流量,限连接数,跨平台,KCP支持,认证API。
Stars: ✭ 11,334 (+35318.75%)
Mutual labels:  socket, tcp, udp
Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+13712.5%)
Mutual labels:  socket, tcp, udp
Async Sockets Cpp
Simple thread-based asynchronous TCP & UDP Socket classes in C++.
Stars: ✭ 127 (+296.88%)
Mutual labels:  socket, tcp, udp
Go Netstat
A netstat implementation written in Go
Stars: ✭ 121 (+278.13%)
Mutual labels:  socket, tcp, udp
Kalm.js
The socket manager
Stars: ✭ 155 (+384.38%)
Mutual labels:  socket, tcp, udp
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (+575%)
Mutual labels:  socket, tcp, udp
Ssokit Qmake
A Simple & Strong Tool for TCP&UDP Debug
Stars: ✭ 231 (+621.88%)
Mutual labels:  socket, tcp, udp
Godsharp.socket
An easy-to-use .NET socket server and client.
Stars: ✭ 35 (+9.38%)
Mutual labels:  socket, tcp, udp
Elixir Socket
Socket wrapping for Elixir.
Stars: ✭ 642 (+1906.25%)
Mutual labels:  socket, tcp, udp
Yasio
A multi-platform support c++11 library with focus on asio (asynchronous socket I/O) for any client application.
Stars: ✭ 483 (+1409.38%)
Mutual labels:  socket, tcp, udp
Socket
Non-blocking socket and TLS functionality for PHP based on Amp.
Stars: ✭ 122 (+281.25%)
Mutual labels:  socket, tcp, udp
ddos
Simple dos attack utility
Stars: ✭ 36 (+12.5%)
Mutual labels:  socket, tcp, udp
Netcat
💻 Netcat client and server modules written in pure Javascript for Node.js.
Stars: ✭ 315 (+884.38%)
Mutual labels:  socket, tcp, udp
Ohsce
PHP HI-REL SOCKET TCP/UDP/ICMP/Serial .高可靠性PHP通信&控制框架SOCKET-TCP/UDP/ICMP/硬件Serial-RS232/RS422/RS485 AND MORE!
Stars: ✭ 206 (+543.75%)
Mutual labels:  socket, tcp, udp
Zapret
Обход DPI в linux
Stars: ✭ 1,148 (+3487.5%)
Mutual labels:  freebsd, openbsd, openwrt

gnb_udp_over_tcp

GNB是一个开源的去中心化的具有极致内网穿透能力的通过P2P进行三层网络交换的VPN。

GNB节点间通过UDP协议传输数据,在一些网络环境下的路由器/防火墙会对UDP分组实施QOS策略,因此通过tcp链路转发GNB数据是不需要改动GNB通讯协议又可以提升GNB网络适应能力的一个办法。

gnb_udp_over_tcp 是一个为GNB开发的通过tcp链路中转UDP分组转发的服务。

通过 gnb_udp_over_tcp 中继 GNB 数据

演示环境

远端GNB节点 ip地址 为 192.168.1.25 GNB UDP 端口 9025 GNB TUN ip 10.1.0.25 远端 GNB 配置文件不需要调整

中继服务器 ip地址为 192.168.1.11

[gnb_1010]
    |
   udp 
    |
[udp_over_tcp udp:127.0.0.1:5001]    (./gnb_udp_over_tcp -u -l 5001 192.168.1.11 6000)
    |
   tcp
    |
[udp_over_tcp tcp:192.168.1.11:6000] (./gnb_udp_over_tcp -t -l 6000 192.168.1.25 9025)
    |
   udp 
    |
[gnb_1025  udp:192.168.1.25:9025]

在 192.168.1.11 上执行

./gnb_udp_over_tcp -t -l 6000 192.168.1.25 9025

本地ip地址为 192.168.1.10 GNB TUN ip 10.1.0.10

本地 GNB conf/1010/address.conf 内容为

n|1025|127.0.0.1|5001

address.conf中不要配置 i 类型的GNB节点

在 192.168.1.10 上执行

./gnb_udp_over_tcp -u -l 5001 192.168.1.11 6000

启动本地的GNB节点后 ping 10.1.0.25 检验是否能够ping通。

gnb_udp_over_tcp可以为其他基于UDP协议的服务中转数据

用nc作本地测试演示

[netcat]                          (nc -u 127.0.0.1 5001)
    |
   udp
    |
[udp_over_tcp udp:127.0.0.1:5001] (./gnb_udp_over_tcp -u -l 5001 127.0.0.1 6000)
    |
   tcp
    |
[udp_over_tcp tcp:127.0.0.1:6000] (./gnb_udp_over_tcp -t -l 6000 127.0.0.1 7000)
    |
   udp
    |
[netcat udp:127.0.0.1:7000]       (nc -u -l 7000)

Step1

用 nc 监听 7000 udp 端口

nc -u -l 7000

Step2

启动 gnb_udp_over_tcp 的 tcp端: 监听 tcp 6000 端口,每个接入该端口的tcp链路将建立起一个udp socket构成一个channel,tcp链路收到的报文发往 127.0.0.1 的 UDP 7000端口,从udp端收到的数据将发往tcp链路的另一端。 gnb_udp_over_tcp的tcp端可以同时接入多个tcp连接并且转发到同一个目的地址的udp端口。

./gnb_udp_over_tcp -t -l 6000 127.0.0.1 7000

Step3

启动 gnb_udp_over_tcp 的 udp端: 监听 udp 5001 端口,与 127.0.0.1 tcp 端口 6000 建立tcp链路,udp 端收到的数据发往tcp链路的另一端,从tcp链路收到的数据发往udp端。

./gnb_udp_over_tcp -u -l 5001 127.0.0.1 6000

Step4

用 nc 访问 127.0.0.1 的 5001 udp 端口,检验数据是否被成功转发。

nc -u 127.0.0.1 5001

免责声明

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