/
githubmirror
/
rclone
Обзор
Документация
Войти
/
githubmirror
/
rclone
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.74.2
bin/test_proxy.py
25 строк
607 B
Josh Soref
docs: spelling: etc.
28 окт 2020, 21:16
28 окт 2020, 21:16
3e1cb83
Код
Авторство
О чём код?
#!/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 backend running on localhost. """ import sys import 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()