-
Notifications
You must be signed in to change notification settings - Fork 50
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
Can't run on Cloudflare Workers #21
Comments
Hi! Thanks for opening an issue. To be honest i have not much experience, knowledge about Cloudflare Workers, but i assume they have some alternative API to create a websocket connection, don't they? Also i'm wondering what would be the usecase to run the client in serverless environment, could you share some details on that? |
Hi, Thanks for the quick response!
Yes. They support the full WebSocket API just like in browsers. They just don't allow your codes to call
We have a task runner that run on demand/schedule in serverless environment. One of the tasks is to SFTP a CSV from a remote server and process and store the data into database. |
Thanks for sharing some details. Unforaunatelly i don't have experience with cloudflare workers, but based on the docs i'm not sure if reusing this code is the best option. ssheasy was design for the browser where you have to go through http, but in workers you could open TCP connections directly and just start an ssh connection, wouldn't that be option? |
Thanks for checking! You're correct that using TCP connections directly is a better option. However, there is no readily-made JS library to set up SSH connection directly. That is why I'm looking at However, as I mentioned in the original post, the issue is actually inside your |
sure, you could try to adapt the dom lib for the worker env. |
We did look at
Not sure how that gist works, but it does not look like a script that runs on Cloudflare Workers. |
Hello,
Our team were interested in running an SSH client on Cloudflare Workers, and
ssheasy
seems to be a great fit. However, we hit a snag of not being able to connect to the proxy server.After debugging, it turned out that the implementation of
github.com/hullarb/dom/net/ws/wsconn_js
usesnew Function()
to create the WebSocket instance, which is not allowed in such serverless environment.Since
github.com/hullarb/dom
has no Issues reporting, I figure to report here, since it's related tossheasy
anyway.Is there a way we can avoid using
new Function()
?The text was updated successfully, but these errors were encountered: