Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse Proxy: Ngrok - Introspected Tunnels to Localhost #301

Open
hhstore opened this issue Jun 25, 2021 · 5 comments
Open

Reverse Proxy: Ngrok - Introspected Tunnels to Localhost #301

hhstore opened this issue Jun 25, 2021 · 5 comments

Comments

@hhstore
Copy link
Owner

hhstore commented Jun 25, 2021

📖 Abstract:

  • ✅ 内网穿透方案: ngrok.

💯 Related:

内网穿透:

反向代理 & 负载均衡:

域名解析:

域名购买:

@hhstore
Copy link
Owner Author

hhstore commented Jun 25, 2021

ngrok - 本地(localhost) 透明代理

  • https://github.com/inconshreveable/ngrok
  • https://ngrok.com/
  • ⭐⭐⭐⭐⭐
  • 非常实用的开发者工具.
  • 用途: 解决本地 localhost+port, 启动的服务, 无法正常访问.
  • 常见于恶劣环境:
    • docker 容器服务 + 全局 VPN 等工具互相干扰导致.
    • 感谢 GFW, 导致开发者的本机网络环境比较复杂, 为了正常使用 Google, 不得不付出的代价.
    • 这给本地开发带来很多麻烦, build 的时候, install 被墙的 lib, 需要 VPN.
    • 服务启动后, 本地网络配置干扰, 需要关闭 VPN.
    • ... 重复这个无聊过程, 很浪费时间.
    • so, ngrok 这个工具的价值, 就体现出来.

使用场景:

  • 本地调试: 一键针对内网 IP, 创建一个对外可访问的 https 地址.
  • 基于 HTTPS 才能调试的第三方 API 服务: 需要把 localhost 代理成 HTTPS. 典型如: telegram bot.
  • 其他黑科技功能.

install:

brew install --cask ngrok

docs:

# 启动本地代理: 
ngrok http 80

# ngrok 自带的 web UI: 
#    - http://localhost:4040 


代理效果: 会自动创建一个公网可见的 代理 host URL

image

其他方案:

@hhstore
Copy link
Owner Author

hhstore commented Jun 30, 2024

1

3 similar comments
@hhstore
Copy link
Owner Author

hhstore commented Jun 30, 2024

1

@hhstore
Copy link
Owner Author

hhstore commented Jun 30, 2024

1

@hhstore
Copy link
Owner Author

hhstore commented Jun 30, 2024

1

@hhstore hhstore changed the title DevOps: ngrok - Introspected tunnels to localhost Reverse Proxy: Ngrok - Introspected Tunnels to Localhost Jun 30, 2024
@hhstore hhstore added the Ngrok label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant