Timetombs

泛义的工具是文明的基础,而确指的工具却是愚人的器物

66h / 116a
,更新于 2024-04-06T22:06:24Z+08:00 by   35f4f88

[工具] rinetd

版权声明 - CC BY-NC-SA 4.0

1 概述

c语言开发的一个端口转发转发工具,非常小巧方便,比iptables方便使用。或者像是在macOS这种不支持转发到remote ip的系统下。

windows 下有内置的netsh interface portproxy add v4tov4 listenport=80 connectaddress=192.168.2.201 connectport=80可以使用。

# 查看帮助
rinetd -h

# 前台运行(默认运行在background),并且指定配置文件
rinetd --foreground --conf-file rinetd.conf
logfile /lnh/_cache/_rinetd/rinetd.log
#127.0.0.1 80   192.168.2.201 80
127.0.0.1 2375 192.168.2.201 2375
127.0.0.1 3306 192.168.2.201 3306
127.0.0.1 6379 192.168.2.201 6379

1.1 macOS 安装

brew install rinetd

或者源码自己编译安装。

git clone https://github.com/samhocevar/rinetd.git
chmod +x bootstrap
./bootstrap
./configure
make

然后你可以在当前目录得到一个rinetd可执行程序。

2 参考

官网:http://www.rinetd.com/
源码:https://github.com/samhocevar/rinetd

上一篇 : [工具] caddy
下一篇 : [工具] pc