Linux 端口映射工具:rinetdplus

jopen 9年前發布 | 15K 次閱讀 Linux rinetdplus

介紹 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.baiduhome.net/lib/view/home/1432434047049

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!