asp.net核心应用程序的ngrok和https隧道

al.*_*val 4 https ngrok asp.net-core

从Visual Studio启动时,ASP.NET CORE应用程序的地址为https:// localhost:44313 /。要测试性能,您需要建立一条隧道。我使用ngrok和命令:

ngrok http -host-header = localhost 44313

但这不适用于https。

谁能分享一个可行的例子?

Mar*_*cać 7

使用 ngrok 版本 2.3.29 并添加了 authtoken(不确定 authtoken 是否影响结果,我刚刚按照在线安装指南添加了它)。

这个命令对我有用:

ngrok http https://localhost:{your-app-port} -host-header=localhost:{your-app-port}
Run Code Online (Sandbox Code Playgroud)

与现有答案的区别:我将 localhost:port 传递给 -host-header

与您的问题不同:我使用ngrok http https://localhos:port而不是ngrok http http://localhos:port(http s而不是http)


al.*_*val 6

  1. 下载当前版本的ngrok
  2. 注册并获得令牌:https//dashboard.ngrok.com/auth
  3. 运行ngrok并使用以下命令设置令牌:ngrok authtoken YOUR_AUTHTOKEN
  4. 创建一个隧道: ngrok http -host-header = localhost https:// localhost:44313

更新2019年4月11日