added support to wipe data directory on exit
This commit is contained in:
parent
567af997d7
commit
8e5152a14e
@ -12,3 +12,4 @@ jinja2==2.11.1
|
||||
toomanyobjs==1.1.0
|
||||
niceware==0.2.1
|
||||
psutil==5.6.7
|
||||
filenuke==0.0.0
|
||||
|
@ -48,6 +48,9 @@ click==7.0 \
|
||||
# via flask
|
||||
deadsimplekv==0.2.0 \
|
||||
--hash=sha256:81405408a4d23cc94ac359f9570e0ff198b67e5a93e3ae32eca85e3b62252f38
|
||||
filenuke==0.0.0 \
|
||||
--hash=sha256:147011c0125121469cae0a8a7f4df399f470e54aa29a08f2d2c099bf0118dcee \
|
||||
--hash=sha256:c55535dcecfdb27c5f4ce664d46e115950b5429763b5db75c198053646177f8f
|
||||
flask==1.1.1 \
|
||||
--hash=sha256:13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52 \
|
||||
--hash=sha256:45eb5a6fd193d6cf7e0cf5d8a5b31f83d5faae0293695626f539a823e93b13f6
|
||||
|
@ -63,6 +63,8 @@ from onionrblocks.deleteplaintext import delete_plaintext_no_blacklist # noqa
|
||||
setup.setup_config()
|
||||
|
||||
import config # noqa
|
||||
import filenuke
|
||||
from utils import identifyhome
|
||||
|
||||
if config.get('advanced.security_auditing', True):
|
||||
try:
|
||||
@ -84,6 +86,11 @@ def onionr_main():
|
||||
if ran_as_script:
|
||||
onionr_main()
|
||||
|
||||
# Wipe Onionr data directory if security level calls for it
|
||||
config.reload()
|
||||
if config.get('general.security_level', 1) >= 2:
|
||||
filenuke.nuke.clean_tree(identifyhome.identify_home())
|
||||
|
||||
# Cleanup standard out/err because Python refuses to do it itsself
|
||||
try:
|
||||
sys.stderr.close()
|
||||
|
@ -1,85 +1,70 @@
|
||||
{
|
||||
"allocations": {
|
||||
"blockCache": 5000000,
|
||||
"blockCacheTotal": 50000000,
|
||||
"disk": 100000000,
|
||||
"net_total": 1000000000
|
||||
},
|
||||
"general": {
|
||||
"dev_mode": false,
|
||||
"announce_node": true,
|
||||
"dev_mode": false,
|
||||
"display_header": false,
|
||||
"minimum_block_pow": 4,
|
||||
"minimum_send_pow": 4,
|
||||
"use_subprocess_pow_if_possible": true,
|
||||
"socket_servers": false,
|
||||
"security_level": 0,
|
||||
"general.random_bind_ip": false,
|
||||
"hide_created_blocks": true,
|
||||
"insert_deniable_blocks": true,
|
||||
"max_block_age": 2678400,
|
||||
"minimum_block_pow": 4,
|
||||
"minimum_send_pow": 4,
|
||||
"public_key": "",
|
||||
"random_bind_ip": true,
|
||||
"use_bootstrap_list": true,
|
||||
"security_level": 0,
|
||||
"show_notifications": true,
|
||||
"socket_servers": false,
|
||||
"store_plaintext_blocks": true,
|
||||
"show_notifications": true
|
||||
"use_bootstrap_list": true,
|
||||
"use_subprocess_pow_if_possible": true
|
||||
},
|
||||
|
||||
"transports": {
|
||||
"tor": true,
|
||||
"manual_disk": true
|
||||
},
|
||||
|
||||
"ui": {
|
||||
"theme": "dark"
|
||||
},
|
||||
|
||||
"plugins": {
|
||||
"enabled": {
|
||||
|
||||
},
|
||||
|
||||
"disabled": {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
"log": {
|
||||
"verbosity": "default",
|
||||
|
||||
"console": {
|
||||
"color": true,
|
||||
"output": true
|
||||
},
|
||||
"file": {
|
||||
"output": true
|
||||
},
|
||||
|
||||
"console": {
|
||||
"output": true,
|
||||
"color": true
|
||||
}
|
||||
"verbosity": "default"
|
||||
},
|
||||
|
||||
"tor": {
|
||||
"v3onions": true,
|
||||
"use_bridge": false,
|
||||
"bridge_ip": "",
|
||||
"bridge_fingerprint": "",
|
||||
"use_existing_tor": false,
|
||||
"existing_control_port": 0,
|
||||
"existing_control_password": "",
|
||||
"existing_socks_port": 0
|
||||
},
|
||||
|
||||
"allocations": {
|
||||
"disk": 100000000,
|
||||
"net_total": 1000000000,
|
||||
"blockCache": 5000000,
|
||||
"blockCacheTotal": 50000000
|
||||
},
|
||||
|
||||
"peers": {
|
||||
"minimum_score": -100,
|
||||
"max_stored_peers": 5000,
|
||||
"max_connect": 1000
|
||||
},
|
||||
|
||||
"timers": {
|
||||
"lookupBlocks": 25,
|
||||
"getBlocks": 10
|
||||
},
|
||||
|
||||
"onboarding": {
|
||||
"done": true
|
||||
},
|
||||
"peers": {
|
||||
"max_connect": 1000,
|
||||
"max_stored_peers": 5000,
|
||||
"minimum_score": -100
|
||||
},
|
||||
"plugins": {
|
||||
"disabled": {},
|
||||
"enabled": {}
|
||||
},
|
||||
"timers": {
|
||||
"getBlocks": 10,
|
||||
"lookupBlocks": 25
|
||||
},
|
||||
"tor": {
|
||||
"bridge_fingerprint": "",
|
||||
"bridge_ip": "",
|
||||
"existing_control_password": "",
|
||||
"existing_control_port": 0,
|
||||
"existing_socks_port": 0,
|
||||
"use_bridge": false,
|
||||
"use_existing_tor": false,
|
||||
"v3onions": true
|
||||
},
|
||||
"transports": {
|
||||
"manual_disk": true,
|
||||
"tor": true
|
||||
},
|
||||
"ui": {
|
||||
"theme": "dark"
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
1580533017
|
||||
1580633234
|
Loading…
Reference in New Issue
Block a user