3 Star 0 Fork 0

mirrors_fossasia / publiccode.asia

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
proxy.sh 375 Bytes
一键复制 编辑 原始数据 按行查看 历史
Kreijstal 提交于 2017-12-13 07:20 . Add signature adder (#87)
#!/bin/bash -e
if [ $# != 3 ]
then
echo "usage: $0 <src-port> <dst-host> <dst-port>"
exit 0
fi
TMP=`mktemp -d`
BACK=$TMP/pipe.back
SENT=$TMP/pipe.sent
RCVD=$TMP/pipe.rcvd
trap 'rm -rf "$TMP"' EXIT
mkfifo -m 0600 "$BACK" "$SENT" "$RCVD"
sed 's/^/ => /' <"$SENT" &
sed 's/^/<= /' <"$RCVD" &
nc -l -p "$1" <"$BACK" | tee "$SENT" | nc "$2" "$3" | tee "$RCVD" >"$BACK"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_fossasia/publiccode.asia.git
git@gitee.com:mirrors_fossasia/publiccode.asia.git
mirrors_fossasia
publiccode.asia
publiccode.asia
master

搜索帮助