standardnotes / filesafe-relay

Relay server used to communicate between FileSafe client extension and server destination (Dropbox, Google Drive, WebDAV)
14 stars 9 forks source link

Add support for S3 compatible endpoints #31

Closed pho closed 3 years ago

pho commented 3 years ago

I just tested this against Scaleway Object Storage and its working nice.

Example config:

endpoint: https://s3.fr-par.scw.cloud region: fr-par bucket: bucketname access-key-id: api-key-access-key-id secret-key: api-secret-key

This should close #10 too

The only thing left to test is leaving an empty "endpoint" field, which I think it should behave exactly as before but I do not have an AWS Bucket to test


I am not sure about this PR. I had it ready to publish but just before submitting it, I thought that this may cause some problems, since leaving the endpoint an user-defined field means the server will open connections to any host... If that is not acceptable, how about we could hardcode a list of providers and let the user select from that list instead?

pho commented 3 years ago

I just went with it anyway, and reimplemented it like this on another branch: https://github.com/pho/filesafe-relay/tree/s3-providers image


I didnt close this PR to avoid notification-spam, and just in case you prefer to give the user more flexibility (which I doubt, but anyway) Merge from the branch you prefer! :D

moughxyz commented 3 years ago

So wait the only thing missing in our implementation to get it working on something like Backblaze is an endpoint parameter?

If so, I'd rather you create a PR with the full feature, including the UI, like in your screenshot ;)

pho commented 3 years ago

Yeah, that was an easy one haha

Alright I'll open a new PR in a sec