无公网ip远程访问调试-内网穿透工具

🍀

# 下载
git clone https://github.com/open-dingtalk/pierced.git

# http穿透-运行命令 ./ding -config=./ding.cfg -subdomain=域名前缀 端口
# mac版
cd mac_64
chmod +x ./ding
./ding -config=./ding.cfg -subdomain=test 8080
# win版
cd windows_64
chmod +x ./ding
./ding -config ding.cfg -subdomain test 8080

命令参数说明:

参数 说明 config 内网穿透的配置文件,按命令照示例固定为钉钉提供的./ding.cfg,无需修改。 subdomain 您需要使用的域名前缀,该前缀将会匹配到“vaiwan.com”前面,例如你的 subdomain 是 test,启动工具后会将 test.vaiwan.com 映射到本地。 端口 您需要代理的本地服务 http-server 端口,例如你本地端口为 8080 等。

启动完客户端后,你访问 http://test.vaiwan.com/xxxxx 都会映射到 http://127.0.0.1:8080/xxxxx。

经验分享 程序员 微信小程序 职场和发展