Added dev config scripts
This commit is contained in:
parent
88146a5690
commit
567af997d7
3 changed files with 49 additions and 2 deletions
19
scripts/disable-dev-config.py
Executable file
19
scripts/disable-dev-config.py
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""Enable dev default config"""
|
||||
|
||||
import json
|
||||
|
||||
conf = json.load(open('static-data/default_config.json', 'r'))
|
||||
|
||||
conf['tor']['use_existing_tor'] = False
|
||||
conf['tor']['existing_control_port'] = 0
|
||||
conf['tor']['existing_control_password'] = ""
|
||||
conf['tor']['existing_socks_port'] = 0
|
||||
|
||||
conf['general']['dev_mode'] = False
|
||||
conf['general']['insert_deniable_blocks'] = True
|
||||
conf['general']['random_bind_ip'] = True
|
||||
|
||||
json.dump(conf, open('static-data/default_config.json', 'w'), sort_keys=True, indent=4)
|
||||
|
20
scripts/enable-dev-config.py
Executable file
20
scripts/enable-dev-config.py
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""Enable dev default config"""
|
||||
|
||||
import json
|
||||
|
||||
conf = json.load(open('static-data/default_config.json', 'r'))
|
||||
|
||||
if input("Reuse Tor? y/n:").lower() == 'y':
|
||||
conf['tor']['use_existing_tor'] = True
|
||||
conf['tor']['existing_control_port'] = int(input("Enter existing control port:"))
|
||||
conf['tor']['existing_control_password'] = input("Tor pass:")
|
||||
conf['tor']['existing_socks_port'] = int(input("Existing socks port:"))
|
||||
|
||||
conf['general']['dev_mode'] = True
|
||||
conf['general']['insert_deniable_blocks'] = False
|
||||
conf['general']['general.random_bind_ip'] = False
|
||||
|
||||
json.dump(conf, open('static-data/default_config.json', 'w'), sort_keys=True, indent=4)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue