work on readme, added mail files, bugfixes

This commit is contained in:
Kevin Froman 2019-01-30 00:10:29 -06:00
parent 4882a21b6a
commit f0382d24da
8 changed files with 101 additions and 17 deletions

View File

@ -1,6 +1,10 @@
![Onionr logo](./docs/onionr-logo.png)
<p align="center">
(***experimental, not well tested or easy to use yet***)
<img src="./docs/onionr-logo.png">
</p>
(***pre-alpha quality & experimental, not well tested or easy to use yet***)
[![Open Source Love](https://badges.frapsoft.com/os/v3/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/)
@ -9,19 +13,20 @@ Anonymous P2P platform, using Tor & I2P.
<hr>
**The main repo for this software is at https://gitlab.com/beardog/Onionr/**
**The main repository for this software is at https://gitlab.com/beardog/Onionr/**
# Summary
Onionr is a decentralized, peer-to-peer data storage network, designed to be anonymous and resistant to (meta)data analysis and spam.
Onionr stores data in independent packages referred to as 'blocks' (not to be confused with a blockchain). The blocks are synced to all other nodes in the network. Blocks and user IDs cannot be easily proven to have been created by particular nodes (only inferred).
Users are identified by ed25519 public keys, which can be used to sign blocks (optional) or send encrypted data.
Onionr can be used for mail, as a social network, instant messenger, file sharing software, or for encrypted group discussion.
# Roadmap/features
Check the [Gitlab Project](https://gitlab.com/beardog/Onionr/milestones/1) to see progress towards the alpha release.
## Core internal features
## Main Features
* [X] Fully p2p/decentralized, no trackers or other single points of failure
* [X] End to end encryption of user data
@ -29,14 +34,29 @@ Check the [Gitlab Project](https://gitlab.com/beardog/Onionr/milestones/1) to se
* [X] Easy API system for integration to websites
* [X] Metadata analysis resistance
## Other features
**Onionr API and functionality is subject to non-backwards compatible change during pre-alpha development**
# Install and Run on Linux
The following applies to Ubuntu Bionic. Other distros may have different package or command names.
* Have python3.5+, python3-pip, Tor (daemon, not browser) installed (python3-dev recommended)
* Clone the git repo: `$ git clone https://gitlab.com/beardog/onionr`
* cd into install direction: `$ cd onionr/`
* Install the Python dependencies ([virtualenv strongly recommended](https://virtualenv.pypa.io/en/stable/userguide/)): `$ pip3 install -r requirements.txt`
## Help out
Everyone is welcome to help out. Please get in touch first if you are making non-trivial changes. If you can't help with programming, you can write documentation or guides.
Everyone is welcome to help out. Help is wanted for the following:
* Development (Get in touch first)
* Creation of a shared object library for use from other languages and faster proof-of-work
* Onionr mobile app development
* Windows and Mac support
* General development
* Testing
* Running stable nodes
* Security review/audit
Bitcoin/Bitcoin Cash: 1onion55FXzm6h8KQw3zFw2igpHcV7LPq
@ -44,4 +64,4 @@ Bitcoin/Bitcoin Cash: 1onion55FXzm6h8KQw3zFw2igpHcV7LPq
The Tor Project, I2P developers, and anyone else do not own, create, or endorse this project, and are not otherwise involved.
The badges (besides travis-ci build) are by Maik Ellerbrock is licensed under a Creative Commons Attribution 4.0 International License.
The badges (besides travis-ci build) are by Maik Ellerbrock is licensed under a Creative Commons Attribution 4.0 International License.

BIN
docs/Tor_Stinks_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -265,7 +265,7 @@ class API:
self.bindPort = bindPort
# Be extremely mindful of this
self.whitelistEndpoints = ('site', 'www', 'onionrhome', 'board', 'boardContent', 'sharedContent')
self.whitelistEndpoints = ('site', 'www', 'onionrhome', 'board', 'boardContent', 'sharedContent', 'mail', 'mailindex')
self.clientToken = config.get('client.webpassword')
self.timeBypassToken = base64.b16encode(os.urandom(32)).decode()
@ -308,6 +308,13 @@ class API:
def loadBoard():
return send_from_directory('static-data/www/board/', "index.html")
@app.route('/mail/<path:path>', endpoint='mail')
def loadMail(path):
return send_from_directory('static-data/www/mail/', '')
@app.route('/mail/', endpoint='mailindex')
def loadMailIndex():
return send_from_directory('static-data/www/mail/', 'index.html')
@app.route('/board/<path:path>', endpoint='boardContent')
def boardContent(path):
return send_from_directory('static-data/www/board/', path)
@ -407,7 +414,11 @@ class API:
@app.route('/getstats')
def getStats():
#return Response("disabled")
return Response(self._core.serializer.getStats())
while True:
try:
return Response(self._core.serializer.getStats())
except AttributeError:
pass
@app.route('/getuptime')
def showUptime():

View File

@ -105,7 +105,8 @@ def check():
open(get_config_file(), 'a', encoding="utf8").close()
save()
except:
logger.debug('Failed to check configuration file.')
pass
#logger.debug('Failed to check configuration file.')
def save():
'''
@ -129,7 +130,8 @@ def reload():
with open(get_config_file(), 'r', encoding="utf8") as configfile:
set_config(json.loads(configfile.read()))
except:
logger.debug('Failed to parse configuration file.')
pass
#logger.debug('Failed to parse configuration file.')
def get_config():
'''

View File

@ -30,7 +30,7 @@ import webbrowser, uuid, signal
from threading import Thread
import api, core, config, logger, onionrplugins as plugins, onionrevents as events
import onionrutils
import netcontroller
import netcontroller, onionrstorage
from netcontroller import NetController
from onionrblockapi import Block
import onionrproofs, onionrexceptions, onionrusers, communicator
@ -190,6 +190,9 @@ class Onionr:
'openhome': self.openHome,
'open-home': self.openHome,
'export-block': self.exportBlock,
'exportblock': self.exportBlock,
'get-file': self.getFile,
'getfile': self.getFile,
@ -271,6 +274,31 @@ class Onionr:
THIS SECTION HANDLES THE COMMANDS
'''
def exportBlock(self):
exportDir = self.dataDir + 'block-export/'
try:
assert self.onionrUtils.validateHash(sys.argv[2])
except (IndexError, AssertionError):
logger.error('No valid block hash specified.')
sys.exit(1)
else:
bHash = sys.argv[2]
try:
path = sys.argv[3]
except (IndexError):
if not os.path.exists(exportDir):
if os.path.exists(self.dataDir):
os.mkdir(exportDir)
else:
logger.error('Onionr not initialized')
sys.exit(1)
path = exportDir
data = onionrstorage.getData(self.onionrCore, bHash)
with open('%s/%s.dat' % (exportDir, bHash), 'wb') as exportFile:
exportFile.write(data)
def showDetails(self):
details = {
'Node Address' : self.get_hostname(),

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>
Onionr Mail
</title>
<link rel='stylesheet' href='/shared/style/modal.css'>
<link rel='stylesheet' href='/shared/main/style.css'>
</head>
<body>
<div id="infoOverlay" class='overlay'>
</div>
<img class='logo' src='/shared/onionr-icon.png' alt='onionr logo'>
<span class='logoText'>Onionr Web Mail</span>
<div class='content'>
</div>
<script src='/shared/misc.js'></script>
</body>
</html>

View File

View File

@ -42,6 +42,8 @@ class StorageCounter:
retData = int(dataFile.read())
except FileNotFoundError:
pass
except ValueError:
pass # Possibly happens when the file is empty
return retData
def getPercent(self):