mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
shadowsocks: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
5f15fdda45
commit
5ee0f71e62
5 files changed
+70
-5
No files matched your search
@@ -116,14 +116,22 @@ def select_domain_name(browser, app_name, domain_name):
|
||||
interface.submit(browser, form_class='form-configuration')
|
||||
|
||||
|
||||
def configure_shadowsocks(browser):
|
||||
"""Configure shadowsocks client with some fake server details"""
|
||||
def configure_shadowsocks(browser, server, password):
|
||||
"""Configure shadowsocks client with given server details."""
|
||||
browser.visit('{}/plinth/apps/shadowsocks/'.format(default_url))
|
||||
browser.find_by_id('id_server').fill('some.shadow.tunnel')
|
||||
browser.find_by_id('id_password').fill('fakepassword')
|
||||
browser.find_by_id('id_server').fill(server)
|
||||
browser.find_by_id('id_password').fill(password)
|
||||
interface.submit(browser, form_class='form-configuration')
|
||||
|
||||
|
||||
def shadowsocks_get_configuration(browser):
|
||||
"""Return the server and password currently configured in shadowsocks."""
|
||||
browser.visit('{}/plinth/apps/shadowsocks/'.format(default_url))
|
||||
server = browser.find_by_id('id_server').value
|
||||
password = browser.find_by_id('id_password').value
|
||||
return server, password
|
||||
|
||||
|
||||
def modify_max_file_size(browser, size):
|
||||
"""Change the maximum file size of coquelicot to the given value"""
|
||||
browser.visit('{}/plinth/apps/coquelicot/'.format(default_url))
|
||||
|
||||
Reference in new issue
Block a user