diff --git a/README.md b/README.md index ff7fd58..1d35885 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,16 @@ # remote_bind 将本地服务映射到公网 + +## example +在服务器 `124.221.61.142` 的 `1234` 端口上运行server,并设置密码为 `passwd` : +``` +$ ./server 1234 passwd +server started on 124.221.61.142:1234 +``` + +在局域网主机上运行客户端,将 `127.0.0.1:3389` 服务映射到 `124.221.61.142:13389` 上: +``` +$ ./client 124.221.61.142:1234 13389 passwd 127.0.0.1:3389 +Connecting to 124.221.61.142:1234 +连接服务器成功! 服务 127.0.0.1:3389 已暴露在公网 124.221.61.142:13389 +```