端口转发
# socat端口转发
- 安装
apt install socat
- 编辑
vim /etc/systemd/system/socat.service
[Unit]
Description=Socat Service
After=network.target
[Service]
ExecStart=/usr/bin/socat TCP4-LISTEN:80,reuseaddr,fork TCP4:1.1.1.1:80
Restart=always
[Install]
WantedBy=multi-user.target
- 启动
systemctl enable socat && systemctl start socat
上次更新: 2025/03/22, 03:52:10