您好,欢迎来到花图问答。
搜索
您的当前位置:首页MAC下使用免费实现内网穿透

MAC下使用免费实现内网穿透

来源:花图问答

一、环境

MacOS Mojava(此条件非必须)

二、

屏幕快照 2019-01-27 下午12.15.00.png

三、使用

1、下载之后直接解压得到 一个 ngrok 文件

2、直接终端运行

➜ chmod a+x ngrok

即可修改权限。

3、开启服务

➜ ./ngrok http localhost:8080

4、结果如下:


屏幕快照 2019-01-27 下午12.19.44.png
http://8dfccac4.ngrok.io
https://8dfccac4.ngrok.io

四、问题

需要主要的是!!!!➜ 必须开启web服务

若没开启出现如下错误:

**Failed to complete tunnel connection**

The connection to [**https://8dfccac4.ngrok.io**](https://8dfccac4.ngrok.io/) was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address [**localhost:8080**](http://localhost:8080/).

Make sure that a web service is running on [**localhost:8080**](http://localhost:8080/) and that it is a valid address.

The error encountered was: **dial tcp** [**::1**]**:8080: getsockopt: connection refused**

Copyright © 2019- huatuowenda.com 版权所有 湘ICP备2023022495号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务