25 lines · 605 B · Python
RawDownload
#!/usr/bin/env python3"""A demo proxy for rclone serve sftp/webdav/ftp etc This takes the incoming user/pass and converts it into an sftp backendrunning on localhost.""" import sysimport json def main():    i = json.load(sys.stdin)    o = {        "type": "sftp",              # type of backend        "_root": "",                 # root of the fs        "_obscure": "pass",          # comma sep list of fields to obscure        "user": i["user"],        "pass": i["pass"],        "host": "127.0.0.1",    }    json.dump(o, sys.stdout, indent="\t") if __name__ == "__main__":    main()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t