guac
guac copied to clipboard
Allow REST endpoints to hijack readers to allow file upload and download
This PR covers the efforts needed to bring support for file download and upload to guac, using a compatible browser Apache Guacamole client. This PR contains highly experimental code at the moment and it is not ready to be reviewed yet.
Code might contain development strings and stuff like that, when ready we will squash it to a single commit. This partly fixes #7.
This PR tracks our progress and is used to keep track of bugs to solve.
We started translating the official Java code to Go. It now needs a simplification, because this is the result of a manual unrol of Java class inheritance and Java-style polimorfisms, which is a fancy way to say that the code you see in this PR sucks.
What works so far: downloads and uploads.
What doesn't: if you stop a download the tunnel closes, because it is implemented using a FilteredReader. When handleBlob
fails because of a broken pipe error (i.e. a user canceled the download of a file), ReadSome
fails and the tunnel gets torn down. I need to find a better way to handle this. Tests are failing because I needed to send the UUID to the browser, so I hard-send a ConnectionID to the browser. This is needed because the browser client (we will opensource our version sooner or later) needs to know the tunnel connectionID in order to build the correct API calls to the REST backend.
TODOs: write tests, research a more idiomatic way to handle some stuff, clean the project.
Hi @kriive, how can we use this changes with vue example app (https://github.com/wwt/guac-vue/.) or any other ui client
I am testing this code in an internal project at my company at the moment. I have had no time to clean it yet. I am afraid the guac-vue client won't work, as it needs support from the client side too. We've added file management support on our Angular library here.
Hi @kriive, I am facing read tcp timeout error, when trying to upload files with size greater than 10MB. Any idea what could be the problem. Thanks in advance
You probably stumbled upon this. You should update the values accordingly to your needs.
You probably stumbled upon this. You should update the values accordingly to your needs.
Thanks, this helps!.
Hi @kriive Uploading a file of size 50MB is taking nearly 5 mins, I tried increasing the buffer size to 6048, if we try to increase the buffer size beyond 6048 the connection is getting disconnected. Any idea about this..? Thanks in advance.
Hi @kriive Uploading a file of size 50MB is taking nearly 5 mins, I tried increasing the buffer size to 6048, if we try to increase the buffer size beyond 6048 the connection is getting disconnected. Any idea about this..? Thanks in advance.
PS: There is much slowness in the file transfer. Did you face this issue..?