ngrok

mac 版本使用ngrok,方便联调,本地内网映射为外网

匿名 (未验证) 提交于 2019-12-03 00:20:01
下载ngrok的压缩包到本地 。官网地址: https://ngrok.com/ A) 第一步下载压缩文件; B) 第二步解压,unzip ngrok.zip的路径地址(路径根据实际情况填写) C) 第三部authtoken后面的就是你账号自动生成的token D) 第四部help 验证是否配置成功 E) 第五部直接放入你要映射的本地的地址 ./ngrok http localhost:80(该端口号根据实际情况填写) 执行完2 E)后如果出现下图即表示成功 测试映射是否成功 在浏览器中输入映射的地址 出现如下图即成功 如果外网进行访问的话,直接给出这个链接即可。如果是联调测试,直接在服务器管理上添加一个反向代理路径就可以啦 这样测试就方便多多啦! invalid host header ) 按照网上的添加disableHostCheck各种不行 发现按照官方的 ./ngrok http 80 这样一直会报这个错 无意中看到 ./ngrok http localhost:80 写法 然后尝试了一下 顺利映射成功。 devServer : { disableHostCheck : true , } 总结:楼主写这篇文章主要为了记录学习到的新技术,熟话说好记性不如烂笔头嘛。更多的还是为了和广大的技术友们分享喽!说不定有些朋友就用到啦。 文章来源: mac 版本使用ngrok,方便联调

npm run start前的那些坑

家住魔仙堡 提交于 2019-12-02 23:27:49
先康康版本,比如 node -v win10 / node v10.16.2→v12.13.0 / npm 6.9.0 / yarn 1.17.3 pngquant failed to build, make sure that libpng-dev is installed. 参考这里 ←上次ok,这次还是不行 然后这里 ←卡在了其他地方。Could not install Visual Studio Build Tools. 这位好萌啊(悲) ngrok: Command failed. 参考这里 gifsicle pre-build test failed 咋办?突然想起,我好像没……翻。 我完全明白了…吗?并没有 翻过gfw然后好像npm install完成了。 然而start后 我仏了!删掉文件夹和重装 单独装下ngrok试试 我疯了! 按这个清理康康 ,再来一次! 因为 它页面 上写着2.3.0所以这次指定版本装吧 yarn add ngrok@2.3.0 把exp也装了 yarn add exp 结果,到Building the Webpack DLL时巨大多报错 算了,直接yarn install试试吧 好勒,我是不是多此一举了 再来一次! ???(看起来是有些没装全……?) 再来一次。这次把package.json还原,package-lock.js和yarn

微信开发环境搭建

♀尐吖头ヾ 提交于 2019-12-02 21:10:03
一、微信开发环境搭建    工欲善其事,必先利其器。要做微信公众号开发,那么要先准备好两样必不可少的东西:   1、要有一个 用来 测试的公众号。   2、用来 调式代码的开发环境 。 1.1、注册测试公众号   微信公众号分为服务号、订阅号、企业号,订阅号可以个人申请,服务号和企业号要有企业资质才可以。 我们所说的微信公众号开发指的是订阅号和服务号。   关于订阅号和服务器的区别,官方是这样解释的   服务号 :主要偏向于服务交互(功能类似12315,114,银行,提供绑定信息,服务交互),每月可群发4条消息;服务号 适用人群: 媒体、企业、政府或其他组织。   订阅号 :主要偏向于为用户传达资讯,(功能类似报纸杂志,为用户提供新闻信息或娱乐趣事),每天可群发1条消息;订阅号 适用人群 :个人、媒体、企业、政府或其他组织。   个人订阅号有一些接口是没有权限的,也就是说个人订阅号无法调用一些高级的权限接口,下图就是一个我的个人订阅号所具备权限列表,如下图所示:  而一些高级接口,如生成二维码、网页授权、自定义菜单、微信支付这样的接口权限个人订阅号是没有调用权限的,如上图红色框起来的那些接口,个人订阅号都无法调用。   幸运的是, 微信公众平台提供了测试公众账号 ,测试公众号的注册地址为: http://mp.weixin.qq.com/debug/cgi-bin/sandbox

View random ngrok URL when run in background

给你一囗甜甜゛ 提交于 2019-12-02 20:19:28
When I start an ngrok client with ./ngrok tcp 22 it runs in the foreground and I can see the randoming generated forwarding URL, such as tcp://0.tcp.ngrok.io:12345 -> localhost:22 . If I run in it the background with ./ngrok tcp & , I can't find any way to see the forwarding URL. How can I run ngrok in the background and still see the URL? Abe Petrillo There are a couple of ways. You can either: 1) Visit localhost:4040/status in your browser to see a bunch of information, or 2) Use curl to hit the API: localhost:4040/api/tunnels This little Python (2.7) script will call the ngrok API and print

