ui changes and work on whitepaper

master
Kevin Froman 2019-03-11 00:10:37 -05:00
parent 4fb01bac0e
commit 800c061e94
10 changed files with 69 additions and 5 deletions

BIN
docs/network-comparison.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -132,3 +132,13 @@ We seek to protect the following information:
We assume that Tor onion services (v3) and I2P services cannot be trivially deanonymized, and that the underlying cryptographic primitives we employ cannot be broken in any manner faster than brute force unless a quantum computer is used. We assume that Tor onion services (v3) and I2P services cannot be trivially deanonymized, and that the underlying cryptographic primitives we employ cannot be broken in any manner faster than brute force unless a quantum computer is used.
Once quantum safe algorithms are more mature and have decent high level libraries, they will be deployed. Once quantum safe algorithms are more mature and have decent high level libraries, they will be deployed.
# Comparisons to other P2P software
Since Onionr is far from the first to implement many of these ideas (on their own), this section compares Onionr to other networks
![network comparison image](network-comparison.png)
# Conclusion
If successful, Onionr will be a complete decentralized platform for anonymous computing, complete with limited metadata exposure, both node and user anonymity, and spam prevention

View File

@ -488,7 +488,7 @@ class OnionrCommunicatorDaemon:
score = str(self.getPeerProfileInstance(i).score) score = str(self.getPeerProfileInstance(i).score)
logger.info(i + ', score: ' + score) logger.info(i + ', score: ' + score)
def peerAction(self, peer, action, data=''): def peerAction(self, peer, action, data='', returnHeaders=False):
'''Perform a get request to a peer''' '''Perform a get request to a peer'''
if len(peer) == 0: if len(peer) == 0:
return False return False
@ -512,7 +512,7 @@ class OnionrCommunicatorDaemon:
else: else:
self._core.setAddressInfo(peer, 'lastConnect', self._core._utils.getEpoch()) self._core.setAddressInfo(peer, 'lastConnect', self._core._utils.getEpoch())
self.getPeerProfileInstance(peer).addScore(1) self.getPeerProfileInstance(peer).addScore(1)
return retData return retData # If returnHeaders, returns tuple of data, headers. if not, just data string
def getPeerProfileInstance(self, peer): def getPeerProfileInstance(self, peer):
'''Gets a peer profile instance from the list of profiles, by address name''' '''Gets a peer profile instance from the list of profiles, by address name'''

View File

@ -480,7 +480,7 @@ class OnionrUtils:
retData = False retData = False
return retData return retData
def doGetRequest(self, url, port=0, proxyType='tor', ignoreAPI=False): def doGetRequest(self, url, port=0, proxyType='tor', ignoreAPI=False, returnHeaders=False):
''' '''
Do a get request through a local tor or i2p instance Do a get request through a local tor or i2p instance
''' '''
@ -520,6 +520,9 @@ class OnionrUtils:
if not 'ConnectTimeoutError' in str(e) and not 'Request rejected or failed' in str(e): if not 'ConnectTimeoutError' in str(e) and not 'Request rejected or failed' in str(e):
logger.debug('Error: %s' % str(e)) logger.debug('Error: %s' % str(e))
retData = False retData = False
if returnHeaders:
return (retData, response_headers)
else:
return retData return retData
def strToBytes(self, data): def strToBytes(self, data):

View File

@ -28,6 +28,10 @@ flask_blueprint = Blueprint('mail', __name__)
c = core.Core() c = core.Core()
kv = c.keyStore kv = c.keyStore
@flask_blueprint.route('/mail/ping')
def mail_ping():
return 'pong!'
@flask_blueprint.route('/mail/deletemsg/<block>', methods=['POST']) @flask_blueprint.route('/mail/deletemsg/<block>', methods=['POST'])
def mail_delete(block): def mail_delete(block):
if not c._utils.validateHash(block): if not c._utils.validateHash(block):

View File

@ -18,6 +18,9 @@
<span class='logoText'>Onionr Mail ✉️</span> <span class='logoText'>Onionr Mail ✉️</span>
<br><br> <br><br>
<div><a href='/' class='idLink'>Home</a> <button class='refresh'>Refresh Page</button></div> <div><a href='/' class='idLink'>Home</a> <button class='refresh'>Refresh Page</button></div>
<div class='mailPing'>
API server either shutdown, has disabled mail, or has experienced a bug.
</div>
<br> <br>
<div>Current Used Identity: <input class='myPub' type='text' readonly></div> <div>Current Used Identity: <input class='myPub' type='text' readonly></div>
<br><br> <br><br>

