From 3825d3857c9cf3a1dd9b1bd8a6e5955cf1370e57 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 16 Jun 2019 15:56:22 -0500 Subject: [PATCH] - removed defunct config option * changed bootstrap node * improved web interface styles * start-daemon script hopefully less prone to crash * fixed openwebinterface url output * added defaults for timer configs incase config can't be read or the values are missing --- onionr/communicator.py | 4 ++-- onionr/onionr.py | 2 -- onionr/onionrcommands/openwebinterface.py | 2 +- onionr/static-data/bootstrap-nodes.txt | 2 +- onionr/static-data/www/friends/friends.js | 5 ++++- onionr/static-data/www/friends/index.html | 6 ++++-- onionr/static-data/www/private/index.html | 2 +- onionr/static-data/www/shared/main/style.css | 6 +++++- start-daemon.sh | 2 +- 9 files changed, 19 insertions(+), 12 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index a75cd998..b245b4de 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -101,8 +101,8 @@ class OnionrCommunicatorDaemon: OnionrCommunicatorTimers(self, self.runCheck, 2, maxThreads=1) # Timers to periodically lookup new blocks and download them - OnionrCommunicatorTimers(self, self.lookupBlocks, self._core.config.get('timers.lookupBlocks'), requiresPeer=True, maxThreads=1) - OnionrCommunicatorTimers(self, self.getBlocks, self._core.config.get('timers.getBlocks'), requiresPeer=True, maxThreads=2) + OnionrCommunicatorTimers(self, self.lookupBlocks, self._core.config.get('timers.lookupBlocks', 25), requiresPeer=True, maxThreads=1) + OnionrCommunicatorTimers(self, self.getBlocks, self._core.config.get('timers.getBlocks', 30), requiresPeer=True, maxThreads=2) # Timer to reset the longest offline peer so contact can be attempted again OnionrCommunicatorTimers(self, self.clearOfflinePeer, 58) diff --git a/onionr/onionr.py b/onionr/onionr.py index c73edb4b..16ec1839 100755 --- a/onionr/onionr.py +++ b/onionr/onionr.py @@ -121,8 +121,6 @@ class Onionr: if type(config.get('client.public.port')) is type(None): randomPort = netcontroller.getOpenPort() config.set('client.public.port', randomPort, savefile=True) - if type(config.get('client.participate')) is type(None): - config.set('client.participate', True, savefile=True) if type(config.get('client.api_version')) is type(None): config.set('client.api_version', API_VERSION, savefile=True) diff --git a/onionr/onionrcommands/openwebinterface.py b/onionr/onionrcommands/openwebinterface.py index c28f3217..2bd0cdd3 100755 --- a/onionr/onionrcommands/openwebinterface.py +++ b/onionr/onionrcommands/openwebinterface.py @@ -26,5 +26,5 @@ def open_home(o_inst): logger.error('Onionr seems to not be running (could not get api host)') else: url = 'http://%s/#%s' % (url, o_inst.onionrCore.config.get('client.webpassword')) - logger.info('If Onionr does not open automatically, use this URL:', url) + logger.info('If Onionr does not open automatically, use this URL: ' + url) webbrowser.open_new_tab(url) \ No newline at end of file diff --git a/onionr/static-data/bootstrap-nodes.txt b/onionr/static-data/bootstrap-nodes.txt index faec3008..885591e6 100755 --- a/onionr/static-data/bootstrap-nodes.txt +++ b/onionr/static-data/bootstrap-nodes.txt @@ -1 +1 @@ -7abghj4dhb4p7ytet4wm4hsejuf2c5ufaznypoifkcacvlzs6yhc6gyd.onion \ No newline at end of file +6i2apk7llawfcqy4y4xumqiedo7nltczmdk2cbvdztaqpkjnygwwz6qd.onion \ No newline at end of file diff --git a/onionr/static-data/www/friends/friends.js b/onionr/static-data/www/friends/friends.js index 28e2a2da..cd17bbc8 100755 --- a/onionr/static-data/www/friends/friends.js +++ b/onionr/static-data/www/friends/friends.js @@ -54,7 +54,10 @@ fetch('/friends/list', { var keys = []; for(var k in resp) keys.push(k); console.log(keys) - friendListDisplay.innerHTML = 'Click name to view info

' + + if (keys.length == 0){ + friendListDisplay.innerText = "None yet :(" + } for (var i = 0; i < keys.length; i++){ var peer = keys[i] var name = resp[keys[i]]['name'] diff --git a/onionr/static-data/www/friends/index.html b/onionr/static-data/www/friends/index.html index 8e38ac39..d7673d70 100755 --- a/onionr/static-data/www/friends/index.html +++ b/onionr/static-data/www/friends/index.html @@ -21,7 +21,7 @@
- Onionr Web Control Panel + Onionr Friends

Home

Friend Manager

@@ -31,7 +31,9 @@

Friend List:

-
None Yet :(
+ Click name to view info

+
+
diff --git a/onionr/static-data/www/private/index.html b/onionr/static-data/www/private/index.html index 2bb74000..633bda94 100755 --- a/onionr/static-data/www/private/index.html +++ b/onionr/static-data/www/private/index.html @@ -17,7 +17,7 @@
- Onionr Web Control Panel + Onionr

🕵️‍♂️ Current Used Identity:

diff --git a/onionr/static-data/www/shared/main/style.css b/onionr/static-data/www/shared/main/style.css index a673ea7b..c895696b 100755 --- a/onionr/static-data/www/shared/main/style.css +++ b/onionr/static-data/www/shared/main/style.css @@ -41,11 +41,15 @@ body{ vertical-align: middle; } .logoText{ - font-family: sans-serif; font-size: 2em; margin-top: 1em; margin-left: 1%; } + + .logoText, h1, h2{ + font-family: Verdana, Geneva, Tahoma, sans-serif; + } + .main{ min-height: 500px; } diff --git a/start-daemon.sh b/start-daemon.sh index 1b713100..4b2e3abb 100755 --- a/start-daemon.sh +++ b/start-daemon.sh @@ -2,4 +2,4 @@ cd "$(dirname "$0")" echo "starting Onionr daemon..." echo "run onionr.sh stop to stop the daemon, or onionr.sh start to get output" -nohup ./onionr.sh start & disown > /dev/null +exec nohup ./onionr.sh start > /dev/null 2>&1 & disown \ No newline at end of file