爱意满满的作品展示区。
embbnux

一个轻量的转发公网请求到本地 HTTP 服务的工具

  •  1
     
  •   embbnux ·
    embbnux · Mar 4, 2022 · 3483 views
    This topic created in 1523 days ago, the information mentioned may be changed or developed.

    最近在做第三方的机器人对话项目,需要提供一个公网的地址作为 WebHook 使用,白嫖 ngrok 好久,但是由于一些原因最近国内越来越不稳定,而且免费版本不能固定域名,一旦重启服务又是一套配置很麻烦,所以试着自己写了这个项目,可以部署到 Heroku 这种支持 node.js 的平台,就能再白嫖一个固定的免费的对外域名。

    项目地址: https://github.com/embbnux/lite-http-tunnel

    可以直接使用 README 上的 Deploy to Heroku 按钮直接部署到 Heroku, 或者自己部署到其他支持 node.js 的服务器上

    代码基于 Express.js 和 Socket.IO, 很轻量,不过也只支持公网 HTTP/HTTPS 的请求转发到本地的 HTTP 服务器

    有兴趣的可以试试,也可以用来把树莓派的本地服务挂到公网上什么的,欢迎 Star~

    Supplement 1  ·  Mar 18, 2022
    Supplement 2  ·  Apr 17, 2022
    0.1.0 支持了 WebSocket 本地服务到公网的映射
    6 replies    2022-03-04 16:19:53 +08:00
    lsj5031
        1
    lsj5031  
       Mar 4, 2022
    deploy to heroku button 好像没用
    lsj5031
        2
    lsj5031  
       Mar 4, 2022
    item could not be retrieved
    czyt
        3
    czyt  
       Mar 4, 2022   ❤️ 2
    cloudflare argo tunnel
    cloudflare pages
    cloudflare workers
    embbnux
        4
    embbnux  
    OP
       Mar 4, 2022
    @lsj5031 用的什么浏览器哦可能是安全设置导致的,heroku 应该是读取请求的 refer 来确定要部署的 github 项目
    embbnux
        5
    embbnux  
    OP
       Mar 4, 2022
    @czyt 赞,看起来不错,这个得配置一个自己的域名吧
    czyt
        6
    czyt  
       Mar 4, 2022
    @embbnux 不需要,可以用 cloudflare 的域名
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2792 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 12:48 · PVG 20:48 · LAX 05:48 · JFK 08:48
    ♥ Do have faith in what you're doing.