美文网首页
Mac内网穿透

Mac内网穿透

作者: 老鱼_chaimyu | 来源:发表于2019-05-21 00:13 被阅读0次

本地机上有个网站,想让外网的人访问测试,又不想部署到外面服务上,开始想到使用“花生壳”,结果不支持Mac系统。

ngrok

下载:https://ngrok.com/download

文档:https://ngrok.com/docs

找到一个据说能做内网穿透的软件,虽然看起来是国外的,不用自己服务的话,可能会慢啊,先试试吧!

下载解压到指定目录,执行如下:

Chaim:tools Chaim$ ./ngrok 
NAME:
   ngrok - tunnel local ports to public URLs and inspect traffic

DESCRIPTION:
    ngrok exposes local networked services behinds NATs and firewalls to the
    public internet over a secure tunnel. Share local websites, build/test
    webhook consumers and self-host personal services.
    Detailed help for each command is available with 'ngrok help <command>'.
    Open http://localhost:4040 for ngrok's web interface to inspect traffic.

EXAMPLES:
    ngrok http 80                    # secure public URL for port 80 web server
    ngrok http -subdomain=baz 8080   # port 8080 available at baz.ngrok.io
    ngrok http foo.dev:80            # tunnel to host:port instead of localhost
    ngrok http https://localhost     # expose a local https server
    ngrok tcp 22                     # tunnel arbitrary TCP traffic to port 22
    ngrok tls -hostname=foo.com 443  # TLS traffic for foo.com to port 443
    ngrok start foo bar baz          # start tunnels from the configuration file

VERSION:
   2.3.29

AUTHOR:
  inconshreveable - <alan@ngrok.com>

COMMANDS:
   authtoken    save authtoken to configuration file
   credits  prints author and licensing information
   http     start an HTTP tunnel
   start    start tunnels by name from the configuration file
   tcp      start a TCP tunnel
   tls      start a TLS tunnel
   update   update ngrok to the latest version
   version  print the version string
   help     Shows a list of commands or help for one command

实际执行如下:

Chaim:tools Chaim$ ./ngrok http 127.0.0.1:3000

ngrok by @inconshreveable                                                                (Ctrl+C to quit)
                                                                                                         
Session Status                online                                                                     
Session Expires               7 hours, 59 minutes                                                        
Version                       2.3.29                                                                     
Region                        United States (us)                                                         
Web Interface                 http://127.0.0.1:4040                                                      
Forwarding                    http://fd6562ef.ngrok.io -> http://127.0.0.1:3000                          
Forwarding                    https://fd6562ef.ngrok.io -> http://127.0.0.1:3000                         
                                                                                                         
Connections                   ttl     opn     rt1     rt5     p50     p90                                
                              0       0       0.00    0.00    0.00    0.00                               

在浏览器里访问“http://fd6562ef.ngrok.io” 就可以访问本地“http://127.0.0.1:3000” 了,不过的确很慢!这个域名每次启动都会变,临时用下还好,免费的能要求啥呢!

参考

https://blog.csdn.net/u011886447/article/details/73268407

相关文章

  • mac内网穿透

    我们在做开发时,不想购买服务器,只想搭建我们本地的服务器,我们搭建的本地服务器只能供我们自己电脑的浏览器访问,或者...

  • Mac内网穿透

    本地机上有个网站,想让外网的人访问测试,又不想部署到外面服务上,开始想到使用“花生壳”,结果不支持Mac系统。 n...

  • 内网穿透(mac)

    我使用的是:ngrok1.下载ngrok:https://ngrok.com/download[https://n...

  • Ngrok 入门到入门 (内网穿透 - Mac)

    Ngrok 入门到入门 (内网穿透 - Mac) 1.下载官方工具 【下载地址:】https://ngrok.co...

  • 钉钉内网穿透vs花生壳vsNATAPP

    目前常用的内网穿透有3种:钉钉内网穿透,花生壳内网穿透,natapp内网穿透。下面我们来对比一下他们的优略以及使用...

  • 内网端口穿透

    内网端口穿透 内网穿透在实际生活中,我们经常会在内网里部署服务让外网访问内网应用。这里我用的花生壳免费的内网穿透。...

  • Sunny-Ngrok实现自定义域名内网穿透

    内网穿透 + Sunny-Ngrok + 自定义域名 1、内网穿透 1.1 内网IP:内网IP,过多官方的解释这里...

  • 自建NAS系列04——网络服务

    内网穿透 花生壳 公网服务器与frp 内网穿透 内网穿透就是将自己内网中的服务映射到公网ip,达到公网可访问的目的...

  • frp内网穿透

    1-内网穿透 内网穿透即内网映射,可以将局域网变公网,从而可以让外网访问本地局域网内的服务。内网穿透原理技术有这么...

  • sunny-ngrok 内网穿透

    sunny-ngrok 内网穿透是基于 ngrok 的一个内网穿透服务,提供免费的用于开发的内网穿透隧道。 接下来...

网友评论

      本文标题:Mac内网穿透

      本文链接:https://www.haomeiwen.com/subject/hqurzqtx.html