added subject line in mail, improved readme

master
Kevin Froman 2019-02-01 13:55:59 -06:00
parent 557ffa2f4a
commit 13c2289096
6 changed files with 51 additions and 15 deletions

View File

@ -1,14 +1,14 @@
<p align="center"> <p align="center">
<img src="./docs/onionr-logo.png"> <img src="./docs/onionr-logo.png" width='250'>
</p> </p>
<p align="center"> <p align="center">
Anonymous P2P storage network Anonymous P2P storage network 🕵️
</p> </p>
(***pre-alpha quality & experimental, not well tested or easy to use yet***) (***pre-alpha & 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/) [![Open Source Love](https://badges.frapsoft.com/os/v3/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/)
@ -18,14 +18,15 @@
# Summary # Summary
Onionr is a decentralized, peer-to-peer data storage network, designed to be anonymous and resistant to (meta)data analysis and spam. Onionr is a decentralized, peer-to-peer data storage network, designed to be anonymous and resistant to (meta)data analysis and spam/disruption.
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). Even if there is enough evidence to believe a particular node created a block, nodes still operate behind Tor or I2P and as such are not trivially known to be at a particular IP address. Onionr stores data in independent packages referred to as 'blocks'. 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). Even if there is enough evidence to believe a particular node created a block, nodes still operate behind Tor or I2P and as such are not trivially known to be at a particular IP address.
Users are identified by ed25519 public keys, which can be used to sign blocks or send encrypted data. Users are identified by ed25519 public keys, which can be used to sign blocks or send encrypted data.
Onionr can be used for mail, as a social network, instant messenger, file sharing software, or for encrypted group discussion. Onionr can be used for mail, as a social network, instant messenger, file sharing software, or for encrypted group discussion.
![Tor stinks slide image](docs/tor-stinks-02.png)
## Main Features ## Main Features
@ -34,7 +35,7 @@ Onionr can be used for mail, as a social network, instant messenger, file sharin
* [X] Optional non-encrypted blocks, useful for blog posts or public file sharing * [X] Optional non-encrypted blocks, useful for blog posts or public file sharing
* [X] Easy API system for integration to websites * [X] Easy API system for integration to websites
* [X] Metadata analysis resistance * [X] Metadata analysis resistance
* [X] Transport agnosticism * [X] Transport agnosticism (no internet required)
**Onionr API and functionality is subject to non-backwards compatible change during pre-alpha development** **Onionr API and functionality is subject to non-backwards compatible change during pre-alpha development**
@ -52,18 +53,19 @@ The following applies to Ubuntu Bionic. Other distros may have different package
Everyone is welcome to help out. Help is wanted for the following: Everyone is welcome to help out. Help is wanted for the following:
* Development (Get in touch first) * Development (Get in touch first)
* Creation of a shared object library for use from other languages and faster proof-of-work * Creation of a lib for use from other languages and faster proof-of-work
* Onionr mobile app development * Android and IOS development
* Windows and Mac support * Windows and Mac support
* General development * General bug fixes and development of new features
* Testing * Testing
* Running stable nodes * Running stable nodes
* Security review/audit * Security review/audit
Bitcoin/Bitcoin Cash: 1onion55FXzm6h8KQw3zFw2igpHcV7LPq Bitcoin: [1onion55FXzm6h8KQw3zFw2igpHcV7LPq](bitcoin:1onion55FXzm6h8KQw3zFw2igpHcV7LPq)
USD: [Ko-Fi](https://www.ko-fi.com/beardogkf)
## Disclaimer ## Disclaimer
The Tor Project, I2P developers, and anyone else do not own, create, or endorse this project, and are not otherwise involved. 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 'open source badge' is by Maik Ellerbrock and is licensed under a Creative Commons Attribution 4.0 International License.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 189 KiB

View File

@ -74,6 +74,7 @@ class OnionrMail:
logger.info('Decrypting messages...') logger.info('Decrypting messages...')
choice = '' choice = ''
displayList = [] displayList = []
subject = ''
# this could use a lot of memory if someone has recieved a lot of messages # this could use a lot of memory if someone has recieved a lot of messages
for blockHash in self.myCore.getBlocksByType('pm'): for blockHash in self.myCore.getBlocksByType('pm'):
@ -97,7 +98,12 @@ class OnionrMail:
senderDisplay = senderKey senderDisplay = senderKey
blockDate = pmBlocks[blockHash].getDate().strftime("%m/%d %H:%M") blockDate = pmBlocks[blockHash].getDate().strftime("%m/%d %H:%M")
displayList.append('%s. %s - %s: %s' % (blockCount, blockDate, senderDisplay[:12], blockHash)) try:
subject = pmBlocks[blockHash].bmetadata['subject']
except KeyError:
subject = ''
displayList.append('%s. %s - %s - <%s>: %s' % (blockCount, blockDate, senderDisplay[:12], subject[:10], blockHash))
while choice not in ('-q', 'q', 'quit'): while choice not in ('-q', 'q', 'quit'):
for i in displayList: for i in displayList:
logger.info(i) logger.info(i)
@ -188,6 +194,7 @@ class OnionrMail:
def draftMessage(self, recip=''): def draftMessage(self, recip=''):
message = '' message = ''
newLine = '' newLine = ''
subject = ''
entering = False entering = False
if len(recip) == 0: if len(recip) == 0:
entering = True entering = True
@ -207,6 +214,10 @@ class OnionrMail:
else: else:
# if -q or ctrl-c/d, exit function here, otherwise we successfully got the public key # if -q or ctrl-c/d, exit function here, otherwise we successfully got the public key
return return
try:
subject = logger.readline('Message subject: ')
except (KeyboardInterrupt, EOFError):
pass
cancelEnter = False cancelEnter = False
logger.info('Enter your message, stop by entering -q on a new line. -c to cancel') logger.info('Enter your message, stop by entering -q on a new line. -c to cancel')
@ -226,7 +237,7 @@ class OnionrMail:
if not cancelEnter: if not cancelEnter:
logger.info('Inserting encrypted message as Onionr block....') logger.info('Inserting encrypted message as Onionr block....')
blockID = self.myCore.insertBlock(message, header='pm', encryptType='asym', asymPeer=recip, sign=True) blockID = self.myCore.insertBlock(message, header='pm', encryptType='asym', asymPeer=recip, sign=True, meta={'subject': subject})
self.sentboxTools.addToSent(blockID, recip, message) self.sentboxTools.addToSent(blockID, recip, message)
def menu(self): def menu(self):
choice = '' choice = ''

View File

@ -7,6 +7,7 @@
</title> </title>
<link rel='stylesheet' href='/shared/style/modal.css'> <link rel='stylesheet' href='/shared/style/modal.css'>
<link rel='stylesheet' href='/shared/main/style.css'> <link rel='stylesheet' href='/shared/main/style.css'>
<link rel='stylesheet' href='/mail/mail.css'>
</head> </head>
<body> <body>
<div id="infoOverlay" class='overlay'> <div id="infoOverlay" class='overlay'>
@ -15,7 +16,7 @@
<span class='logoText'>Onionr Mail</span> <span class='logoText'>Onionr Mail</span>
<div class='content'> <div class='content'>
<button class='refresh'>Refresh</button> <button class='refresh'>Refresh</button>
<div id='threads'></div> <div id='threads' class='threads'></div>
</div> </div>
<script src='/shared/misc.js'></script> <script src='/shared/misc.js'></script>
<script src='/mail/mail.js'></script> <script src='/mail/mail.js'></script>

View File

@ -9,8 +9,30 @@ function getInbox(){
.then((resp) => resp.json()) // Transform the data into json .then((resp) => resp.json()) // Transform the data into json
.then(function(resp) { .then(function(resp) {
var entry = document.createElement('div') var entry = document.createElement('div')
entry.innerHTML = resp['meta']['time'] + ' - ' + resp['meta']['signer'] var bHash = pms[i].substring(0, 10)
var bHashDisplay = document.createElement('span')
var senderInput = document.createElement('input')
var subjectLine = document.createElement('span')
var dateStr = document.createElement('span')
var humanDate = new Date(0)
humanDate.setUTCSeconds(resp['meta']['time'])
senderInput.value = resp['meta']['signer']
bHashDisplay.innerText = bHash
senderInput.readOnly = true
dateStr.innerText = humanDate.toString()
if (resp['metadata']['subject'] === undefined || resp['metadata']['subject'] === null) {
subjectLine.innerText = '()'
}
else{
subjectLine.innerText = '(' + resp['metadata']['subject'] + ')'
}
//entry.innerHTML = 'sender ' + resp['meta']['signer'] + ' - ' + resp['meta']['time']
threadPart.appendChild(entry) threadPart.appendChild(entry)
entry.appendChild(bHashDisplay)
entry.appendChild(senderInput)
entry.appendChild(subjectLine)
entry.appendChild(dateStr)
}) })
} }