View File

@ -53,6 +53,11 @@ input{
margin: 1em; margin: 1em;
} }
.mailPing{
display: none;
color: orange;
}
.danger{ .danger{
color: red; color: red;
} }

View File

@ -94,6 +94,27 @@ function deleteMessage(bHash){
}) })
} }
function mailPing(){
fetch('/mail/ping', {
"method": "get",
headers: {
"token": webpass
}})
.then(function(resp) {
var pings = document.getElementsByClassName('mailPing')
if (resp.ok){
for (var i=0; i < pings.length; i++){
pings[i].style.display = 'none';
}
}
else{
for (var i=0; i < pings.length; i++){
pings[i].style.display = 'block';
}
}
})
}
function loadInboxEntries(bHash){ function loadInboxEntries(bHash){
fetch('/getblockheader/' + bHash, { fetch('/getblockheader/' + bHash, {
headers: { headers: {
@ -201,12 +222,16 @@ function getSentbox(){
var toLabel = document.createElement('span') var toLabel = document.createElement('span')
toLabel.innerText = 'To: ' toLabel.innerText = 'To: '
var toEl = document.createElement('input') var toEl = document.createElement('input')
var sentDate = document.createElement('span')
var humanDate = new Date(0)
humanDate.setUTCSeconds(resp[i]['date'])
var preview = document.createElement('span') var preview = document.createElement('span')
var deleteBtn = document.createElement('button') var deleteBtn = document.createElement('button')
var message = resp[i]['message'] var message = resp[i]['message']
deleteBtn.classList.add('deleteBtn', 'dangerBtn') deleteBtn.classList.add('deleteBtn', 'dangerBtn')
deleteBtn.innerText = 'X' deleteBtn.innerText = 'X'
toEl.readOnly = true toEl.readOnly = true
sentDate.innerText = humanDate
if (resp[i]['name'] == null){ if (resp[i]['name'] == null){
toEl.value = resp[i]['peer'] toEl.value = resp[i]['peer']
} }
@ -219,6 +244,7 @@ function getSentbox(){
entry.appendChild(toLabel) entry.appendChild(toLabel)
entry.appendChild(toEl) entry.appendChild(toEl)
entry.appendChild(preview) entry.appendChild(preview)
entry.appendChild(sentDate)
entry.onclick = (function(tree, el, msg) {return function() { entry.onclick = (function(tree, el, msg) {return function() {
console.log(resp) console.log(resp)
if (! entry.classList.contains('deleteBtn')){ if (! entry.classList.contains('deleteBtn')){
@ -316,3 +342,6 @@ fetch('/friends/list', {
} }
}) })
setActiveTab('inbox') setActiveTab('inbox')
setInterval(function(){mailPing()}, 10000)
mailPing()

View File

@ -20,6 +20,9 @@
<span class='logoText'>Onionr Web Control Panel</span> <span class='logoText'>Onionr Web Control Panel</span>
<br><br> <br><br>
<button id='shutdownNode'>Shutdown Node</button> <button id='refreshStats'>Refresh Stats</button> <button id='shutdownNode'>Shutdown Node</button> <button id='refreshStats'>Refresh Stats</button>
<br><br>
<label>Site Hash: <input type='text' id='siteViewer'> <button id='openSite' class='primaryBtn openSiteBtn'>Open Onionr Site</button></label>
<br>
<br><br><a class='idLink' href='/mail/'>Mail</a> - <a class='idLink' href='/friends/'>Friend Manager</a> <br><br><a class='idLink' href='/mail/'>Mail</a> - <a class='idLink' href='/friends/'>Friend Manager</a>
<h2>Stats</h2> <h2>Stats</h2>
<p>Uptime: <span id='uptime'></span></p> <p>Uptime: <span id='uptime'></span></p>
@ -32,5 +35,6 @@
<script src='/shared/misc.js'></script> <script src='/shared/misc.js'></script>
<script src='/shared/main/stats.js'></script> <script src='/shared/main/stats.js'></script>
<script src='/shared/panel.js'></script> <script src='/shared/panel.js'></script>
<script src=/shared/sites.js></script>
</body> </body>
</html> </html>

View File

@ -173,3 +173,9 @@ body{
.primaryBtn{ .primaryBtn{
background-color:#396BAC; background-color:#396BAC;
} }
.openSiteBtn{
padding: 5px;
border: 1px solid black;
border-radius: 5px;
}