refactoring, work on friends ui, bug fixes and whitepaper work
This commit is contained in:
parent
1562848999
commit
137d6f39dd
0
.gitmodules
vendored
0
.gitmodules
vendored
@ -61,7 +61,9 @@ The following applies to Ubuntu Bionic. Other distros may have different package
|
|||||||
* Have python3.6+, python3-pip, Tor (daemon, not browser) installed (python3-dev recommended)
|
* Have python3.6+, python3-pip, Tor (daemon, not browser) installed (python3-dev recommended)
|
||||||
* Clone the git repo: `$ git clone https://gitlab.com/beardog/onionr`
|
* Clone the git repo: `$ git clone https://gitlab.com/beardog/onionr`
|
||||||
* cd into install direction: `$ cd 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`
|
* Install the Python dependencies ([virtualenv strongly recommended](https://virtualenv.pypa.io/en/stable/userguide/)): `$ pip3 install --require-hashes -r requirements.txt`
|
||||||
|
|
||||||
|
(--require-hashes is intended to prevent exploitation via compromise of Pypi/CA certificates)
|
||||||
|
|
||||||
## Help out
|
## Help out
|
||||||
|
|
||||||
@ -94,6 +96,8 @@ beardog [ at ] mailbox.org
|
|||||||
|
|
||||||
## 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 and I2P developers do not own, create, or endorse this project, and are not otherwise involved.
|
||||||
|
|
||||||
|
Tor is a trademark for the Tor Project. We do not own it.
|
||||||
|
|
||||||
The 'open source badge' is by Maik Ellerbrock and 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.
|
@ -1,25 +1,25 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="onionr-logo.png" alt="<h1>Onionr</h1>">
|
<img src="onionr-logo.png" alt="<h1>Onionr</h1>" width=200>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">Anonymous, Decentralized, Distributed Network</p>
|
<p align="center">Anonymous, Decentralized, Distributed Network</p>
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
|
|
||||||
One of the most important things in the modern world is information. The ability to communicate freely with others is crucial for maintaining societal and personal liberty. The internet has provided humanity with the ability to spread information globally, but there are many people who try (and sometimes succeed) to stifle the flow of information.
|
We believe that the ability to communicate freely with others is crucial for maintaining societal and personal liberty. The internet has provided humanity with the ability to spread information globally, but there are many persons and organizations who try to stifle the flow of information, sometimes with success.
|
||||||
|
|
||||||
Internet censorship comes in many forms, state censorship, corporate consolidation of media, threats of violence, network exploitation (e.g. denial of service attacks) and other threats.
|
Internet censorship comes in many forms, state censorship, corporate consolidation of media, threats of violence, network exploitation (e.g. denial of service attacks) and other threats.
|
||||||
|
|
||||||
To prevent censorship and loss of information, these measures must be in place:
|
We hold that in order to protect individual privacy, users must have the ability to communicate anonymously and with decentralization.
|
||||||
|
|
||||||
|
We believe that in order to prevent censorship and loss of information, these measures must be in place:
|
||||||
|
|
||||||
* Resistance to censorship of underlying infrastructure or of particular network hosts
|
* Resistance to censorship of underlying infrastructure or of particular network hosts
|
||||||
|
|
||||||
* Anonymization of users by default
|
* Anonymization of users by default
|
||||||
* The Inability to coerce human users (personal threats/"doxxing", or totalitarian regime censorship)
|
* The Inability to coerce users (personal threats/"doxxing", or totalitarian regime censorship)
|
||||||
|
|
||||||
* Economic availability. A system should not rely on a single device to be constantly online, and should not be overly expensive to use. The majority of people in the world own cell phones, but comparatively few own personal computers, particularly in developing countries. Internet connectivity can be slow or spotty in many areas.
|
* Economic availability. A system should not rely on a single device to be constantly online, and should not be overly expensive to use. The majority of people in the world own cell phones, but comparatively few own personal computers, particularly in developing countries. Internet connectivity can be slow or spotty in many areas.
|
||||||
|
|
||||||
There are many great projects that tackle decentralization and privacy issues, but there are none which tackle all of the above issues. Some of the existing networks have also not worked well in practice, or are more complicated than they need to be.
|
|
||||||
|
|
||||||
# Onionr Design Goals
|
# Onionr Design Goals
|
||||||
|
|
||||||
When designing Onionr we had these main goals in mind:
|
When designing Onionr we had these main goals in mind:
|
||||||
@ -131,4 +131,4 @@ 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 relatively high level libraries, they will be deployed.
|
Once quantum safe algorithms are more mature and have decent high level libraries, they will be deployed.
|
||||||
|
@ -156,7 +156,7 @@ class Onionr:
|
|||||||
with open('static-data/header.txt', 'rb') as file:
|
with open('static-data/header.txt', 'rb') as file:
|
||||||
# only to stdout, not file or log or anything
|
# only to stdout, not file or log or anything
|
||||||
sys.stderr.write(file.read().decode().replace('P', logger.colors.fg.pink).replace('W', logger.colors.reset + logger.colors.bold).replace('G', logger.colors.fg.green).replace('\n', logger.colors.reset + '\n').replace('B', logger.colors.bold).replace('A', '%s' % API_VERSION).replace('V', ONIONR_VERSION))
|
sys.stderr.write(file.read().decode().replace('P', logger.colors.fg.pink).replace('W', logger.colors.reset + logger.colors.bold).replace('G', logger.colors.fg.green).replace('\n', logger.colors.reset + '\n').replace('B', logger.colors.bold).replace('A', '%s' % API_VERSION).replace('V', ONIONR_VERSION))
|
||||||
logger.info(logger.colors.fg.lightgreen + '-> ' + str(message) + logger.colors.reset + logger.colors.fg.lightgreen + ' <-\n')
|
logger.info(logger.colors.fg.lightgreen + '-> ' + str(message) + logger.colors.reset + logger.colors.fg.lightgreen + ' <-\n', sensitive=True)
|
||||||
|
|
||||||
def doExport(self, bHash):
|
def doExport(self, bHash):
|
||||||
exportDir = self.dataDir + 'block-export/'
|
exportDir = self.dataDir + 'block-export/'
|
||||||
|
@ -122,7 +122,6 @@ def get_commands(onionr_inst):
|
|||||||
'importblocks': onionr_inst.onionrUtils.importNewBlocks,
|
'importblocks': onionr_inst.onionrUtils.importNewBlocks,
|
||||||
|
|
||||||
'introduce': onionr_inst.onionrCore.introduceNode,
|
'introduce': onionr_inst.onionrCore.introduceNode,
|
||||||
'connect': onionr_inst.addAddress,
|
|
||||||
'pex': onionr_inst.doPEX,
|
'pex': onionr_inst.doPEX,
|
||||||
|
|
||||||
'getpassword': onionr_inst.printWebPassword,
|
'getpassword': onionr_inst.printWebPassword,
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
|
'''
|
||||||
|
Onionr - P2P Anonymous Storage Network
|
||||||
|
|
||||||
|
launch the api server and communicator
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
'''
|
||||||
|
|
||||||
import os, time, sys, platform, sqlite3
|
import os, time, sys, platform, sqlite3
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
import onionr, api, logger, communicator
|
import onionr, api, logger, communicator
|
||||||
|
@ -1,6 +1,22 @@
|
|||||||
import sys
|
'''
|
||||||
import logger
|
Onionr - P2P Anonymous Storage Network
|
||||||
|
|
||||||
|
add keys (transport and pubkey)
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
'''
|
||||||
def add_peer(o_inst):
|
def add_peer(o_inst):
|
||||||
try:
|
try:
|
||||||
newPeer = sys.argv[2]
|
newPeer = sys.argv[2]
|
||||||
@ -25,7 +41,7 @@ def add_address(o_inst):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
logger.info("Adding address: " + logger.colors.underline + newAddress)
|
logger.info("Adding address: " + logger.colors.underline + newAddress)
|
||||||
if self.onionrCore.addAddress(newAddress):
|
if o_inst.onionrCore.addAddress(newAddress):
|
||||||
logger.info("Successfully added address.")
|
logger.info("Successfully added address.")
|
||||||
else:
|
else:
|
||||||
logger.warn("Unable to add address.")
|
logger.warn("Unable to add address.")
|
@ -1,3 +1,23 @@
|
|||||||
|
'''
|
||||||
|
Onionr - P2P Anonymous Storage Network
|
||||||
|
|
||||||
|
plugin CLI commands
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
'''
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import logger, onionrplugins as plugins
|
import logger, onionrplugins as plugins
|
||||||
|
|
||||||
|
@ -415,12 +415,14 @@ class OnionrUtils:
|
|||||||
This function is intended to scan for new blocks ON THE DISK and import them
|
This function is intended to scan for new blocks ON THE DISK and import them
|
||||||
'''
|
'''
|
||||||
blockList = self._core.getBlockList()
|
blockList = self._core.getBlockList()
|
||||||
|
exist = False
|
||||||
if scanDir == '':
|
if scanDir == '':
|
||||||
scanDir = self._core.blockDataLocation
|
scanDir = self._core.blockDataLocation
|
||||||
if not scanDir.endswith('/'):
|
if not scanDir.endswith('/'):
|
||||||
scanDir += '/'
|
scanDir += '/'
|
||||||
for block in glob.glob(scanDir + "*.dat"):
|
for block in glob.glob(scanDir + "*.dat"):
|
||||||
if block.replace(scanDir, '').replace('.dat', '') not in blockList:
|
if block.replace(scanDir, '').replace('.dat', '') not in blockList:
|
||||||
|
exist = True
|
||||||
logger.info('Found new block on dist %s' % block)
|
logger.info('Found new block on dist %s' % block)
|
||||||
with open(block, 'rb') as newBlock:
|
with open(block, 'rb') as newBlock:
|
||||||
block = block.replace(scanDir, '').replace('.dat', '')
|
block = block.replace(scanDir, '').replace('.dat', '')
|
||||||
@ -430,6 +432,8 @@ class OnionrUtils:
|
|||||||
self._core._utils.processBlockMetadata(block)
|
self._core._utils.processBlockMetadata(block)
|
||||||
else:
|
else:
|
||||||
logger.warn('Failed to verify hash for %s' % block)
|
logger.warn('Failed to verify hash for %s' % block)
|
||||||
|
if not exist:
|
||||||
|
print('No blocks found to import')
|
||||||
|
|
||||||
def progressBar(self, value = 0, endvalue = 100, width = None):
|
def progressBar(self, value = 0, endvalue = 100, width = None):
|
||||||
'''
|
'''
|
||||||
|
@ -72,6 +72,9 @@ fetch('/friends/list', {
|
|||||||
entry.appendChild(removeButton)
|
entry.appendChild(removeButton)
|
||||||
entry.appendChild(nameText)
|
entry.appendChild(nameText)
|
||||||
friendListDisplay.appendChild(entry)
|
friendListDisplay.appendChild(entry)
|
||||||
|
entry.onclick = (function(entry, nameText, peer) {return function() {
|
||||||
|
overlay('friendInfo')
|
||||||
|
};})(entry, nameText, peer);
|
||||||
}
|
}
|
||||||
// If friend delete buttons are pressed
|
// If friend delete buttons are pressed
|
||||||
|
|
||||||
|
@ -11,6 +11,12 @@
|
|||||||
<link rel='stylesheet' href='/friends/style.css'>
|
<link rel='stylesheet' href='/friends/style.css'>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div id="friendInfo" class='overlay'>
|
||||||
|
<div class='overlayContent'>
|
||||||
|
<button id='defriend' class='warnBtn'>Unfriend</button>
|
||||||
|
<label>Public Key <input id='friendPubkey' type='text' readonly></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class='content'>
|
<div class='content'>
|
||||||
<img class='logo' src='/shared/onionr-icon.png' alt='onionr logo'>
|
<img class='logo' src='/shared/onionr-icon.png' alt='onionr logo'>
|
||||||
<span class='logoText'>Onionr Web Control Panel</span>
|
<span class='logoText'>Onionr Web Control Panel</span>
|
||||||
|
@ -23,4 +23,14 @@ form label{
|
|||||||
#friendList button{
|
#friendList button{
|
||||||
display: inline;
|
display: inline;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#friendInfo .overlayContent{
|
||||||
|
padding: 1em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#defriend{
|
||||||
|
display: block;
|
||||||
|
margin-left: 50%;
|
||||||
|
margin-bottom: 1em;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user