linux - ngrok 中的错误 - 无法完成隧道连接

标签 linux localhost ngrok

所以我只是想创建一些网络钓鱼网站来尝试一下,但现在每当我尝试通过 ngrok 创建一个网站或启动 ngrok ./ngrok http 80 然后访问它向我显示的网站时这个-

Failed to complete tunnel connection
The connection to https://xxx.xxx.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.
Make sure that a web service is running on localhost:80 and that it is a valid address the error encountered was: dial tcp [::1]:80:Connect:connection refused.

每当我访问它们时,谷歌都会向它们显示警告
有什么建议吗?

最佳答案

您应该在端口 80 上创建本地服务器。使用phppython创建本地服务器。

PHP

~$ php -S localhost:80

Python

~$ python -m http.server 80

启动本地服务器后打开一个新的终端 session 并启动ngrok

~$ ./ngrok  http 80

您也可以使用 ssh 创建链接。请确保您已安装 ssh。

~$  php -S localhost:80 | ssh -R 80:localhost:80 ssh.localhost.run

~$  python -m http.server 80 | ssh -R 80:localhost:80 ssh.localhost.run

顺便说一句,chrome 会自动检测网络钓鱼页面。

关于linux - ngrok 中的错误 - 无法完成隧道连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70503113/

相关文章:

linux - NUMA 感知缓存对齐内存分配

php - 为现有网站创建测试环境

PHP 套接字 - 只能从本地主机连接(端口转发问题?)

localhost - 在Vagrant框上访问ngrok Web界面

node.js - 使用 ngrok 和 Bot 框架未找到 404

c++ - 如何在 cout 上使用 isatty(),或者我可以假设 cout == 文件描述符 1?

linux - 尝试添加 providerAccount 时 Yodlee Y400 错误在 Windows 上有效,但在 Linux 上很少

linux - 如何从 svn 状态循环 linux 中的文件

localhost - 在本地主机上使用 reCAPTCHA

mamp - ngrok 不适用于 mamp