mirror of
https://github.com/winters27/obsidian-byoc.git
synced 2026-07-22 06:53:46 +00:00
feat: Initial BYOC fork (from Remotely Save)
This commit is contained in:
commit
9e69f0793f
244 changed files with 25316 additions and 0 deletions
1
927.main.js
Normal file
1
927.main.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
"use strict";(this.webpackChunkobsidian_byoc=this.webpackChunkobsidian_byoc||[]).push([[927],{86927(e,t,r){r.d(t,{EventStreamSerde:()=>s});var i=r(65792),n=r(42637);class s{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:r,serdeContext:i,defaultContentType:n}){this.marshaller=e,this.serializer=t,this.deserializer=r,this.serdeContext=i,this.defaultContentType=n}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){const i=this.marshaller,n=t.getEventStreamMember(),s=t.getMemberSchema(n),a=this.serializer,o=this.defaultContentType,l=Symbol("initialRequestMarker"),c={async*[Symbol.asyncIterator](){if(r){const e={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:o}};a.write(t,r);const i=a.flush();yield{[l]:!0,headers:e,body:i}}for await(const t of e)yield t}};return i.serialize(c,e=>{if(e[l])return{headers:e.headers,body:e.body};const t=Object.keys(e).find(e=>"__type"!==e)??"",{additionalHeaders:r,body:i,eventType:n,explicitPayloadContentType:a}=this.writeEventBody(t,s,e);return{headers:{":event-type":{type:"string",value:n},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:a??o},...r},body:i}})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){const n=this.marshaller,s=t.getEventStreamMember(),a=t.getMemberSchema(s).getMemberSchemas(),o=Symbol("initialResponseMarker"),l=n.deserialize(e.body,async e=>{const r=Object.keys(e).find(e=>"__type"!==e)??"",n=e[r].body;if("initial-response"===r){const e=await this.deserializer.read(t,n);return delete e[s],{[o]:!0,...e}}if(r in a){const t=a[r];if(t.isStructSchema()){const s={};let a=!1;for(const[o,l]of t.structIterator()){const{eventHeader:t,eventPayload:c}=l.getMergedTraits();if(a=a||Boolean(t||c),c)l.isBlobSchema()?s[o]=n:l.isStringSchema()?s[o]=(this.serdeContext?.utf8Encoder??i.P)(n):l.isStructSchema()&&(s[o]=await this.deserializer.read(l,n));else if(t){const t=e[r].headers[o]?.value;null!=t&&(l.isNumericSchema()?s[o]=t&&"object"==typeof t&&"bytes"in t?BigInt(t.toString()):Number(t):s[o]=t)}}if(a)return{[r]:s};if(0===n.byteLength)return{[r]:{}}}return{[r]:await this.deserializer.read(t,n)}}return{$unknown:e}}),c=l[Symbol.asyncIterator](),d=await c.next();if(d.done)return l;if(d.value?.[o]){if(!t)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[e,t]of Object.entries(d.value))r[e]=t}return{async*[Symbol.asyncIterator](){for(d?.value?.[o]||(yield d.value);;){const{done:e,value:t}=await c.next();if(e)break;yield t}}}}writeEventBody(e,t,r){const i=this.serializer;let s,a=e,o=null;const l={};if(t.getSchema()[4].includes(e)){const n=t.getMemberSchema(e);if(n.isStructSchema()){for(const[t,i]of n.structIterator()){const{eventHeader:n,eventPayload:s}=i.getMergedTraits();if(s)o=t;else if(n){const n=r[e][t];let s="binary";i.isNumericSchema()?s=(-2)**31<=n&&n<=2**31-1?"integer":"long":i.isTimestampSchema()?s="timestamp":i.isStringSchema()?s="string":i.isBooleanSchema()&&(s="boolean"),null!=n&&(l[t]={type:s,value:n},delete r[e][t])}}if(null!==o){const t=n.getMemberSchema(o);t.isBlobSchema()?s="application/octet-stream":t.isStringSchema()&&(s="text/plain"),i.write(t,r[e][o])}else i.write(n,r[e])}else{if(!n.isUnitSchema())throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");i.write(n,{})}}else{const[t,n]=r[e];a=t,i.write(15,n)}const c=i.flush()??new Uint8Array;return{body:"string"==typeof c?(this.serdeContext?.utf8Decoder??n.a)(c):c,eventType:a,explicitPayloadContentType:s,additionalHeaders:l}}}}}]);
|
||||
3
LICENSE
Normal file
3
LICENSE
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
The codes or files or subfolders inside the folder `src`, `tests`, `docs`, `assets`, are released under the "Open Source" license: "Apache License, version 2.0", described at: https://www.apache.org/licenses/LICENSE-2.0 .
|
||||
|
||||
The codes or files or subfolders inside the folder `pro`, are released under the "Source Available" license: "PolyForm Strict License 1.0.0", described at: https://polyformproject.org/licenses/strict/1.0.0/ .
|
||||
98
README.md
Normal file
98
README.md
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
# Bring Your Own Cloud (BYOC)
|
||||
|
||||
> A clean, self-hosted synchronization plugin for [Obsidian](https://obsidian.md).
|
||||
|
||||
BYOC is a community-maintained fork of the excellent [Remotely Save](https://github.com/remotely-save/remotely-save) plugin. This version focuses on providing a clean, completely self-hosted experience while maintaining the robust sync engine created by the original developers.
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
- **12 cloud providers** — S3, WebDAV, Dropbox, OneDrive (AppFolder & Full), Google Drive, Box, pCloud, Yandex Disk, Koofr, Azure Blob Storage, Webdis
|
||||
- **3-Way Merge Sync Engine** — tracks a local baseline to make correct push/pull/conflict decisions across sessions
|
||||
- **Smart Conflict Resolution** — automatically creates timestamped conflict copies instead of silently overwriting
|
||||
- **Independent Authorization** — connect your own cloud provider APIs with credentials that persist locally.
|
||||
- **End-to-end encryption** — optional AES-256 / rclone-crypt encryption before data leaves your device
|
||||
- **Auto-sync** — timed background sync and sync-on-save
|
||||
- **Seamless migration** — automatically imports your existing Remotely Save config on first load
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
### Manual (Recommended)
|
||||
|
||||
1. Download the [latest release](../../releases/latest) — grab `main.js`, `manifest.json`, and `styles.css`
|
||||
2. Copy them into your vault at `.obsidian/plugins/obsidian-byoc/`
|
||||
3. In Obsidian → Settings → Community Plugins, enable **Bring Your Own Cloud**
|
||||
|
||||
### From Source
|
||||
|
||||
```bash
|
||||
git clone https://github.com/obsidian-byoc/obsidian-byoc
|
||||
cd obsidian-byoc
|
||||
npm install
|
||||
npm run build
|
||||
# Copy main.js + manifest.json to your vault's .obsidian/plugins/obsidian-byoc/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Provider Setup
|
||||
|
||||
### S3-Compatible (AWS, Cloudflare R2, Backblaze B2, MinIO, etc.)
|
||||
|
||||
Enter your endpoint, region, access key ID, secret key, and bucket name in plugin settings.
|
||||
|
||||
### WebDAV
|
||||
|
||||
Enter your server URL, username, and password. Works with Nextcloud, ownCloud, Synology, and any WebDAV server.
|
||||
|
||||
### Dropbox / OneDrive / Google Drive / Box / Yandex Disk / Koofr
|
||||
|
||||
Click **Auth** in the provider settings panel. You'll be redirected to the provider's OAuth page, then back to Obsidian automatically.
|
||||
|
||||
### pCloud
|
||||
|
||||
Click **Auth** in pCloud settings. Select your region (US or EU) during the OAuth flow. Your access token is stored locally and never expires.
|
||||
|
||||
> **Note:** BYOC uses a registered pCloud application. If you have your own pCloud API key, you can override it by setting the `PCLOUD_CLIENT_ID` and `PCLOUD_CLIENT_SECRET` environment variables before building.
|
||||
|
||||
### Azure Blob Storage
|
||||
|
||||
Enter your container SAS URL and container name.
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
All settings are in Obsidian → Settings → **Bring Your Own Cloud**.
|
||||
|
||||
| Setting | Description |
|
||||
|---------|-------------|
|
||||
| **Service** | Which cloud provider to sync with |
|
||||
| **Password** | Optional encryption passphrase |
|
||||
| **Auto Sync Interval** | Sync every N milliseconds (−1 to disable) |
|
||||
| **Sync on Save** | Sync N ms after the last file change |
|
||||
| **Conflict Action** | `keep_newer`, `keep_larger`, or `smart_conflict` |
|
||||
| **Protect Modify %** | Abort if more than N% of files would be changed |
|
||||
| **Sync Config Dir** | Whether to sync `.obsidian/` settings |
|
||||
| **Delete To** | Move deleted files to system trash or Obsidian trash |
|
||||
|
||||
---
|
||||
|
||||
## Migrating from Remotely Save
|
||||
|
||||
BYOC automatically detects your Remotely Save `data.json` on first launch and imports all credentials and settings. A backup of your current config is created at `.obsidian/plugins/obsidian-byoc/data.json.byoc-backup` before any changes are made.
|
||||
|
||||
## Credits
|
||||
|
||||
BYOC is a fork of **Remotely Save**, originally created by [fyears](https://github.com/remotely-save). The core sync algorithm, multi-provider architecture, and foundational logic are the result of their exceptional work.
|
||||
|
||||
We are incredibly grateful to the original developer for creating such a robust tool and making it open source. If you are looking for the original plugin, please visit the [Remotely Save Repository](https://github.com/remotely-save/remotely-save).
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
[Apache 2.0](LICENSE) — inherited from the upstream Remotely Save project.
|
||||
3
assets/branding/256x256.png
Normal file
3
assets/branding/256x256.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a9bf1cc2403c3a32e7a6f5d5829bb065573922dc050ae2fdb8b3d34b4c87ecf5
|
||||
size 8296
|
||||
3
assets/branding/300x300.png
Normal file
3
assets/branding/300x300.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6990a598379c457442345e50c3f056c4598a121523bc10980835c08fc7447a54
|
||||
size 10119
|
||||
3
assets/branding/300x300.svg
Normal file
3
assets/branding/300x300.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:432198e63fa9676541a41436917e025d1ea6af3772139c1dea450fcc0155cfd0
|
||||
size 13054
|
||||
3
assets/branding/50x50.png
Normal file
3
assets/branding/50x50.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fe3b5b8bf9c32e57c0af366c455b11ae68eb9fb8a32f371c9c445b3e7e89cc02
|
||||
size 1120
|
||||
3
assets/branding/64x64.png
Normal file
3
assets/branding/64x64.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f68df7bae94eb4c4cddfa6af47d7819d01a6482d4f6afe6ef3236f72f9adf15f
|
||||
size 1523
|
||||
1
assets/branding/LICENSE.txt
Normal file
1
assets/branding/LICENSE.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
This work is licensed under CC BY-SA 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/
|
||||
75
assets/branding/README.md
Normal file
75
assets/branding/README.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# the logo
|
||||
|
||||
Some different sizes' logos are needed.
|
||||
|
||||
## license
|
||||
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
|
||||
|
||||
## the process of creation
|
||||
|
||||
No professional designers are here. Thus the following steps involve many programer styles. :-)
|
||||
|
||||
1. use excalidraw and export png and svg.
|
||||
|
||||
```bash
|
||||
# results
|
||||
logo.excalidraw
|
||||
logo.png
|
||||
logo.svg
|
||||
```
|
||||
|
||||
2. manually edit the `logo.svg` and make background transparent.
|
||||
|
||||
```bash
|
||||
# results
|
||||
logo-transparent.svg
|
||||
```
|
||||
|
||||
3. use python library [`svgutils`](https://github.com/btel/svg_utils) to make a strictly square figure. The [doc](https://svgutils.readthedocs.io/en/latest/tutorials/composing_multipanel_figures.html) is very useful.
|
||||
|
||||
```python
|
||||
from svgutils.compose import *
|
||||
def get_standard_300x300(file_name):
|
||||
fig = Figure(300, 300,
|
||||
Panel(
|
||||
SVG(file_name),
|
||||
).move(-3, 12),
|
||||
)
|
||||
return fig
|
||||
|
||||
get_standard_300x300('logo-transparent.svg').save('300x300.svg')
|
||||
|
||||
# def get_other_size_from_standard(file_name, px):
|
||||
# fig = Figure(px, px,
|
||||
# Panel(
|
||||
# SVG(file_name).scale(px/300.0),
|
||||
# ).move(-3*px/300.0, 12*px/300.0),
|
||||
# )
|
||||
# return fig
|
||||
|
||||
# get_other_size_from_standard('logo.svg',256).save('256x256.svg')
|
||||
```
|
||||
|
||||
```bash
|
||||
# results
|
||||
300x300.svg
|
||||
```
|
||||
|
||||
4. use `inkscape` command line to get different sizes' `.png` files.
|
||||
|
||||
```bash
|
||||
inkscape 300x300.svg -o 300x300.png
|
||||
|
||||
inkscape 300x300.svg -o 50x50.png -w 50 -h 50
|
||||
|
||||
inkscape 300x300.svg -o 64x64.png -w 64 -h 64
|
||||
inkscape 300x300.svg -o 256x256.png -w 256 -h 256
|
||||
```
|
||||
|
||||
```bash
|
||||
# results
|
||||
50x50.png
|
||||
64x64.png
|
||||
256x256.png
|
||||
```
|
||||
3
assets/branding/logo-transparent.svg
Normal file
3
assets/branding/logo-transparent.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:daedd262170200cb5e8cc288898b40892771b3962cf2bc17dc443f1c82a4aa94
|
||||
size 12886
|
||||
3
assets/branding/logo.excalidraw
Normal file
3
assets/branding/logo.excalidraw
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6b33b2a71f2d91988416c17015b59ef205dbf6a8c704ecac1cc95ed03ccc2c8e
|
||||
size 16537
|
||||
3
assets/branding/logo.png
Normal file
3
assets/branding/logo.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:98358aa726dcb5565164ff260634f5c527223d1f2ec1d0410b400625c8dad704
|
||||
size 14082
|
||||
3
assets/branding/logo.svg
Normal file
3
assets/branding/logo.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:02a5057ebe38e4c3835c8354f53aca01c4c2335d8a0435e22f509b4ca4a73ca4
|
||||
size 12889
|
||||
3
assets/cla-process/cla-robot-alert.png
Normal file
3
assets/cla-process/cla-robot-alert.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:07fd075d0f73c708d77fd97bb31d6f185f094031e8275e8fd582e3a0145f6be8
|
||||
size 415757
|
||||
3
assets/cla-process/cla-sign-and-pass.png
Normal file
3
assets/cla-process/cla-sign-and-pass.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4c5754df8b5d6878a7fa58992fc7e37ddcce1ecf578a0fc2ec751b6f7bab6f13
|
||||
size 284700
|
||||
55
biome.json
Normal file
55
biome.json
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
},
|
||||
"files": {
|
||||
"ignore": ["main.js"]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"formatWithErrors": false,
|
||||
"ignore": [],
|
||||
"attributePosition": "auto",
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 2,
|
||||
"lineEnding": "lf",
|
||||
"lineWidth": 80
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"arrowParentheses": "always",
|
||||
"bracketSameLine": false,
|
||||
"bracketSpacing": true,
|
||||
"jsxQuoteStyle": "double",
|
||||
"quoteProperties": "asNeeded",
|
||||
"semicolons": "always",
|
||||
"trailingCommas": "es5"
|
||||
}
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"suspicious": {
|
||||
"noExplicitAny": "off",
|
||||
"noPrototypeBuiltins": "off",
|
||||
"noControlCharactersInRegex": "off"
|
||||
},
|
||||
"style": {
|
||||
"noUselessElse": "off",
|
||||
"useNodejsImportProtocol": "off",
|
||||
"noUnusedTemplateLiteral": "off",
|
||||
"useTemplate": "off",
|
||||
"noNonNullAssertion": "off"
|
||||
},
|
||||
"performance": {
|
||||
"noDelete": "off"
|
||||
},
|
||||
"complexity": {
|
||||
"noForEach": "off",
|
||||
"useLiteralKeys": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12
docs/browser_env.md
Normal file
12
docs/browser_env.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Limitations From The Browser Environment
|
||||
|
||||
Obsidian desktop is developed by using [Electron](https://www.electronjs.org/). And Obsidian mobile is developed by using [Capacitor](https://capacitorjs.com/)
|
||||
|
||||
Technically, the plugin (or any plugin?) runs in the js environment provided by Obsidian. And to support the mobile Obsidian, the plugin is limited to be developed for the browser environment, instead of the Node.js environment.
|
||||
|
||||
Then some limitations are applied:
|
||||
|
||||
1. [The CORS issue (solved in the new Obsidian version on some platforms).](./browser_env_cors.md)
|
||||
2. [No Node.js environment.](./browser_env_no_nodejs.md)
|
||||
3. If the cloud service uses OAuth flow, it needs to support PKCE. More details are [here](./browser_env_oauth2_pkce.md).
|
||||
4. [No background running after Obsidian is closes.](./browser_env_no_background_after_closing.md)
|
||||
14
docs/browser_env_cors.md
Normal file
14
docs/browser_env_cors.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Limitations From The Browser Environment: CORS Issue
|
||||
|
||||
The plugin is developed for the browser environment. The "fake" browser behind the scenes also follows the CORS policy.
|
||||
|
||||
[MDN has a doc about CORS.](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
|
||||
|
||||
1. From Obsidian desktop >= 0.13.25 or mobile >= 1.1.1, Obsidian [provides a new API `requiestUrl`](https://forum.obsidian.md/t/obsidian-release-v0-13-25-insider-build/32701), that allows the plugin to fully bypass the CORS issue. As of Mar 2022, the latest public-released Obsidian desktop has supported this API, but the Obsidian mobile still stays in insider.
|
||||
|
||||
2. For using this plugin in Obsidian desktop < 0.13.25 or mobile < 1.1.1, we need to configure the server side to return the header `Access-Control-Allow-Origin` allowing the origins `app://obsidian.md` and `capacitor://localhost` and `http://localhost`.
|
||||
|
||||
Example configurations:
|
||||
|
||||
- [Amazon S3](./s3_cors_configure.md)
|
||||
- [Apache](./apache_cors_configure.md) ([contributed by community](https://github.com/remotely-save/remotely-save/pull/31))
|
||||
3
docs/browser_env_no_background_after_closing.md
Normal file
3
docs/browser_env_no_background_after_closing.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Limitations From The Browser Environment: No Background Running After Obsidian Is Closed
|
||||
|
||||
The plugin treats Obsidian as a special browser, and is in fact some js codes. So if Obsidian is closed, then the browser environment stops, then the plugin will be stopped.
|
||||
9
docs/browser_env_no_nodejs.md
Normal file
9
docs/browser_env_no_nodejs.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Limitations From The Browser Environment: No Node.js
|
||||
|
||||
To support the mobile Obsidian, the plugin is limited to be developed for the browser environment, instead of the Node.js environment.
|
||||
|
||||
Many js libraries are designed to work in both the browser and the Node.js environments. But some are not, because the browser doesn't provide the corresponding abilities.
|
||||
|
||||
For example, there is a popular npm package [`ssh2-sftp-client`](https://www.npmjs.com/package/ssh2-sftp-client) for SFTP. But it relies on the modules (e.g. `http`) from Node.js which cannot be "translated" to the browser environment. So it's impossible to make this plugin support SFTP. The same status applies to FTP / FTPS.
|
||||
|
||||
Likewise, [MEGA](https://mega.nz/) provides a SDK, but the SDK is [for C++ only](https://mega.nz/doc), so it's also impossible to make this plugin support MEGA.
|
||||
7
docs/browser_env_oauth2_pkce.md
Normal file
7
docs/browser_env_oauth2_pkce.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Limitations From The Browser Environment: OAuth2 PKCE
|
||||
|
||||
If the cloud service uses OAuth flow, it needs to support PKCE, because the plugin is released to the public, and no real secrets can be statically kept in the client.
|
||||
|
||||
Luckily, Dropbox and OneDrive supports PKCE, making it possible for this plugin to connect to them easily.
|
||||
|
||||
Dropbox has an excellent [article](https://dropbox.tech/developers/pkce--what-and-why-) explaining what is and how to use PKCE.
|
||||
13
docs/check_performance/README.md
Normal file
13
docs/check_performance/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Check performance
|
||||
|
||||
1. Go to settings, scroll to the very end, and enable the "Enable Profiler" option.
|
||||
2. Also enable "Enable Profiler Printing".
|
||||
3. Check Console Output (directly or via `vConsole` plugin). More details are [here](../how_to_debug/README.md).
|
||||
4. Sync!
|
||||
5. You can also "Export Profiler Results" afterwards. A new file `_debug_remotely_save/profiler_results_exported_on_xxxx.md` will be generated.
|
||||
|
||||
In the console or exported files, you can see the time cost of each steps.
|
||||
|
||||

|
||||
|
||||

|
||||
3
docs/check_performance/profiler_exported.png
Normal file
3
docs/check_performance/profiler_exported.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5a71d0746a75c93aa4cb5be3f7964bfdf74722a10505f5a1965790738eaebdc4
|
||||
size 265289
|
||||
3
docs/check_performance/profiler_settings.png
Normal file
3
docs/check_performance/profiler_settings.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ffd1557c2f714c56bfacd8166b85749d6bfa15c2f9c7363942b443d51288083
|
||||
size 81259
|
||||
13
docs/code_design.md
Normal file
13
docs/code_design.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Code Design
|
||||
|
||||
## Code Organization
|
||||
|
||||
1. Every function except `main.ts` should be pure. Pass any stateful information in parameters.
|
||||
|
||||
2. `misc.ts` should not depend on any other written code.
|
||||
|
||||
3. Each storage code should not depend on `sync.ts`.
|
||||
|
||||
## File and Folder Representation
|
||||
|
||||
While writing sync codes, folders are always represented by a string ending with `/`.
|
||||
47
docs/dropbox_review_material/README.md
Normal file
47
docs/dropbox_review_material/README.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
## Material Source
|
||||
|
||||
To apply for the production use of Dropbox API, some descriptions are needed to be submitted to Dropbox. Coincidently, this can also be served as a "readme" to use this plugin with Dropbox.
|
||||
|
||||
## Some Backgrounds
|
||||
|
||||
1. Obsidian allows users to take notes using markdown files.
|
||||
2. The "app", remotely-save. is an unofficial Obsidian plugin, helping users download and upload ("sync") their notes from and to Dropbox.
|
||||
3. Technically, remotely-save is developed using web technologies.
|
||||
|
||||
## Api Usages
|
||||
|
||||
1. remotely-save uses "App folder", to avoid unnecessary accessing users' other files.
|
||||
2. remotely-save uses "account_info.read", to get the displayed username, so that users know which of their accounts has been logged in after OAuth steps.
|
||||
3. remotely-save uses "files.content.read", so that it can read the "last modified time", and the content of files on Dropbox. Under some conditions, the plugin would download the files. For example, the plugin would compare the last modified timestamps of the file in the local device and that on Dropbox, and if the timestamp on Dropbox is larger, the plugin would download the "newer" file from Dropbox to local.
|
||||
4. remotely-save uses "files.content.write", so that it can upload or overwrite the content of files on Dropbox. Under some conditions, the plugin would do that. For example, the plugin would compare the last modified timestamps of the file in the local device and that on Dropbox, and if the timestamp in the local device is larger, the plugin would upload the "newer" file from local to Dropbox, and overwrite that file on Dropbox.
|
||||
|
||||
## Steps
|
||||
|
||||
Here are the steps to see the functionality of remotely-save.
|
||||
|
||||
Most steps have screenshots.
|
||||
|
||||
1. Download the note-taking app Obsidian (Windows or Mac versions are both ok) from its official website: https://obsidian.md/ . It's free to download and use. Then install it.
|
||||
2. Open Obsidian, click the "Create" button under "Create new vault".
|
||||
3. Pick a vault name, "example-vault", and choose a location, then click "Create".
|
||||

|
||||
4. Close any update new if prompted.
|
||||
5. Create a new note by clicking a button on the left. And write something on the note.
|
||||

|
||||
6. Click "setting" (a gear icon) on the button left of the sidebar.
|
||||

|
||||
7. In the settings panel, go to the "Community plugins" page, turn off the safe mode, and confirm to turn off the safe mode. Then click the "Browse" button for community plugins.
|
||||

|
||||
8. Search "Remotely Save" and install on the result.
|
||||

|
||||
9. After successful installing the plugin, go back to the "Community plugins" page, and enable the plugin.
|
||||

|
||||
10. Go to newly added "Remotely Save" settings, select "Dropbox" in "Choose service", and click the "Auth" button.
|
||||

|
||||
11. The standard auth flow address is shown, users should click the address, and finish the auth steps on the website. Finally, the Dropbox website should automatically redirect users back to the Obsidian app.
|
||||

|
||||
12. The "Auth" button disappears. A new "Revoke Auth" appears.
|
||||

|
||||
13. Go back to the main interface of Obsidian, a new "switch icon" should appear on the left sidebar. Click this, then the plugin would trigger the sync progress. It would compare meta info of local files and remote files (on Dropbox), and decide to download some files and/or upload some files.
|
||||

|
||||
14. Create, edit, remove some notes, and repeat step 13, the files on Dropbox should also change to reflect the changes locally.
|
||||
3
docs/dropbox_review_material/attachments/step03.png
Normal file
3
docs/dropbox_review_material/attachments/step03.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:655f6f487cc24af0ab86b8592622a7701c30f3369e7847a1fbb783d0962829c3
|
||||
size 52910
|
||||
3
docs/dropbox_review_material/attachments/step05.png
Normal file
3
docs/dropbox_review_material/attachments/step05.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fe971af94f1f7b042b7313268e4d2d8432d926ce2392e50ca2a4abc21c8a4aab
|
||||
size 57033
|
||||
3
docs/dropbox_review_material/attachments/step06.png
Normal file
3
docs/dropbox_review_material/attachments/step06.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:025303053f2b2cedd2bdd61cd71e1f1c0fb12e45bfbc0e81f2c0d70747133505
|
||||
size 63458
|
||||
3
docs/dropbox_review_material/attachments/step07.png
Normal file
3
docs/dropbox_review_material/attachments/step07.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:061707977c8046a6f924881f86aac962e2f05618e201080768246270de792040
|
||||
size 100162
|
||||
3
docs/dropbox_review_material/attachments/step08.png
Normal file
3
docs/dropbox_review_material/attachments/step08.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8add61e6ef34b2470e5a5bea3e10955a86eed5ed1fc4dd398f30835485a6c455
|
||||
size 158422
|
||||
3
docs/dropbox_review_material/attachments/step09.png
Normal file
3
docs/dropbox_review_material/attachments/step09.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:021ae1ce29d3932f088f0954787c475be826915b794320bf212d3ba7d58656da
|
||||
size 110529
|
||||
3
docs/dropbox_review_material/attachments/step10.png
Normal file
3
docs/dropbox_review_material/attachments/step10.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b225d21de5778ddc032893e0f52150ab4260b0dfbe0e9141da4aa8b03131a9da
|
||||
size 147821
|
||||
3
docs/dropbox_review_material/attachments/step11.png
Normal file
3
docs/dropbox_review_material/attachments/step11.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fda4f6e8cf68833f239bdc85c46802fe2131d149011074f747b1829822a38939
|
||||
size 59041
|
||||
3
docs/dropbox_review_material/attachments/step12.png
Normal file
3
docs/dropbox_review_material/attachments/step12.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:576801d5ebd8cf7fcd3c9c0c6df325654338854f7d762a5680e9aab3c9e6508a
|
||||
size 142155
|
||||
3
docs/dropbox_review_material/attachments/step13.png
Normal file
3
docs/dropbox_review_material/attachments/step13.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c93f681f0f7ce74cee0f2ed193f574ef915554f1a9ef96ba54afdede302f13a
|
||||
size 112057
|
||||
8
docs/encryption/README.md
Normal file
8
docs/encryption/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Encryption
|
||||
|
||||
Currently (March 2024), Remotely Save supports two end to end encryption format:
|
||||
|
||||
1. [RClone Crypt](./rclone.md) format, which is the recommend way now.
|
||||
2. [OpenSSL enc](./openssl.md) format
|
||||
|
||||
Here is also the [comparation](./comparation.md).
|
||||
23
docs/encryption/comparation.md
Normal file
23
docs/encryption/comparation.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Comparation Between Encryption Formats
|
||||
|
||||
## Warning
|
||||
|
||||
**ALWAYS BACKUP YOUR VAULT MANUALLY!!!**
|
||||
|
||||
If you switch between RClone Crypt format and OpenSSL enc format, you have to delete the cloud vault files **manually** and **fully**, so that the plugin can re-sync (i.e. re-upload) the newly encrypted versions to the cloud.
|
||||
|
||||
## The feature table
|
||||
|
||||
| | RClone Crypt | OpenSSL enc | comments |
|
||||
| ------------------------ | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| key generation | scrypt with fixed salt | PBKDF2 with dynamic salt | scrypt is better than PBKDF2 from the algorithm aspect. But RClone uses fixed salt by default. Also the parameters might affect the result. |
|
||||
| content encryption | XSalsa20Poly1305 on chunks | AES-256-CBC | XSalsa20Poly1305 is way better than AES-256-CBC. And encryption by chunks should require less resources. |
|
||||
| file name encryption | EME on each segment of the path | AES-256-CBC on the whole path | RClone has the benefit as well as pitfall that the path structure is preserved. Maybe it's more of a design decision difference? No comment on EME and AES-256-CBC. |
|
||||
| viewing decrypted result | RClone has command that can mount the encrypted vault as if the encryption is transparent. | No convenient way except writing some scripts we are aware of. | RClone is way more convenient. |
|
||||
|
||||
## Some notes
|
||||
|
||||
1. Anyway, security is a hard problem. The author of Remotely Save doesn't have sufficient knowledge to "judge" which one is the better format. **Use them at your own risk.**
|
||||
2. Currently the RClone Crypt format is recommended by default in Remotely Save. Just because of the taste from the Remotely Save author, who likes RClone.
|
||||
3. **Always use a long password.**
|
||||
4. Both algorithms are selected deliberately to **be compatible with some well-known third-party tools** (instead of some home-made methods) and **have many tests to ensure the correctness**.
|
||||
46
docs/encryption/openssl.md
Normal file
46
docs/encryption/openssl.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# OpenSSL enc format
|
||||
|
||||
If a password is set, the files are encrypted before being sent to the cloud.
|
||||
|
||||
## Warning
|
||||
|
||||
**ALWAYS BACKUP YOUR VAULT MANUALLY!!!**
|
||||
|
||||
If you switch between RClone Crypt format and OpenSSL enc format, you have to delete the cloud vault files **manually** and **fully**, so that the plugin can re-sync (i.e. re-upload) the newly encrypted versions to the cloud.
|
||||
|
||||
## Comparation between encryption formats
|
||||
|
||||
See the doc [Comparation](./comparation.md).
|
||||
|
||||
## Interoperability with official OpenSSL
|
||||
|
||||
This encryption algorithm is delibrately designed to be aligned with openssl format.
|
||||
|
||||
1. The encryption algorithm is implemented using web-crypto. Using AES-256-CBC.
|
||||
2. The file content is encrypted using openssl format. Assuming a file named `sometext.txt`, a password `somepassword`, then the encryption is equivalent to the following command:
|
||||
|
||||
```bash
|
||||
# file content encryption (ignoring file path encryption)
|
||||
openssl enc -p -aes-256-cbc -pbkdf2 -iter 20000 -pass pass:somepassword -in ./sometext.txt -out ./sometext.txt.enc
|
||||
|
||||
# file content decryption (ignoring file path decryption)
|
||||
openssl enc -d -p -aes-256-cbc -pbkdf2 -iter 20000 -pass pass:somepassword -in ./sometext.txt.enc -out ./sometext.txt
|
||||
```
|
||||
|
||||
3. The file/directory path strings, are encrypted using openssl in binary mode and then `base64url without padding` is applied.
|
||||
Assuming the file path is `a-folder-文件夹/a-file-文件.md`, then the following commands are equivilent:
|
||||
|
||||
```bash
|
||||
# prepare the functions
|
||||
# https://unix.stackexchange.com/questions/628842
|
||||
base64url::encode () { base64 -w0 | tr '+/' '-_' | tr -d '='; }
|
||||
base64url::decode () { awk '{ if (length($0) % 4 == 3) print $0"="; else if (length($0) % 4 == 2) print $0"=="; else print $0; }' | tr -- '-_' '+/' | base64 -d; }
|
||||
|
||||
# pure string encryption then base32
|
||||
echo -n 'a-folder-文件夹/a-file-文件.md' | openssl enc -aes-256-cbc -pbkdf2 -iter 20000 -pass pass:mylongpassword | base64url::encode
|
||||
|
||||
# pure string base64url then decryption
|
||||
echo -n 'U2FsdGVkX19tNkdFL5rZeHxbe7FL-Pp5mkZJkDNFJWFT6lldZlfa57j0C_cKn0I3PZ9YDvOkyoKqfF6lbn0_yg' | base64url::decode | openssl enc -d -aes-256-cbc -pbkdf2 -iter 20000 -pass pass:mylongpassword
|
||||
```
|
||||
|
||||
4. The directory is considered as special "0-byte" object on remote s3. So this meta infomation may be easily guessed if some third party can access the remote bucket.
|
||||
46
docs/encryption/rclone.md
Normal file
46
docs/encryption/rclone.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# RClone Crypt format
|
||||
|
||||
The encryption is compatible with RClone Crypt with **base64** name encryption format.
|
||||
|
||||
It's developed based on another js project by the same author of Remotely Save: [`@fyears/rclone-crypt`](https://github.com/fyears/rclone-crypt), which is NOT an official library from RClone, and is NOT affiliated with RClone.
|
||||
|
||||
Reasonable tests are also ported from official RClone code, to ensure the compatibility and correctness of the encryption.
|
||||
|
||||
## Warning
|
||||
|
||||
**ALWAYS BACKUP YOUR VAULT MANUALLY!!!**
|
||||
|
||||
If you switch between RClone Crypt format and OpenSSL enc format, you have to delete the cloud vault files **manually** and **fully**, so that the plugin can re-sync (i.e. re-upload) the newly encrypted versions to the cloud.
|
||||
|
||||
## Comparation between encryption formats
|
||||
|
||||
See the doc [Comparation](./comparation.md).
|
||||
|
||||
## Interoperability with official RClone
|
||||
|
||||
Please pay attention that the plugin uses **base64** of encrypted file names, while official RClone by default uses **base32** file names. The intention is purely for potentially support longer file names.
|
||||
|
||||
You could set up the RClone profile by calling `rclone config`. You need to create two profiles, one for your original connection and the other for RClone Crypt.
|
||||
|
||||
Finally, a working config file should like this:
|
||||
|
||||
```ini
|
||||
[webdav1]
|
||||
type = webdav
|
||||
url = https://example.com/sharefolder1/subfolder1 # the same as the web address in Remotely Save settings.
|
||||
vendor = other
|
||||
user = <some webdav username>
|
||||
pass = <some webdav password, obfuscated>
|
||||
|
||||
[webdav1crypt]
|
||||
type = crypt
|
||||
remote = nas1test:vaultname # the same as your "Remote Base Directory" (usually the vault name) in Remotely Save settings
|
||||
password = <some encryption password, obfuscated>
|
||||
filename_encoding = base64 # don't forget this!!!
|
||||
```
|
||||
|
||||
You can use the `mount` command to view and see the files in file explorer! On Windows, the command should like this (the remote vault is mounted to drive `X:`):
|
||||
|
||||
```bash
|
||||
rclone mount webdav1crypt: X: --network-mode --vfs-cache-mode writes
|
||||
```
|
||||
25
docs/how_to_debug/README.md
Normal file
25
docs/how_to_debug/README.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# How To Debug
|
||||
|
||||
Ideally, users do not need to debug anything. But if something bad happened, we have to dig into details.
|
||||
|
||||
## Easy: Export Sync Plans
|
||||
|
||||
See [here](./export_sync_plans.md).
|
||||
|
||||
## Medium: Desktop: Check Console Output Directly
|
||||
|
||||
...of desktop and Android.
|
||||
|
||||
See [here](./check_console_output.md).
|
||||
|
||||
## Medium: Mobile: Use `Obsidian vConsole` to Check Console Ouput Directly
|
||||
|
||||
...of mobile (iOS and Android).
|
||||
|
||||
See [here](./check_vconsole_output.md).
|
||||
|
||||
## Advanced: Use `Logstravaganza` to export logs
|
||||
|
||||
This method works for desktop and mobile devices (iOS, Android), especially useful for iOS.
|
||||
|
||||
See [here](./use_logstravaganza.md).
|
||||
25
docs/how_to_debug/check_console_output.md
Normal file
25
docs/how_to_debug/check_console_output.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Check Console Output
|
||||
|
||||
If you are using Obsidian on desktop or Android, you can check the Obsidian console.
|
||||
|
||||
## Disable Auto Sync Firstly
|
||||
|
||||
You should disable auto sync to avoid any unexpected running.
|
||||
|
||||
## Set The Output Level To Debug
|
||||
|
||||
Go to the plugin settings, scroll down to the section "Debug" -> "alter console log level", and change it from "info" to "debug".
|
||||
|
||||
## Check The Output
|
||||
|
||||
- If you are on desktop
|
||||
|
||||
Press the keyboard shortcut "ctrl+shift+i" if you are on Windows or Linux, or press "cmd+shift+i" if you are on macOS. You should be able to see the console of Obsidian.
|
||||
|
||||
- If you are using Android
|
||||
|
||||
If you want to check the console **with the help of desktop Chrome**, you need to [enable USB debugging](https://developer.android.com/studio/debug/dev-options#enable) on your Android, then connect your Android to a computer using USB, then open the **desktop** Chrome browser and go to the special web page <chrome://inspect>. You shall be able to see the "inspect" link inside the special page, then click the link to open the console. After debugging, remember to turn off USB debugging.
|
||||
|
||||
If you want to check the console **directly on the mobile device**, check out [this doc](./check_vconsole_output.md).
|
||||
|
||||
Trigger the sync manually (by clicking the icon on the ribbon sidebar). Something (hopefully) helpful should show up in the console. You could understand what happened and what goes wrong more explictly by checking the output.
|
||||
21
docs/how_to_debug/check_vconsole_output.md
Normal file
21
docs/how_to_debug/check_vconsole_output.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Check "Obsidian vConsole" Output
|
||||
|
||||
It's quite hard to debug on mobile. But fortunately you can use another plugin to rescue!
|
||||
|
||||
This applies to both iOS (iPhone / iPad) and Android.
|
||||
|
||||
## Disable Auto Sync Firstly
|
||||
|
||||
You should disable auto sync to avoid any unexpected running.
|
||||
|
||||
## Set The Output Level To Debug
|
||||
|
||||
Go to the plugin settings, scroll down to the section "Debug" -> "alter console log level", and change it from "info" to "debug".
|
||||
|
||||
## Use "Obsidian vConsole"
|
||||
|
||||
1. Install the third-party plugin ["Obsidian vConsole"](https://github.com/zhouhua/obsidian-vconsole).
|
||||
2. Enable "Obsidian vConsole". You shall see a green button in the right buttom corner of the interface of your mobile Obsidian. You can drag this green button to where you like.
|
||||
3. Sync! And quickly click the vConsole green button, you will see the console logs in its panel! Moreover, you can check browser network and Storage (LocalStorage) in the panel!
|
||||
4. You can copy (by clicking the small "disk" icon beside each line of the log) or take a screenshot of the logs, and report bugs in Remotely Save GitHub. You can click "Hide" in the panel to hide the panel.
|
||||
5. If you don't need to debug any more, you can disable Obsidian vConsole plugin, then the green button should disappear.
|
||||
95
docs/how_to_debug/export_sync_plans.md
Normal file
95
docs/how_to_debug/export_sync_plans.md
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
# Export Sync Plans
|
||||
|
||||
## What's this?
|
||||
|
||||
Everytime the plugin starts a sync, it gathers all required information together, generates a "sync plan" of every operations to every files and folders, and assign the corresponding actual operations.
|
||||
|
||||
Thus, if something goes wrong, we should check the sync plan firstly.
|
||||
|
||||
## How To Export The Plans?
|
||||
|
||||
Please read through the following instructions.
|
||||
|
||||
### Disable Auto Sync Firstly
|
||||
|
||||
You should disable auto sync to avoid any unexpected running.
|
||||
|
||||
### Manual Sync If Not Yet
|
||||
|
||||
You should at least sync once, so that at least one sync plan is generated and saved. If you have synced the vualt before, there should be some sync plans already saved.
|
||||
|
||||
### Export To The File
|
||||
|
||||
Go to the plugin settings, scroll down to the section "Debug" -> "export sync plans", and click the button "Export". \*\*It would generate a new folder `_debug_remotely_save/` in your vault, and generate a file `sync_plans_hist_exported_on_{a_timestamp},md.` inside that folder.
|
||||
|
||||
## How To Read The Plans
|
||||
|
||||
Open the genrated `sync_plans_hist_exported_on_{a_timestamp},md.`. You should see a json, or multiple jsons. Every json represents a sync plan.
|
||||
|
||||
A sync plan looks like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"ts": 1646960867560,
|
||||
"remoteType": "onedrive",
|
||||
"mixedStates": {
|
||||
"abc.md": {
|
||||
"key": "abc.md",
|
||||
"existRemote": true,
|
||||
"mtimeRemote": 1646566632000,
|
||||
"sizeRemote": 56797,
|
||||
"remoteEncryptedKey": "abc.md",
|
||||
"changeMtimeUsingMapping": true,
|
||||
"existLocal": true,
|
||||
"mtimeLocal": 1646566632000,
|
||||
"sizeLocal": 56797,
|
||||
"decision": "skipUploading",
|
||||
"decisionBranch": 1
|
||||
},
|
||||
"New folder/": {
|
||||
"key": "New folder/",
|
||||
"deltimeRemote": 1646925354372,
|
||||
"existLocal": false,
|
||||
"existRemote": false,
|
||||
"decision": "keepRemoteDelHistFolder",
|
||||
"decisionBranch": 9
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
We usually care about the `mixedStates` property. As you may guess, every item in `mixedStates` represent a file or a folder.
|
||||
|
||||
We should find out the file/folder we are interested in (or we believe something goes wrong), then checkout the following properties:
|
||||
|
||||
```
|
||||
decision
|
||||
What decision is made.
|
||||
|
||||
decisionBranch
|
||||
It's a mark of the actual logic in the sync code. Useful to debug.
|
||||
|
||||
existRemote
|
||||
Does the file/folder exist on the remote service?
|
||||
|
||||
mtimeRemote
|
||||
The "last modeified time" on the remote service.
|
||||
|
||||
deltimeRemote
|
||||
The "deletion time" on the remote record.
|
||||
|
||||
existLocal
|
||||
Does the file/folder exist locally?
|
||||
|
||||
mtimeLocal
|
||||
The max of "last modeified time" and "creation time" locally.
|
||||
|
||||
deltimeLocal
|
||||
The "deletion time" locally.
|
||||
```
|
||||
|
||||
The `decision` SHOULD be determined by the modified times and deletion times, by the logic described in [the doc of sync alogorithm](../sync_algorithm_v2.md). In short, we collect four timestamps (`mtimeRemote`, `deltimeRemote`, `mtimeLocal`, `deltimeLocal`), and respect the max timestamp and its corresponding operation.
|
||||
|
||||
## Common Issues
|
||||
|
||||
Some users report that their "last modeified time"s or "creation time"s are not set correctly by the operating system. In this case, the plugin cannot do anything because it determines the sync plan by comparing the timestamps. It's suggested to check the settings of the operating system or check whether other programs are doing something to the files.
|
||||
14
docs/how_to_debug/use_logstravaganza.md
Normal file
14
docs/how_to_debug/use_logstravaganza.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Use `Logstravaganza`
|
||||
|
||||
On iOS, it's quite hard to directly check the console logs.
|
||||
|
||||
Luckily, there is a third-party plugin: [`Logstravaganza`](https://obsidian.md/plugins?search=Logstravaganza#), by Carlo Zottmann, that can redirect the output to a note.
|
||||
|
||||
You can just:
|
||||
|
||||
1. Install it.
|
||||
2. Enable it.
|
||||
3. Do something, to trigger some console logs.
|
||||
4. Checkout `LOGGING-NOTE (device name).md` in the root of your vault.
|
||||
|
||||
See more on its site: <https://github.com/czottmann/obsidian-logstravaganza>.
|
||||
19
docs/import_export_some_settings.md
Normal file
19
docs/import_export_some_settings.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
## Bonus: Import And Export Not-Oauth2 Plugin Settings By QR Code
|
||||
|
||||
It's often verbose / inconvenient to input not-oauth2 credentials on mobile. (On different desktop computers, it's trivial to copy and paste `data.json` across different devices.)
|
||||
|
||||
So this plugin has a helper function to export those settings as a QR code, then you could use mobile device's camera to import the settings.
|
||||
|
||||
Attention:
|
||||
|
||||
1. Oauth2 - related information is omitted. It means that Dropbox, OneDrive login credentials are NOT included in the QR Code.
|
||||
2. Please, NEVER share the QR Code to others. It's as equivalent to the login credentials.
|
||||
|
||||
Steps:
|
||||
|
||||
1. Configure the plugin settings on one device, and make sure the sync functions work. (E.g, you could sync notes using S3 credentials.)
|
||||
2. Open plugin settings page. Then scroll down the page, until the section "Import and Export Settings". Click the button "Get QR Code". A new modal should show up and you should see a QR code.
|
||||
3. On a second device, make sure the vault name is the same as the first device's.
|
||||
4. On that second device, use its camera app, or any apps that support scanning QR codes, to scan the QR code from the first device. (On latest iOS, the system's built in camera app should work. On Android, at least one open source app [Binary Eye](https://github.com/markusfisch/BinaryEye) is tested to be working.)
|
||||
5. A link / url / address should be identified in the scan-QR-code app, and you could follow the instruction in the app, and then you should be redirected to open the Obsidian app.
|
||||
6. And finally, there should be a new notice in the Obsidian app saying the settings are successfully imported. Otherwise please check the error message in the notice.
|
||||
56
docs/linux.md
Normal file
56
docs/linux.md
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# How to receive `obsidian://` in Linux
|
||||
|
||||
## Background
|
||||
|
||||
For example, when we are authorizing OneDrive, we have to jump back to Obsidian automatically using `obsidian://`.
|
||||
|
||||
## Short Desc From Official Obsidian Doc
|
||||
|
||||
Official doc has some explanation:
|
||||
|
||||
<https://help.obsidian.md/Extending+Obsidian/Obsidian+URI#Register+Obsidian+URI>
|
||||
|
||||
# Long Desc
|
||||
|
||||
Assuming the username is `somebody`, and the `.AppImage` file is downloaded to `~/Desktop`.
|
||||
|
||||
1. Download and **extract** the app image file in terminal
|
||||
|
||||
```bash
|
||||
cd /home/somebody/Desktop
|
||||
chmod +x Obsidian-x.y.z.AppImage
|
||||
./Obsidian-x.y.z.AppImage --appimage-extract
|
||||
|
||||
# you should have the folder squashfs-root
|
||||
# we want to rename it
|
||||
mv squashfs-root Obsidian
|
||||
```
|
||||
|
||||
2. Create a `.desktop` file
|
||||
|
||||
```bash
|
||||
# copy and paste the follow MULTI LINE command
|
||||
# you might need to input your password because it requires root privilege
|
||||
# remember to adjust the path
|
||||
cat > ~/Desktop/obsidian.desktop <<EOF
|
||||
[Desktop Entry]
|
||||
Name=Obsidian
|
||||
Comment=obsidian
|
||||
Exec=/home/somebody/Desktop/Obsidian/obsidian %u
|
||||
Keywords=obsidian
|
||||
StartupNotify=true
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=/home/somebody/Desktop/Obsidian/obsidian.png
|
||||
MimeType=x-scheme-handler/obsidian;
|
||||
EOF
|
||||
|
||||
# yeah we can check out the output
|
||||
cat ~/Desktop/obsidian.desktop
|
||||
## [Desktop Entry]
|
||||
## ...
|
||||
```
|
||||
|
||||
3. Right click the `obsidian.desktop` file on the Desktop, and click "Allow launching"
|
||||
|
||||
4. Double click the `obsidian.desktop` file.
|
||||
85
docs/migration-from-remotely-save.md
Normal file
85
docs/migration-from-remotely-save.md
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# Migrating from Remotely Save to Obsidian BYOC
|
||||
|
||||
This guide covers what changes when you switch from the upstream [remotely-save](https://github.com/remotely-save/remotely-save) plugin to Obsidian BYOC.
|
||||
|
||||
## TL;DR
|
||||
|
||||
1. Disable Remotely Save.
|
||||
2. Install BYOC.
|
||||
3. Re-enter your provider credentials in BYOC settings.
|
||||
4. Run one sync and verify.
|
||||
|
||||
## Plugin ID change
|
||||
|
||||
| | Remotely Save | BYOC |
|
||||
|---|---|---|
|
||||
| Plugin ID | `remotely-save` | `obsidian-byoc` |
|
||||
| Settings file | `.obsidian/plugins/remotely-save/data.json` | `.obsidian/plugins/obsidian-byoc/data.json` |
|
||||
|
||||
Because the plugin ID is different, Obsidian treats these as completely separate plugins. **Settings are not migrated automatically.** You will need to re-enter your configuration.
|
||||
|
||||
## Step-by-step migration
|
||||
|
||||
### 1. Note your current settings
|
||||
|
||||
Before disabling Remotely Save, open its settings and note:
|
||||
|
||||
- Which provider you are using
|
||||
- Your remote folder / prefix setting
|
||||
- Your encryption password (if any)
|
||||
- Any skip-paths or skip-large-files settings
|
||||
- Your conflict resolution strategy
|
||||
|
||||
### 2. Disable Remotely Save
|
||||
|
||||
In Obsidian → Settings → Community plugins, toggle off Remotely Save. **Do not uninstall it yet** in case you need to reference settings.
|
||||
|
||||
### 3. Install BYOC
|
||||
|
||||
Install via BRAT or manually (see [README](../README.md#installation)).
|
||||
|
||||
### 4. Re-enter your settings in BYOC
|
||||
|
||||
Open BYOC settings and configure the same provider with the same credentials and folder settings you noted in step 1.
|
||||
|
||||
**Important:** Use the same remote folder / prefix as before. If you change it, BYOC will treat the remote as empty and re-upload everything.
|
||||
|
||||
### 5. Re-enter your encryption password
|
||||
|
||||
If you used end-to-end encryption, enter the **exact same password** in BYOC. The encrypted files on the remote are in the same format (openssl / rclone crypt), so the same password will decrypt them.
|
||||
|
||||
If you enter a different password (or no password), BYOC will be unable to read the encrypted files and may overwrite them.
|
||||
|
||||
### 6. Run a test sync
|
||||
|
||||
Trigger a manual sync. On the first run, BYOC has no previous sync history, so it will treat all remote files as "created remotely" and download them. This is safe and expected.
|
||||
|
||||
### 7. Verify
|
||||
|
||||
Check that your vault files look correct. If everything looks good, you can uninstall Remotely Save.
|
||||
|
||||
## PRO features
|
||||
|
||||
If you were using Remotely Save PRO features (Google Drive, Box, pCloud, Yandex Disk, Koofr, Azure Blob Storage, OneDrive Full), those are fully unlocked in BYOC with no subscription required.
|
||||
|
||||
Re-authorize each provider in BYOC settings — your existing data on the remote is untouched.
|
||||
|
||||
## Sync history / prevSync database
|
||||
|
||||
Remotely Save stores sync history in a local SQLite database (`.obsidian/plugins/remotely-save/remotely-save.db`). BYOC uses a separate database at `.obsidian/plugins/obsidian-byoc/remotely-save.db`.
|
||||
|
||||
On the first sync after migration, BYOC has no prior sync history. It will:
|
||||
|
||||
- Download any remote-only files (treat them as "remote created")
|
||||
- Upload any local-only files (treat them as "local created")
|
||||
- Files present on both sides with the same content will sync without conflict
|
||||
|
||||
This is safe behavior — it essentially re-establishes the baseline. After the first sync, future incremental syncs will use the 3-way merge algorithm correctly.
|
||||
|
||||
## Rolling back
|
||||
|
||||
If you want to go back to Remotely Save:
|
||||
|
||||
1. Disable BYOC.
|
||||
2. Re-enable Remotely Save.
|
||||
3. Your remote files are unchanged — Remotely Save's database is also unchanged.
|
||||
27
docs/minimal_intrusive_design.md
Normal file
27
docs/minimal_intrusive_design.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Minimal Intrusive Design
|
||||
|
||||
~~Before version 0.3.0, the plugin did not upload additional meta data to the remote.~~
|
||||
|
||||
~~From version 0.3.0 ~ 0.3.40, the plugin just upload minimal extra necessary meta data to the remote.~~
|
||||
|
||||
From version 0.4.1 and above, the plugin doesn't need uploading meta data due to the sync algorithm upgrade.
|
||||
|
||||
## Benefits
|
||||
|
||||
Then the plugin doesn't make more-than-necessary assumptions about information on the remote endpoint.
|
||||
|
||||
For example, it's possbile for a uses to manually upload a file to s3, and next time the plugin can download that file to the local device.
|
||||
|
||||
And it's also possible to combine another "sync-to-s3" solution (like, another software) on desktops, and this plugin on mobile devices, together.
|
||||
|
||||
## ~~Necessarity Of Uploading Extra Metadata from 0.3.0 ~ 0.3.40~~
|
||||
|
||||
~~The main issue comes from deletions (and renamings which is actually interpreted as "deletion-then-creation").~~
|
||||
|
||||
~~If we don't upload any extra info to the remote, there's usually no way for the second device to know what files / folders have been deleted on the first device.~~
|
||||
|
||||
~~To overcome this issue, from and after version 0.3.0, the plugin uploads extra metadata files `_remotely-save-metadata-on-remote.{json,bin}` to users' configured cloud services. Those files contain some info about what has been deleted on the first device, so that the second device can read the list to apply the deletions to itself. Some other necessary meta info would also be written into the extra files.~~
|
||||
|
||||
## No uploading extra metadata from 0.4.1
|
||||
|
||||
Some information, including previous successful sync status of each file, is kept locally.
|
||||
53
docs/pro/README.md
Normal file
53
docs/pro/README.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# PRO Features
|
||||
|
||||
From version 0.5.x, Remotely Save introduces PRO (paid) features. Users need to subscribe to (pay) them to use them.
|
||||
|
||||
**If you are using basic features only, you don't need an online account, and you don't need to pay for the plugin.**
|
||||
|
||||
# Links
|
||||
|
||||
* Remotely Save official website: <https://remotelysave.com>
|
||||
* Sign up / Sign in: <https://remotelysave.com/user/signupin>
|
||||
* User profile: <https://remotelysave.com/user/profile>
|
||||
|
||||
# Disclaimer
|
||||
|
||||
It's different from, and NOT affiliated with Obsidian account.
|
||||
|
||||
# Steps
|
||||
|
||||
## Steps of signing up and signing in
|
||||
|
||||
1. Go to the website, sign up and sign in. You can directly visit <https://remotelysave.com/user/signupin> or click the link in Remotely Save plugin setting page.
|
||||

|
||||
2. Use an email and your password as usual. Don't need to be GMail account.
|
||||
|
||||
## Steps of connecting
|
||||
|
||||
You need to connect your plugin to your online account. In Obsidian, in your Remotely Save plugin setting, you can click the button "Connect" to start the flow.
|
||||
|
||||
1. You will see a special address on website. Click it and visit the website
|
||||
2. Click "allow" on the website.
|
||||
3. In the end of the auth flow on the website, you will be shown up a code, please copy it...
|
||||
4. And paste the code back to the plugin modal inside Obsidian, and confirm.
|
||||
|
||||

|
||||
|
||||
## Steps of subscribing to some features.
|
||||
|
||||
1. Firstly please visit your [profile page](https://remotelysave.com/user/profile) online.
|
||||
2. You can subscribe to some features. Prices vary.
|
||||

|
||||
3. Go back to your Remotely Save plugin inside Obsidian, click "Check again" button in PRO settings. So that the plugin knows some features are enabled.
|
||||

|
||||
4. Sync and enjoy your PRO features!
|
||||
|
||||
## Why so complicated?
|
||||
|
||||
Because we don't have a payment method inside the plugin, so we have to:
|
||||
|
||||
* build a website,
|
||||
* require users having online accounts
|
||||
* and connect the plugin to the online account.
|
||||
|
||||
Moreover, an online account allows flexible management of subscriptions.
|
||||
3
docs/pro/check_pro_features_in_settings.png
Normal file
3
docs/pro/check_pro_features_in_settings.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8c73da29a621d225387640b76ec0dcfb56b3ffad151dab374d3b7cc76067a1a0
|
||||
size 94377
|
||||
3
docs/pro/connect_flow.png
Normal file
3
docs/pro/connect_flow.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:116c2a8ec1a277a3985f4056b390574fc57145ec5635d44accf2a7445666264a
|
||||
size 626668
|
||||
3
docs/pro/pro_features_enabled_on_website.png
Normal file
3
docs/pro/pro_features_enabled_on_website.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4c45c08e6fc487341032aac511c332e3f9978a44e9b93377a73648b56b684b62
|
||||
size 155427
|
||||
3
docs/pro/pro_setting.png
Normal file
3
docs/pro/pro_setting.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:08d128125dba033f5dd18a6ea8d942b284ddca6c5c3b0362c47dcb4a7153a8f9
|
||||
size 395800
|
||||
107
docs/remote_services/azureblobstorage/README.md
Normal file
107
docs/remote_services/azureblobstorage/README.md
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
# Azure Blob Storage (GDrive) (PRO)
|
||||
|
||||
# Intro
|
||||
|
||||
* It's a PRO feature of Remotely Save plugin.
|
||||
* **This plugin is NOT an official Microsoft / Azure product, and just uses Azure Blob Storage's public api.**
|
||||
|
||||
# Disclaimer
|
||||
|
||||
I (author of Remotely Save) is **NOT** an expert of Azure products. The tutorials here are for references only. Azure products are very complex.
|
||||
|
||||
***As far as the law allows, the software (Remotely Save) comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
||||
|
||||
# Steps
|
||||
|
||||
Please read through the following steps before you actually connect.
|
||||
|
||||
## Preparation In Azure Blob Storage Side
|
||||
|
||||
You only need to do this **once**, before the Container SAS Url expires in the future.
|
||||
|
||||
In short, you need to: configure CORS and configure a policy and cobtain a Container SAS Url.
|
||||
|
||||
1. Connect to the service:
|
||||
|
||||
Download Microsoft's free [Azure Storage Explorer](https://azure.microsoft.com/en-us/products/storage/storage-explorer). The following tutorial uses this app. Actually you may be able to find the same settings on Azure official website.
|
||||
|
||||
Use this app to connect to your Blob Storage service or account.
|
||||
|
||||
2. CORS:
|
||||
|
||||
Right click on `Blob containers`, click "configure CORS". Add a rule, enter the following and save:
|
||||
```
|
||||
Allowed Origins: *
|
||||
Allowed Methods: DELETE,GET,HEAD,MERGE,POST,PATCH,OPTIONS,PUT
|
||||
Allowed Headers: x-ms-*, content-type
|
||||
Exposed Headers: x-ms-*, content-type
|
||||
Max Age (in seconds): 5
|
||||
```
|
||||
|
||||

|
||||
|
||||
3. Create the container:
|
||||
|
||||
Create the container if you don't have one. In this tutorial, we use `example-container`.
|
||||
|
||||

|
||||
|
||||
4. Generate a policy:
|
||||
|
||||
* Right click on you container, click "Manage Stored Access Policies".
|
||||
* Choose your id, for example `example-container-0000001`.
|
||||
* Change to Expiry time to an appropriate date. **By default it is only valid for a week.** After its expiration, you need come back and adjust the expiry date again! In this tutorial, we set it to a year.
|
||||
* And allow these methods: Read, Add, Create, Write, Delete, List.
|
||||
* Save
|
||||
|
||||
Read Microsoft's official [doc](https://learn.microsoft.com/en-us/rest/api/storageservices/define-stored-access-policy) for more info. The main benefit of generating an access policy is easier revocation of SAS Url if anything goes bad.
|
||||
|
||||

|
||||

|
||||
|
||||
5. Generate a Container SAS Url:
|
||||
|
||||
Then we want to create a container level SAS (shared access signature) url.
|
||||
|
||||
* Right click on you container, click "Get Shared Access Signature".
|
||||
* In access policy, choose the previous one you created: for example `example-container-0000001`.
|
||||
* Save the setting
|
||||
* You will see a url is generated, which starts with `https://` or `http://`. It should looks like `https://<account>.blob.core.windows.net/<container name>?sv=...&sig=...`
|
||||
* Save the Container SAS Url somewhere, and you will need this later.
|
||||
|
||||
Read Microsoft's official [doc](https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview) for more info.
|
||||
|
||||

|
||||

|
||||
|
||||
### Why so complicated in Azure settings?
|
||||
|
||||
Because Azure Blob Storage's api has some limitation in browser environment, so we need to configure CORS and SAS. Because we want to revoke the SAS when needed, we need to use a policy.
|
||||
|
||||
### Revocation
|
||||
|
||||
If you suspect someone read the resource unexpectedly, you can revoke the SAS by changing the name or expiry date of the policy. And generate the SAS Url again.
|
||||
|
||||
## Steps of Remotely Save subscription
|
||||
|
||||
1. Please sign up and sign in an online account, connect your plugin to your online account firstly. See [the PRO tutorial](../../pro/README.md) firstly.
|
||||
2. Subscribe to "sync with Azure Blob Storage" feature online.
|
||||
3. Go back to your Remotely Save plugin inside Obsidian, click "Check again" button in PRO settings. So that the plugin knows some features are enabled. In this case, sync with Azure Blob Storage should be detected.
|
||||
|
||||
## Steps of Connecting to your Azure Blob Storage
|
||||
|
||||
After you enabled the PRO feature in your Remotely Save plugin, **and prepared the Container SAS Url**, you can connect to your Azure Blob Storage account now.
|
||||
|
||||
1. In Remotely Save settings, change your sync service to Azure Blob Storage.
|
||||
2. Input your Container SAS Url
|
||||
3. Input your container name.
|
||||
4. By default, the plugin will save your vault remotely with a prefix `<your vault name>/`. You can change the prefix. No prefix is not allowed.
|
||||
5. Check the connection. A notice will tell you that you've connected or not.
|
||||
7. Sync! The plugin will upload the fils and "folders" of your vault into your Azure Blob Storage with the preix.
|
||||
8. **Read the caveats below.**
|
||||
|
||||

|
||||
|
||||
# The caveats
|
||||
|
||||
* As of June 2024, this feature is in alpha stage. **Back up your vault before using this feature.**
|
||||
3
docs/remote_services/azureblobstorage/azure_cors.png
Normal file
3
docs/remote_services/azureblobstorage/azure_cors.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:83caba9a42772f995035e3c879c6119eabcd6d3c27298cf0fb067b3676680571
|
||||
size 107057
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ef2d525d3ac7ecca26f7f8b6782fb1056d54f8c558a8d77586571defb7e6b5be
|
||||
size 41282
|
||||
3
docs/remote_services/azureblobstorage/azure_policy_1.png
Normal file
3
docs/remote_services/azureblobstorage/azure_policy_1.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cba5bf27e76eaf8ea21e51e43172501fc4867539c90c1758a02945477dc261ea
|
||||
size 132487
|
||||
3
docs/remote_services/azureblobstorage/azure_policy_3.png
Normal file
3
docs/remote_services/azureblobstorage/azure_policy_3.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b2add8a559eab0b7073f7ed52d4a3e4efae68b499c7b924d1ac50278758961b
|
||||
size 193894
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:582a69a7aee2cfab72dc14324e4a864acab92c145d533e799f8ceea61a8f0102
|
||||
size 478941
|
||||
3
docs/remote_services/azureblobstorage/azure_sas_1.png
Normal file
3
docs/remote_services/azureblobstorage/azure_sas_1.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cbb8863d98d8826739b5bf9fa4c7a2de3ba49fde4bbe3c4988a877ba74f89abd
|
||||
size 143007
|
||||
3
docs/remote_services/azureblobstorage/azure_sas_2.png
Normal file
3
docs/remote_services/azureblobstorage/azure_sas_2.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ddc30f97d75d7c3a6061cbb30cc991cbdf1f4039aad3547ef88998c3dd9be666
|
||||
size 132904
|
||||
34
docs/remote_services/box/README.md
Normal file
34
docs/remote_services/box/README.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Box (PRO)
|
||||
|
||||
# Links
|
||||
|
||||
<https://www.box.com/>
|
||||
|
||||
# Intro
|
||||
|
||||
* It's a PRO feature of Remotely Save plugin.
|
||||
* **This plugin is NOT an official Box product, and just uses Box's public api.**
|
||||
|
||||
# Steps
|
||||
|
||||
## Steps of Remotely Save subscription
|
||||
|
||||
1. Please sign up and sign in an online account, connect your plugin to your online account firstly. See [the PRO tutorial](../../pro/README.md) firstly.
|
||||
2. Subscribe to "sync with Box" feature online.
|
||||
3. Go back to your Remotely Save plugin inside Obsidian, click "Check again" button in PRO settings. So that the plugin knows some features are enabled. In this case, sync with Box should be detected.
|
||||
|
||||
## Steps of Connecting to your Box
|
||||
|
||||
After you enabled the PRO feature in your Remotely Save plugin, you can connect to your Box account now.
|
||||
|
||||
1. In Remotely Save settings, change your sync service to Box.
|
||||
2. Click Auth, visit the link, go to Box website to start.
|
||||
3. Follow the instruction on Box, and allow Remotely Save to connect.
|
||||
4. You will be redirected back to Remotely Save plugin.
|
||||
5. A notice will tell you that you've connected or not.
|
||||
6. Sync! The plugin will create a vault folder in the root of your Box and upload notes into that folder.
|
||||
7. **Read the caveats below.**
|
||||
|
||||
# The caveats
|
||||
|
||||
* As of June 2024, this feature is in beta stage. **Back up your vault before using this feature.**
|
||||
59
docs/remote_services/googledrive/README.md
Normal file
59
docs/remote_services/googledrive/README.md
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# Google Drive (GDrive) (PRO)
|
||||
|
||||
# Intro
|
||||
|
||||
* It's a PRO feature of Remotely Save plugin.
|
||||
* **This plugin is NOT an official Google product, and just uses Google Drive's public api.**
|
||||
|
||||
# Steps
|
||||
|
||||
## Steps of Remotely Save subscription
|
||||
|
||||
1. Please sign up and sign in an online account, connect your plugin to your online account firstly. See [the PRO tutorial](../../pro/README.md) firstly.
|
||||
2. Subscribe to "sync with Google Drive" feature online.
|
||||
3. Go back to your Remotely Save plugin inside Obsidian, click "Check again" button in PRO settings. So that the plugin knows some features are enabled. In this case, sync with Google Drive should be detected.
|
||||
|
||||
## Steps of Connecting to your Google Drive
|
||||
|
||||
After you enabled the PRO feature in your Remotely Save plugin, you can connect to your Google Drive account now.
|
||||
|
||||
1. In Remotely Save settings, change your sync service to Google Drive.
|
||||

|
||||
2. Click Auth, visit the link, go to Remotely Save website to start.
|
||||

|
||||
3. On the website, click the link to go to Google Drive auth page.
|
||||
4. Follow the instruction on Google website, and allow (continue) Remotely Save to connect.
|
||||

|
||||
5. You will be redirected to Remotely Save website, and you will get a code. Copy it...
|
||||

|
||||
6. ... And paste the code back to the plugin inside Obsidian. Click submit.
|
||||

|
||||
7. A notice will tell you that you've connected or not.
|
||||
8. Sync! The plugin will create a vault folder in the root of your Google Drive and upload notes into that folder.
|
||||
9. **Read the caveats below.**
|
||||
|
||||
# Why so complicated?
|
||||
|
||||
Because Google Drive's api doesn't fit into the special envorinment of Obsidian plugin. So we need a website.
|
||||
|
||||
# The credential
|
||||
|
||||
The website does **NOT** store or save the Google drive credential (the code you obtian in the end of the flow). The website is just a "bridge" to help you obtain that code, and just manage your subscription to PRO features.
|
||||
|
||||
But please be aware that the code is saved locally in your Obsidian. It works like a special password. So that the plugin can upload or download or modify the files for you.
|
||||
|
||||
# The caveats
|
||||
|
||||
* As of June 2024, this feature is in beta stage. **Back up your vault before using this feature.**
|
||||
|
||||
* The plugin can **only** sees, reads or writes the files and folders created by itself!
|
||||
|
||||
It means that, you CANNOT manually create the vault folder in your Google Drive account. And if you manually upload any files using Google's official website, the plugin does **NOT** see them. All operations must go through Obsidian and uploaded by the plugin.
|
||||
|
||||
You can, however, view, and download the files on Google Drive [official web page](https://drive.google.com/drive/u/0/my-drive).
|
||||
|
||||
Precisely speaking, the plugin applies for the `drive.file` scope recommended by Google. See [the doc](https://developers.google.com/drive/api/guides/api-specific-auth#benefits) by Google for the scope's benefits. Basically the plugin will never (is unable to) mess up your other files or folders.
|
||||
|
||||
Moreover, this scope is "not-sensitive", so that the plugin doesn't need to go through Google's complicated verification process while applying for it.
|
||||
|
||||
* Google Drive, unlike other cloud storage, allows files of same name co-existing in the same folder! (hmmmmm...) It may or may not make the plugin stop working. Users might need to remove the duplicated file manually on Google's official website.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eaa9aa8ba6b066dfefdce08a8d1da1d97089f5c2de0ba4c0c026d6df9eb9ece8
|
||||
size 99896
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6683a63718053603ae7dde44063a3807ba0def7e935da0b40fcc8e181afd24ae
|
||||
size 342848
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:310bd4c7d5fe19521ec7184b2eee749f0eecf00397f2b8e68480c23b4fd7c943
|
||||
size 153504
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dcebb1f73829670883071447a8eee46c972b26fe8735c7422949cb6fe927b8ab
|
||||
size 179369
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7e5a85c28f5614e4de75eacc021c2876d36596bcb77f0744a6edcff7777b9530
|
||||
size 155004
|
||||
38
docs/remote_services/koofr/README.md
Normal file
38
docs/remote_services/koofr/README.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Koofr (PRO)
|
||||
|
||||
# Links
|
||||
|
||||
<https://koofr.eu/>
|
||||
|
||||
# Intro
|
||||
|
||||
* It's a PRO feature of Remotely Save plugin.
|
||||
* **This plugin is NOT an official Koofr product, and just uses Koofr's public api.**
|
||||
|
||||
# Steps
|
||||
|
||||
## Steps of Remotely Save subscription
|
||||
|
||||
1. Please sign up and sign in an online account, connect your plugin to your online account firstly. See [the PRO tutorial](../../pro/README.md) firstly.
|
||||
2. Subscribe to "sync with Koofr" feature online.
|
||||
3. Go back to your Remotely Save plugin inside Obsidian, click "Check again" button in PRO settings. So that the plugin knows some features are enabled. In this case, sync with Koofr should be detected.
|
||||
|
||||
## Steps of Connecting to your Koofr
|
||||
|
||||
After you enabled the PRO feature in your Remotely Save plugin, you can connect to your Koofr account now.
|
||||
|
||||
1. In Remotely Save settings, change your sync service to Koofr.
|
||||
2. Click Auth, visit the link, go to Koofr website to start.
|
||||
3. Follow the instruction on Koofr, and allow Remotely Save to connect.
|
||||
4. You will be redirected back to Remotely Save plugin.
|
||||
5. A notice will tell you that you've connected or not.
|
||||
6. Sync! The plugin will create a vault folder in the root of your Koofr and upload notes into that folder.
|
||||
7. **Read the caveats below.**
|
||||
|
||||
# The caveats
|
||||
|
||||
* As of June 2024, this feature is in beta stage. **Back up your vault before using this feature.**
|
||||
|
||||
# Why not use webdav?
|
||||
|
||||
The Remotely Save PRO feture "sync with Koofr" is developed using Koofr's native API, instead of webdav interface. It brings benefits such that the last modified time can be preserved.
|
||||
31
docs/remote_services/onedrive/README.md
Normal file
31
docs/remote_services/onedrive/README.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# OneDrive (App Folder)
|
||||
|
||||
- **This plugin is NOT an official Microsoft / OneDrive product.** The plugin just uses Microsoft's [OneDrive's public API](https://docs.microsoft.com/en-us/onedrive/developer/rest-api).
|
||||
- After the authorization, the plugin can read your name and email, and read and write files in your OneDrive's `/Apps/remotely-save` folder.**The free version of Remotely Save only connects to App Folder, while the PRO version can connect to the root folder in Onedrive.**
|
||||
- If you decide to authorize this plugin to connect to OneDrive, please go to plugin's settings, and choose OneDrive then follow the instructions.
|
||||
- Password-based end-to-end encryption is also supported. But please be aware that **the vault name itself is not encrypted**.
|
||||
- If you want to sync the files across multiple devices, **your vault name should be the same** while using default settings.
|
||||
|
||||
## FAQ
|
||||
|
||||
### How about OneDrive for Business?
|
||||
|
||||
This plugin only works for "OneDrive for personal", and not works for "OneDrive for Business" (yet). See [#11](https://github.com/fyears/remotely-save/issues/11) to further details.
|
||||
|
||||
### I cannot find `/Apps/remotely-save` folder
|
||||
|
||||
Mystically some users report that their OneDrive generate `/Application/Graph` instead of `/Apps/remotely-save`. See [#517](https://github.com/remotely-save/remotely-save/issues/517).
|
||||
|
||||
The solution is simple:
|
||||
|
||||
1. Backup your vault manually.
|
||||
2. Go to onedrive website (<https://onedrive.live.com/>), and rename `/Application/Graph` to `/Application/remotely-save` (right click on the folder and you will see rename option)
|
||||
3. Come back to Obsidian and try to sync!
|
||||
|
||||
### Empty file is not uploaded
|
||||
|
||||
Onedrive's API does not allow uploading empty files. You can choose to skip them or raise errors in Remotely Save plugin's settings.
|
||||
|
||||
### How to connect to root folder rather than the App Folder?
|
||||
|
||||
As of June 2024, this is a new PRO feature. See the [doc](../onedrivefull/README.md).
|
||||
42
docs/remote_services/onedrivefull/README.md
Normal file
42
docs/remote_services/onedrivefull/README.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# Onedrive (Full) (PRO)
|
||||
|
||||
# Intro
|
||||
|
||||
* It's a PRO feature of Remotely Save plugin.
|
||||
* **This plugin is NOT an official Microsoft / Onedrive product, and just uses Onedrive's public api.**
|
||||
* This still only applies to Onedrive for personal. The dev team doesn't have Onedrive for business account to develop and test on it.
|
||||
|
||||
# Steps
|
||||
|
||||
## Steps of Remotely Save subscription
|
||||
|
||||
1. Please sign up and sign in an online account, connect your plugin to your online account firstly. See [the PRO tutorial](../../pro/README.md) firstly.
|
||||
2. Subscribe to "sync with Onedrive (Full)" feature online.
|
||||
3. Go back to your Remotely Save plugin inside Obsidian, click "Check again" button in PRO settings. So that the plugin knows some features are enabled. In this case, sync with Onedrive (Full) should be detected.
|
||||
|
||||
## Steps of Connecting to your Onedrive
|
||||
|
||||
After you enabled the PRO feature in your Remotely Save plugin, you can connect to your Onedrive account now.
|
||||
|
||||
1. In Remotely Save settings, change your sync service to Onedrive (Full).
|
||||
2. Click Auth, visit the link, go to Onedrive website to start.
|
||||
3. Follow the instruction on Onedrive, and allow Remotely Save to connect.
|
||||
4. You will be redirected back to Remotely Save plugin.
|
||||
5. A notice will tell you that you've connected or not.
|
||||
6. Sync! The plugin will create a vault folder **in the root** of your Onedrive and upload notes into that folder.
|
||||
7. **Read the caveats below.**
|
||||
|
||||
# The caveats
|
||||
|
||||
* As of June 2024, this feature is in beta stage.
|
||||
* **Back up your vault before using this feature.**
|
||||
* **Back up everything in your Onedrive (besides the sync sub folder) before using this feature!**
|
||||
* Onedrive's API does not allow uploading empty files. You can choose to skip them or raise errors in Remotely Save plugin's settings.
|
||||
|
||||
# What's the difference of Onedrive (App Folder) and Onedrive (Full)?
|
||||
|
||||
Due to history reasons, Remotely Save only supported uploading to App Folder back to year 2021. Because that greatly ensured the security and ensure not messing up with others files.
|
||||
|
||||
However, repeatedly some users want to sync to arbitrary root folder rather than `/Apps/remotely-save/` folder. Thus as of June 2024, the new PRO feature is finally developed.
|
||||
|
||||
As of June 2024, connecting to Onedrive (App Folder) is free, but connecting to Onedrive (Full) is a PRO feature.
|
||||
40
docs/remote_services/pcloud/README.md
Normal file
40
docs/remote_services/pcloud/README.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# pCloud (PRO)
|
||||
|
||||
# Links
|
||||
|
||||
<https://www.pcloud.com/>
|
||||
|
||||
# Intro
|
||||
|
||||
* It's a PRO feature of Remotely Save plugin.
|
||||
* **This plugin is NOT an official pCloud product, and just uses pCloud's public api.**
|
||||
|
||||
# Steps
|
||||
|
||||
## Steps of Remotely Save subscription
|
||||
|
||||
1. Please sign up and sign in an online account, connect your plugin to your online account firstly. See [the PRO tutorial](../../pro/README.md) firstly.
|
||||
2. Subscribe to "sync with pCloud" feature online.
|
||||
3. Go back to your Remotely Save plugin inside Obsidian, click "Check again" button in PRO settings. So that the plugin knows some features are enabled. In this case, sync with pCloud should be detected.
|
||||
|
||||
## Steps of Connecting to your pCloud
|
||||
|
||||
After you enabled the PRO feature in your Remotely Save plugin, you can connect to your pCloud account now.
|
||||
|
||||
1. In Remotely Save settings, change your sync service to pCloud.
|
||||
2. Click Auth, visit the link, go to pCloud website to start.
|
||||
3. Follow the instruction on pCloud, and allow Remotely Save to connect.
|
||||
4. You will be redirected back to Remotely Save plugin.
|
||||
5. A notice will tell you that you've connected or not.
|
||||
6. Sync! The plugin will create a vault folder in the root of your pCloud and upload notes into that folder.
|
||||
7. **Read the caveats below.**
|
||||
|
||||
# The caveats
|
||||
|
||||
* As of June 2024, this feature is in beta stage. **Back up your vault before using this feature.**
|
||||
* pCloud's API seems to not allow uploading empty files. You can choose to skip them or raise errors in Remotely Save plugin's settings.
|
||||
|
||||
# Why not use webdav?
|
||||
|
||||
1. pCloud only provides webdav for Premium. If you are a Premium user, you can still use pCloud webdav with Remotely Save.
|
||||
2. The Remotely Save PRO feture "sync with pCloud" is developed using pCloud's native API, instead of webdav interface. It brings benefits such that the last modified time can be preserved.
|
||||
53
docs/remote_services/s3_backblaze_b2/README.md
Normal file
53
docs/remote_services/s3_backblaze_b2/README.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Backblaze B2
|
||||
|
||||
## Links
|
||||
|
||||
https://www.backblaze.com/cloud-storage
|
||||
|
||||
## Steps
|
||||
|
||||
1. Create a Backblaze account [on this page](https://www.backblaze.com/cloud-storage). Credit card info _is not_ required. Backblaze B2 offers 10 GB of free storage.
|
||||
|
||||
2. Please be aware that, though B2 provides some free quota, **it may still cost you money if the usage of storage or api requests exceed a certain value!!!** Especially pay attention to the api requests!!!
|
||||
|
||||
3. Create a **bucket**, you can leave the default settings, or you can enable the encryption (which is different from what you can set in Remotely Save):
|
||||
|
||||

|
||||

|
||||
|
||||
4. Copy `Endpoint`, eg. `s3.us-east-005.backblazeb2.com` — it'll be used later.
|
||||
|
||||
5. Copy `bucketname` near the 🪣 icon (the "bucket icon") — it'll be used later.
|
||||
|
||||

|
||||
|
||||
6. Go to **Application Keys**:
|
||||
|
||||

|
||||
|
||||
7. **Add a new key**:
|
||||
|
||||

|
||||

|
||||
|
||||
8. Save `keyID` and `applicationKey` — they will be used later.
|
||||
|
||||
9. Go to Remotely Save settings in Obsidian and:
|
||||
|
||||
- Choose `S3 or compatibile` in **Remote Service**:
|
||||
- Copy `Endpoint` from Backblaze (see 3. above) to `Endpoint` in Remotely Save
|
||||
- From `endpoint` take `region` (eg. `us-east-005`) and paste it in `endpoint` in Remotely Save
|
||||
- Copy `keyID` (see 7. above) to `Access Key ID` in Remotely Save
|
||||
- Copy `applicationKey` (see 7. above) to `Secret Access Key` in Remotely Save
|
||||
- Copy `bucketname` (see 4. above) to `Bucket Name` in Remotely Save
|
||||

|
||||
|
||||
10. **Enable Bypass CORS**:
|
||||

|
||||
|
||||
11. Click **Check** in _Check Connectivity_ to see if you can connect to B2 bucket:
|
||||

|
||||
|
||||
12. Sync!
|
||||
|
||||

|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fae18a84bb218461aca01c7de47ddadfd2b451d865ec889c098cd6918f6e8773
|
||||
size 59679
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9389f9c4462740371edb548f7e05191ede5277a5d470e3254c60fbcc4a75e552
|
||||
size 4558
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:46f35968938ebf3bbafae64ee49a4927844fd0abf79e4190522be91776d9fed0
|
||||
size 107623
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7fb639c7b4e595516594ee9d07c864e7cd15b608a97c81386f4cf72d499d0e5f
|
||||
size 80121
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:299bfca82b77de86f60d8f481b5f74069dc977dece19fa025ee629d1e6f783d4
|
||||
size 6499
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5985e918b521c91cc185f60c58cdd334ee76695b897a02e02eaa17c1bad71609
|
||||
size 10214
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5796791bcf89c99c1e1e844c0083739fd46b1a458dc274f3c3fa3f65b87b71b3
|
||||
size 70728
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3633379fcb12f1a5e0a4d1d68c193ddc7bf0be7edd92f2f6006351817035a94f
|
||||
size 27164
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9e130be182ae7d3270e5de3fec442ac5e81efd61822e844cd61ed24c7e485d39
|
||||
size 16802
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:29a8971fea065fd86223850198640f4072ee3fda2112820829cda1348f122c59
|
||||
size 11103
|
||||
27
docs/remote_services/s3_cloudflare_r2/README.md
Normal file
27
docs/remote_services/s3_cloudflare_r2/README.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Cloudflare R2
|
||||
|
||||
## Links
|
||||
|
||||
<https://www.cloudflare.com/developer-platform/r2/>
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Be aware that it may cost you money.**
|
||||
2. Create a Cloudflare account and enable R2 feature. **Credit card info might be required by Cloudflare**, though Cloudflare provides generous free tier and zero egress fee.
|
||||
3. Create a bucket.
|
||||

|
||||
4. Create an Access Key with "Object Read & Write" permission, and add specify to your created bucket. During the creation, you will also get the auto-generated secret key, and the endpoint address.
|
||||

|
||||
5. In remotely-save setting page, input the address / bucket / access key / secret key. **Region being set to `us-east-1` is sufficient.** Enable "Bypass CORS", because usually that's what you want.
|
||||
|
||||
Click "check connectivity". (If you encounter an issue and sure the info are correct, please upgrade remotely-save to **version >= 0.3.29** and try again.)
|
||||
|
||||

|
||||
|
||||
6. Sync!
|
||||
|
||||
## And Issue Related To "Check Connectivity"
|
||||
|
||||
If you encounter an issue and sure the info are correct, please upgrade remotely-save to **version >= 0.3.29** and try again.
|
||||
|
||||
Cloudflare doesn't allow `HeadBucket` for access keys with "Object Read & Write". So it may be possible that checking connectivity is not ok but actual syncing is ok. New version >= 0.3.29 of the plugin fix this problem by using `ListObjects` instead of `HeadBucket`.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:49a5cd07e538205ba733dc3ccb30e4e7da1290a4a80aefe08afac19fd2db2232
|
||||
size 467448
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:61fc0812fe96871eed507d2f6b7bbad790ab70e95ff5fe764f8f8b2ab8ce82c2
|
||||
size 153015
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:02f9c0fea36679e54c8c3fac979bc41d15ae4f7992b269bc2b67255059af1d2f
|
||||
size 579889
|
||||
33
docs/remote_services/s3_general/s3_cors_configure.md
Normal file
33
docs/remote_services/s3_general/s3_cors_configure.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# How To Configure S3 CORS Rules
|
||||
|
||||
If you are using the latest version of this plugin AND Obsidian desktop >= 0.13.25, mobile >= 1.1.1, you do not need to configure it any more. If you are using Obsidian desktop < 0.13.25, moble < 1.1.1, you are required to configure the rules as following.
|
||||
|
||||
Thanks to [@NAL100 in the Discussion](https://github.com/fyears/remotely-save/discussions/28).
|
||||
|
||||
Please try this config:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"AllowedHeaders": ["*"],
|
||||
"AllowedMethods": ["GET", "PUT", "POST", "DELETE", "HEAD"],
|
||||
"AllowedOrigins": [
|
||||
"app://obsidian.md",
|
||||
"capacitor://localhost",
|
||||
"http://localhost"
|
||||
],
|
||||
"ExposeHeaders": [
|
||||
"Content-Length",
|
||||
"Content-Type",
|
||||
"Connection",
|
||||
"Date",
|
||||
"ETag",
|
||||
"Server",
|
||||
"x-amz-delete-marker",
|
||||
"x-amz-id-2",
|
||||
"x-amz-request-id",
|
||||
"x-amz-version-id"
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
79
docs/remote_services/s3_general/s3_user_policy.md
Normal file
79
docs/remote_services/s3_general/s3_user_policy.md
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
# AWS S3 Bucket: How to configure user's policy
|
||||
|
||||
## Attention
|
||||
|
||||
Please read the doc carefully and adjust the optional fields accordingly. The doc is not fully tested and contributions are welcome.
|
||||
|
||||
## AWS Official Docs
|
||||
|
||||
- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-policy-language-overview.html>
|
||||
- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html>
|
||||
- <https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations.html>
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Using the principle of least privilege is crucial for security when allowing a third party system to access your AWS resources.
|
||||
|
||||
**Prerequisites**: Ensure you have an AWS account and administrative access to manage IAM policies.
|
||||
|
||||
## Step 1: Create a new IAM Policy
|
||||
|
||||
1. Log in to your AWS Management Console.
|
||||
1. Navigate to the IAM Policies section.
|
||||
1. Create a new policy with the following configuration.
|
||||
|
||||
**Note**: `my-bucket` is a placeholder. For example, if your bucket's name is `obsidian-data`, the resource line should read `arn:aws:s3:::obsidian-data`.
|
||||
|
||||
```JSON
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "ObsidianObjects",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:HeadObject",
|
||||
"s3:ListBucket",
|
||||
"s3:PutObject",
|
||||
"s3:CopyObject",
|
||||
"s3:UploadPart",
|
||||
"s3:UploadPartCopy",
|
||||
"s3:ListMultipartUploads",
|
||||
"s3:AbortMultipartUpload",
|
||||
"s3:CompleteMultipartUpload",
|
||||
"s3:ListObjects",
|
||||
"s3:ListObjectsV2",
|
||||
"s3:ListParts",
|
||||
"s3:GetObject",
|
||||
"s3:GetObjectAttributes",
|
||||
"s3:DeleteObject",
|
||||
"s3:DeleteObjects"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::my-bucket",
|
||||
"arn:aws:s3:::my-bucket/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
> The policy allows the Obsidian plugin to list, add, retrieve, and delete objects in the specified S3 bucket.
|
||||
|
||||
## Step 2: Attach the Policy to Obsidian user
|
||||
|
||||
1. Create a new user in the IAM console. (Never use your own root user, as it would have full access to your AWS account).
|
||||
1. When creating the user, select "Attach policy directly" and select the policy created.
|
||||
1. Edit the recent created user and go to "Security Credentials" tab to create your access key.
|
||||
1. Create an Access Key. If asked for a "use case", select "other"
|
||||
1. Use the credentials in the plugin settings. (NEVER share these credentials)
|
||||
|
||||
> PS. The bucket doesn't need to have a policy, only the user.
|
||||
|
||||
## Verifying the Policy
|
||||
|
||||
After attaching the policy, test it by trying to access the S3 bucket through the Obsidian plugin. Ensure that all intended actions can be performed without errors.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you encounter permission errors, check the policy for typos in the bucket name or actions. Ensure the policy is attached to the correct user.
|
||||
27
docs/remote_services/s3_minio/README.md
Normal file
27
docs/remote_services/s3_minio/README.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# MinIO
|
||||
|
||||
## Links
|
||||
|
||||
<https://min.io/>
|
||||
|
||||
## Steps
|
||||
|
||||
1. Configure your minio instance and get an account.
|
||||
2. Create an Access Key (during the creation, you will also get the auto-generated secret key).
|
||||

|
||||
3. Check or set the region.
|
||||

|
||||
4. Create a bucket.
|
||||

|
||||
5. In remotely-save setting page, input the address / bucket / access key / secret key. **Usually minio instances may need "S3 URL style"="Path Style".** Enable "Bypass CORS", because usually that's what you want.
|
||||

|
||||
6. Sync!
|
||||

|
||||
|
||||
## Ports In Address
|
||||
|
||||
Just type in the full address with `http(s)://` and `:port` in remotely-save settings, for example `http://192.168.31.198:9000`.
|
||||
|
||||
It's verified that everything is ok.
|
||||
|
||||

|
||||
3
docs/remote_services/s3_minio/minio_access_key.png
Normal file
3
docs/remote_services/s3_minio/minio_access_key.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c384ec32a43fcac1e63dbc81d4fbb7fbfaffcd67d0f5a66104482a39475ad639
|
||||
size 323050
|
||||
3
docs/remote_services/s3_minio/minio_create_bucket.png
Normal file
3
docs/remote_services/s3_minio/minio_create_bucket.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:894a6a10b7f41754936d77a935b4a5a4ae722796fa5680c9c6d0dd53c3cdc1a2
|
||||
size 269705
|
||||
3
docs/remote_services/s3_minio/minio_custom_port.png
Normal file
3
docs/remote_services/s3_minio/minio_custom_port.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b25c1209875ad781a29d3ac1cde5bd9c2137622e3919987c4d4e5f77dc8e3ec7
|
||||
size 68997
|
||||
3
docs/remote_services/s3_minio/minio_region.png
Normal file
3
docs/remote_services/s3_minio/minio_region.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bfcc526281d2c6a9f1261f489603f3dd768f8b94f099a1b26649fa37c9318575
|
||||
size 315030
|
||||
3
docs/remote_services/s3_minio/minio_rs_settings.png
Normal file
3
docs/remote_services/s3_minio/minio_rs_settings.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:83615a6c2fbf7ff74679b480d29d222db8835bc067aee33a646e4b8d500c3aca
|
||||
size 467575
|
||||
3
docs/remote_services/s3_minio/minio_sync_success.png
Normal file
3
docs/remote_services/s3_minio/minio_sync_success.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fd1bb9a6e285a1e63b545d714ca269eb714e980a5177392b967556f1f1754afe
|
||||
size 147218
|
||||
17
docs/remote_services/s3_storj_io/README.md
Normal file
17
docs/remote_services/s3_storj_io/README.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Storj
|
||||
|
||||
## Links
|
||||
|
||||
<https://www.storj.io/>
|
||||
|
||||
## Steps
|
||||
|
||||
1. Register an account. Login.
|
||||
2. Create a bucket.
|
||||
3. Create S3 Credentials in Access Management. Allow all permissions for the bucket. Remember the access key and secret key and the end point. The end point is likely to be [`https://gateway.storjshare.io`](https://docs.storj.io/dcs/api/s3/s3-compatible-gateway).
|
||||

|
||||

|
||||
4. Input your credentials into remotely-save settings. Region [should be `global`](https://docs.storj.io/dcs/api/s3/s3-compatibility).
|
||||

|
||||
5. Check connectivity.
|
||||
6. Sync!
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a3484f74f45fbdae6110de285edeff10c196c13160cb97f079da77843ae92e80
|
||||
size 386188
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue