diff --git a/README.md b/README.md index 2cb4e69f..c1541186 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- Private P2P Communication Network 📡 + Privacy Respecting Communication Network 📡

@@ -30,7 +30,7 @@ Onionr ("Onion Relay") is a decentralized/distributed peer-to-peer communication network, designed to be anonymous and resistant to (meta)data analysis, spam, and corruption. -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 a particular user. Even if there is enough evidence to believe that a specific user created a block, nodes still operate behind Tor or I2P and as such cannot be trivially unmasked. The anonymity is achieved by a stateless network with no given indication of what node a block came from or even the user ID. +Onionr stores data in independent packages referred to as 'blocks'. The blocks are distributed to all interested nodes. Blocks and user IDs cannot be easily proven to have been created by a particular user. Even if there is enough evidence to believe that a specific user created a block, nodes still operate behind Tor or I2P and as such cannot be trivially unmasked. The anonymity is achieved by a stateless network with no given indication of what node a block came from or even the user ID. Through long-term traffic analysis, a well funded adversary may discover the most probable node(s) to be creating a set of related blocks, however doing so would only lead them to a node behind Tor or I2P. As the first node that a block appears on is almost always not the creator of the block, there is plausible deniability regarding the true creator of the block. diff --git a/onionr/communicator/__init__.py b/onionr/communicator/__init__.py index de760f0d..8cff0a9f 100755 --- a/onionr/communicator/__init__.py +++ b/onionr/communicator/__init__.py @@ -202,6 +202,7 @@ class OnionrCommunicatorDaemon: except AttributeError: pass else: + # Stop onionr direct connection services for server in self.service_greenlets: server.stop() localcommand.local_command('shutdown') # shutdown the api diff --git a/onionr/httpapi/onionrsitesapi/__init__.py b/onionr/httpapi/onionrsitesapi/__init__.py index a07b4f0b..d40db153 100644 --- a/onionr/httpapi/onionrsitesapi/__init__.py +++ b/onionr/httpapi/onionrsitesapi/__init__.py @@ -47,7 +47,7 @@ def site(name: str)->Response: # Now make sure the key is regardless a valid base32 format ed25519 key (readding padding if necessary) if stringvalidators.validate_pub_key(name): name = unpaddedbase32.repad(name) - resp = sitefiles.get_file('index.html') + resp = sitefiles.get_file(name, 'index.html') elif stringvalidators.validate_hash(name): try: diff --git a/onionr/httpapi/onionrsitesapi/sitefiles.py b/onionr/httpapi/onionrsitesapi/sitefiles.py index 5637abd7..742a3ee5 100644 --- a/onionr/httpapi/onionrsitesapi/sitefiles.py +++ b/onionr/httpapi/onionrsitesapi/sitefiles.py @@ -14,9 +14,13 @@ from onionrcrypto import generate_deterministic def find_site_gzip(user_id: str)->str: sites = blockmetadb.get_blocks_by_type('osite') + user_site = None for site in sites: - if onionrblockapi.Block(site).isSigner(user_id): - return tarfile.open(fileobj=io.BytesIO(site.bcontent), mode='r') + block = onionrblockapi.Block(site) + if block.isSigner(user_id): + user_site = block + if not user_site is None: + return tarfile.open(fileobj=io.BytesIO(user_site.bcontent), mode='r') return None def get_file(user_id, file)->Union[bytes, None]: diff --git a/requirements.in b/requirements.in index df17ef29..07d0d932 100644 --- a/requirements.in +++ b/requirements.in @@ -6,7 +6,7 @@ Flask==1.1.1 PySocks==1.6.8 stem==1.7.1 deadsimplekv==0.2.0 -unpaddedbase32==0.1.0 +unpaddedbase32==0.2.0 streamedrequests==1.0.0 jinja2==2.10.1 toomanyobjs==1.1.0 diff --git a/requirements.txt b/requirements.txt index 1827ed91..436d4f4f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -178,8 +178,9 @@ streamedrequests==1.0.0 \ --hash=sha256:1d9d07394804a6e1fd66bde74a804e71cab98e6920053865574a459f1cf7d3b7 toomanyobjs==1.1.0 \ --hash=sha256:99e27468f9dad19127be9e2fb086b42acd69aed9ad7e63cef74d6e4389be0534 -unpaddedbase32==0.1.0 \ - --hash=sha256:5e4143fcaf77c9c6b4f60d18301c7570f0dac561dcf9b9aed8b5ba6ead7f218c +unpaddedbase32==0.2.0 \ + --hash=sha256:4aacee75f8fd6c8cf129842ecba45ca59c11bfb13dae19d86f32b48fa3715403 \ + --hash=sha256:b7b780c31d27d55e66abf6c221216a35690ee8892c2daacff7f2528e229bd9c3 urllib3==1.24.2 \ --hash=sha256:4c291ca23bbb55c76518905869ef34bdd5f0e46af7afe6861e8375643ffee1a0 \ --hash=sha256:9a247273df709c4fedb38c711e44292304f73f39ab01beda9f6b9fc375669ac3 diff --git a/static-data/www/onboarding/index.html b/static-data/www/onboarding/index.html index 69c613f2..fcf54ae1 100644 --- a/static-data/www/onboarding/index.html +++ b/static-data/www/onboarding/index.html @@ -25,6 +25,8 @@

Your node will shutdown. Thank you for using Onionr.

+

If you are using random bind IPs (default in non dev mode), Onionr will have a different URL next time. +

diff --git a/static-data/www/private/index.html b/static-data/www/private/index.html index 35a2a053..71dfba83 100755 --- a/static-data/www/private/index.html +++ b/static-data/www/private/index.html @@ -31,6 +31,7 @@

Your node will shutdown. Thank you for using Onionr.

+

If you are using random bind IPs (default in non dev mode), Onionr will have a different URL next time.