forked from rclone/rclone
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: use of 'serve s3' with 'auth-proxy'
- Loading branch information
1 parent
a19ddff
commit 8a67479
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
A proxy for rclone serve s3 | ||
""" | ||
|
||
import sys | ||
import json | ||
import os | ||
|
||
|
||
def main(): | ||
i = json.load(sys.stdin) | ||
o = { | ||
"type": "webdav", # type of backend | ||
"_root": "", # root of the fs | ||
"bearer_token": i["pass"], | ||
"url": os.getenv("RCLONE_WEBDAV_URL", "https://localhost:9200/webdav"), | ||
} | ||
json.dump(o, sys.stdout, indent="\t") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters