stableness / caldera

🦕 http/https CONNECT tunnel server on top of Deno
https://deno.land/x/caldera
GNU General Public License v3.0
2 stars 3 forks source link

deno deploy #3

Open zhu327 opened 1 year ago

zhu327 commented 1 year ago

try to deploy caldera to deno deploy

import { main } from "https://deno.land/x/caldera@v0.0.11/mod.ts?s=main"

main({port: {http: 8000}}).catch(console.error);

but got

502 Bad Gateway The deployment failed while serving the request.

code: DEPLOYMENT_FAILED

zhu327 commented 1 year ago

能否实现一个websocket tunnel, 在websocket请求头中拿connect的host:port, 建立连接后台, 后续所有的二进制data pipe出去

imcotton commented 1 year ago

Currently crt and key are required parameters, otherwise it would fail right away by deno run locally, you may try the following instead:

main({port: {http: 8000}, crt: '', key: ''}).catch(console.error);

I haven't tried Deno Deploy, but it worth to mention that Proxy program is considered against its Fair Use Policy

能否实现一个websocket tunnel, 在websocket请求头中拿connect的host:port, 建立连接后台, 后续所有的二进制data pipe出去

You probably could make it work, but only more complex, less economic, nonstandard and runs on your own tool chain.


Sorry for the later reply btw, missed issue notification from GitHub.