rinetdplusLinux 端口映射工具

联合创作 · 2023-10-01 10:29

介绍 rinetdplus 之前,先介绍 rinetdrinetd 是 Linux 下的端口映射工具,实现端口映射/转发/重定向。简单好用。

“Redirects TCP connections from one IP address and port to another. rinetd is a single-process server which handles any number of connections to the address/port pairs specified in the file /etc/rinetd.conf. Since rinetd runs as a single process using nonblocking I/O, it is able to redirect a large number of connections without a severe impact on the machine. This makes it practical to run TCP services on machines inside an IP masquerading firewall”.

rinetd 是用 select 来实现 多路I/O机制。

rinetdplus 所要做的,是在 rinetd 基础上,用 epoll 来替代 select。它使用的是 redis 封装的 一个简单库 ae。

附:README.md

# rinetdplus
rinetd + ae from redis

1 what is rinetd? see http://www.boutell.com/rinetd/

2 ae is "A simple event-driven programming library" from redis

3 what rinetdplus do ?
rinetd use function "select", rinetdplus replace it with "epoll" (ae).Just it.

浏览 21
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报