Unable to ssh into remote Linux by ngrok

南楼画角 提交于 2019-12-02 17:34:02
The remote Linux computer is in an internal network and has no public IP address. So I installed ngrok. ngrok tcp 22 ngrok by @inconshreveable (Ctrl+C to quit) Tunnel Status online Version 2.0.19/2.0.17 Web Interface http://127.0.0.1:4040 Forwarding tcp://0.tcp.ngrok.io:36428 -> localhost:22 Connections ttl opn rt1 rt5 p50 p90 0 0 0.00 0.00 0.00 0.00 I checked that sshd is running. At the local PC, I tried ssh myuser@ngrok.com -p36428 which gave rise to ssh: connect to host ngrok.com port 36428: Connection refused You are connecting to the wrong destination address. The command should be ssh

ngrok command not found

社会主义新天地 提交于 2019-12-02 16:09:17
I'm trying to install ngrok (which I've been using for a while on Windows with no issues) on my 1 week old yosemite and these are the steps I've followed so far. Downloaded ngrok from here https://ngrok.com/download . Unziped the file and copied the Unix Executable File into application. Now from what I understand I just need to open the terminal, move inside the application folder and write ngrok http 80 . The result of this is "command not found". I've even signed up at the ngrok website and run from terminal the command ./ngrok authtoken "blablabla" and the result is "No such file or

How to generate fixed url with ngrok

心已入冬 提交于 2019-12-02 15:04:19
I am working on facebook messenger. Facebook app only accept one url for webhook but ngrock is generating new url every time. now i am unable to test my app because of webhook url changed. Probably, it is not the best option for you but I started using localtunnel instead of ngrok . An installation and run flow is very simple: npm install -g localtunnel lt --port <your localhost port> --subdomain youruniquesubdomain Then I can go to my http://youruniquesubdomain.localtunnel.me That's it! An Incredible Update I've found Serveo just now! And it is totally incredible! No installation, no signup!

ngrok小米球的使用

荒凉一梦 提交于 2019-12-02 14:36:06
一:在ngrok官网下载ngrok ,ngrok官网: https://ngrok.com/ 二:进入ngrok文件层,在cmd中使用命令:ngrok http 端口号 三:然后便可通过域名访问网页 : 来源: https://blog.csdn.net/weixin_44871934/article/details/102775259

Invalid Host Header when ngrok tries to connect to React dev server

陌路散爱 提交于 2019-12-02 13:50:40
I'm trying to test my React application on a mobile device. I'm using ngrok to make my local server available to other devices and have gotten this working with a variety of other applications. However, when I try to connect ngrok to the React dev server, I get the error: Invalid Host Header I believe that React blocks all requests from another source by default. Any thoughts? im encountering a similar issue and found two solutions that work as far as viewing the application directly in a browser ngrok http 8080 -host-header="localhost:8080" ngrok http --host-header=rewrite 8080 obviously

微信开发-内网穿透的方式

半城伤御伤魂 提交于 2019-12-02 08:50:08
什么是内网穿透 内网穿透 其实就是两台计算机都处于不同的局域网之中,外网与内网的计算机节点需要连接通信,那么就需要借助 内网穿透 技术来解决这个问题,也叫NAT穿透。 常见的内网穿透工具 1、Ngrok( https://natapp.cn/ ) ngrok 是一个反向代理,通过在公共端点和本地运行的 Web 服务器之间建立一个安全的通道,实现内网主机的服务可以暴露给外网。ngrok 可捕获和分析所有通道上的流量,便于后期分析和重放,所以ngrok可以很方便地协助服务端程序测试。 2、Natapp( https://www.ngrok.cc/ ) natapp 是 基于ngrok的国内收费内网穿透工具,类似花生壳,有免费版本,比花生壳好。免费版本:提供http,https,tcp全隧道穿透,随机域名/TCP端口,不定时强制更换域名/端口,自定义本地端口。 内网穿透工具有很多,在此处就不一一介绍了,本文将以Ngrok工具进行讲解,Natapp与其使用方法基本一致。 由于Natapp给出的域名会一直变化,所以建议使用Ngrok。 开启穿透之旅 1.第一步肯定是万年不变的 注册 2.注册登录成功后,点开 隧道管理-----开通隧道 ,点击购买免费的那个(如果花钱谁还用它 ^_^ ) 3.填写 隧道信息 ,填写完成后点击 确认添加 4.添加后即可在隧道管理下查看新添加的 免费隧道 5.