Linux 端口映射工具:rinetdplus

jopen 9年前

介绍 rinetdplus 之前,先介绍 rinetd。rinetd 是 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.

项目主页:http://www.open-open.com/lib/view/home/1432434047049