Compare commits

...

1287 Commits

Author SHA1 Message Date
Kevin F
61051d5711 Removed old scripts 2023-01-16 23:33:57 -06:00
Kevin F
59ad2731ba Disconnect peers who stem a bad block 2023-01-16 23:31:30 -06:00
Kevin F
560a20e90a Only expose wot to rpc if rpc is active 2023-01-16 23:30:50 -06:00
Kevin F
ce3a548c70 Added create block RPC wrapper 2023-01-16 23:29:50 -06:00
Kevin F
8712a1c401 Changed rpc block wrapper to use multiprocessing 2023-01-12 21:51:27 -06:00
Kevin F
8511fb42b6 Added test for multiprocess wrapper 2023-01-12 21:51:03 -06:00
Kevin F
9eb2e5d413 Added multiprocess wrapper to do simple function calls in a seperate process 2023-01-12 21:42:22 -06:00
Kevin F
39c01fdbc5 Improved RPC, added threaded RPC with result fetcher 2023-01-12 00:23:28 -06:00
Kevin F
7bcef03592 Added setunixsocket and settcpsocket helper commands to RPC plugin 2023-01-11 16:51:11 -06:00
Kevin F
2b224cae84 Added create_block RPC endpoint 2023-01-10 22:08:08 -06:00
Kevin F
7895442b51 Respond to OPTIONS in rpc 2023-01-04 00:52:15 -06:00
Kevin F
474ef21163 Remove old dispatcher for getting blocks in RPC blocks wrapper 2023-01-02 19:36:37 -06:00
Kevin F
8e35a79864 Started on trust identity CLI menu option 2022-12-09 19:46:29 +00:00
Kevin F
8e730cef98 WOT API can now serialize identities 2022-12-02 21:42:11 +00:00
Kevin F
738fa0c361 Ping the RPC api before using the wot CLI 2022-12-02 21:41:48 +00:00
Kevin F
b3eb0caffd Add result plugin to reduce confusing use of exceptions 2022-12-02 21:41:10 +00:00
Kevin F
446662cc60 Fix RPC plugin server binding incorrectly to TCP and doubling up JSON encoding 2022-12-02 21:40:33 +00:00
Kevin F
180116a55d Fix killdaemon logging 2022-12-02 21:19:42 +00:00
Kevin F
bc3d6571bb merge seattle work 2022-11-27 01:03:44 +00:00
Kevin F
30d50ceacf merge seattle work 2022-11-27 01:03:36 +00:00
Kevin F
e84ad93de7 work on wot cli 2022-11-22 00:57:14 -05:00
Kevin F
84e16e5b82 bump dependencies 2022-10-31 17:01:15 +00:00
Kevin F
cd3a7cd7b2 Added identity generation 2022-10-22 06:22:29 +00:00
Kevin F
24e0157e15 Updated dockerfile 2022-10-22 06:22:05 +00:00
Kevin F
c2db671a85 Work on secure identity keystorage using system keyring 2022-10-17 20:45:45 +00:00
Kevin F
9501d73546 Adding WOT API to RPC to enable 3rd party apps like merkato 2022-10-14 18:26:07 +00:00
Kevin F
4572f255fb Wot adjustments, blockdb plugin events 2022-10-01 04:25:46 +00:00
Kevin F
20393a547e bump dependencies 2022-09-27 19:21:31 +00:00
Kevin F
015a072b0b Fix test writing to wrong test dir directory 2022-09-27 19:08:58 +00:00
Kevin F
5ae5897703 Removed defunct utils that will probably never be used again 2022-09-27 19:06:18 +00:00
Kevin F
e9efffff34 Removed crappy logger and replaced it with a sane built in logging logger 2022-09-27 17:21:00 +00:00
Kevin F
2eea681e98 Removed defunct tests and fixed remaining tests 2022-09-27 00:49:51 +00:00
Kevin F
3852b15c89 Fix gossip server not closing connections 2022-09-27 00:49:25 +00:00
Kevin F
3643e4f8d7 Removed lots of defunct cruft 2022-09-26 20:06:05 +00:00
Kevin F
8676a18c87 Split up requirements that default official plugins have 2022-09-26 20:04:03 +00:00
Kevin F
97d8662f15 started splitting dependencies by plugin 2022-09-25 23:18:18 -04:00
Kevin F
a517ad3aee Mostly finished with wot command processing 2022-09-23 17:31:34 -04:00
Kevin F
d915a2aaed handle unix peer socket file not existing 2022-09-17 01:24:11 -05:00
Kevin F
25e705c0b2 Removed sqlite as dependency 2022-09-17 01:23:27 -05:00
Kevin F
6f3e5aebd9 Removed defunct Onionrusers 2022-09-17 01:23:01 -05:00
Kevin F
584bc6b73f + Added ONIONR_PROFILING enviornment variable to profile onionr daemon or commands
+ Added SIGUSR1 handler to dump stacktrace of all active threads
2022-09-17 01:22:42 -05:00
Kevin F
171ea25f46 Wot import fixes 2022-09-17 00:02:49 -05:00
Kevin F
2c9836c54f Added REPL plugin 2022-09-16 23:33:39 -05:00
Kevin F
a036c1839f Added event for main loop 2022-09-16 23:24:44 -05:00
Kevin F
6ad36bf4e5 Removed deprecated DB code and onioncrypto 2022-09-16 23:24:25 -05:00
Kevin F
cdeaa403af Added set wrapper to contain identities
Finished signature revoking implementation
2022-09-15 20:03:29 -05:00
Kevin F
fae9521d8f Made trust distance test graph generation reliable 2022-09-15 20:01:59 -05:00
Kevin F
05e04ef557 Adjusted trust signatures to sign the wot command 2022-09-15 01:27:46 -05:00
Kevin F
5bb43326e7 Finished tests for trust payload processing 2022-09-14 12:35:20 -05:00
Kevin F
9058f7bee5 Added basic test for trust payload processing 2022-09-13 21:40:39 -05:00
Kevin F
08d8fda857 developing signature processing in wot 2022-09-13 12:29:50 -05:00
Kevin F
650e943182 Work on WOT block processing and signatures 2022-09-08 18:44:23 -05:00
Kevin F
e3d06ff0f5 Defunct code removal 2022-09-01 21:31:49 -05:00
Kevin F
83007cb28d Finished loading identities from blocks 2022-09-01 21:31:04 -05:00
Kevin F
57b1e07715 Finished identity serialization 2022-08-31 00:30:28 -05:00
Kevin F
bddddd7c5b Remove notifications for now 2022-08-22 12:27:06 -05:00
Kevin F
85b6f468fd Remove ID commands for now 2022-08-22 10:35:49 -05:00
Kevin F
5ca2c8d329 Corrected missing hashes 2022-08-22 10:19:39 -05:00
Kevin F
c0d3b367dc Get distance of trust with bfs 2022-08-18 00:12:01 -05:00
Kevin F
86615305d7 Fix tor peers not being removed from connection pool when they fail 2022-08-16 19:30:05 -05:00
Kevin F
69a31d1d83 Fixed high CPU usage when there are no outbound connections 2022-08-16 17:22:28 -05:00
Kevin F
954f5d793d fix log spamming 2022-08-16 17:11:56 -05:00
Kevin F
c95d4b2685 README cleanup 2022-08-16 16:24:13 -05:00
Kevin F
736549c1dc added dependencies for rpc 2022-08-16 16:08:39 -05:00
Kevin F
2deb9271dc README cleanup 2022-08-16 16:01:00 -05:00
Kevin F
189645d560 correct readme to current status 2022-08-16 10:46:23 -05:00
Kevin F
b59e79a21f Init wot plugin 2022-08-16 09:55:01 -05:00
Kevin F
3b8644fa8f Init wot plugin 2022-08-16 09:54:54 -05:00
Kevin F
b2ebc56419 Added RPC plugin scaffolding 2022-08-11 14:25:07 -05:00
Kevin F
bc71d12b77 Removed notifications requirements 2022-08-11 14:24:40 -05:00
Kevin F
264eeaa988 Started serializedAPI plugin 2022-08-09 19:02:37 -05:00
Kevin F
c880b6fa7a Removed webUI and unused god objects
Remove defunct requirements
Removed more defunct code
Prepare onionrvalues for new release
disable unixtransport by default
2022-08-06 12:01:32 -05:00
Kevin F
228d3cbe35 Fix tor announcing to itsself 2022-08-02 21:06:30 -05:00
Kevin F
9864fa5040 Tweaked some gossip timeout values and fixed tor not storing full address in config 2022-07-31 12:23:01 -05:00
Kevin F
3a7e378d8b Added block database cleaner 2022-07-31 00:32:43 -05:00
Kevin F
f220e398f1 Substantial bug fixes and performance improvements 2022-07-30 15:41:11 -05:00
Kevin F
8bd4a4c524 Fixed stemout blocking and performance issues 2022-07-28 16:10:36 -05:00
Kevin F
c663be30f1 bump flask 2022-07-28 16:09:31 -05:00
Kevin F
90176e43fb Implemented non-dandelion uploading to improve network performance 2022-07-26 12:45:48 -05:00
Kevin F
9b6d1f5dbd Fix diffuseblocks blocking the event loop 2022-07-25 14:37:39 -05:00
Kevin F
e7daaf576f Added logic for less strict dandelion++ fanout in order to enable smaller networks to function more quickly 2022-07-24 00:37:10 -05:00
Kevin F
84c13ade51 gossip fixes 2022-07-19 00:32:54 -05:00
Kevin F
d2b5298bc6 Fix conflicting module names in transports 2022-07-17 00:01:07 -05:00
Kevin F
d11d12b67f async bug fixes 2022-07-11 10:27:13 -05:00
Kevin F
1eadb4bf6e bumped dependencies 2022-07-10 22:28:30 -05:00
Kevin F
64a88118bd added unix transport for testing 2022-06-26 14:43:16 -05:00
Kevin F
b25e376349 gossip bug and performance fixes 2022-06-26 00:34:49 -05:00
Kevin F
b9fa446cb0 Fix missing comma 2022-06-21 12:10:11 -05:00
Kevin F
6b6d357a13 Small gossip fixes 2022-06-14 11:01:07 -05:00
Kevin F
ac88e0a1da Stem out even if we only have 1 peer 2022-06-14 11:00:08 -05:00
Kevin F
cdccde2d9d Don't write python bytecode 2022-06-14 10:55:38 -05:00
Kevin F
7b0c761dd1 Bump psutil, flask, and ujson 2022-06-10 13:25:21 -05:00
Kevin F
911d8118bc Small gossip fixes 2022-06-05 15:11:53 -05:00
Kevin F
ac17b53663 Fix ping not properly responding 2022-06-05 14:46:13 -05:00
Kevin F
946fdbd06d Don't add .onion if it is not needed 2022-06-05 14:46:01 -05:00
Kevin F
9088d931c9 Move setupconfig up to fix default config not being used properly 2022-06-05 14:40:31 -05:00
Kevin F
421c6da25a Load and save tor peers 2022-05-30 19:52:03 -05:00
Kevin F
158178d6fc Don't spam tracebacks when sockets timeout 2022-05-20 10:13:12 -05:00
Kevin F
85626d6642 Removed close gossip command 2022-05-18 23:56:25 -05:00
Kevin F
9f25291c3a Finished client announce tests 2022-05-18 23:39:14 -05:00
Kevin F
15a4744a70 Completed new new peers test 2022-05-16 09:53:33 -05:00
Kevin F
1b21e25f7e Finished basic get_new_peers tests 2022-05-15 23:21:45 -05:00
Kevin Froman
0b4e264877 Dont accept peers too large 2022-05-15 21:54:14 -04:00
Kevin F
12d4ed7638 started get new peers test 2022-05-14 11:28:12 -05:00
Kevin F
2be0175326 started get new peers test 2022-05-13 00:17:06 -05:00
Kevin F
5bdfbd7c43 started get new peers test 2022-05-12 09:21:38 -05:00
Kevin F
93fc1827b5 Added remaining stem choice test cases 2022-05-10 09:29:28 -05:00
Kevin F
3a26d053fe Gossip client tests, fixed delayed threads 2022-05-09 12:38:03 -05:00
Kevin F
7b7d6a03d3 Ignore broken pipes when streaming blocks in the gossip client 2022-05-05 22:31:05 -05:00
Kevin F
50f0cfa6f4 Added basic streamblocks test, slight fixes for streamblocks 2022-05-05 00:07:58 -05:00
Kevin F
91df7507f4 db set_if_new returns bool on if a new key was set or not and doesn't raise duplicate exception 2022-05-05 00:05:53 -05:00
Kevin F
c065be0145 Fix blockdb has_block not having block path 2022-05-05 00:04:37 -05:00
Kevin F
4edbde82cc Added example plugin that tests block insertion 2022-05-01 16:06:32 -05:00
Kevin F
1b37264eb7 Work on gossip tests and cleaned up api server some 2022-05-01 00:45:26 -05:00
Kevin F
e6b61c5f59 Added put block test (1 block) 2022-04-24 15:19:39 -05:00
Kevin F
ca2344c72c Added peer announce and exchange tests 2022-04-23 00:41:57 -05:00
Kevin F
237cdde4e5 Added peer exchange test (passing) 2022-04-20 00:28:29 -05:00
Kevin F
6a6460ef31 Added testing of streaming multiple blocks from gossip peer 2022-04-16 12:55:01 -05:00
Kevin F
4caee50ce7 Remove dead neighbor closeness benchmark 2022-04-16 12:49:42 -05:00
Kevin F
a61cd273a8 Implemented basic server diffusal test 2022-04-05 01:17:40 -05:00
Kevin F
c7ba974264 Block diffusal mostly done 2022-04-04 00:48:30 -05:00
Kevin F
9d2c2641f4 Block diffusal mostly done 2022-04-03 01:16:58 -05:00
Kevin F
996bff267b Work on normal gossip diffusion 2022-03-30 01:13:42 -05:00
Kevin F
dae99dc2f7 Work on normal gossip diffusion 2022-03-28 00:13:36 -05:00
Kevin F
5858b0aca3 updated readme 2022-03-28 00:13:03 -05:00
Kevin F
df02bdb826 Work on normal gossip diffusion 2022-03-26 18:26:55 -05:00
Kevin F
c215d4decd Work on normal gossip diffusion 2022-03-26 18:24:40 -05:00
Kevin F
b07c176f5c Refactored gossip peer set, gossip block queues, and dandelionphase to use singleton/module instances instead of being passed around 2022-03-21 01:03:53 -05:00
Kevin F
9c44069248 Misc bug fixes for gossip 2022-03-20 18:05:44 -05:00
Kevin F
5b5e5ef764 Don't bother to check if tor address in bootstrap list ends in .onion, it always shouldn't 2022-03-20 13:00:33 -05:00
Kevin F
fd9e6f5ede Dandelion phases now have IDs so it can be known more easily if an epoch elapsed 2022-03-20 13:00:04 -05:00
Kevin F
8b2b6a613e corrected remaining_time being used as atter when resting during end op remaining time in dandelion client loop 2022-03-20 12:56:36 -05:00
Kevin F
be1dde95a6 Corrected type hinting for block queues and peer sets 2022-03-20 12:54:57 -05:00
Kevin F
9ef6f46a5c Implemented do_stem_stream to stem blocks for dandelion++ 2022-03-20 12:53:40 -05:00
Kevin F
e985966e7c Turned dandelion stem into a module and corrected use of wait_for 2022-03-20 12:52:58 -05:00
Kevin F
f740d475c4 Specify that Onionr's pid is a pid in log 2022-03-20 12:51:54 -05:00
Kevin F
a53c31fda7 peer.get_socket implementations now must take timeout arg used for initial connection 2022-03-20 12:51:25 -05:00
Kevin F
511803f565 update readme to reflect current state of development 2022-03-20 12:50:19 -05:00
Kevin F
1b77c60346 Remove todo.txt and replace with ROADMAP.md 2022-03-20 12:48:27 -05:00
Kevin F
568a192c97 Fix license docstring boilerplate spacing 2022-03-17 19:56:31 -05:00
Kevin F
2544579363 updated readme to reflect current work 2022-03-16 00:57:05 -05:00
Kevin F
6c2b1e49a2 Implemented dandelion stemout stream building 2022-03-14 10:04:28 -05:00
Kevin F
9bf16c5758 Work on stemout 2022-03-13 00:35:22 -06:00
Kevin F
19159ffa06 Work on stemout 2022-03-12 19:28:18 -06:00
Kevin F
4c54677387 Use tuple of queues for block queues instead of list for clarity that queues cannot be added 2022-03-11 11:15:18 -06:00
Kevin F
747b7d70a8 Added ordered_set dependency so we can pick from gossip peer set more efficiently 2022-03-11 10:55:33 -06:00
Kevin F
fefec8bdc8 added block store function used when not in stem phase 2022-03-10 01:10:13 -06:00
Kevin F
9d17c7bd64 Implemented server dandelion++ stem portion 2022-03-04 18:05:12 -06:00
Kevin F
17b268d9e4 lots of work on gossip 2022-03-02 07:29:59 -06:00
Kevin F
4f3da58a60 Only 1 command per peer connection should be handled 2022-02-27 13:36:39 -06:00
Kevin F
1a7ce7d386 Try mulitiple times and log an error if we can't bootstrap to anyone 2022-02-27 13:36:02 -06:00
Kevin F
44f6b90777 When checking for peer online to add to peer pool, make sure it closes and avoid attempting if its already in the pool 2022-02-27 13:34:16 -06:00
Kevin F
5337b0aba4 bootstrap logic separated out of plugin and announcement logic mostly completed 2022-02-26 01:07:18 -06:00
Kevin F
34f9ffbf6b Made peers hashable and comparable for their use in the peer set 2022-02-26 01:06:17 -06:00
Kevin F
8d394c76a7 Peer announcing client side done 2022-02-25 01:02:04 -06:00
Kevin F
df3568fc15 Scaffolding before implementing peer exchange logic 2022-02-24 01:03:50 -06:00
Kevin F
850468dc39 Scaffolding before implementing peer exchange logic 2022-02-23 11:47:01 -06:00
Kevin F
d6b1c98cbd Ping loop while brainstorming. 2022-02-22 14:34:19 -06:00
Kevin F
8eec2167c8 Tor can now initialize peers 2022-02-21 15:15:26 -06:00
Kevin F
d48af45210 better error handling in plugin importing 2022-02-18 14:40:00 -06:00
Kevin F
81a0d83b53 Fix import in getsocks 2022-02-18 14:39:46 -06:00
Kevin F
15875d26c6 Work on gossip system and tor transport 2022-02-16 23:58:04 -06:00
Kevin F
2bcfbf0d79 Tor address generation completed. New system stores the priv key in config as a cleaner method 2022-02-16 00:49:32 -06:00
Kevin F
e5b396fc11 Work on gossip system and tor transport 2022-02-14 17:47:54 -06:00
Kevin F
713aeb199d Added DandelionPhase to pick stem mode or not 2022-02-12 14:36:45 -06:00
Kevin F
026f39b680 Work on new gossip system 2022-02-11 00:56:19 -06:00
Kevin F
ebb75b136d Fix sigterm handler shutdown call 2022-02-10 17:38:22 -06:00
Kevin F
ed6e2d05b4 ignore another python path in big brother disk ministry 2022-02-10 17:37:58 -06:00
Kevin F
d388bba646 Added files for new dandelion++ gossip and transport system 2022-02-09 19:29:16 -06:00
Kevin F
cbd9a3cbec bump version codename 2022-02-09 19:28:52 -06:00
Kevin F
e55beec18c Adjusted onionrthreads to take kwargs 2022-02-09 19:28:31 -06:00
Kevin F
4fba79950c adjusted pythonpath .env 2022-02-09 19:28:00 -06:00
Kevin F
cedd01c98f Removed netcontroller
Removed etc (moving most to onionrutils)
Small refactoring
2022-02-06 19:18:53 -06:00
Kevin F
df686b3995 Completed basic blockdb tests 2022-02-06 18:06:34 -06:00
Kevin F
9c3ed5bb10 Removed more scripts 2022-02-06 18:05:49 -06:00
Kevin F
29b28accf1 Started test for blockdb 2022-02-05 13:25:28 -06:00
Kevin F
79639ba0af Added unittest for onionr subprocess module 2022-02-05 00:24:31 -06:00
Kevin F
061e2d1e01 Added generic multiprocess wrapper
Corrected blocks after timeout function
2022-02-04 00:18:57 -06:00
Kevin F
eb763cf293 Work on blockdb functions 2022-02-03 12:55:07 -06:00
Kevin F
ff9eb13579 Added block type iteration generator 2022-02-03 00:32:26 -06:00
Kevin F
844723cea9 Remove tests associated with removed code 2022-02-02 14:45:27 -06:00
Kevin F
bb34f9042e Remove tests associated with removed code 2022-02-02 13:33:37 -06:00
Kevin F
44d5eeab2a Remove tests associated with removed code 2022-02-02 00:34:50 -06:00
Kevin F
15931ccc32 add onionrblocks dependency 2022-01-31 23:16:52 -06:00
Kevin F
21d1f69bbe Removed some dead scripts 2022-01-31 22:55:50 -06:00
Kevin F
fd93f6151e + Add pijion support
* Fix shutdown
2022-01-30 23:59:34 -06:00
Kevin F
1d22b43ef9 Removed old block system 2022-01-30 19:39:24 -06:00
Kevin F
e99056afac More cleanup 2022-01-19 18:47:28 -06:00
Kevin F
cb647daa85 Cleaning up transport remnants 2022-01-11 18:13:19 -06:00
Kevin F
4bd9bd6e9d Removed lan and tor transports 2022-01-11 01:20:15 -06:00
Kevin F
2352e066cc work on moving to vdf 2022-01-06 14:48:22 -06:00
Kevin F
6a8ab46815 Added vdf create wrapper
Removed some dead code
2021-12-31 15:46:56 -06:00
Kevin F
8f784f208b Added new bootstrap node, more to come 2021-12-30 01:05:19 -06:00
Kevin F
de18cdfd55 Update netcheck onions to v3 2021-12-28 21:35:58 -06:00
Kevin F
06907a80fa Bumped dependencies 2021-12-28 13:53:34 -06:00
kev
aecd9ad9ef Update 'README.md' 2021-02-01 04:58:07 +00:00
Kevin Froman
3e17cf7c0b added papers list dev doc 2021-01-24 07:16:44 +00:00
Kevin Froman
735220d8da update runtime result 2021-01-23 19:21:02 +00:00
Kevin Froman
914b505dfa added remote ui plugin 2021-01-23 05:41:36 +00:00
Kevin Froman
8659fa613e merge master for docker fixes 2021-01-23 04:04:17 +00:00
Kevin Froman
7fa320cfc5 don't print version command to devnull in run script either
added docker and VPS documentation
2021-01-23 04:00:14 +00:00
Kevin Froman
9306143e4c dont check hostname if not bound to loopback in client api security 2021-01-23 04:00:03 +00:00
Kevin Froman
7303cf041e if binding to 0.0.0.0, don't validate source ip in client api 2021-01-23 04:00:03 +00:00
Kevin Froman
4e96d18396 print tor errors to stdout 2021-01-23 04:00:03 +00:00
Duncan X Simpson
133b3ea699 Docker improvements
- Create run-onionr-node.sh to parse env and supply args to run-onionr-node.py
- Dockerfile:
  - Run onionr by default rather than bash
  - Run as unprivileged user by default instead of root
  - Use /app for all code
  - Specify python 3.7 (3.8 fails to build cffi)
  - Use apt-get rather than apt (apt's CLI is not stable)
  - Slight reformatting and consolidation
  - do not use devnull in run-onionr-node.py
2021-01-23 04:00:03 +00:00
Duncan X Simpson
3a98183fa0 Compare uid not username in create_dirs() 2021-01-23 04:00:03 +00:00
Kevin Froman
8083489110 removed process info from run-onionr-node script 2021-01-23 04:00:03 +00:00
dependabot-preview[bot]
cb2e29ad6e Bump pdoc3 from 0.9.1 to 0.9.2
Bumps [pdoc3](https://github.com/pdoc3/pdoc) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/pdoc3/pdoc/releases)
- [Changelog](https://github.com/pdoc3/pdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/pdoc3/pdoc/compare/0.9.1...0.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-23 04:00:03 +00:00
dependabot-preview[bot]
6b6a698370 Bump pip-tools from 5.4.0 to 5.5.0
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/5.4.0...5.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-23 04:00:03 +00:00
Kevin Froman
d10ccd2e13 Merge branch 'docker' of https://git.k7dxs.net/dxs/onionr 2021-01-22 19:47:06 +00:00
Kevin Froman
513b758c7a removed process info from run-onionr-node script 2021-01-22 18:55:58 +00:00
Kevin F
5a9594074e
Merge pull request #109 from beardog108/dependabot/pip/pdoc3-0.9.2
Bump pdoc3 from 0.9.1 to 0.9.2
2021-01-16 20:31:45 +00:00
dependabot-preview[bot]
ba8b9b49ed
Bump pdoc3 from 0.9.1 to 0.9.2
Bumps [pdoc3](https://github.com/pdoc3/pdoc) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/pdoc3/pdoc/releases)
- [Changelog](https://github.com/pdoc3/pdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/pdoc3/pdoc/compare/0.9.1...0.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-16 20:31:06 +00:00
Kevin F
8c9a24b227
Merge pull request #117 from beardog108/dependabot/pip/pip-tools-5.5.0
Bump pip-tools from 5.4.0 to 5.5.0
2021-01-16 20:29:44 +00:00
Kevin Froman
c28e5dea74 Merge branch 'master' of ssh://git.voidnet.tech:/kev/Onionr 2021-01-16 20:28:21 +00:00
Kevin Froman
07d9207808 Fix regression when opening homepage 2021-01-16 06:38:12 +00:00
Kevin Froman
ad91a3222f show web url every time onionr daemon starts 2021-01-16 02:08:36 +00:00
Kevin Froman
a032782d26 merge readme changes 2021-01-16 01:42:33 +00:00
Kevin Froman
1042676f26 added security mechanisms doc 2021-01-16 01:40:48 +00:00
Kevin Froman
9bf27b345d improved readme layout 2021-01-16 01:40:37 +00:00
Kevin Froman
8a2d0a635a accept #1 fixing #31 arm64 build issues 2021-01-15 22:24:21 +00:00
footsiefat
5a0231653f Added a new ARM64 (Raspberry Pi's for example) patch allowing for proper support now. 2021-01-15 22:23:24 +00:00
footsiefat
e71935fcef Added a new ARM64 (Raspberry Pi's for example) patch allowing for proper support now. 2021-01-15 22:21:38 +00:00
Kevin Froman
87685fd728 add license to disk ministry 2021-01-15 21:36:57 +00:00
Kevin Froman
d0df62770f added doc that describes testing 2021-01-15 19:41:31 +00:00
Kevin Froman
e95b75b193 update runtime-result 2021-01-15 18:48:14 +00:00
Kevin Froman
59090b4a03 Merge branch 'master' of git.voidnet.tech:kev/Onionr 2021-01-15 08:57:33 +00:00
Kevin Froman
ab41282fba Added instructions for generating requirements.txt 2021-01-15 08:56:20 +00:00
kev
d1e4ae6032 Use list for version infos in issue template 2021-01-15 08:56:20 +00:00
kev
b6b941bf9b Remove i2p and add cpu to issue template for now 2021-01-15 08:56:20 +00:00
Kevin Froman
509e8a290b don't use hard coded python version number in .env file 2021-01-15 08:56:20 +00:00
Kevin Froman
b267d3028e bump version to 8.0.2 2021-01-15 08:55:42 +00:00
Kevin Froman
76f1d164e7 + added basic dev guide
* fixes #22
* When restarting from cli, always output to previous process' terminal
2021-01-15 07:30:38 +00:00
Kevin Froman
54f6e3bdc6 Added instructions for generating requirements.txt 2021-01-15 01:53:31 +00:00
Kevin Froman
fd440b8b91 Merge branch 'master' of git.voidnet.tech:kev/Onionr 2021-01-15 01:13:47 +00:00
Kevin Froman
8797bce4fa don't use hard coded python version number in .env file 2021-01-15 01:11:52 +00:00
kev
b42dc8fbc6 Use list for version infos in issue template 2021-01-15 02:10:30 +02:00
kev
e950f3242e Remove i2p and add cpu to issue template for now 2021-01-15 01:55:28 +02:00
Kevin Froman
eefcb8ccbe added basic dev guide 2021-01-14 05:59:00 +00:00
Kevin Froman
f4e37bbf4e added basic dev guide 2021-01-14 05:56:22 +00:00
Kevin Froman
7dce969eaa added benchmark for neighbor closeness 2021-01-13 21:06:28 +00:00
Kevin Froman
79b46b62eb add SO link to err msg when sqlite is not installed 2021-01-13 09:37:47 +00:00
Kevin Froman
314bec0909 move centos install 2021-01-12 05:01:45 +00:00
Kevin Froman
fcc3bd656d added quickstart guide pdf 2021-01-12 00:37:31 +00:00
Kevin F
4b7be71102
Merge pull request #118 from digitalhuman/patch-1
Install on CentOS 7
2021-01-12 00:33:03 +00:00
Kevin Froman
8a722a0911 removed outdated html autogenerated docs 2021-01-12 00:15:59 +00:00
Victor Angelier CCX
797da0aaea
Install on CentOS 7
Enjoy!
2021-01-11 19:37:56 +01:00
Kevin Froman
52bffa0aae update readme 2021-01-11 04:55:39 +00:00
dependabot-preview[bot]
d7bcd2b4a8
Bump pip-tools from 5.4.0 to 5.5.0
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/5.4.0...5.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-30 17:58:21 +00:00
Kevin Froman
0fb5e5df10 remove chat web files 2020-12-29 07:58:44 +00:00
Kevin Froman
ae84d09e8e * detect stale run file
fixes #27
2020-12-22 08:57:15 -06:00
Kevin Froman
80e4562029 Merge branch 'master' of https://git.voidnet.tech/kev/onionr 2020-12-22 04:15:56 -06:00
Kevin Froman
427957b9e8 add all venvs to gitignore and update changelog 2020-12-22 01:55:05 +00:00
Kevin Froman
9d55c62d68 * revert pow to 5
* is is_alive in sneakernet observer
* catch subprocess err in 3.9.x (dirty hack) in vanityonionr and block gen
* bump version
2020-12-22 01:53:04 +00:00
Kevin Froman
e36f44f9a1 bump deps 2020-12-22 00:54:29 +00:00
Kevin Froman
57638e73f7 added faq.md 2020-12-18 00:12:22 +00:00
Duncan X Simpson
2dc11303d7 Docker improvements
- Create run-onionr-node.sh to parse env and supply args to run-onionr-node.py
- Dockerfile:
  - Run onionr by default rather than bash
  - Run as unprivileged user by default instead of root
  - Use /app for all code
  - Specify python 3.7 (3.8 fails to build cffi)
  - Use apt-get rather than apt (apt's CLI is not stable)
  - Slight reformatting and consolidation
2020-12-15 22:38:46 -07:00
Duncan X Simpson
9345d27d6a Compare uid not username in create_dirs() 2020-12-15 22:38:38 -07:00
Kevin Froman
5afbed63cf Merge branch 'bind-args' 2020-12-16 04:47:16 +00:00
Kevin Froman
c44d6624ff correct yt link
Docker improvements

- Run onionr by default rather than bash
- Run as unprivileged user by default instead of root
- Use /app for all code
- Specify python 3.7 (3.8 fails to build cffi)
- Use apt-get rather than apt (apt's CLI is not stable)
- Slight reformatting and consolidation

Added custom port and bind address args
2020-12-16 04:46:46 +00:00
Kevin Froman
ae359de562 Added custom port and bind address args 2020-12-16 04:44:25 +00:00
dependabot-preview[bot]
2bd58945da Bump watchdog from 0.10.4 to 1.0.1
Bumps [watchdog](https://github.com/gorakhargosh/watchdog) from 0.10.4 to 1.0.1.
- [Release notes](https://github.com/gorakhargosh/watchdog/releases)
- [Changelog](https://github.com/gorakhargosh/watchdog/blob/master/changelog.rst)
- [Commits](https://github.com/gorakhargosh/watchdog/compare/v0.10.4...v1.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-16 04:44:25 +00:00
Duncan X Simpson
b1ef248ee9 Docker improvements
- Modify onionr.sh to parse env and supply args to run-onionr-node.py
- Run onionr by default rather than bash
- Run as unprivileged user by default instead of root
- Use /app for all code
- Specify python 3.7 (3.8 fails to build cffi)
- Use apt-get rather than apt (apt's CLI is not stable)
- Slight reformatting and consolidation
2020-12-16 04:44:25 +00:00
Kevin Froman
416e43e7bb correct yt link 2020-12-16 04:44:25 +00:00
Kevin Froman
1eb6140811 Added custom port and bind address args 2020-12-15 21:59:36 -06:00
Kevin Froman
700bde4bd8 Merge branch 'master' of https://git.k7dxs.net/dxs/onionr 2020-12-15 19:55:46 -06:00
Kevin Froman
71b511382b correct yt link 2020-12-15 19:54:33 -06:00
Duncan X Simpson
67f5c30d85 Docker improvements
- Modify onionr.sh to parse env and supply args to run-onionr-node.py
- Run onionr by default rather than bash
- Run as unprivileged user by default instead of root
- Use /app for all code
- Specify python 3.7 (3.8 fails to build cffi)
- Use apt-get rather than apt (apt's CLI is not stable)
- Slight reformatting and consolidation
2020-12-14 23:27:32 -07:00
Kevin Froman
9684585432 Fix consent message in onboarding 2020-12-13 00:22:51 +00:00
Kevin Froman
9d6216e16b decrease pow, bump version 2020-12-04 09:41:40 +00:00
Kevin Froman
2a6f6bb1aa speed up tests by lowering pow in their configs 2020-12-03 06:36:30 +00:00
Kevin Froman
7820c87b79 bump version 2020-12-03 06:36:15 +00:00
Kevin Froman
93d176badc fix upload.py logging b_hash define 2020-12-03 06:12:06 +00:00
Kevin Froman
968f468027 Merge branch 'fixmultiprocessexit' of /home/user/win-merges/bare-onionr/onionr into fixmultiprocessexit 2020-12-03 05:24:42 +00:00
Kevin Froman
86fd936d52 exit faster from communicator 2020-12-03 05:20:03 +00:00
Kevin Froman
e34b499044 purge old blocks if POW increases 2020-12-02 20:46:36 -06:00
Kevin Froman
01ed4d49d0 fix wsl apport breaking sites 2020-12-03 01:25:24 -06:00
Kevin Froman
9db9c495c8 check block POW *before* syncning from lan 2020-12-02 23:01:12 -06:00
Kevin Froman
dcc304be9d fix wsl apport breaking sitecreator 2020-12-02 23:00:51 -06:00
Kevin Froman
eaf61c280a fixed subprocesspow not exiting on wsl 2020-12-01 16:24:10 -06:00
Kevin Froman
e831a27ae3 bug fixes in block creation and directory security 2020-11-23 03:47:50 +00:00
Kevin Froman
de271794fd added git-update.sh 2020-11-23 03:07:47 +00:00
Kevin Froman
21df88fdaa bumped deps 2020-11-22 01:15:06 +00:00
dependabot-preview[bot]
9d4afc4b3a Bump pip-tools from 5.3.1 to 5.4.0
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/5.3.1...5.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-22 01:13:20 +00:00
Kevin Froman
28044f2bd7 bump version 2020-11-22 01:11:14 +00:00
Kevin Froman
adba4be099 fix tests 2020-11-22 00:43:59 +00:00
Kevin Froman
30a4285b92 - Removed direct connections (will be a different project in the future)
- removed chat for now
- removed onionrcommunicatortimers
2020-11-21 05:31:19 +00:00
Kevin Froman
59330149e1 removed netcheck comm timer 2020-11-18 22:16:37 -06:00
Kevin Froman
a775f3b26d dont upload blocks that arent valid (anymore?), progress removing communicator timers 2020-11-16 06:57:38 +00:00
Kevin Froman
cc703fc404 progress removing communicator timers 2020-11-15 18:52:52 +00:00
Kevin Froman
ecd2cc54da progress removing communicator timers 2020-11-15 18:26:25 +00:00
Kevin Froman
bbd76da333 added flood fill work, misc bug fixes and removing communicator timers 2020-11-13 08:17:48 +00:00
Kevin Froman
04105a2b70 show more info in show-blocks.py script 2020-11-03 04:38:35 +00:00
Kevin Froman
8d839f62c9 bump version 2020-11-03 04:21:17 +00:00
Kevin Froman
a0ae62d0a3 added togglenetwork module in torcontrol 2020-11-03 03:56:24 +00:00
Kevin Froman
a9d0524ccc + added sandbox script
* handle sigterm
2020-11-02 23:47:38 +00:00
Kevin Froman
130e9de5e9 remove disablenetwork for now 2020-11-02 02:09:52 +00:00
Kevin Froman
f0cd2fb2b9 moved blockmetadata to onionrblocks 2020-11-02 01:31:11 +00:00
Kevin Froman
44112750ec Merge branch 'master' into flood-fill 2020-10-29 20:58:17 +00:00
Kevin Froman
f2d7075b3a bump version 2020-10-28 08:28:56 +00:00
Kevin Froman
256c402223 fix connectnewpeers not using specified peer 2020-10-28 07:54:11 +00:00
Kevin Froman
2601263b87 disable forward secrecy for now, fix autocomplete for to address in mail 2020-10-28 02:49:21 +00:00
Kevin Froman
3ab8681b24 Merge branch 'master' of gitlab.com:beardog/Onionr 2020-10-27 15:58:27 +00:00
Kevin Froman
2837210cf4 blockapi decrypt fix 2020-10-27 15:58:06 +00:00
Kevin Froman
d0e6f6c4af bump requirements 2020-10-26 08:45:02 +00:00
Kevin Froman
67054446ae bump requirements 2020-10-26 08:36:53 +00:00
Kevin Froman
f7f4732789 added floodfill network visualization script 2020-10-26 08:32:36 +00:00
Kevin Froman
f80d58e5b8 added floodfill network visualization script 2020-10-26 06:57:22 +00:00
Kevin Froman
4a831a4a4d fixed closeness calculation 2020-10-26 06:11:24 +00:00
Kevin Froman
57ec04eff5 remove hs after creation in generate onions 2020-10-26 06:10:56 +00:00
Kevin Froman
da11c74f6c finished closeness measurement 2020-10-25 04:12:42 +00:00
Kevin Froman
c4be08bd23 added onion generator script 2020-10-24 16:50:25 +00:00
Kevin Froman
299980f126 work on flood fill network 2020-10-24 08:07:54 +00:00
Kevin Froman
b5fe4453ed added graph simulation script 2020-10-22 16:23:16 +00:00
Kevin Froman
77de7e318d fix zalgo overflow in circles ui 2020-10-22 15:16:49 +00:00
Kevin Froman
eec8c356ad fix systemrandom shuffle 2020-10-22 15:16:19 +00:00
Kevin Froman
6a4744997c correct wording in log warning in sidebar 2020-10-22 14:53:11 +00:00
Kevin Froman
cf0507b82d ensure whole tree is made in createdirs 2020-10-22 14:52:49 +00:00
Kevin Froman
862b39c217 fix systemrandom shuffle 2020-10-22 14:25:57 +00:00
Kevin Froman
b424ef6674 disable restart tor button if tor is not enabled 2020-10-22 13:46:28 +00:00
Kevin Froman
4847d9bddf added cpu optimize onboarding option 2020-10-22 12:51:20 +00:00
Kevin Froman
51c3078b90 newline in tor sidebar log 2020-10-22 12:45:38 +00:00
Kevin Froman
8a4c138eed don't netcheck if tor disabled 2020-10-22 12:45:19 +00:00
Kevin Froman
5dddeb3f10 remove random shuffle function for systemrandom equivalent 2020-10-21 09:46:05 +00:00
Kevin Froman
fb85856f76 added bootstrap run argument 2020-10-21 05:34:43 +00:00
Kevin Froman
5c61708c61 added graph simulation script 2020-10-19 07:32:34 +00:00
Kevin Froman
183e6491d0 use SystemRandom for randomshuffle instead of own rolled implementation 2020-10-19 07:28:38 +00:00
Kevin Froman
3ca05e2390 added sidebar log warning 2020-10-19 07:28:17 +00:00
Kevin Froman
88ec98c92a size sanity in webui sidebar log output 2020-10-19 03:25:49 +00:00
Kevin Froman
8f52fa4669 autoscroll sidebar log 2020-10-17 10:11:07 +00:00
Kevin Froman
60c7e6cb37 now shows log in sidebar 2020-10-17 09:54:29 +00:00
Kevin Froman
c23b286540 added file reader offset 2020-10-17 07:51:28 +00:00
Kevin Froman
723d004e5c disable autocomplete for mail message subjects 2020-10-17 02:45:14 +00:00
Kevin Froman
989692c6ac add disable-plugin-list, --store-plaintext and --dev-mode run arguments
fixes #6
2020-10-17 01:36:50 +00:00
Kevin Froman
fcfecaff7e fix removing circles from nav bar when disabled 2020-10-16 06:30:17 +00:00
Kevin Froman
895b4fe4fd side bar and ui node list fixes 2020-10-15 23:24:25 +00:00
Kevin Froman
cf669024bf handle invalid input when adding peer better 2020-10-15 22:02:51 +00:00
Kevin Froman
a9096dc048 correct return type in storage setdata 2020-10-15 09:50:52 +00:00
Kevin Froman
1e7d7840b1 added showblocks script 2020-10-15 04:00:09 +00:00
Kevin Froman
57225f57f0 work on fixing weird upload issues 2020-10-15 03:56:43 +00:00
Kevin Froman
fbcb95be9e fix mixmate indent 2020-10-15 02:46:20 +00:00
Kevin Froman
c2b7246048 handle bad user ids in mail ui better 2020-10-14 22:28:56 +00:00
Kevin Froman
e0f59784b1 Fix mixmate and sneakernet 2020-10-14 00:07:41 +00:00
Kevin Froman
2291d5a5f2 reduce pow 2020-10-12 09:22:54 +00:00
Kevin Froman
d067a343e6 fixed pex 2020-10-11 05:58:42 +00:00
Kevin Froman
3ef29077e7 plaintext block fixes with sharing, fixed peer lookup 2020-10-10 23:23:22 +00:00
Kevin Froman
835c2e527e Fixed encrypted uploads 2020-10-10 08:49:33 +00:00
Kevin Froman
1c44a514a5 Fixed encrypted uploads 2020-10-10 08:43:20 +00:00
Kevin Froman
5baa048a4e Fixed encrypted uploads 2020-10-10 08:41:55 +00:00
Kevin Froman
0338cd64b6 do not upload plaintext to peers that do not support it, closes #14 2020-10-10 04:50:11 +00:00
Kevin Froman
fc7db42deb do not upload plaintext to peers that do not support it, closes #14 2020-10-10 04:26:51 +00:00
Kevin Froman
503bf65cbe fix error on deletion or upload of plaintext blocks to node that does not support it 2020-10-10 02:51:04 +00:00
Kevin F
da57dc373f
Merge pull request #100 from beardog108/dependabot/pip/ujson-4.0.1
Bump ujson from 4.0.0 to 4.0.1
2020-10-10 01:01:46 +00:00
dependabot-preview[bot]
f0bb41daac
Bump ujson from 4.0.0 to 4.0.1
Bumps [ujson](https://github.com/ultrajson/ultrajson) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/4.0.0...4.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-10 00:18:40 +00:00
Kevin Froman
2dc706a894 fixed sneakernet, removed unused vdf 2020-10-10 00:16:24 +00:00
Kevin Froman
d0baa7fd12 deleted csharppow and bumped version 2020-10-09 17:57:12 +00:00
Kevin Froman
10689f24d7 added graph info to readme 2020-10-09 06:39:32 +00:00
Kevin F
b010fa8326
Merge pull request #99 from beardog108/dependabot/pip/ujson-4.0.0
Bump ujson from 3.2.0 to 4.0.0
2020-10-09 01:41:26 +00:00
Kevin Froman
b5b7c756ea removed old onionr contact address from readme 2020-10-09 00:41:12 +00:00
dependabot-preview[bot]
99371cfec5
Bump ujson from 3.2.0 to 4.0.0
Bumps [ujson](https://github.com/ultrajson/ultrajson) from 3.2.0 to 4.0.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/3.2.0...4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-07 17:54:24 +00:00
Kevin Froman
10ba2be93f small bug fixes, added more cors headers for pub api browser requests 2020-10-06 02:53:56 +00:00
Kevin Froman
45940b2dba + added address adding input to web ui in sidebar
fixes #10
2020-10-03 22:43:18 +00:00
Kevin Froman
092233027c allow truncated hashes in getblocks public endpoint 2020-09-30 10:05:40 +00:00
Kevin Froman
5abe4cf704 (re)added cors to public api 2020-09-30 07:45:14 +00:00
Kevin Froman
ab9726a41a in removeblock calculate size of block before removing it 2020-09-28 08:19:06 +00:00
Kevin Froman
6370d07f90 fix standalone block file ext in removeblock 2020-09-28 08:18:30 +00:00
Kevin Froman
fa0318802b use new pow value formats 2020-09-25 08:09:08 +00:00
Kevin Froman
366295f09c Added upload mixing run script arg 2020-09-25 08:08:58 +00:00
Kevin Froman
48f988877d use new pow value formats 2020-09-25 07:32:29 +00:00
Kevin Froman
68a557daf5 added block type filter for public get blocks endpoint 2020-09-25 05:17:08 +00:00
Kevin Froman
02cdbc75ce c# pow implementation work 2020-09-23 21:21:43 +00:00
Kevin F
843f1c1a8e
Merge pull request #97 from beardog108/dependabot/pip/helium-3.0.5
Bump helium from 3.0.4 to 3.0.5
2020-09-23 18:11:14 +00:00
Kevin F
50f0ff8da6
Merge pull request #98 from beardog108/dependabot/pip/gevent-20.9.0
Bump gevent from 20.6.2 to 20.9.0
2020-09-23 18:11:07 +00:00
Kevin Froman
60d6aa0510 c# pow implementation work 2020-09-23 00:36:08 +00:00
dependabot-preview[bot]
0c315c3181
Bump gevent from 20.6.2 to 20.9.0
Bumps [gevent](https://github.com/gevent/gevent) from 20.6.2 to 20.9.0.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/20.6.2...20.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-22 22:30:39 +00:00
Kevin Froman
e9dbc9fa09 c# pow implementation work 2020-09-21 07:10:10 +00:00
Kevin Froman
499981ed52 c# pow implementation work 2020-09-20 21:13:46 +00:00
Kevin Froman
60c1ec07e9 started c# pow implementation 2020-09-19 21:01:31 +00:00
Kevin Froman
fd0f13cf63 started c# pow implementation 2020-09-19 21:01:22 +00:00
Kevin Froman
3199f93d4b work on making mail more efficient, added --private-ke argument imp to run script 2020-09-19 08:25:10 +00:00
Kevin Froman
646a7c0b80 Removed difficulty adjuster from pow
Fixed board popularity cache
2020-09-19 03:08:42 +00:00
Kevin Froman
5b3d76067a Move users to use phrase system for sites as well 2020-09-15 18:12:39 +00:00
Kevin Froman
c0ebfec034 Default disabled upload mixing with new config value 2020-09-15 18:11:44 +00:00
Kevin Froman
c19797bb2e Added remove log on exit argument to run script 2020-09-15 18:10:39 +00:00
Kevin Froman
1f067f614a Added tor restart button to index and tor restart command. Enabled tor restart daemon event 2020-09-15 17:08:50 +00:00
Kevin Froman
b4d80da3ff Work on fixing node uptime 2020-09-14 23:28:01 +00:00
dependabot-preview[bot]
43d3e687d7
Bump helium from 3.0.4 to 3.0.5
Bumps [helium](https://github.com/mherrmann/helium) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/mherrmann/helium/releases)
- [Commits](https://github.com/mherrmann/helium/compare/v3.0.4...v3.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 12:23:42 +00:00
Kevin Froman
4bc2bf5db5 removed deterministic keys due to poor hashing 2020-09-14 11:54:14 +00:00
Kevin Froman
c7e0b6c1b2 Removed batch files, added WIP run wrapper script 2020-09-13 03:26:02 +00:00
Kevin Froman
247b1f616d added missing last release to changelog 2020-09-10 22:04:53 +00:00
Kevin Froman
b4ddf343fc Removed unreachable return in onionrproofs 2020-09-10 21:44:42 +00:00
Kevin Froman
196d02a751 Sped up + fixed statistics table command using psutil, removed checkcommunicator as a result 2020-09-10 21:44:30 +00:00
Kevin Froman
a5b6805b5f Update readme to have version tag 2020-09-10 20:50:41 +00:00
Kevin Froman
e11c3d2733 Merge branch 'master' into remote-access 2020-09-08 18:31:12 +00:00
Kevin F
97708e5875
Merge pull request #91 from beardog108/dependabot/pip/pip-tools-5.3.1
Bump pip-tools from 5.2.1 to 5.3.1
2020-09-08 18:30:49 +00:00
Kevin F
41e57cb5b9
Merge pull request #96 from beardog108/dependabot/pip/ujson-3.2.0
Bump ujson from 3.0.0 to 3.2.0
2020-09-08 18:27:53 +00:00
dependabot-preview[bot]
79a5e6ca3e
Bump ujson from 3.0.0 to 3.2.0
Bumps [ujson](https://github.com/ultrajson/ultrajson) from 3.0.0 to 3.2.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/3.0.0...3.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 16:46:17 +00:00
Kevin Froman
2ce5f48c90 Added ui.public_remote_enabled and ui.public_remote_hosts 2020-09-08 08:39:18 +00:00
Kevin Froman
17ef138c21 bump version 2020-09-07 05:49:13 +00:00
Kevin Froman
cb88ff8c3f update runtime test 2020-09-07 05:47:58 +00:00
Kevin Froman
d40bd85368 added test for api version 2020-09-07 05:13:36 +00:00
dependabot-preview[bot]
d7e7d4499b
Bump pip-tools from 5.2.1 to 5.3.1
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 5.2.1 to 5.3.1.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/5.2.1...5.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 04:08:23 +00:00
Kevin F
104f71c0c3
Merge pull request #95 from beardog108/dependabot/pip/pdoc3-0.9.1
Bump pdoc3 from 0.8.3 to 0.9.1
2020-09-07 04:06:52 +00:00
Kevin Froman
16cdd6d877 Merge branch 'master' of ssh://git.voidnet.tech:/kev/Onionr 2020-09-07 03:44:17 +00:00
Kevin Froman
b7091d2062 fix showlogo crash when not connected to terminal, bump version 2020-09-07 03:42:13 +00:00
Kevin Froman
f8fcd6d4e5 Formatting changes 2020-09-07 03:18:23 +00:00
Kevin Froman
15a66c7fb4 fix showlogo crash when not connected to terminal 2020-09-07 03:17:20 +00:00
Kevin Froman
37e5dbab4b Moved plugin web files to be in the plugin folder to reduce staticfiles blueprint coupling 2020-09-01 22:41:59 +00:00
dependabot-preview[bot]
3df1859df5
Bump pdoc3 from 0.8.3 to 0.9.1
Bumps [pdoc3](https://github.com/pdoc3/pdoc) from 0.8.3 to 0.9.1.
- [Release notes](https://github.com/pdoc3/pdoc/releases)
- [Changelog](https://github.com/pdoc3/pdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/pdoc3/pdoc/compare/0.8.3...0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-27 23:12:01 +00:00
Kevin Froman
14f2d03ebf Formatting improvements in httpapis 2020-08-26 08:25:43 +00:00
Kevin Froman
3422ca43ff Fixing block syncing quirks 2020-08-25 15:02:13 -05:00
Kevin Froman
a83351a73c misc formatting improvements 2020-08-25 13:20:37 -05:00
Kevin Froman
39650a4ca0 catch and log when cannot reach non-managed tor 2020-08-23 22:26:54 -05:00
Kevin Froman
8d54519771 implemented the sybil attack script 2020-08-23 11:54:14 -05:00
Kevin Froman
9f1f1435ce Fix block downloading for shared state 2020-08-23 11:53:49 -05:00
Kevin Froman
78e533952c added sybil attack script 2020-08-23 07:17:10 -05:00
Kevin Froman
e19e23022b show message if user tries to open .onion as onionr site 2020-08-23 06:29:40 -05:00
Kevin Froman
68aac2153b add some more useful logging for failed signed blocks in validatemetadata 2020-08-23 06:29:12 -05:00
Kevin Froman
15379a7c2f add readline to client api request crafter 2020-08-23 05:53:43 -05:00
Kevin Froman
61bc5fd34b use better language for LE on onboarding page 2020-08-23 05:17:32 -05:00
Kevin Froman
b66e1d852e clear stats interval on shutdown button, remove deprecated sync httpget 2020-08-23 05:17:15 -05:00
Kevin Froman
02fde0ad70 fix subprocesspow keyboard interrupt not being catched 2020-08-21 10:44:59 -05:00
Kevin Froman
308fca7c22 added creating blocks count to sidebar 2020-08-21 09:57:59 -05:00
Kevin Froman
72653c1e93 check for light theme before enabling particles 2020-08-21 09:57:28 -05:00
Kevin Froman
cd0b69b03f Use init-time creation only of StorageCounter to use less inotify instances 2020-08-21 09:56:49 -05:00
Kevin Froman
bbc9646a25 fix LANServer dns rebinding crashing because of old kwarg format 2020-08-20 20:03:11 -05:00
Kevin Froman
fd73f63ecd fix public block list not working because of old kwarg format 2020-08-20 20:00:44 -05:00
Kevin Froman
2cf7a8c8b3 Fix unclickable labels in onboarding 2020-08-20 01:29:29 -05:00
Kevin Froman
6089cc3c98 fix formatting in onionrservices 2020-08-19 23:05:06 -05:00
Kevin Froman
05127dd3b7 remove warden since it won't be implemented 2020-08-19 23:04:29 -05:00
Kevin Froman
d39c12ab4d Update runtime test 2020-08-17 19:16:07 -05:00
Kevin Froman
ce0e60c4ea Correct formatting in expiredblocks 2020-08-17 19:03:42 -05:00
Kevin Froman
0938bf0692 Deduplicate infoNumbers in transportinfo keydb 2020-08-17 19:03:21 -05:00
Kevin Froman
fb4dd07ba4 fix missed blockHash->block_hash change in onionrstorage 2020-08-17 19:02:51 -05:00
Kevin Froman
6f242298fe Don't run LAN unittests on QubesOS 2020-08-17 19:02:24 -05:00
Kevin Froman
0b2658374b Added/corrected timeouts for sqlite3 database connections
Bumped mail plugin patch version for sqlite3 timeout change
Code formatting corrections
2020-08-16 19:52:50 -05:00
Kevin Froman
2a7c933321 Utils format fixes 2020-08-12 18:07:04 -05:00
Kevin Froman
c9af24392d Fix netutils formatting 2020-08-12 17:30:12 -05:00
Kevin Froman
272d7d7f74 Removed Windows specific code 2020-08-12 17:21:11 -05:00
Kevin Froman
ce63c4cd3b Show a terminal message if bridge is enabled but one is not set. By design, there is no easy way for us to get Tor bridges automatically
work on tor blocking detection
2020-08-12 13:16:13 -05:00
Kevin Froman
e900d597d8 Added repo-size shield to readme 2020-08-12 03:22:52 -05:00
Kevin Froman
2ddeab8788 work on tor blocking detection 2020-08-11 23:49:26 -05:00
Kevin Froman
a24086da62 add comments to bootstrappeers 2020-08-10 21:35:19 -05:00
Kevin Froman
8389ed190c Basic check for QubesOS in runtime tests and to avoid starting LAN server 2020-08-10 01:09:19 -05:00
Kevin Froman
87b8655b83 do not start lan on qubes 2020-08-10 01:03:32 -05:00
Kevin Froman
feb8004c95 fix generating hashes not being removed when done, add endpoint to get generating hashes 2020-08-09 22:13:06 -05:00
Kevin Froman
a01b645a79 added dump endpoints to debug api 2020-08-08 21:19:09 -05:00
Kevin Froman
3473c5e36a Improved torcontrol formatting and efficency 2020-08-08 21:18:56 -05:00
Kevin Froman
e14955cb6b Improved formatting and removed unnecessary imports in torcontrol 2020-08-08 20:44:11 -05:00
Kevin Froman
504c53edb3 added debug info api files 2020-08-08 15:59:44 -05:00
Kevin Froman
5e00bb930f added client api request crafting script 2020-08-08 15:40:20 -05:00
Kevin Froman
6976dcf8f3 Friends API now shows redirect error message when ref header not set instead of request failing 2020-08-08 15:39:24 -05:00
Kevin Froman
552e7427d8 Merge branch 'master' of ssh://git.voidnet.tech:/kev/Onionr into sidebar 2020-08-08 12:52:39 -05:00
kev
661a4ee3d2 Fix doc links in readme 2020-08-08 20:52:02 +03:00
Kevin Froman
96af4e8db0 Fixed some broken things from communicator decoupling 2020-08-08 12:38:14 -05:00
Kevin Froman
bff2595ac9 Merge branch 'new-release' into sidebar 2020-08-08 10:51:04 -05:00
Kevin Froman
522cd2c462 bumped requirements versions 2020-08-08 00:11:45 -05:00
Kevin
2f5c1311be update readme to reflect release tag usage 2020-08-07 22:41:56 -05:00
Kevin
077f530b72 Fix peeraction still using comm_inst 2020-08-07 21:57:02 -05:00
Kevin
5930f3bfad Added missing tests and sidebar files 2020-08-04 22:35:45 -05:00
Kevin
ab10cea8b6 add forgotten spawndaemonthreads and added license info to bulma extension files 2020-08-04 08:45:06 -05:00
Kevin
086f2f718c fix onlinepeers decoupling 2020-08-04 08:44:24 -05:00
Kevin
4cf17ffe62 work on removing communicator 2020-07-30 20:15:36 -05:00
Kevin
0b34aa7385 added onionrthreads to replace communicator timers 2020-07-29 20:36:41 -05:00
Kevin
6f1daf50d3 added setup kvvars 2020-07-29 20:36:11 -05:00
Kevin
5bde99967b Moved all communicator ext vars to KV 2020-07-29 04:32:09 -05:00
Kevin
f28d469e56 Moved all communicator ext vars to KV 2020-07-29 03:57:06 -05:00
Kevin
080f33bf1f More decoupling, removed unnecessary announceCache 2020-07-26 21:45:17 -05:00
Kevin
fad5e8547e Moved cooldownPeer to KV to further reduce coupling 2020-07-26 19:15:26 -05:00
Kevin
dde10b7005 Moved offllinePeers to KV to further reduce coupling 2020-07-26 19:12:52 -05:00
Kevin
10c1cd7803 Moved blocksToUpload to KV to further reduce coupling 2020-07-26 19:02:39 -05:00
Kevin
97a5f50271 Moved dbTimestamps and newPeers to KV for more decoupling 2020-07-26 15:49:34 -05:00
Kevin
e00d41f8a9 Moved onlinePeers and announceCache to kv for more decoupling 2020-07-26 15:26:15 -05:00
Kevin
6a6718c9fd Moved onlinePeers to KV to further reduce coupling 2020-07-25 22:28:32 -05:00
Kevin
0e4e7bb050 Moved communicator shutdown over to KV model for more decoupling 2020-07-25 21:36:48 -05:00
Kevin F
0460d3380f
Merge pull request #89 from beardog108/dependabot/pip/deadsimplekv-0.3.2
Bump deadsimplekv from 0.3.1 to 0.3.2
2020-07-25 21:30:17 -05:00
dependabot-preview[bot]
e3b1eaad17
Bump deadsimplekv from 0.3.1 to 0.3.2
Bumps [deadsimplekv](https://github.com/beardog108/deadsimplekv) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/beardog108/deadsimplekv/releases)
- [Changelog](https://github.com/beardog108/DeadSimpleKV/blob/master/CHANGELOG.md)
- [Commits](https://github.com/beardog108/deadsimplekv/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-24 20:08:08 +00:00
Kevin
6ecb62356a Moved blockQueue to DSKV singleton as part of communicator decoupling 2020-07-24 14:37:01 -05:00
Kevin
47013431d2 Removed use of communicator's storagecounter to reduce coupling 2020-07-24 03:27:42 -05:00
Kevin
b4be481f81 bumped urllib3 to 1.25.10 2020-07-24 03:03:21 -05:00
Kevin
f4d1739e4a made storagecounter use a watchdog (inotify) instead of excessive file reads 2020-07-24 02:57:44 -05:00
Kevin
8b5c87d356 Removed single-process POW support, which was just needed on Windows 2020-07-23 15:16:52 -05:00
Kevin
ac279c1cef bumped version 2020-07-21 21:57:44 -05:00
Kevin
82b1121ad5 updated bootstrap list 2020-07-18 23:58:13 -05:00
Kevin F
9fe74d1f9b
Merge pull request #87 from beardog108/dependabot/pip/lan/psutil-5.7.2
Bump psutil from 5.7.0 to 5.7.2
2020-07-18 18:32:54 -05:00
Kevin
9fc741106a made localcommand pep8 compliant 2020-07-17 13:49:18 -05:00
dependabot-preview[bot]
9424f1d6a0
Bump psutil from 5.7.0 to 5.7.2
Bumps [psutil](https://github.com/giampaolo/psutil) from 5.7.0 to 5.7.2.
- [Release notes](https://github.com/giampaolo/psutil/releases)
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](https://github.com/giampaolo/psutil/compare/release-5.7.0...release-5.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-15 13:33:54 +00:00
Kevin
782c980b69 formatting and comment improvements, cleanup 2020-07-07 09:11:30 -05:00
Kevin
714b3a3c33 cleaned up onionrblocks/insert/main some 2020-07-04 14:44:06 -05:00
Kevin
a887efe3d2 updated runtime test ts 2020-06-30 19:08:56 -05:00
Kevin
7931f514b6 Only hide blocks uploaded to us if we have outgoing peers (don't send to upload event handler) 2020-06-30 18:34:13 -05:00
Kevin
c46e9590c6 share too_many to all requests (flask "g") handled by public security module 2020-06-30 17:17:22 -05:00
Kevin
08d2dee18a update runtime test ts 2020-06-30 17:16:46 -05:00
Kevin
3a6322c6c6 Remove _delay_wait_for_share_block_removal because it doesn't seem to exist 2020-06-30 17:16:33 -05:00
Kevin
d6422801a2 don't set lookupblocks timestamp unless they actually have new blocks 2020-06-30 17:09:18 -05:00
Kevin
63e676ed6f cleanup lookupblocks 2020-06-30 17:08:32 -05:00
Kevin
e174b4a636 clarify parts of readme and include intention to use VDF 2020-06-30 17:05:11 -05:00
Kevin
3f13cd84ea * Do not print border around quotes when the terminal is small 2020-06-29 02:30:37 -05:00
Kevin
25485e6aa4 * Revert back to hiding blocks even when we have no outgoing connections
* ensure that block is hidden in public list in insert test
2020-06-29 02:29:55 -05:00
Kevin
1aa707cea5 Do not run LANserver runtime test if we are not on an appropriate LAN (such as VMs/VPS) 2020-06-29 02:28:50 -05:00
Kevin
049956544e improve upload error log messages 2020-06-28 04:18:00 -05:00
Kevin
7f8e63f19b keep trying to connect to new peers eagerly if we have no outgoing connections 2020-06-28 04:17:45 -05:00
Kevin
6738eaf222 don't hide uploaded blocks if we have no peers 2020-06-28 04:16:55 -05:00
Kevin
0d58d57467 add line break to a quote 2020-06-28 04:15:58 -05:00
Kevin F
95c4050142
Merge pull request #84 from beardog108/dependabot/pip/lan/pdoc3-0.8.3
Bump pdoc3 from 0.8.2 to 0.8.3
2020-06-27 18:18:14 -05:00
Kevin
27adbbb199 swap spock for snowden in quotes 2020-06-27 18:05:53 -05:00
Kevin
e9bbd38aab improve verifypow error message info to show affected block 2020-06-27 18:05:39 -05:00
Kevin
cc41ad793e correct gettortransport endpoint tor config reading to use int and not bool 2020-06-27 18:05:04 -05:00
Kevin
b878faeb4c fix bug where onionr would complain while restarting about not being able to start 2020-06-27 18:03:20 -05:00
Kevin
c5fd39c762 remove unused var in torstats 2020-06-27 18:00:52 -05:00
Kevin
7780093898 dev toggle scripts toggle animated background 2020-06-27 18:00:31 -05:00
dependabot-preview[bot]
0358ce91f0
Bump pdoc3 from 0.8.2 to 0.8.3
Bumps [pdoc3](https://github.com/pdoc3/pdoc) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/pdoc3/pdoc/releases)
- [Changelog](https://github.com/pdoc3/pdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/pdoc3/pdoc/compare/0.8.2...0.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-27 17:38:27 +00:00
Kevin F
57a18999ac
Merge pull request #83 from beardog108/dependabot/pip/lan/pdoc3-0.8.2
Bump pdoc3 from 0.8.1 to 0.8.2
2020-06-27 02:22:54 -05:00
dependabot-preview[bot]
91c95ac32e
Bump pdoc3 from 0.8.1 to 0.8.2
Bumps [pdoc3](https://github.com/pdoc3/pdoc) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/pdoc3/pdoc/releases)
- [Changelog](https://github.com/pdoc3/pdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/pdoc3/pdoc/compare/0.8.1...0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-26 15:40:05 +00:00
Kevin
ee28aba792 do not bind to lan if there is no lan 2020-06-25 23:44:39 -05:00
Kevin
4a647b4cb1 correct readme 2020-06-25 19:42:02 -05:00
Kevin
e07c70057c Added license info to more JS files 2020-06-25 17:30:34 -05:00
Kevin F
b2068fc6b5
Merge pull request #82 from beardog108/dependabot/pip/lan/watchdog-0.10.3
Bump watchdog from 0.10.2 to 0.10.3
2020-06-25 16:38:39 -05:00
dependabot-preview[bot]
22c4a2e8cd
Bump watchdog from 0.10.2 to 0.10.3
Bumps [watchdog](https://github.com/gorakhargosh/watchdog) from 0.10.2 to 0.10.3.
- [Release notes](https://github.com/gorakhargosh/watchdog/releases)
- [Changelog](https://github.com/gorakhargosh/watchdog/blob/master/changelog.rst)
- [Commits](https://github.com/gorakhargosh/watchdog/compare/v0.10.2...v0.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-25 20:46:41 +00:00
Kevin
1aea6c3362 don't show tor transport box if there is none 2020-06-25 03:29:27 -05:00
Kevin
1bf365aff4 disable lan if there is a local threat (sec level >=3) 2020-06-25 03:28:59 -05:00
Kevin
03608960c0 fix bug in test_lan_learn and handle errors better in encryption plugin 2020-06-23 16:48:04 -05:00
Kevin
8d33e1a188 added sqlite3 check for weird python setups 2020-06-23 04:16:40 -05:00
Kevin
ca1f9eb44b fix regression in apicheck js 2020-06-21 22:48:34 -05:00
Kevin
5bcb5a759d update runtime test 2020-06-21 18:00:57 -05:00
Kevin
5419cb431a clarify recent blocks window text 2020-06-21 17:55:52 -05:00
Kevin
817f0263db transport addresses now displays in dashboard 2020-06-21 17:55:32 -05:00
Kevin
6c75c525d2 added gettoraddress private endpoint 2020-06-21 17:54:30 -05:00
Kevin
7d8c3f75e4 fix formatting in httpapi security 2020-06-21 15:48:00 -05:00
Kevin Froman
a24c87c5b0 fix lan server test for real this time 2020-06-21 14:23:46 -05:00
Kevin F
3ed2ac2d63
Merge pull request #77 from beardog108/dependabot/pip/lan/pip-tools-5.2.1
Bump pip-tools from 5.2.0 to 5.2.1
2020-06-21 14:00:16 -05:00
Kevin F
1b90458b19
Merge pull request #80 from beardog108/dependabot/pip/lan/gevent-20.6.2
Bump gevent from 20.5.2 to 20.6.2
2020-06-21 14:00:01 -05:00
Kevin
34416c07fe made particles more efficient, finished basic blocks feed 2020-06-21 02:27:55 -05:00
dependabot-preview[bot]
c41592de0a
Bump gevent from 20.5.2 to 20.6.2
Bumps [gevent](https://github.com/gevent/gevent) from 20.5.2 to 20.6.2.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/20.5.2...20.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-21 05:05:02 +00:00
Kevin F
dafa4b6117
Merge pull request #81 from beardog108/dependabot/pip/lan/requests-2.24.0
Bump requests from 2.23.0 to 2.24.0
2020-06-21 00:03:23 -05:00
Kevin
c81df9093d added particles and some code for recent block listing 2020-06-20 05:31:51 -05:00
Kevin
c9a6769be7 fix lan server test not using raw 2020-06-19 01:29:47 -05:00
Kevin
7205189d62 make lan server test only a few ports, add run time test grace period in service detection attack prevetion mechanism 2020-06-19 01:08:39 -05:00
Kevin
5751468e8a remove deprecated POW 2020-06-19 00:55:37 -05:00
Kevin
eeab5ef2c2 basic lan syncing support is done 2020-06-19 00:55:13 -05:00
dependabot-preview[bot]
9ad20c069c
Bump requests from 2.23.0 to 2.24.0
Bumps [requests](https://github.com/psf/requests) from 2.23.0 to 2.24.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.23.0...v2.24.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-17 16:42:20 +00:00
Kevin
bae8b38f08 handle ping missed in lan connecting 2020-06-17 00:53:33 -05:00
Kevin
c0b72f9007 handle ping missed in lan connecting 2020-06-17 00:42:40 -05:00
Kevin
1f2c116b4b handle ping missed in lan connecting 2020-06-17 00:37:11 -05:00
Kevin
5b9bb2e5e2 made lan port identification faster 2020-06-17 00:29:03 -05:00
Kevin
1e76990d1e made lan port identification faster 2020-06-17 00:00:52 -05:00
Kevin
529da22cc4 Merge branch 'master' into lan 2020-06-16 15:34:54 -05:00
Kevin
ac665f5872 made some dashboard text clearer 2020-06-16 15:33:53 -05:00
Kevin
0c7afa89f1 fix setup_online_mode in daemon launch 2020-06-16 02:12:05 -05:00
Kevin
a10a32fafb improved documentation + refactored daemonlaunch 2020-06-14 19:08:17 -05:00
Kevin
88824b7913 update runtime test result 2020-06-13 18:18:24 -05:00
Kevin
3c7b090a4e Merge branch 'master' into lan 2020-06-13 18:04:20 -05:00
Kevin
a401f49da3 fix index.html not being auto loaded in subdirs
fix pep8 styling in sitefiles.py
2020-06-13 17:51:09 -05:00
Kevin
3d0f1d9337 fix import format in sitecreator init 2020-06-13 17:50:37 -05:00
Kevin
2a65f605f5 fix site creator not working with full paths by using a temporary chdir
fix grammar issue in site creator
2020-06-13 17:49:16 -05:00
Kevin Froman
33896d9c91 remove block count in readme 2020-06-09 21:08:34 -05:00
Kevin Froman
7c5359c39e added colors.py 2020-06-09 21:05:33 -05:00
dependabot-preview[bot]
eefc0e28e1
Bump pip-tools from 5.2.0 to 5.2.1
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/5.2.0...5.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 14:11:33 +00:00
Kevin F
05f65c1f89
Merge pull request #75 from beardog108/dependabot/pip/lan/ujson-3.0.0
Bump ujson from 2.0.3 to 3.0.0
2020-06-03 23:39:58 -05:00
dependabot-preview[bot]
db8fdc4999
Bump ujson from 2.0.3 to 3.0.0
Bumps [ujson](https://github.com/ultrajson/ultrajson) from 2.0.3 to 3.0.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](https://github.com/ultrajson/ultrajson/compare/2.0.3...3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-03 16:55:32 +00:00
Kevin F
f35db0a3cf
Merge pull request #74 from beardog108/dependabot/pip/lan/gevent-20.5.2
Bump gevent from 20.5.1 to 20.5.2
2020-05-28 17:10:07 -05:00
dependabot-preview[bot]
b5d5c77516
Bump gevent from 20.5.1 to 20.5.2
Bumps [gevent](https://github.com/gevent/gevent) from 20.5.1 to 20.5.2.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/20.5.1...20.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-28 17:55:55 +00:00
Kevin F
57fe06ff11
Merge pull request #73 from beardog108/dependabot/pip/lan/pip-tools-5.2.0
Bump pip-tools from 5.1.2 to 5.2.0
2020-05-27 22:12:26 -05:00
dependabot-preview[bot]
d7b9b507a1
Bump pip-tools from 5.1.2 to 5.2.0
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 5.1.2 to 5.2.0.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/5.1.2...5.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-27 18:26:07 +00:00
Kevin F
6a1cd02477
Merge pull request #72 from beardog108/dependabot/pip/lan/gevent-20.5.1
Bump gevent from 20.5.0 to 20.5.1
2020-05-26 16:40:50 -05:00
dependabot-preview[bot]
2c4b012d90
Bump gevent from 20.5.0 to 20.5.1
Bumps [gevent](https://github.com/gevent/gevent) from 20.5.0 to 20.5.1.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/20.5.0...20.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-26 10:58:56 +00:00
Kevin Froman
2a34218391 Merge branch 'lan' of ssh://github.com/beardog108/onionr into lan 2020-05-26 04:02:05 -05:00
Kevin F
e1fd4daa8e
Merge pull request #67 from beardog108/dependabot/pip/lan/gevent-20.5.0
Bump gevent from 20.4.0 to 20.5.0
2020-05-26 04:01:45 -05:00
Kevin F
6047ae842f
Merge pull request #69 from beardog108/dependabot/pip/lan/pip-tools-5.1.2
Bump pip-tools from 5.0.0 to 5.1.2
2020-05-26 04:00:24 -05:00
Kevin F
935220bd69
Merge branch 'lan' into dependabot/pip/lan/pip-tools-5.1.2 2020-05-26 04:00:16 -05:00
dependabot-preview[bot]
c15e7b7cf3
Bump gevent from 20.4.0 to 20.5.0
Bumps [gevent](https://github.com/gevent/gevent) from 20.4.0 to 20.5.0.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/20.04.0...20.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-26 09:00:08 +00:00
Kevin F
5f54c9ec56
Merge pull request #70 from beardog108/dependabot/pip/lan/helium-3.0.4
Bump helium from 3.0.2 to 3.0.4
2020-05-26 03:59:15 -05:00
Kevin F
7cc86057f3
Merge pull request #63 from beardog108/dependabot/pip/lan/mimcvdf-1.1.0
Bump mimcvdf from 1.0.0 to 1.1.0
2020-05-26 03:59:06 -05:00
Kevin F
13acff9db7
Merge pull request #71 from beardog108/dependabot/pip/lan/pynacl-1.4.0
Bump pynacl from 1.3.0 to 1.4.0
2020-05-26 03:58:41 -05:00
dependabot-preview[bot]
ca8f139c2f
Bump pynacl from 1.3.0 to 1.4.0
Bumps [pynacl](https://github.com/pyca/pynacl) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/pyca/pynacl/releases)
- [Changelog](https://github.com/pyca/pynacl/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pyca/pynacl/compare/1.3.0...1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-25 19:52:34 +00:00
dependabot-preview[bot]
30351a1343
Bump helium from 3.0.2 to 3.0.4
Bumps [helium](https://github.com/mherrmann/helium) from 3.0.2 to 3.0.4.
- [Release notes](https://github.com/mherrmann/helium/releases)
- [Commits](https://github.com/mherrmann/helium/compare/v3.0.2...v3.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-06 08:44:21 +00:00
dependabot-preview[bot]
4a155c5c11
Bump pip-tools from 5.0.0 to 5.1.2
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 5.0.0 to 5.1.2.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/5.0.0...5.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-05 15:49:27 +00:00
Kevin F
1a189a85ba
Merge pull request #64 from beardog108/dependabot/pip/lan/gevent-20.4.0
Bump gevent from 1.5.0 to 20.4.0
2020-04-24 12:30:42 -05:00
dependabot-preview[bot]
1270628155
Bump gevent from 1.5.0 to 20.4.0
Bumps [gevent](https://github.com/gevent/gevent) from 1.5.0 to 20.4.0.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_1_5.rst)
- [Commits](https://github.com/gevent/gevent/compare/1.5.0...20.04.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-22 12:45:22 +00:00
dependabot-preview[bot]
f2290d48d2
Bump mimcvdf from 1.0.0 to 1.1.0
Bumps [mimcvdf](https://www.chaoswebs.net/) from 1.0.0 to 1.1.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-22 08:58:34 +00:00
Kevin Froman
249c62a515 Merge branch 'lan' of ssh://github.com/beardog108/onionr into lan 2020-04-17 00:44:45 -05:00
Kevin F
1618e2988d
Merge pull request #61 from beardog108/dependabot/pip/lan/pip-tools-5.0.0
Bump pip-tools from 4.5.1 to 5.0.0
2020-04-17 00:44:36 -05:00
Kevin Froman
76daf89565 Merge branch 'lan' of ssh://github.com/beardog108/onionr into lan 2020-04-17 00:43:39 -05:00
dependabot-preview[bot]
fc17dda993
Bump pip-tools from 4.5.1 to 5.0.0
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 4.5.1 to 5.0.0.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/4.5.1...5.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-17 05:00:29 +00:00
Kevin F
05ec520f0e
Merge pull request #62 from beardog108/dependabot/pip/lan/urllib3-1.25.9
Bump urllib3 from 1.25.8 to 1.25.9
2020-04-16 23:59:01 -05:00
dependabot-preview[bot]
9605c9db73
Bump urllib3 from 1.25.8 to 1.25.9
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.8 to 1.25.9.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.8...1.25.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-16 16:22:02 +00:00
Kevin F
6a23c13cc4
Merge pull request #60 from beardog108/dependabot/pip/lan/pdoc3-0.8.1
Bump pdoc3 from 0.7.5 to 0.8.1
2020-04-15 23:35:59 -05:00
dependabot-preview[bot]
b863a8cab0
Bump pdoc3 from 0.7.5 to 0.8.1
Bumps [pdoc3](https://github.com/pdoc3/pdoc) from 0.7.5 to 0.8.1.
- [Release notes](https://github.com/pdoc3/pdoc/releases)
- [Changelog](https://github.com/pdoc3/pdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/pdoc3/pdoc/compare/0.7.5...0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-16 00:46:14 +00:00
0Gitnick
9f61a93397 Add hash to requirements.txt 2020-04-14 22:52:50 -05:00
Kevin Froman
a6baa8ac00 Merge branch 'master' into lan 2020-04-14 22:41:11 -05:00
Kevin Froman
026901ce90 Fix gettransports 2020-04-14 22:40:31 -05:00
Kevin Froman
039d791b90 Merge branch 'lan' of ssh://github.com/beardog108/onionr into lan 2020-04-14 22:19:19 -05:00
Kevin F
eb37325222
Merge pull request #58 from beardog108/dependabot/pip/lan/gevent-1.5.0
Bump gevent from 1.4.0 to 1.5.0
2020-04-10 14:11:07 -05:00
dependabot-preview[bot]
5d496ee3b1
Bump gevent from 1.4.0 to 1.5.0
Bumps [gevent](https://github.com/gevent/gevent) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_1_4.rst)
- [Commits](https://github.com/gevent/gevent/compare/1.4.0...1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-10 16:21:22 +00:00
Kevin Froman
a52465a54f work on lan 2020-04-06 08:51:20 -05:00
Kevin Froman
a5983d32a4 Merge branch 'lan' of ssh://github.com/beardog108/onionr into lan 2020-04-06 03:40:25 -05:00
Kevin F
b2a581823f
Merge pull request #57 from beardog108/dependabot/pip/lan/streamedrequests-1.0.3
Bump streamedrequests from 1.0.0 to 1.0.3
2020-04-06 03:39:53 -05:00
dependabot-preview[bot]
b35d5be8db
Bump streamedrequests from 1.0.0 to 1.0.3
Bumps [streamedrequests](https://github.com/beardog108/StreamedRequests) from 1.0.0 to 1.0.3.
- [Release notes](https://github.com/beardog108/StreamedRequests/releases)
- [Changelog](https://github.com/beardog108/StreamedRequests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/beardog108/StreamedRequests/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-06 08:38:07 +00:00
Kevin Froman
3bc54086a3 Merge branch 'lan' of ssh://github.com/beardog108/onionr into lan 2020-04-06 03:06:41 -05:00
Kevin F
9959ec0d57
Merge pull request #56 from beardog108/dependabot/pip/lan/flask-1.1.2
Bump flask from 1.1.1 to 1.1.2
2020-04-06 03:06:27 -05:00
dependabot-preview[bot]
12137d3c00
Bump flask from 1.1.1 to 1.1.2
Bumps [flask](https://github.com/pallets/flask) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/1.1.1...1.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-06 08:05:19 +00:00
Kevin Froman
d13d9a3039 added is_friend test for onionrusers and fixed bug where isFriend was setting instead of getting the value 2020-04-05 23:35:03 -05:00
Kevin Froman
ae8d1fc5ea Finished implementing notification settings for sound and strangers 2020-04-05 23:21:21 -05:00
Kevin Froman
4cd2302bc9 added logic for stranger notification setting
made page content refreshes happen on visibility
2020-04-05 03:52:40 -05:00
Kevin Froman
7bedae48a4 * Mail compose no longer uses overlay 2020-04-04 04:22:11 -05:00
Kevin Froman
aa729d862c added escape_ansi unittest 2020-04-04 02:21:28 -05:00
Kevin Froman
653954714f added script to start many nodes 2020-04-04 00:58:49 -05:00
Kevin Froman
da1940cc8e fix circles escapeansi being passed bytes 2020-04-04 00:58:02 -05:00
Kevin Froman
d47c546620 added dns rebinding runtime test 2020-04-03 23:34:23 -05:00
Kevin Froman
39d0be32ac import jsondecodeerror seperately since its not in ujson 2020-04-03 04:33:30 -05:00
Kevin Froman
919ab12b76 plugins now use ujson 2020-04-03 04:27:37 -05:00
Kevin Froman
a8ab5d20f1 moving onionrutils over to ujson 2020-04-03 04:20:55 -05:00
Kevin Froman
37913d544b fixed localcommand formatting and imports 2020-04-03 04:19:20 -05:00
Kevin Froman
eea8b39b0f refactored onionrusers formatting and json 2020-04-03 04:17:45 -05:00
Kevin Froman
dee5d8ceed make config use ujson
made httpapi use ujson

made onionrblocks mod use ujson

made setup config use ujson

made devreporting use ujson

made transports/tor use ujson

made contactmanager use ujson
2020-04-03 04:13:50 -05:00
dependabot-preview[bot]
5be4df1276 Bump helium from 3.0.1 to 3.0.2
Bumps [helium](https://github.com/mherrmann/helium) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/mherrmann/helium/releases)
- [Commits](https://github.com/mherrmann/helium/compare/v3.0.1...v3.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-03 04:13:49 -05:00
Kevin Froman
b23343e7cb use ujson in serializeddata 2020-04-03 03:51:31 -05:00
Kevin Froman
46ce27cbe8 fixed get_lan_ips test 2020-04-03 03:33:05 -05:00
Kevin Froman
8804c13225 * refactored subprocess and made it 20%+ faster by using ujson
+ added watchdog dep for sneakernet
+ added ujson dep for faster json esp in pow
2020-04-03 03:28:48 -05:00
Kevin Froman
8d372cccfb added stats reporter 2020-03-31 04:00:48 -05:00
Kevin Froman
0da27a78c7 basic requests can now use lan, work on lan client 2020-03-31 01:48:20 -05:00
Kevin Froman
b2f630e4f9 added disk ministry 2020-03-31 00:15:24 -05:00
Kevin Froman
09134eaba4 comment sneakernet 2020-03-30 21:14:48 -05:00
Kevin Froman
1bd0aa9419 added sneakernet auto importing
exportblocks now takes argument
2020-03-30 20:52:04 -05:00
Kevin F
d2746c21b4
Merge pull request #53 from beardog108/dependabot/pip/deadsimplekv-0.3.1
Bump deadsimplekv from 0.3.0 to 0.3.1
2020-03-29 18:52:15 -05:00
Kevin Froman
160469f50f added popular board selector 2020-03-29 18:51:12 -05:00
Kevin Froman
7bb4a7680a fix export test to use new circle plugin name 2020-03-29 18:50:16 -05:00
Kevin Froman
018f6692a9 don't refresh boards if doc hidden 2020-03-29 18:49:51 -05:00
Kevin Froman
b256db2698 added endpoint to get most popular circles 2020-03-28 02:41:23 -05:00
dependabot-preview[bot]
70a26598fb
Bump deadsimplekv from 0.3.0 to 0.3.1
Bumps [deadsimplekv](https://github.com/beardog108/deadsimplekv) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/beardog108/deadsimplekv/releases)
- [Changelog](https://github.com/beardog108/DeadSimpleKV/blob/master/CHANGELOG.md)
- [Commits](https://github.com/beardog108/deadsimplekv/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-28 05:41:11 +00:00
Kevin Froman
825c576ce3 finish requirements.txt merge 2020-03-28 00:18:13 -05:00
Kevin Froman
179ec4a3be Added work on popular board listing 2020-03-28 00:16:42 -05:00
Kevin F
2c848a4caf
Merge pull request #52 from beardog108/dependabot/pip/deadsimplekv-0.3.0
Bump deadsimplekv from 0.2.0 to 0.3.0
2020-03-28 00:15:03 -05:00
dependabot-preview[bot]
309f98d640
Bump deadsimplekv from 0.2.0 to 0.3.0
Bumps [deadsimplekv](https://github.com/beardog108/deadsimplekv) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/beardog108/deadsimplekv/releases)
- [Changelog](https://github.com/beardog108/DeadSimpleKV/blob/master/CHANGELOG.md)
- [Commits](https://github.com/beardog108/deadsimplekv/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-28 05:09:53 +00:00
Kevin Froman
418881fc32 removed searchengine plugin files for now since no work being done 2020-03-27 21:13:42 -05:00
Kevin Froman
3b939b4598 Added default config formatter script 2020-03-27 20:59:38 -05:00
Kevin Froman
d50e6db1d2 fix removeblock docstring 2020-03-27 20:03:30 -05:00
Kevin Froman
012ee33499 corrected onionrstorage formatting 2020-03-26 03:57:54 -05:00
Kevin Froman
16ae16f042 fixed forward secrecy test 2020-03-26 03:57:42 -05:00
Kevin Froman
b8a8cfd3f6 changed socket_server config key to more accurate ephemeral_tunnels key 2020-03-26 03:49:23 -05:00
Kevin Froman
62b4f5eb0e Removed support for v2 onions 2020-03-26 03:48:57 -05:00
Kevin Froman
922f2be235 added binary forward secrecy test 2020-03-26 03:47:49 -05:00
Kevin Froman
d5c9b01b53 * adjusted default config to scale better
* test default config values for dev accidental changes
* bump runtime result
2020-03-26 03:46:49 -05:00
Kevin Froman
db9cd3eb60 remove defunct import in register_private_blueprints.py 2020-03-26 02:33:08 -05:00
Kevin Froman
71c7ad4545 made onboarding use bulma steps 2020-03-26 02:30:59 -05:00
Kevin Froman
d24fd41c53 added fd and disk usage stats 2020-03-24 03:18:05 -05:00
Kevin Froman
8e31d51740 improve start ram script to use quotes 2020-03-24 03:17:40 -05:00
Kevin Froman
1be08e09ef reformated sizeutils 2020-03-24 03:17:22 -05:00
Kevin Froman
0825f2dd01 use mktemp for ram dir 2020-03-24 02:17:11 -05:00
Kevin Froman
427a5355bc switched circle post loader to use fetch instead of xml http 2020-03-24 00:21:46 -05:00
Kevin Froman
83a1c09af7 do not ping api when document is hidden 2020-03-24 00:21:13 -05:00
Kevin Froman
2aa8cdbaa0 corrected utils formatting and removed defunct utils 2020-03-23 23:55:57 -05:00
Kevin Froman
b5e57da191 lan can now properly connect 2020-03-23 03:39:57 -05:00
Kevin Froman
2c8f1fdf99 restore unicoding in multicast ad 2020-03-23 01:25:27 -05:00
Kevin Froman
eec7efd38d use right multicast address 2020-03-23 01:24:13 -05:00
Kevin Froman
d77f802fdd lan client thread added 2020-03-23 00:37:49 -05:00
Kevin Froman
3c6b3652c6 hidden is not a js func 2020-03-23 00:00:35 -05:00
Kevin Froman
77b24d022f fixed undefined mail sig load 2020-03-22 22:04:20 -05:00
Kevin Froman
c7b8f9bed6 don't fetch stats on home page if there is no window focus 2020-03-22 22:04:06 -05:00
Kevin Froman
42a8d71ebf added script to start Onionr in RAM 2020-03-22 21:54:20 -05:00
Kevin Froman
acabeab7c4 added files for vdf proofing 2020-03-22 19:16:26 -05:00
Kevin Froman
9369a22841 correct updateblockinfo docstring and format 2020-03-22 19:16:08 -05:00
Kevin Froman
361853cc95 bump mimcvdf version 2020-03-22 19:15:37 -05:00
Kevin Froman
481cb5aeff use a smaller offset for obscuring block metadb time 2020-03-21 01:15:07 -05:00
Kevin Froman
4696e7be3f added offset test for lan block list and improved run time tests to be random order and have better iterative output 2020-03-21 01:14:35 -05:00
Kevin Froman
05ea54cd28 use double quotes instead of single in home page 2020-03-20 18:41:09 -05:00
Kevin Froman
2a104d7459 added ram stats 2020-03-20 18:39:26 -05:00
Kevin Froman
a52a17ac25 removed thread debug from events 2020-03-20 18:39:08 -05:00
Kevin Froman
3e4a39016f work on lan server (upload endpoint) 2020-03-20 03:51:08 -05:00
Kevin Froman
e6181bdd1f fixed nasty bug where tor circuits was causing gevent to leak threads 2020-03-20 03:50:48 -05:00
Kevin Froman
022fbaa1af bumped disk allocation to 1gb 2020-03-20 03:47:08 -05:00
Kevin Froman
b2f4dae226 refactored main page to not use xhr, added thread ui stat area 2020-03-20 03:46:33 -05:00
Kevin Froman
b5ac1ed7d8 correct timer thread amounts 2020-03-20 03:45:25 -05:00
Kevin Froman
fe3b6c01c4 * Remove ifaddr since psutil provides access to net interfaces
+ added mimcvdf dependency for future block spec
2020-03-19 16:02:15 -05:00
Kevin Froman
d4f4487fb6 finished block list endpoint for lan and added get data endpoint 2020-03-19 01:44:44 -05:00
Kevin Froman
e90d7e96f4 moved daemon kill command to its own seperate file in daemonlaunch 2020-03-19 01:43:57 -05:00
Kevin Froman
1ffc899695 added lan transport config 2020-03-19 01:43:25 -05:00
Kevin Froman
6fed37a237 reduced sleep in housekeeping run test 2020-03-19 01:43:02 -05:00
Kevin Froman
69bb257166 made ownnode run test only run if tor is enabled 2020-03-19 01:42:15 -05:00
Kevin Froman
24284e058f ensure public api served blocks are not decrypted 2020-03-19 01:40:52 -05:00
Kevin Froman
62a01b6dba update tests dir readme 2020-03-19 01:38:59 -05:00
Kevin Froman
76118a2e4a improve dev config scripts to be able to toggle Tor 2020-03-19 01:01:05 -05:00
Kevin Froman
68678177ed type hinted bytesconverter 2020-03-16 02:55:36 -05:00
Kevin Froman
9575352e3e added config option for using LAN transport 2020-03-16 02:51:47 -05:00
Kevin Froman
3aec35ef33 * lan server including discovery and publishing added (only ping implemented in server) 2020-03-16 02:28:41 -05:00
Kevin Froman
92c4109572 * updated big brother to allow multicast and LAN 2020-03-16 02:06:37 -05:00
Kevin Froman
2732b2feea + added ifaddr for use in lan related connectivity 2020-03-16 02:05:20 -05:00
Kevin Froman
18aca5aeea finishd tests for multicast lan service discovery 2020-03-14 00:56:10 -05:00
Kevin Froman
d4652e1107 added test for learning lan services 2020-03-13 23:47:44 -05:00
Kevin Froman
7bb95c3b87 work on lan transport, added service discovery logic 2020-03-11 04:46:42 -05:00
Kevin Froman
a8290e2ac3 added cleanup test and test-re-runner automation script 2020-03-09 21:43:18 -05:00
Kevin Froman
4e053f1b30 don't have mouse keep mail send notification active 2020-03-09 17:58:01 -05:00
Kevin Froman
e4d4091e66 fixed pep8 formatting in daemon launch 2020-03-09 04:13:37 -05:00
Kevin Froman
c106d5881f removed imports in daemon launch 2020-03-09 04:13:13 -05:00
Kevin Froman
25766e02fc Fixed epoch formatting 2020-03-09 04:05:10 -05:00
Kevin Froman
a5c733469f made better sleep ignored sleep and added test for it 2020-03-09 04:04:41 -05:00
Kevin Froman
159585a292 add dev bumps from master 2020-03-07 18:58:19 -06:00
Kevin Froman
04133035ba fix existing tor daemon not having closed ephemeral onions and work on mail test 2020-03-07 18:51:39 -06:00
Kevin F
901b7fa064
Merge pull request #50 from beardog108/dependabot/pip/pdoc3-0.7.5
Bump pdoc3 from 0.7.4 to 0.7.5
2020-03-05 03:41:13 -06:00
dependabot-preview[bot]
eb081d1f3d
Bump pdoc3 from 0.7.4 to 0.7.5
Bumps [pdoc3](https://github.com/pdoc3/pdoc) from 0.7.4 to 0.7.5.
- [Release notes](https://github.com/pdoc3/pdoc/releases)
- [Changelog](https://github.com/pdoc3/pdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/pdoc3/pdoc/compare/0.7.4...0.7.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-05 09:41:02 +00:00
Kevin F
46c8c99fa1
Merge pull request #51 from beardog108/dependabot/pip/pip-tools-4.5.1
Bump pip-tools from 4.5.0 to 4.5.1
2020-03-05 03:39:41 -06:00
Kevin Froman
dfc42953f7 added mail browser test file 2020-03-04 17:02:34 -06:00
Kevin Froman
008e16c11f added helium test deps to ci 2020-03-04 17:02:03 -06:00
Kevin Froman
61d60c13d2 Finished signature support for outgoing mail 2020-03-04 04:45:27 -06:00
dependabot-preview[bot]
6c82632469
Bump pip-tools from 4.5.0 to 4.5.1
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/4.5.0...4.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-04 10:30:45 +00:00
Kevin Froman
4516cdee24 reenabled browser tests, added mail test, work on mail signatures 2020-03-04 04:29:28 -06:00
Kevin Froman
60d2ebfaed + added more tests
* fixed chdir home bug
* fixed some tests creating normal data dir
2020-03-04 01:15:58 -06:00
Kevin Froman
665cb0c732 fixed housekeeping being broken 2020-03-03 05:55:50 -06:00
Kevin Froman
c0def6fb7e fixed shutdown not working on onboarding page 2020-02-28 23:24:32 -06:00
Kevin Froman
1322352fa2 update onionrvalues test for new expire time 2020-02-28 05:05:00 -06:00
Kevin Froman
02fa6dd558 added first browser test, tests if circles opens out of ot the box 2020-02-28 03:49:30 -06:00
Kevin Froman
b62e613e8e work on mail settings, onionruser own key adding bug fix 2020-02-27 21:06:28 -06:00
Kevin Froman
862c6f2ea4 work on mail settings 2020-02-25 20:30:04 -06:00
Kevin Froman
6f0ef390a7 work on mail settings 2020-02-24 04:45:29 -06:00
Kevin Froman
56e86460d1 more vanityonionr changes 2020-02-23 02:12:30 -06:00
Kevin Froman
b8348be65a now avoid looking up older than allowed blocks 2020-02-23 02:12:13 -06:00
Kevin Froman
34a55f63f9 fixed vanity not working and added integration test for it 2020-02-22 05:44:21 -06:00
Kevin Froman
6b5e6a9ad0 merge master changes: repo configs and dep bumps 2020-02-22 02:45:18 -06:00
Kevin Froman
59376135f9 remove mergify 2020-02-22 02:43:23 -06:00
Kevin F
38e2ecb8ca
Merge pull request #46 from beardog108/dependabot/pip/pip-tools-4.5.0
Bump pip-tools from 4.4.1 to 4.5.0
2020-02-22 02:37:24 -06:00
dependabot-preview[bot]
e5d64bb164
Bump pip-tools from 4.4.1 to 4.5.0
Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 4.4.1 to 4.5.0.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jazzband/pip-tools/compare/4.4.1...4.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-21 10:29:09 +00:00
Kevin F
6f2f2c89a3
Create stale.yml 2020-02-21 03:32:31 -06:00
Kevin F
3e6811bea6
Update .mergify.yml 2020-02-21 03:23:13 -06:00
Kevin F
bdf838e48f
Update .mergify.yml 2020-02-21 03:13:33 -06:00
Kevin F
aaa7251d56
Update .mergify.yml 2020-02-21 03:06:05 -06:00
Kevin F
c1472ecfaa
Merge pull request #41 from beardog108/mergify/beardog108/config-update
Mergify: configuration update
2020-02-21 03:00:02 -06:00
Kevin F
1b52a957dc Mergify: configuration update 2020-02-21 02:57:31 -06:00
Kevin Froman
d342bb3e5b verified dependabot bumps pass tests 2020-02-21 02:51:07 -06:00
Kevin Froman
4dae995eaa remove defunct commented out padding code 2020-02-21 02:46:59 -06:00
Kevin F
3e0919f12d
Merge pull request #40 from beardog108/dependabot/pip/requests-2.23.0
Bump requests from 2.22.0 to 2.23.0
2020-02-21 02:46:22 -06:00
Kevin F
d0fb035572
Merge pull request #39 from beardog108/dependabot/pip/psutil-5.7.0
Bump psutil from 5.6.7 to 5.7.0
2020-02-21 02:46:06 -06:00
dependabot-preview[bot]
20debf5c9e
Bump requests from 2.22.0 to 2.23.0
Bumps [requests](https://github.com/psf/requests) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.22.0...v2.23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 10:28:52 +00:00
Kevin Froman
080933639c fixed 'is onionr client' security exit attribute error and improved public security module formatting 2020-02-19 18:02:20 -06:00
Kevin Froman
6fe2da7b09 fixed padding view for sentbox 2020-02-19 17:33:54 -06:00
dependabot-preview[bot]
bf73dedd64
Bump psutil from 5.6.7 to 5.7.0
Bumps [psutil](https://github.com/giampaolo/psutil) from 5.6.7 to 5.7.0.
- [Release notes](https://github.com/giampaolo/psutil/releases)
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](https://github.com/giampaolo/psutil/compare/release-5.6.7...release-5.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-19 10:28:26 +00:00
Kevin Froman
9f1790a601 Added mail message padding support 2020-02-19 01:57:56 -06:00
Kevin Froman
83ef9dc3ca added sound notifications (used in mail for now) and more settings UI work 2020-02-18 05:32:17 -06:00
Kevin Froman
aea4815fbd added sound notification support and forward secery setting finished 2020-02-17 06:13:57 -06:00
Kevin Froman
23782dcb8f work on mail settings 2020-02-12 05:31:05 -06:00
Kevin Froman
6bb4347f61 update runtime test 2020-02-12 01:22:09 -06:00
Kevin Froman
47eef04643 fix #45 2020-02-12 01:19:59 -06:00
Kevin Froman
d149f351d2 made onionr ascii image default, added quotes to startup 2020-02-12 00:58:15 -06:00
Kevin Froman
59a1ad1235 move tor start finished message to bottom during merge from work on fixing onboarding 2020-02-11 20:10:21 -06:00
Kevin Froman
353b2f1c63 + added check for Tor to be ready before openhome works
* fixed not being able to stop Onionr when awaiting onboarding survey to be finished
2020-02-11 19:49:44 -06:00
Kevin Froman
3bb51a16e1 check for onionr exit when awaiting onboarding completion 2020-02-11 16:47:30 -06:00
Kevin Froman
6f7406e82c improved mail formatting and work on settings ui 2020-02-11 16:41:06 -06:00
Kevin Froman
26ddee54ce work on mail settings 2020-02-10 08:01:49 -06:00
Kevin Froman
559f6bed49 added settings modal for mail 2020-02-09 03:11:41 -06:00
Kevin Froman
dee531fd51 added license info to boxprint 2020-02-08 17:07:39 -06:00
Kevin Froman
982ac88a72 print tor startup progress to term 2020-02-08 04:24:19 -06:00
Kevin Froman
572e29f5d5 bumped network version and main version, lots of test work and some stability improvements 2020-02-08 03:34:11 -06:00
Kevin Froman
e77d422fc2 fix main init formatting 2020-02-06 16:00:19 -06:00
Kevin Froman
b8c288259b fix keymanager formatting 2020-02-06 16:00:06 -06:00
Kevin Froman
2319ff8344 added config option to shred log file on exit 2020-02-06 04:11:39 -06:00
Kevin Froman
7c7e5de091 do not allow restart on windows 2020-02-06 00:54:49 -06:00
Kevin Froman
938e1bddd3 Added site list command test 2020-02-05 01:53:14 -06:00
Kevin Froman
3456fae533 added site lister 2020-02-05 01:49:24 -06:00
Kevin Froman
4487bf2806 Update todo 2020-02-04 22:07:18 -06:00
Kevin Froman
c8f0427f45 make data dir readable only by user by default, make no dep release 2020-02-04 18:07:03 -06:00
Kevin Froman
b305380447 protect data dir by default 2020-02-04 16:58:24 -06:00
Kevin Froman
d91480104b handle more sec levels in ui stats 2020-02-04 15:42:08 -06:00
Kevin Froman
52e3600ae1 bump version 2020-02-04 14:55:56 -06:00
Kevin Froman
e7fd0d1d66 update runtime test 2020-02-04 14:53:46 -06:00
Kevin Froman
6960d9209d refreshed and renamed docs, added bootstrap server, added default config for sec auditing 2020-02-04 14:46:17 -06:00
Kevin Froman
fe36b87c57 fix notifier formatting 2020-02-04 14:18:20 -06:00
Kevin Froman
8e1eaa2b42 updated readme 2020-02-04 00:59:52 -06:00
Kevin Froman
b86eb821ce clean up onboarding handler 2020-02-03 21:49:21 -06:00
Kevin Froman
583ce92065 remove redundant home link in navbar 2020-02-03 21:42:41 -06:00
Kevin Froman
b08e95d752 moving to release with better settings and onboarding, add dev setup docs 2020-02-03 21:35:46 -06:00
Kevin Froman
f0ffbb63e7 fix bootstrap list 2020-02-03 21:29:15 -06:00
Kevin Froman
68074d4dd8 moving to release with better settings and onboarding 2020-02-03 20:08:06 -06:00
Kevin Froman
09617dc563 added vscode files 2020-02-03 17:38:04 -06:00
Kevin Froman
246ba6eb7b fixed onboarding bugs and enabled it by default 2020-02-03 17:01:08 -06:00
Kevin Froman
6500229000 added attack simulation scripts 2020-02-02 21:21:51 -06:00
Kevin Froman
c58bbbb10f Add missing import in daemon launch 2020-02-02 19:16:30 -06:00
Kevin Froman
d4dd964069 don't restart tor unless its our own 2020-02-02 19:07:48 -06:00
Kevin Froman
5b78a8810d only nuke data on node shutdown 2020-02-02 19:00:49 -06:00
Kevin Froman
79a3f725be fix mail sorting and send fields not being cleared 2020-02-02 18:29:20 -06:00
Kevin Froman
5c3fb5bec3 added requirements files for devs 2020-02-02 17:52:14 -06:00
Kevin Froman
912c2c832b started safety docs 2020-02-02 17:51:52 -06:00
Kevin Froman
74be4dee01 Added scripts readme info for dev config scripts 2020-02-02 17:51:35 -06:00
Kevin Froman
8a82e76182 fix tor dir being too open 2020-02-02 03:23:59 -06:00
Kevin Froman
8e5152a14e added support to wipe data directory on exit 2020-02-02 02:48:23 -06:00
Kevin Froman
567af997d7 Added dev config scripts 2020-02-02 00:55:39 -06:00
Kevin Froman
88146a5690 use thread instead of greenlet to start run time tests 2020-01-31 22:57:53 -06:00
Kevin Froman
cd671feb92 tor can now be attached 2020-01-31 22:14:26 -06:00
Kevin Froman
ea47ae456b work on the ability to attach to existing Tor 2020-01-31 18:23:48 -06:00
Kevin Froman
8bf1389a48 Merge branch 'existingtor' of gitlab.com:beardog/Onionr into existingtor 2020-01-31 07:36:31 -06:00
Kevin Froman
840563f75c work on the ability to attach to existing Tor 2020-01-31 07:35:44 -06:00
Kevin Froman
bffef46e89 Added boilerplate to gettransports 2020-01-31 07:35:44 -06:00
Kevin F
95599003e5
Merge pull request #38 from beardog108/dependabot/pip/jinja2-2.11.1
Bump jinja2 from 2.11.0 to 2.11.1
2020-01-31 13:34:59 +00:00
dependabot-preview[bot]
d2dca0f94d
Bump jinja2 from 2.11.0 to 2.11.1
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.0 to 2.11.1.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.0...2.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-31 10:28:47 +00:00
Kevin Froman
1556339ab2 work on the ability to attach to existing Tor 2020-01-30 23:47:48 -06:00
Kevin Froman
6707af2c9a Merge branch 'master' of ssh://github.com/beardog108/onionr into existingtor 2020-01-30 21:45:34 -06:00
Kevin F
927071533f
Merge pull request #37 from beardog108/dependabot/pip/jinja2-2.11.1
Bump jinja2 from 2.11.0 to 2.11.1
2020-01-31 03:45:19 +00:00
Kevin Froman
4484489690 Added boilerplate to gettransports 2020-01-30 18:34:47 -06:00
dependabot-preview[bot]
940272136c
Bump jinja2 from 2.11.0 to 2.11.1
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.0 to 2.11.1.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.0...2.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 21:39:17 +00:00
Kevin Froman
a934fbd006 reset bootstrap setting 2020-01-30 01:57:28 -06:00
Kevin Froman
e0b8b3fcef Merge branch 'master' of gitlab.com:beardog/Onionr 2020-01-30 01:47:49 -06:00
Kevin Froman
f17d56341b reset random bind ip setting 2020-01-30 01:47:27 -06:00
Kevin Froman
b1eb9a1338 reset random bind ip setting 2020-01-30 01:45:38 -06:00
Kevin Froman
d0bdeca7c4 fixed hide blocks being broken in some cases 2020-01-30 00:54:43 -06:00
Kevin Froman
8649231860 fix cmd recommend to use f string 2020-01-29 23:22:23 -06:00
Kevin Froman
d4c1dc2bf2 bump runtime test allow to half an hour 2020-01-29 23:08:18 -06:00
Kevin Froman
6f557d0aef removed webpass test since it is a runtime test now 2020-01-29 23:05:48 -06:00
Kevin Froman
8a3f84097a + now require runtime tests to generate unittest result that is somewhat fresh
+ add runtime test for webpass needing to be set
2020-01-29 22:56:47 -06:00
Kevin Froman
6624a80c68 remove signed stats from stats command 2020-01-29 20:20:02 -06:00
Kevin Froman
68ebb2f0df Merge branch 'master' into fix-mail-sentbox 2020-01-29 16:08:13 -06:00
Kevin Froman
cffe74d310 Added documentation for onionr sites 2020-01-29 15:54:26 -06:00
Kevin Froman
2bc14b5c63 add gzip to exec bigbrother for sites and fix passphase print in site creator 2020-01-29 15:44:44 -06:00
Kevin Froman
d0291c2fb3 Added passphrase generator script 2020-01-29 15:44:01 -06:00
Kevin Froman
cb108cb990 use webpass in torstats 2020-01-29 14:21:12 -06:00
Kevin Froman
7f8aa64fa4 update onion in readme 2020-01-29 13:48:45 -06:00
Kevin Froman
a958b99fef remove sent mail from sentbox when block is blacklisted 2020-01-29 13:48:45 -06:00
Kevin Froman
c636e87b2c improve formatting in removeblock and blacklist 2020-01-29 13:48:45 -06:00
Kevin Froman
d612fbf5c5 better market readme for anti censorship 2020-01-29 13:48:45 -06:00
Kevin Froman
2732c3a149 reenable client security (OOPS) 2020-01-29 13:45:31 -06:00
Kevin Froman
d303b8252b remove sent mail from sentbox when block is blacklisted 2020-01-28 21:39:01 -06:00
Kevin Froman
85be8f76e5 improve formatting in removeblock and blacklist 2020-01-28 02:15:11 -06:00
Kevin Froman
787c733785 better market readme for anti censorship 2020-01-28 00:57:33 -06:00
Kevin Froman
d65d9c79c0 Add talk image 2020-01-28 00:48:05 -06:00
Kevin Froman
c8e215341d comment out unused buttons and add talk to readme 2020-01-28 00:47:15 -06:00
Kevin Froman
0059c91b06 use fp symbol instead, merge master changes before merging back to improve circles 2020-01-28 00:29:20 -06:00
Kevin Froman
2bc996f660 supress gevent error from sses 2020-01-27 23:52:35 -06:00
Kevin Froman
2388c80a3d Merge branch 'master' of ssh://github.com/beardog108/onionr 2020-01-27 19:33:01 -06:00
Kevin Froman
a1fd5f2648 remove defunct test, add random bint ip test, and fix offline mode 2020-01-27 19:32:25 -06:00
Kevin F
0e013df9d4
Merge pull request #36 from beardog108/dependabot/pip/jinja2-2.11.0
Bump jinja2 from 2.10.3 to 2.11.0
2020-01-27 19:31:37 -06:00
Kevin F
70d94c6ba9
Merge pull request #35 from beardog108/dependabot/pip/urllib3-1.25.8
Bump urllib3 from 1.25.7 to 1.25.8
2020-01-27 19:31:24 -06:00
dependabot-preview[bot]
73993a67e5
Bump jinja2 from 2.10.3 to 2.11.0
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10.3 to 2.11.0.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.10.3...2.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-27 23:37:32 +00:00
Kevin Froman
ef25377e15 improved formatting in miscclient endpoints 2020-01-27 17:30:22 -06:00
Kevin Froman
b17834d814 reenable bootstrap 2020-01-27 02:20:26 -06:00
Kevin Froman
11d97a12d0 give stats module more specific name 2020-01-27 02:20:09 -06:00
Kevin Froman
b1a7641db9 removed defunct communicator methods 2020-01-27 02:09:28 -06:00
Kevin Froman
5c636246fb added tor circuit stats to main page 2020-01-25 02:23:18 -06:00
dependabot-preview[bot]
66d24e3535
Bump urllib3 from 1.25.7 to 1.25.8
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.7 to 1.25.8.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.7...1.25.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-22 10:30:15 +00:00
Kevin Froman
57f233d856 added work on new main page with tor statistics. Added TorStats class to access tor statistics suck as circuit information 2020-01-21 02:36:19 -06:00
Kevin Froman
48d19b277c Merge branch 'master' of gitlab.com:beardog/Onionr into improve-circles 2020-01-21 01:29:58 -06:00
Kevin Froman
dd0ebd9238 add forgotten blocknoncestart file 2020-01-19 21:55:58 -06:00
Kevin Froman
07ab85698d raise exceptions instead of false return in blockimporter 2020-01-19 21:10:51 -06:00
Kevin Froman
3aeb305994 disable pool for mixing and announce node sooner after start 2020-01-19 21:10:01 -06:00
Kevin Froman
c7bbd054e4 make deniable blocks larger on average 2020-01-19 21:06:22 -06:00
Kevin Froman
4afa3d87e5 delete disk usage file after soft reset 2020-01-19 21:05:55 -06:00
Kevin Froman
f3b22dad56 remove DataPOW and make POW use non hard coded start int value 2020-01-19 21:02:51 -06:00
Kevin Froman
7db8193bf6 remove POW for annoncements 2020-01-19 21:02:04 -06:00
Kevin Froman
1c6893e297 fix variable misspelling when clearing wait for share session 2020-01-15 00:26:10 -06:00
Kevin Froman
abddeecda7 made circles main.py pep8 compliant 2020-01-15 00:25:16 -06:00
Kevin Froman
0cd533db60 remove block hashes from board cache if they 404 2020-01-15 00:24:42 -06:00
Kevin Froman
3fc11657e8 don't fetch all zero circle messages in ui 2020-01-15 00:22:36 -06:00
Kevin Froman
828f7682b8 added server sent events wrapper and example 2020-01-14 02:29:42 -06:00
Kevin Froman
29421d678e KISS startup delete plaintext blocks based on config, no blacklist 2020-01-10 03:42:04 -06:00
dependabot-preview[bot]
1c5fe29baf Bump stem from 1.7.1 to 1.8.0 (#34)
Bumps [stem](https://github.com/torproject/stem) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/torproject/stem/releases)
- [Commits](https://github.com/torproject/stem/compare/1.7.1...1.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-08 19:52:17 -08:00
Kevin Froman
f78809fa2a added config observers, delete plaintext blocks when plaintext storage is disabled 2020-01-07 05:44:53 -06:00
Kevin Froman
2e31155a5d fix insert queue removal not using json mode 2020-01-06 18:40:44 -06:00
Kevin Froman
27ef1d9ce4 remove never added daemon event function from pluginapi 2020-01-06 18:26:31 -06:00
Kevin Froman
88fe605762 finish up removing daemon queue, migrate shutdown to event system 2020-01-06 18:25:51 -06:00
Kevin Froman
a801960179 moved all but shutdown over to new daemon events system 2020-01-06 06:09:33 -06:00
Kevin Froman
c975d27906 switched to upload event api 2020-01-04 06:13:10 -06:00
Kevin Froman
1ba8b4c707 * fleshed out daemon events; also is now used for insertion queue removal
* deprecated daemon queue and removed unused daemon queue commands
2020-01-03 04:26:36 -06:00
Kevin Froman
6529d3e622 json mode added to local command 2020-01-03 04:15:20 -06:00
Kevin Froman
d7be2ca16d delete upload memory file file on shutdown if upload queue is empty 2020-01-03 04:14:04 -06:00
Kevin Froman
ee7b68c844 added new daemon events files 2020-01-01 20:07:34 -06:00
Kevin Froman
66aafb6deb added new daemon events work 2019-12-30 18:57:14 -06:00
Kevin Froman
a4762ccf9a change env to 3.8 2019-12-29 14:35:08 -06:00
Kevin Froman
a9bc826930 added tests/readme and disabled unneccesary executable bits on tests 2019-12-29 14:24:25 -06:00
Kevin Froman
34b1abddb7 added toggle bootstrap command 2019-12-29 11:33:47 -06:00
Kevin Froman
e9f0e60608 added toggle bootstrap command 2019-12-29 11:21:18 -06:00
Kevin Froman
01f9b9b470 work on block insertion mixing 2019-12-27 01:53:18 -06:00
Kevin Froman
87ea8d137b minor bug fixes and linting improvements 2019-12-23 01:51:24 -06:00
Kevin Froman
9329b07e3b added mixmate to improve base routing 2019-12-22 13:42:10 -06:00
Kevin Froman
f71f2f6246 fix env home regression and made identifyhome lint compliant 2019-12-20 15:50:56 -06:00
Kevin Froman
c469c5d871 made communicator init have better lint compliance 2019-12-20 02:59:27 -06:00
Kevin Froman
b5a8f295c9 made uploadqueue lint compliant 2019-12-20 02:43:18 -06:00
Kevin Froman
1019ff0773 * made api servers lint compliant
* made bigbrother lint compliant
2019-12-20 02:37:12 -06:00
Kevin Froman
9571ea519d identify home better supports env home in non daemon 2019-12-20 02:33:42 -06:00
Kevin Froman
e5f3866f9e linting refactoring communicator(utils) and reduced TOCTOU issus with online peer picking 2019-12-20 01:24:38 -06:00
Kevin Froman
9fbee668aa fix regression exposing socks port to daemon instead of api server 2019-12-20 01:21:43 -06:00
Kevin Froman
eb294dd9ae fix big brother docstrings and disable_hooks default arg 2019-12-19 23:28:12 -06:00
Kevin Froman
0484655e2e fix ofexec not properly checking for windows for tor kill os.system 2019-12-19 23:26:29 -06:00
Kevin Froman
f5a98fba13 fix ofexec auditor docstrings 2019-12-19 23:22:51 -06:00
Kevin Froman
906219fe30 * Refactored onionrcommands py to be linting compliant (started using mypy)
+ git ignore mypy cache
2019-12-19 20:46:11 -06:00
Kevin Froman
6d123b93fc made parser flake8 compliant 2019-12-19 04:32:40 -06:00
Kevin Froman
4b6fdbdd0a change dockerfile to python image, remove unnecessary apt installs 2019-12-19 03:30:30 -06:00
Kevin Froman
ef794b18cf use python docker for CI instead of ubuntu 2019-12-19 03:29:51 -06:00
Kevin Froman
e77e213589 made keyadders pep8 compliant 2019-12-19 03:13:41 -06:00
Kevin Froman
027abd3f13 None is not a type 2019-12-18 04:13:38 -06:00
Kevin Froman
c1dd2a7213 flake8 log style for connect fails 2019-12-18 04:10:00 -06:00
Kevin Froman
00e20c54b0 don't try to connect to peers in offline mode 2019-12-18 04:09:37 -06:00
Kevin Froman
f7e2a94502 flake8 refactors get onlinePeers 2019-12-18 04:08:33 -06:00
Kevin Froman
9707d5e320 fix flake8 ofcommunication line len 2019-12-18 04:07:20 -06:00
Kevin Froman
aa51a2fea6 var for netCheckTimer and commented code removal 2019-12-18 04:06:52 -06:00
Kevin Froman
a1c68fabe7 set isOnline to false if offline mode 2019-12-18 04:05:37 -06:00
Kevin Froman
f42e777408 make network check obey offline mode 2019-12-18 04:03:55 -06:00
Kevin Froman
abe1dde57e pep8 refactor netcheck 2019-12-18 04:03:26 -06:00
Kevin Froman
8f1df8c371 make daemon launch obey offline mode and pep8 refactor it 2019-12-18 04:02:08 -06:00
Kevin Froman
a36885c806 pep8 formatted daemon launch boilerplate 2019-12-18 04:00:39 -06:00
Kevin Froman
9af3f06b56 added block system auditor 2019-12-18 03:58:47 -06:00
Kevin Froman
70408b828b fix about authors 2019-12-18 03:53:16 -06:00
Kevin Froman
743e735c48 add big brother readme and test 2019-12-18 03:52:52 -06:00
Kevin Froman
9790785c08
made runtests init flake8/pylint conforming 2019-12-17 19:31:41 -06:00
Kevin Froman
ae416bc650 added big brother security auditing to prevent some RCE and leaks 2019-12-14 13:45:18 -06:00
Kevin Froman
47e69bab99 added big brother event auditor 2019-12-13 12:24:29 -06:00
Kevin Froman
bb87bc192e refactored netcontroller and split module 2019-12-12 02:47:33 -06:00
Kevin Froman
6b0c88aff9 added custom torrc support 2019-12-10 04:52:32 -06:00
Kevin Froman
15872f8f7c added watchdog, use it to kill tor 2019-12-10 00:29:16 -06:00
Kevin Froman
63c0c51f38 circles timezone and sorting fixes 2019-12-06 14:25:02 -06:00
Kevin Froman
fd6096a93c default plugins now have navbar removal logic 2019-12-06 01:21:30 -06:00
Kevin Froman
1eb7880de9 fix #36 2019-12-04 01:02:28 -06:00
Kevin Froman
1eb47a4584 onboarding work 2019-12-03 00:00:15 -06:00
Kevin Froman
3816e64da7 fix more of nick's broken changes 2019-12-01 03:51:38 -06:00
Kevin Froman
3c1fd87fd4 Merge branch 'master' of gitlab.com:beardog/Onionr 2019-12-01 02:18:29 -06:00
Kevin
fa3b1c5d22 Merge branch 'nickchanges' into 'master'
Merge nick's fixes

See merge request beardog/Onionr!27
2019-12-01 08:10:00 +00:00
Kevin
8a4102cbd1 Merge nick's fixes 2019-12-01 08:10:00 +00:00
Kevin Froman
68ead2ae85
Undo reconstructhash changes, but with pep-8 2019-12-01 02:07:41 -06:00
Kevin Froman
9b2aa63846 Merge branch 'master' of https://github.com/0Gitnick/onionr 2019-12-01 01:37:35 -06:00
Kevin Froman
1de668a9e5 onboarding work, now waits to start daemon timers 2019-11-30 02:42:49 -06:00
Kevin Froman
fb975dc52c fix time skew message formatting 2019-11-30 01:11:46 -06:00
Kevin F
158510e9fb
Merge pull request #32 from EgosOwn/master
properly delete run files when tor is not found
2019-11-30 00:40:03 -06:00
KF
316b01ea85 properly delete run files when tor is not found 2019-11-29 17:49:14 -06:00
Kevin Froman
13c34a1c04 adjust tests for upload queue exception 2019-11-27 14:07:51 -06:00
Kevin Froman
f401518d24 fix insertion upload check when daemon is not running 2019-11-27 13:53:06 -06:00
Kevin Froman
00baf30141 add check and daemon api endpoint to fix #41 2019-11-27 13:39:48 -06:00
0Gitnick
d4ae6255d6 Improve syntax 2019-11-26 22:11:08 -06:00
0Gitnick
e7c826d4c6 Clean up board.js syntax 2019-11-26 21:46:45 -06:00
0Gitnick
6f8a843e49 Make peer cleanup timings smoother 2019-11-26 18:46:14 -06:00
Kevin Froman
d1f9911fd4 when resetting plugins, dont copy until onionr is ran again 2019-11-26 18:36:50 -06:00
0Gitnick
e41487f80c Simplify replay_timestamp_validation 2019-11-26 18:19:28 -06:00
Kevin Froman
ee5f4409af work on onboarding and pep8 compliance. re-worded about 2019-11-26 18:01:32 -06:00
Kevin Froman
a4a0d240ac updated import path in tests 2019-11-21 03:26:23 -06:00
Kevin Froman
54a35a452a fixed mail bugs where one couldn't add contact 2019-11-21 03:18:16 -06:00
Kevin Froman
720efe4fca renamed onionr dir and bugfixes/linting progress 2019-11-21 02:23:58 -06:00
Kevin F
2b996da17f
Create greetings.yml 2019-11-20 04:42:18 -06:00
Kevin F
8126e6490e
Create greetings.yml 2019-11-20 04:40:54 -06:00
Kevin Froman
d27ebd7f19 use data based importer in importnewblocks and fixed file exists error in createdirs 2019-11-16 11:29:18 -06:00
Kevin Froman
b4225d3750 fix updater 2019-11-16 02:57:49 -06:00
Kevin Froman
6cc01fa240 boiler plate and bug fixes 2019-11-15 22:18:38 -06:00
Kevin F
15b3d506ff
Merge pull request #31 from beardog108/dependabot/pip/urllib3-1.25.7
Bump urllib3 from 1.25.6 to 1.25.7
2019-11-14 01:45:25 -06:00
Kevin Froman
1166c9155a fixed site loader and subdirs 2019-11-13 21:06:04 -06:00
dependabot-preview[bot]
534bf138cc
Bump urllib3 from 1.25.6 to 1.25.7
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.6 to 1.25.7.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.6...1.25.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-12 10:30:27 +00:00
Kevin Froman
0cce0f4318 sites now support multi pages 2019-11-11 23:32:18 -06:00
KF
57e750a15a added deleted blocks to statistics command 2019-11-09 20:30:07 -06:00
Kevin F
348904c97a
Merge pull request #28 from beardog108/dependabot/pip/pysocks-1.7.1
Bump pysocks from 1.6.8 to 1.7.1
2019-11-07 17:02:13 -06:00
dependabot-preview[bot]
5bb4cc7179
Bump pysocks from 1.6.8 to 1.7.1
Bumps [pysocks](https://github.com/Anorov/PySocks) from 1.6.8 to 1.7.1.
- [Release notes](https://github.com/Anorov/PySocks/releases)
- [Changelog](https://github.com/Anorov/PySocks/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Anorov/PySocks/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 22:36:00 +00:00
Kevin F
ce761f6ec0
Merge pull request #27 from beardog108/dependabot/pip/gevent-1.4.0
Bump gevent from 1.3.6 to 1.4.0
2019-11-07 16:34:27 -06:00
dependabot-preview[bot]
54c7b807c7
Bump gevent from 1.3.6 to 1.4.0
Bumps [gevent](https://github.com/gevent/gevent) from 1.3.6 to 1.4.0.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/1.3.6...1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 22:28:13 +00:00
Kevin F
95a5ad0668
Merge pull request #30 from beardog108/dependabot/pip/urllib3-1.25.6
Bump urllib3 from 1.24.3 to 1.25.6
2019-11-07 16:26:47 -06:00
dependabot-preview[bot]
5ce1ea6774
Bump urllib3 from 1.24.3 to 1.25.6
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.24.3 to 1.25.6.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.24.3...1.25.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 10:48:54 +00:00
Kevin F
ba8e9ebfc8
Merge pull request #26 from beardog108/dependabot/pip/requests-2.22.0
Bump requests from 2.21.0 to 2.22.0
2019-11-07 04:12:03 -06:00
dependabot-preview[bot]
38a9be9a2e
Bump requests from 2.21.0 to 2.22.0
Bumps [requests](https://github.com/requests/requests) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/requests/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/requests/requests/compare/v2.21.0...v2.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 10:11:38 +00:00
Kevin F
bf74a4eb20
Merge pull request #29 from beardog108/dependabot/pip/urllib3-1.24.3
Bump urllib3 from 1.24.2 to 1.24.3
2019-11-07 04:10:09 -06:00
Kevin F
9e4e6a6e53
Merge pull request #25 from beardog108/dependabot/pip/jinja2-2.10.3
Bump jinja2 from 2.10.1 to 2.10.3
2019-11-07 04:08:43 -06:00
dependabot-preview[bot]
209b3e4323
Bump jinja2 from 2.10.1 to 2.10.3
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10.1 to 2.10.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.10.1...2.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 00:12:24 +00:00
dependabot-preview[bot]
0b4b075802
Bump urllib3 from 1.24.2 to 1.24.3
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.24.2 to 1.24.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.24.2...1.24.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 00:12:17 +00:00
Kevin Froman
adcb3f31a9 * bumped unpaddedbase32 version
* improved readme
* better shutdown message in ui
2019-11-06 18:03:38 -06:00
Kevin Froman
aa07d50eed Fix static file read encoding on windows 2019-11-06 15:01:11 -06:00
Kevin Froman
bc37fc0e95 ensure bootstrap is always added if enabled, work on site creator 2019-11-05 05:33:14 -06:00
KF
56c901eb8b * use utf-8 encoding on readstatic 2019-11-04 20:10:03 -06:00
Kevin Froman
9fa05d6e1f added site creator command 2019-11-04 04:52:38 -06:00
Kevin Froman
ff9bdc690e work on new site system, only change directory when doing start command 2019-11-04 00:31:13 -06:00
Kevin Froman
027ce4f45b fix forking duplicating processes on shutdown and breaking on windows 2019-11-01 13:35:28 -05:00
Kevin Froman
9ccbcf6c1d work on sitesapi 2019-10-31 04:29:03 -05:00
Kevin Froman
bc71e3f693 update todo.txt, remove b64 file task 2019-10-29 04:32:30 -05:00
Kevin Froman
40eed73ff7 remove no longer needed base64 on file sharing 2019-10-29 02:12:30 -05:00
Kevin Froman
49ecffb245 use database timeout in hasblock 2019-10-29 00:44:11 -05:00
Kevin Froman
304df0fbb4 lock databases with timeout from onionrvalues 2019-10-29 00:36:56 -05:00
Kevin Froman
df57e2300e
fork onionr when restarting or shutting down 2019-10-28 22:57:45 -05:00
Kevin Froman
c237efd523 a little work on new site system 2019-10-28 21:33:08 -05:00
Arinerron
9a35619a0b Fix whitespace issue in bootstrap 2019-10-24 23:52:26 -07:00
Kevin Froman
9c1cb1a7e1 added new bootstrap node, changed todo, documented onionrvalues better 2019-10-24 03:20:06 -05:00
Kevin Froman
e0c53ee118 fix online peers having zero division error, added stress test insertion 2019-10-19 03:47:24 -05:00
Kevin Froman
b3ee096e49 updated todo.txt, as things got done 2019-10-19 03:45:54 -05:00
Kevin Froman
c60dfdcea3 added new bootstrap node 2019-10-19 03:45:11 -05:00
Kevin Froman
08d5d9e425 added install readme disclaimer and don't log max thread messages to terminal 2019-10-17 17:04:57 -05:00
Kevin Froman
4eeed15ecb added license boilerplate to onboarding and apicheck js 2019-10-17 14:53:21 -05:00
Kevin Froman
bfd25ab706 removed web password from details and fixed python powered image 2019-10-17 05:01:27 -05:00
Kevin Froman
9fd8bd8bd0 updated readme and todo 2019-10-17 05:00:50 -05:00
Kevin Froman
265e2c181b work on onboarding 2019-10-17 05:00:24 -05:00
Kevin Froman
d034072704 added apicheck file 2019-10-16 17:32:47 -05:00
Kevin Froman
560e828c8a updated todo and about 2019-10-16 04:15:24 -05:00
Kevin Froman
cea6840588 added api shutdown check 2019-10-16 03:55:45 -05:00
Kevin Froman
aea5b5ecfd added sticker image 2019-10-16 03:20:07 -05:00
Kevin Froman
bb7817076d make socket servers non default for now 2019-10-16 01:32:27 -05:00
Kevin Froman
811538601f added basic anonymity information to readme 2019-10-16 01:32:14 -05:00
Kevin Froman
18e317c820 work on onboarding 2019-10-16 01:30:44 -05:00
Kevin Froman
2d5fc6cf54 use span instead of input in mail ui 2019-10-14 06:02:51 -05:00
Kevin Froman
63fced9cff * improved friend removal
* made restart more reliable
* fixed banblock not deleting blocks
* somewhat fixed friend endpoints not working with niceware keys
* started working on adjusting mail interface to use div instead of inputs
2019-10-13 20:13:00 -05:00
Kevin Froman
e5fc15acc2 lots of web ui work 2019-10-11 04:28:43 -05:00
Kevin Froman
f0c72ef1c8 move config editor in index, fix circles showing posts under wrong circle 2019-10-10 02:25:12 -05:00
Kevin Froman
a704eaaf60 make outgoing connections scroll better & not be textarea 2019-10-09 22:32:19 -05:00
Kevin Froman
47e81a4bb5 correct resettor help message 2019-10-09 22:31:40 -05:00
Kevin Froman
7145cf6f7d updated screenshots 2019-10-09 22:31:17 -05:00
Kevin Froman
2ab2597e00 correct placeholder color in dark theme, use better uptime display 2019-10-08 23:17:29 -05:00
Kevin Froman
b10bbe7c52 added confirm for restart/shutdown ui btns 2019-10-08 22:25:34 -05:00
Kevin Froman
7f60560cbe improve input fields in dark theme 2019-10-08 22:17:47 -05:00
Kevin Froman
8195ffbeb6 bug fixes for tor and lock files 2019-10-08 17:26:44 -05:00
Kevin Froman
c4c4fb70d5 added motd, todo.txt, and small bug fixes 2019-10-08 16:14:30 -05:00
Kevin Froman
695f334297 added motd system, reworked handling of bytes in signatures 2019-10-07 21:32:33 -05:00
Kevin Froman
31825bfad7 fix lockfile and add motd key to onionrvalues 2019-10-07 19:02:12 -05:00
Kevin Froman
c22f084315 work on runtime tests and onboarding 2019-10-07 00:51:30 -05:00
Kevin Froman
dbb306d7ee webui cleanup 2019-10-06 04:34:30 -05:00
Kevin Froman
e75adb3d48 fixed vanity test 2019-10-05 18:55:40 -05:00
Kevin Froman
7e9fe03235
+ added theme api
+ added switcher from dark and light theme
- deleted profiles directory for now
+ added theme config option
* added boilerplate to circle picker and useridenticons
2019-10-05 18:35:40 -05:00
Kevin Froman
578a238f2e added missing circle files and bulmaswatch 2019-10-05 15:32:07 -05:00
Kevin Froman
f4d7a2acb9 darkmoded friends 2019-10-04 17:13:03 -05:00
Kevin Froman
e2832afacb fixed friends 2019-10-04 17:12:07 -05:00
Kevin Froman
215c8d2c3a added dark mode 2019-10-04 16:49:35 -05:00
Kevin Froman
14334e7197 fix mnemonic test and added make-release.sh 2019-09-30 00:13:43 -05:00
Kevin Froman
37db4b514e switch pubkeymanager and contactmanager over to niceware 2019-09-29 23:40:23 -05:00
Kevin Froman
991c79b350 added url command 2019-09-29 22:03:55 -05:00
Kevin Froman
48e956c27c moved to niceware from mnemonic 2019-09-29 21:14:43 -05:00
Kevin
86ae8327c3 Merge branch 'master' into 'master'
Fixes for Linux install files

See merge request beardog/Onionr!26
2019-09-29 23:44:59 +00:00
Duncan X Simpson
ec6cda7de9 Fixes in install/onionr
- Replace := with :- as := causes an extra unnecessary assignment each
time it is used
- Use system-wide default dirs based on being EUID 0 rather than not
having $HOME set - with previous logic you needed to unset $HOME to
interact with the GUI
- Default XDG_DATA_HOME to $HOME/.local/share rather than
$HOME/.local/share/onionr as it should not be set to an app specific
dir, and usage as if it is one would result in files being set in the
user's chosen XDG_DATA_HOME directly (not in an onionr subdir)
- Default ONIONR_HOME to $XDG_DATA_HOME/onionr rather than
$XDG_DATA_HOME - see previous
- Put $LOG_DIR under $ONIONR_HOME rather than $XDG_DATA_HOME - see
previous
- Don't bother setting XDG_DATA_HOME since we only use it here
- Default ONIONR_HOME to /var/lib/onionr rather than /etc/onionr for
system-wide as it's mostly state data, not just config
- Make assignments more concise
- Removed -R from chmod - 700 already restricts access to
subdirectories and files, and this chmod would require all files to be
marked executable, which is not necessary
- Specified 0700 in chmod - Make sure setuid/setgid/sticky isn't set
for some reason
- Removed chown - chown is usually reserved for root
- Specify python3 rather than 3.7 - We support 3.6 and probably want to
support 3.8+ too
- Rename OUTPUT_DIR to the more descriptive ONIONR_BASEDIR
- Call onionr.sh rather than onionr.py (nonexistent, presumably
intended __init__.py, but this is better anyway)
2019-09-29 23:44:59 +00:00
Kevin Froman
f0e7810342 split mail reply on - 2019-09-29 16:32:46 -05:00
Kevin Froman
d49811bc2e increase restart sleep to avoid port conflicts 2019-09-29 15:55:14 -05:00
Kevin Froman
6d515f7a60 added notification config option 2019-09-29 15:52:34 -05:00
Kevin Froman
1ca0402660 merge master after rebase for friend fix 2019-09-29 15:49:18 -05:00
Kevin Froman
b077f72e5f work on site finder and fixed friend adding 2019-09-29 15:48:21 -05:00
Kevin Froman
b42c0a79a1 work on site finder and fixed friend adding 2019-09-29 15:39:03 -05:00
Kevin Froman
0067bd36b5 try to fix stdout broken pipe 2019-09-28 23:57:29 -05:00
Kevin Froman
e310ffc4e2 try to fix stdout broken pipe 2019-09-28 23:53:15 -05:00
Kevin Froman
e3b8e12dfb try to fix stderr broken pipe 2019-09-28 23:48:28 -05:00
Kevin Froman
c709c8e030 try to fix stderr broken pipe 2019-09-28 23:44:19 -05:00
Kevin Froman
4c208d54e8 change readme python version 2019-09-28 22:01:44 -05:00
Kevin Froman
0fc33e30ff change readme python version 2019-09-28 21:59:13 -05:00
Kevin Froman
7006c7e63d added test for vanity 2019-09-28 20:26:17 -05:00
Kevin Froman
631510f4fe moved vanityonionr into onionr repo 2019-09-28 20:22:39 -05:00
Kevin Froman
4df69b7842 work on sites api for finding user sites 2019-09-28 00:37:24 -05:00
Kevin Froman
60f0ef0fef added option to disable plaintext blocks 2019-09-27 20:38:47 -05:00
Kevin Froman
71c9337ab7 board now uses sha256 2019-09-27 18:04:49 -05:00
Kevin Froman
24d682860f fix ui test 2019-09-27 10:42:35 -05:00
Kevin Froman
f14239db6c added run time test framework 2019-09-26 02:43:03 -05:00
Kevin Froman
6d2ae36f38 removed logo from whitepaper 2019-09-23 18:35:22 -05:00
Kevin Froman
e91c9da714 added auto generated api documentation 2019-09-23 18:29:32 -05:00
Kevin Froman
386b64da10 moved onionrproofs and subprocesspow into one module/directory 2019-09-23 18:01:32 -05:00
Kevin Froman
09f6735961 moved static data one directory up 2019-09-23 17:56:05 -05:00
Kevin Froman
e4df34ef29
moved dbcreator to onionrsetup 2019-09-23 14:48:35 -05:00
Kevin Froman
2a6782f88d finished sentence in not yet completed forward secrecy specs 2019-09-22 15:49:32 -05:00
Kevin Froman
f980c26aa7 now use bootstrap use configuration setting 2019-09-22 15:48:56 -05:00
Kevin Froman
7e75089eaa updated screenshots 2019-09-22 14:22:46 -05:00
Kevin Froman
6322306273 fixed mail plugin being broken 2019-09-22 14:22:35 -05:00
Kevin Froman
0d4ab54ceb fixed plugins import onionrblocksapi unnecessary 2019-09-22 03:28:38 -05:00
Kevin Froman
6d4b35c5e3 Merge branch 'master' of gitlab.com:beardog/Onionr 2019-09-21 21:55:03 -05:00
Kevin Froman
ec4ff3158e merge dev server 2019-09-21 21:54:49 -05:00
Kevin Froman
292cae9822 Merge branch 'master' of ssh://gitlab.com:/beardog/onionr 2019-09-21 21:45:46 -05:00
Kevin Froman
921bf36a3f slightly improved readstatic 2019-09-21 21:45:36 -05:00
Kevin Froman
edd9bf6d3b moved block related files to onionrblocks 2019-09-21 18:49:24 -05:00
Kevin Froman
e49f311192 merged plugin related py files into one folder/module 2019-09-21 17:45:46 -05:00
Kevin Froman
22836f068e change doc install py version 2019-09-21 16:27:43 -05:00
Kevin Froman
021954c86b added identicons to circles 2019-09-21 00:07:21 -05:00
Kevin Froman
586ce58894 added more help messages 2019-09-21 00:06:49 -05:00
Kevin Froman
ccc30f68d6 Fix circles feed bug not showing your posts 2019-09-20 20:41:06 -05:00
Kevin Froman
4187aba570 added restart button to ui 2019-09-20 12:53:42 -05:00
Kevin Froman
a7a5f88142 added restart command 2019-09-20 11:25:12 -05:00
Kevin Froman
fbe1766aea
fix filenotfound error in softreset, added softreset event 2019-09-20 09:47:14 -05:00
Kevin Froman
0405eda30e +added python info to version command
+uploads now have sessions
2019-09-19 18:43:06 -05:00
Kevin Froman
1114db8a30 started work on upload sessions 2019-09-17 01:56:13 -05:00
Kevin Froman
d598d9b9c2 started work on upload sessions 2019-09-16 20:16:06 -05:00
Kevin Froman
4b8fe7eeb3 bumped min python version to 3.7, added upload sessions to use in preventing infinite upload fails 2019-09-16 02:50:13 -05:00
Kevin Froman
376b2cc2d6 added peerprofiles and filepaths tests 2019-09-14 01:29:31 -05:00
Kevin Froman
4f6f83f383
moved tests to parent directory 2019-09-12 21:22:25 -05:00
Kevin Froman
ab49e3eaf6 improved typing for communicatortimes, give api threads a name 2019-09-12 14:50:06 -05:00
Kevin Froman
48f111021b fixed uploads with bytes 2019-09-12 10:54:36 -05:00
Kevin Froman
742ef564e1 fix some bytes for uploading 2019-09-12 01:28:20 -05:00
Kevin Froman
2ba42ba145 fixed bytes encoding on getdata endpoint 2019-09-11 16:50:09 -05:00
Kevin Froman
4fbfd89b12 try to fix storagecounter test in CI 2019-09-10 22:56:20 -05:00
Kevin Froman
a20222d246 try to fix storagecounter test in CI 2019-09-10 22:09:54 -05:00
Kevin Froman
d3424c416d try to fix storagecounter test in CI 2019-09-10 21:59:33 -05:00
Kevin Froman
fd6660aba1 try to fix storagecounter test in CI 2019-09-10 21:53:28 -05:00
Kevin Froman
5e86864298 try to fix storagecounter test in CI 2019-09-10 21:48:07 -05:00
Kevin Froman
0de04c3ee5 fix storagecounter call in getdifficultymodifier being old casing 2019-09-10 21:14:15 -05:00
Kevin Froman
b47da779cb Merge branch 'mergenick' into mergenickmaster 2019-09-10 21:08:35 -05:00
Kevin Froman
92588c9f96 more work on blocks tests 2019-09-10 20:59:31 -05:00
Kevin Froman
a50abcd20a work on blocks tests 2019-09-10 17:35:44 -05:00
Kevin Froman
63b32f98df block data portion now pure bytes when encrypted (barely tested), and improved config testing 2019-09-10 15:25:50 -05:00
Kevin Froman
d24d0fc315 added block count shield to readme 2019-09-10 13:43:40 -05:00
Kevin Froman
3277192bc7 mail UI fixes 2019-09-10 11:55:44 -05:00
Kevin Froman
f99ff27006 onionr can now run from relative dirs and lots of bug fixes 2019-09-10 01:05:59 -05:00
Kevin Froman
5f22387af6 merge from dev server 2019-09-09 19:28:24 -05:00
Kevin Froman
a27e01a16d added pnotify to index 2019-09-09 18:33:24 -05:00
Kevin Froman
b56e8eeabd fix sentbox not showing first sent 2019-09-09 18:21:05 -05:00
Kevin Froman
67e16f2d7d set contact alias name in inbox when available 2019-09-09 18:05:09 -05:00
Kevin Froman
d74bfbd5ee let contactmanager support unpaddedbase32 and bip39 keys 2019-09-09 17:29:29 -05:00
Kevin Froman
61eb4a53e6 repad base32 if necessary in more places in onionrcrypto 2019-09-09 13:26:11 -05:00
Kevin Froman
2ca762b3b6 added forgotten sethumanreadable.js 2019-09-09 03:56:50 -05:00
Kevin Froman
2fbef82fd2 note about name in readme 2019-09-09 03:54:55 -05:00
Kevin Froman
382627426b added vanity address support 2019-09-09 03:52:40 -05:00
Kevin Froman
866f0ce501 added vanity address support 2019-09-09 03:23:09 -05:00
Kevin Froman
57791c34a5 fixed broken random IP binding and Improved Onionr code safety 2019-09-08 19:21:36 -05:00
Kevin Froman
bd24b54bef fixed broken random IP binding, work on improving code safety 2019-09-08 17:39:51 -05:00
Kevin Froman
8191854a2f fix resetplugins 2019-09-08 14:23:27 -05:00
Kevin Froman
085b90f84c added storagecounter test and renamed setup 2019-09-08 04:48:16 -05:00
Kevin Froman
311dda91d6 boards now show human readable public key authors 2019-09-07 15:08:15 -05:00
Kevin Froman
818a716cbf updated human readable length test 2019-09-07 14:20:36 -05:00
Kevin Froman
50e2efee32 set idstrings async, validate sig on plaintext blocks before save, and change to returning unpadded key from API 2019-09-06 17:22:33 -05:00
Kevin Froman
ddcb1e39e3 switched to bip39 from pgp word list 2019-09-06 15:09:39 -05:00
Kevin Froman
41eab0e98d fixed command parser plugin command building 2019-09-06 13:23:01 -05:00
Kevin Froman
d0fab00e3b
added basic tor bridge support.
fixes #35
2019-09-06 04:31:13 -05:00
Kevin Froman
3be83699db boards now load async 2019-09-06 00:18:25 -05:00
Kevin Froman
6a0913c437 added simplenotifications as dependency 2019-09-05 14:39:10 -05:00
Kevin Froman
1f757679d9 added soft-reset command, fixed broken nonce cache, work on chat 2019-09-05 04:40:31 -05:00
Kevin Froman
cc66c3a896 work on about modal 2019-09-04 05:10:17 -05:00
Kevin Froman
170cca9620 misc work on webui 2019-09-04 01:20:11 -05:00
Kevin Froman
cf26232d61 added command to reset tor transport 2019-09-01 04:13:46 -05:00
Kevin Froman
17d345824e added notifications and signed posts to board 2019-08-31 19:13:59 -05:00
Kevin Froman
2cb36875d2 added signature toggle on circles posts 2019-08-31 05:56:44 -05:00
Kevin Froman
271307fbe1 removed fontawesome source 2019-08-30 18:08:02 -05:00
Kevin Froman
abf4845425 improve readme 2019-08-30 16:25:07 -05:00
Kevin Froman
44dd672e2f merge readme changes 2019-08-30 04:50:47 -05:00
Kevin
9c5a222921 Merge branch 'markdowntest' into 'master'
Markdowntest

See merge request beardog/Onionr!24
2019-08-30 09:47:23 +00:00
Kevin
93e030db92 Markdowntest 2019-08-30 09:47:23 +00:00
Kevin Froman
c3bb676363 +added fontawesome, improved readme 2019-08-30 04:23:44 -05:00
Kevin Froman
3ce0a617ae + added file for command testing 2019-08-29 19:37:39 -05:00
Kevin Froman
e02e7dba87 readded help support including for plugins 2019-08-29 18:26:43 -05:00
Kevin Froman
604ce5f012 readded command help support 2019-08-29 17:17:47 -05:00
Kevin Froman
03649756f5
added reset plugins command 2019-08-29 04:25:21 -05:00
KF
dcc42575c3 fixed mail ordering 2019-08-29 01:49:41 -05:00
KF
8549b79ac9 remove headers for onionr clients 2019-08-28 18:33:28 -05:00
KF
d2845b2ad5 added some missing boilerplates 2019-08-28 02:42:26 -05:00
KF
1c21e62606 fixed invalid import for encrypt plugin decryption 2019-08-28 02:40:11 -05:00
KF
664b955255 * added forgotten onionrproofs import in onionrblocks insert 2019-08-27 21:46:33 -05:00
KF
127df8b2a3 * fixed broken mime types 2019-08-27 21:46:14 -05:00
KF
7d2080a1d1 added taskkill hack for killing onionr's Tor process on Windows 2019-08-27 21:15:56 -05:00
KF
03356e98fd * log unhandled daemon queue commands 2019-08-27 21:14:18 -05:00
Kevin Froman
dd87ad8999 encryptType no longer set when encryption not used 2019-08-27 03:47:22 -05:00
Kevin Froman
0c196e8135 import-blocks command should have non-plural alias 2019-08-27 03:27:00 -05:00
Kevin Froman
5d1d49368e downloads now start much sooner when blocks are discovered 2019-08-27 03:26:14 -05:00
Kevin Froman
575c927541 updated readme 2019-08-27 03:24:51 -05:00
Kevin Froman
abd252cfed added console.log welcome on ui homepage 2019-08-27 03:24:43 -05:00
Kevin Froman
2c61380ffa fixed unsynced flow cache 2019-08-25 21:18:09 -05:00
Kevin Froman
9fc6e35fe4 work on direct connections 2019-08-25 03:08:09 -05:00
Kevin Froman
225f93106d bumped flask version 2019-08-22 03:36:47 -05:00
Kevin Froman
a375117dd8 work on chat 2019-08-21 03:03:24 -05:00
Kevin Froman
d548723f90 work on chat 2019-08-19 01:04:35 -05:00
Kevin Froman
995d380b9f work on chat 2019-08-18 22:54:36 -05:00
Kevin Froman
315e860eff added chat sendbox 2019-08-18 15:10:28 -05:00
Kevin Froman
a5490b9f28 reduced initial block cleanup timer count 2019-08-18 00:54:52 -05:00
Kevin Froman
a69cb17e47 fixed inserted blocks not having default expire in meta db
work on chat
2019-08-18 00:27:33 -05:00
Kevin Froman
80098d39c1 connections now able to be created and detected in webui 2019-08-17 02:27:33 -05:00
Kevin Froman
0d9e72eccd work on chat 2019-08-16 17:40:17 -05:00
Kevin Froman
bb6ce10985 Added thread call to create client service from web interface endpoint
made create_client in onionrservices static
2019-08-16 16:28:54 -05:00
Kevin Froman
602bc62897 work on chat 2019-08-16 15:41:56 -05:00
Kevin Froman
d8af21ab16 * started endpoint for non-app specific control of direct connections
* fixed signature bugs in direct connections and forward secrecy
* removed chain and parent stuff from onionrblocks
2019-08-15 03:36:05 -05:00
Kevin Froman
3c6cbca0ac added loading whitelisted endpoints from plugins 2019-08-14 18:44:29 -05:00
Kevin Froman
e267bbbead catch value error on insert queue removal 2019-08-14 01:40:03 -05:00
0Gitnick
00ad409737 Some microimprovements 2019-08-13 20:06:14 -05:00
0Gitnick
26b1cc5d87 Delegate code in onionrproofs 2019-08-13 19:12:45 -05:00
Kevin Froman
e86f154522 * prevent the same message from being inserted at the same time in the http api
* bumped toomanyobjs
* correct pysocks raise
fixes #34
2019-08-13 17:28:53 -05:00
0Gitnick
34c00069f5 Fix difficulty calculator for new blocks 2019-08-13 16:54:03 -05:00
0Gitnick
7c7058a691 Remove unused variables in onionrproofs.py 2019-08-13 15:26:20 -05:00
0Gitnick
6c091acd34 Shorten hashMeetsDifficulty function 2019-08-13 15:18:43 -05:00
0Gitnick
401723f5ab Comment step function 2019-08-13 15:10:58 -05:00
0Gitnick
60c9a395f6 Delegate finding leading zeroes to library functions 2019-08-13 15:04:20 -05:00
0Gitnick
8a36144675 Fix difficultyModifier 2019-08-13 14:51:46 -05:00
0Gitnick
ae845940d9 Increase random bits mainly for preventing duplicate nonces for the same block 2019-08-13 08:13:52 -05:00
Kevin Froman
795266edaf Download queue log messages now skip-based x10
fixes #31
2019-08-13 04:16:11 -05:00
Kevin Froman
9601a3d072 log what block is being uploaded by hash 2019-08-12 18:49:16 -05:00
Kevin Froman
56dc2e0ce7 re-add bootstrap node since it is apparently fixed 2019-08-12 18:48:51 -05:00
Kevin Froman
1493e029ea catch keyboard interupt when generating deterministic keys 2019-08-12 18:48:20 -05:00
Kevin Froman
c07cfeec9e improve node public disclaimer page 2019-08-12 01:55:47 -05:00
Kevin Froman
26b0a05d66 * uploads now only remove from upload queue on 'exists' for efficiency-security trade off
fixes #26
2019-08-11 23:00:08 -05:00
Kevin Froman
97d04440ee added upload queue class to remember block inserts across restarts 2019-08-11 22:32:58 -05:00
Kevin Froman
da2c6b5b9c handle and setup onion service streams better 2019-08-11 15:44:56 -05:00
Kevin Froman
0e9da24d79 refactored lookup timer calls in communicator 2019-08-11 15:44:16 -05:00
Kevin Froman
00e2445475 make tor restart more aggressive as last resort for tor-death bug 2019-08-11 13:53:38 -05:00
Kevin Froman
3e99bd3a83 remove cliui for now 2019-08-10 21:13:15 -05:00
Kevin Froman
6d5aef7058 board is now sorta usable 2019-08-10 21:12:37 -05:00
Kevin Froman
06d074d4e0 added run commands for linux to readme 2019-08-10 21:11:26 -05:00
Kevin Froman
43f40ba753 fix windows run batch scripts 2019-08-10 21:02:06 -05:00
Kevin Froman
0cd1ee8bb6 hopefully improve tors connectivity with torrc changes 2019-08-10 19:42:47 -05:00
Kevin Froman
bf6bbd3024 added forgotten imports in blockmetadata 2019-08-09 23:18:30 -05:00
Kevin Froman
75ec108496 improved network stability by having automatic tor restarts 2019-08-09 20:04:56 -05:00
Kevin Froman
daff149acc refactoring 2019-08-09 15:41:27 -05:00
Kevin Froman
7c02f6fff1 * refactored blockmetadata
* be more careful with block type length
+ work on chat
2019-08-09 15:07:32 -05:00
Kevin Froman
8c7319048d bug fixes 2019-08-08 01:25:48 -05:00
Kevin Froman
ef01d3b577
+ added notifications for mail messages
+ added authors.md
2019-08-07 22:45:18 -05:00
Kevin Froman
41368a2747 fix broken connection pool 2019-08-07 18:14:13 -05:00
Kevin Froman
76356d5e3f added some more readmes 2019-08-07 17:46:57 -05:00
Kevin Froman
636cf3a8d1 added readme for communicator 2019-08-07 00:42:37 -05:00
Kevin Froman
ae435bd5f9 limit log file line count 2019-08-06 21:50:15 -05:00
Kevin Froman
bd5b6a1802 do not update address databases on every request 2019-08-06 16:19:26 -05:00
Kevin Froman
bf9b244180 fixed some bugs 2019-08-06 00:49:31 -05:00
Kevin Froman
9080374d7b onionr.py fully removed 2019-08-05 22:10:21 -05:00
Kevin Froman
3409a2888f progress removing onionr.py 2019-08-05 18:09:04 -05:00
Kevin Froman
3a90185cd3 progress removing onionr.py 2019-08-05 14:01:53 -05:00
Kevin Froman
2bc908deb6 progress removing onionr.py 2019-08-05 12:57:25 -05:00
Kevin Froman
6bf8bb1db6 progress removing onionr.py 2019-08-05 11:30:19 -05:00
Kevin Froman
cbe10f914a progress removing onionr.py 2019-08-05 00:25:27 -05:00
Kevin Froman
0690e9ca0e progress removing onionr.py 2019-08-04 23:23:12 -05:00
Kevin Froman
705962e9e7 progress removing onionr.py 2019-08-04 23:08:56 -05:00
Kevin Froman
2f9c1de062 progress removing onionr.py 2019-08-04 19:34:57 -05:00
Kevin Froman
aea32bd1bc progress removing onionr.py 2019-08-03 23:52:57 -05:00
Kevin Froman
a6fec9eefb progress removing onionr.py 2019-08-02 18:00:04 -05:00
Kevin Froman
6e526bf629 progress removing onionr.py 2019-07-31 00:10:28 -05:00
Kevin Froman
e037633735 progress removing onionr.py 2019-07-30 13:13:10 -05:00
Kevin Froman
453e8588c5 progress removing onionr.py 2019-07-30 00:19:22 -05:00
Kevin Froman
802af58d46 do not have duplicate class name in onionrpluginapi 2019-07-29 13:43:50 -05:00
Kevin Froman
2316e3c6e4 fixed encrypt plugin having bad import 2019-07-29 13:13:40 -05:00
Kevin Froman
b7d4aaed9a
Fixed up mail CSS and message deletion 2019-07-29 13:05:27 -05:00
Kevin Froman
000db2dda2 remove test.html 2019-07-28 23:48:39 -05:00
Kevin Froman
9cd33971d4 added new bootstrap node 2019-07-28 23:14:06 -05:00
Kevin Froman
0fee4eb390 added auto refresh to circle ui 2019-07-28 23:07:29 -05:00
Kevin Froman
9933cd1b82 circles now working ok in ui 2019-07-28 22:00:38 -05:00
Kevin Froman
ccbf687ad1 work on chat 2019-07-28 13:05:32 -05:00
Kevin Froman
a086198ca0 work on chat 2019-07-28 00:44:21 -05:00
Kevin Froman
da21999287 work on chat 2019-07-28 00:33:26 -05:00
Kevin Froman
7514fd5228 work on chat 2019-07-27 16:56:06 -05:00
Kevin Froman
ef6bb8c1e9 added keymanager test 2019-07-27 15:29:15 -05:00
Kevin Froman
b24c683f5f work on chat 2019-07-27 02:29:16 -05:00
Kevin Froman
faf85c10d2 fixed importer 2019-07-26 21:42:55 -05:00
Kevin Froman
4bbbff7651 added getopenport 2019-07-26 18:20:27 -05:00
Kevin Froman
3f5834da95 removed empty pkgbuild 2019-07-26 16:18:12 -05:00
Kevin Froman
bf12ce6d8c removed unnecessary imports in onionr.py 2019-07-26 16:17:34 -05:00
Kevin Froman
e45ce2e4dd progress in removing core 2019-07-26 16:11:24 -05:00
Kevin Froman
405e8cdd24 added identify home test 2019-07-26 16:05:58 -05:00
Kevin Froman
c7efc1ba08 added network merger test 2019-07-26 00:55:20 -05:00
Kevin Froman
19fa128710 progress in removing core 2019-07-25 11:14:13 -05:00
Kevin Froman
3d50dbcaac remove core to merge easyinstall 2019-07-24 20:58:09 -05:00
Kevin Froman
c6badab18e progress in removing core 2019-07-24 14:35:18 -05:00
Kevin Froman
ac70966c41 progress in removing core 2019-07-24 13:23:31 -05:00
Kevin Froman
147ae953db progress in removing core 2019-07-24 13:10:37 -05:00
Kevin Froman
3097407774 progress in removing core 2019-07-24 12:22:19 -05:00
Kevin Froman
274505a51f progress in removing core 2019-07-24 11:32:23 -05:00
Arinerron
d01bfe8443
Hotfix build.sh missing dependencies 2019-07-22 17:08:03 -07:00
Arinerron
5e0ed2757e
Rename AUR package to onionr-git 2019-07-22 17:04:02 -07:00
Arinerron
e57ecb1f3f
Move install files to install dir 2019-07-22 17:00:33 -07:00
Arinerron
fff2b7b18f
master <- easy-releases 2019-07-22 16:59:48 -07:00
Arinerron
2b17cd13f4
Merge branch 'master' of ssh://gitlab.com/beardog/onionr 2019-07-22 16:41:47 -07:00
Kevin Froman
a74f2c5051 progress in removing core 2019-07-22 00:24:42 -05:00
Kevin Froman
26c3b519c7 progress in removing core 2019-07-21 21:23:22 -05:00
Kevin Froman
4025983ca7 progress in removing core 2019-07-21 11:15:20 -05:00
Kevin Froman
50a8e8958a progress in removing core 2019-07-20 19:29:08 -05:00
Kevin Froman
f843ccc3b2 progress in removing core 2019-07-20 16:21:03 -05:00
Kevin Froman
e7c8c93dab progress in removing core 2019-07-20 10:52:03 -05:00
Kevin Froman
348ec1081f progress in removing core 2019-07-20 01:02:30 -05:00
Kevin Froman
e351710189 progress in removing core 2019-07-19 19:41:15 -05:00
Kevin Froman
e1676ef168 progress in removing core 2019-07-19 19:01:16 -05:00
Kevin Froman
e12781a49d progress in removing core 2019-07-19 14:49:56 -05:00
Kevin Froman
08d3e3a231 progress in removing core 2019-07-18 23:59:44 -05:00
Kevin Froman
dbbefafd19 progress in removing core 2019-07-18 18:07:18 -05:00
Kevin Froman
1775b96a04 progress in removing core 2019-07-18 12:40:48 -05:00
Kevin Froman
e69c8dbb60 progress in removing core 2019-07-18 00:11:52 -05:00
Kevin Froman
8163292ed9 progress in removing onionr core 2019-07-17 17:41:33 -05:00
Kevin Froman
bf8a9c4f27 refactoring core databases to not use core anymore 2019-07-17 11:58:40 -05:00
Kevin Froman
000538ddc8 fixes in board, refactoring core databases to not use core anymore 2019-07-17 11:25:29 -05:00
Kevin Froman
1ced21f40c forgot navbar.js, work on board web ui refreshing and appearance 2019-07-17 00:10:39 -05:00
Kevin Froman
837286a970 use proper data folders 2019-07-14 22:01:56 -05:00
Kevin Froman
650d5077ed correct onionr.py open port function call 2019-07-14 02:05:25 -05:00
Kevin Froman
c92689ef20 Merge branch 'master' of gitlab.com:beardog/Onionr 2019-07-14 01:59:13 -05:00
Kevin Froman
7aadd6a3b5 refactored netcontroller into a module 2019-07-14 01:58:57 -05:00
Kevin Froman
34ddded76d import signal in netcontrol 2019-07-14 01:57:25 -05:00
Kevin Froman
51cc390515 refactored netcontroller into a module 2019-07-14 01:51:43 -05:00
Kevin Froman
9298b3716b
refactored logger into a module 2019-07-13 19:29:33 -05:00
Kevin Froman
4256de5097 updated screenshots to have new ui 2019-07-13 01:35:49 -05:00
Kevin Froman
2811173051 fix broken peer cleanup 2019-07-12 19:03:06 -05:00
Kevin Froman
2a124c423b fixed broken plugin blueprint loading 2019-07-12 17:31:11 -05:00
Kevin Froman
b008616636 fixed flask's nonsense with relative dirs 2019-07-12 13:47:50 -05:00
Kevin F
4c0c9675d0
Update LICENSE.txt 2019-07-12 17:58:46 +00:00
Kevin Froman
1ba26541b2 put peerprofiles in its own file 2019-07-12 12:51:35 -05:00
Kevin Froman
f5e613134b
removed unnecessary imports in onionrpeers 2019-07-12 12:29:05 -05:00
Kevin Froman
021fa87f30
refactored onionrpeers into a module 2019-07-12 12:21:08 -05:00
Kevin Froman
ec2f24b257
refactored api servers into module 2019-07-12 02:07:30 -05:00
Kevin Froman
62200d4d98 fixed broken daemon queue thread count 2019-07-11 13:26:57 -05:00
Kevin Froman
dbd154d450 mostly finished refactoring communicator into a module 2019-07-11 02:39:35 -05:00
Kevin Froman
9bf6c76557 refactoring communicator into module 2019-07-10 17:38:20 -05:00
Kevin Froman
be318f2403 punish peers for overloading get responses 2019-07-10 02:29:05 -05:00
Kevin Froman
52c7ba860d fixed mail UI for redesign 2019-07-09 22:17:56 -05:00
Kevin Froman
b822a74c53 based block size protection added 2019-07-09 01:25:20 -05:00
Kevin Froman
fe142528ca added streamedrequests dependency for future use 2019-07-08 13:42:06 -05:00
Kevin Froman
8da1fded97 Merge branch 'new-ui-refactorinsert' of gitlab.com:beardog/Onionr into new-ui-refactorinsert 2019-07-03 21:52:55 -05:00
Kevin Froman
bd647c9ccc correct downloadblocks bhash var name 2019-07-03 21:52:09 -05:00
Kevin Froman
076678d1af correct downloadblocks bhash var name 2019-07-03 21:41:41 -05:00
Kevin Froman
6a11ba38eb correct downloadblocks bhash var name 2019-07-03 21:37:20 -05:00
Kevin Froman
bcc475dc61 refactor downloadblocks, removed old main.js, correct replay protection check 2019-07-03 21:28:16 -05:00
Kevin Froman
873740c5ad reject large requests 2019-07-02 21:50:22 -05:00
Kevin Froman
98fcd9d139 fixed duplicate upload namespace 2019-07-02 19:43:18 -05:00
Kevin Froman
4538a7e470 undo replace mistake 2019-07-02 19:35:59 -05:00
Kevin Froman
cf0d27e85b Merge branch 'new-ui-refactorinsert' of github.com:EgosOwn/onionr into new-ui-refactorinsert 2019-07-02 18:55:34 -05:00
Kevin Froman
9230157d7a updated help wanted readme section 2019-07-02 18:55:09 -05:00
KF
0e2928db38 * refactored client api endpoints to their own file and class 2019-07-02 18:16:04 -05:00
KF
2f07b2d00e * fixed some mail elements for bulma redesign
* added dll, exe to .gitignore
* fixed some miscpublicapi endpoints httpapi calls
2019-07-02 17:34:26 -05:00
Kevin Froman
10ef9ce41b refactored api servers, especially the public server. Client server to recieve similar refactoring soon 2019-07-02 01:32:26 -05:00
Kevin Froman
54dabefe45 incomplete work on refactoring client api endpoints 2019-07-01 15:38:55 -05:00
Kevin Froman
02c71eab2f * fixed fd handler probably
* fixed security level in ui redesign
* moved client api insertblock to its own blueprint
2019-06-29 15:17:48 -05:00
Kevin Froman
cff38cb7c2 sync and onionrservices fixes 2019-06-29 13:18:31 -05:00
Kevin Froman
d70afbf92b merge refactorinsert into travis' ui work 2019-06-28 17:26:37 -05:00
Travis
33340746dd Implemented Bulma for the new UI.
Tried to use the template element and JavaScript for some elements.
2019-06-28 16:24:34 -05:00
Arinerron
5a8fa38b43
fix merge conflict 2019-04-28 22:00:42 -07:00
Arinerron
83fb7754ad
Add basic PKGBUILD 2019-03-27 11:57:59 -07:00
422 changed files with 9542 additions and 15938 deletions

View File

@ -1,4 +1,6 @@
onionr/data/**/*
onionr/data
RUN-WINDOWS.bat
MY-RUN.sh
Dockerfile
.dockerignore
.git

1
.env Normal file
View File

@ -0,0 +1 @@
PYTHONPATH=./venv/bin/python310:./src/

7
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,7 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 0
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 0
# Label to use when marking an issue as stale
staleLabel: wontfix
closeComment: false

13
.github/workflows/greetings.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Message that will be displayed on users'' first issue'
pr-message: 'Hi, please make the PR at https://gitlab.com/beardog/Onionr'' first pr'

56
.gitignore vendored
View File

@ -1,32 +1,44 @@
__pycache__/
onionr/data/config.ini
onionr/data/*.db
onionr/data-old/*
onionr/data*
onionr/testdata
onionr/*.pyc
onionr/*.log
onionr/data/hs/hostname
onionr/data/*
onionr/data-backup/*
onionr/gnupg/*
src/data/config.ini
src/data/*.db
src/data-old/*
src/data*
src/tor
src/tor.exe
src/testdata
src/*.pyc
src/*.log
src/data/hs/hostname
src/data/*
src/data-backup/*
run.sh
onionr/data-encrypted.dat
onionr/.onionr-lock
core
.vscode/*
venv/*
onionr/fs*
src/.onionr-lock
daemon-true.txt
.vscode/tags
.vscode/settings.json
venv*
src/fs*
src/tmp/*
testdata/*
*.dll
*.exe
.mypy_cache/
dist/*
# log files
output.log
*.log
onionr/output.log
onionr/*.log
onionr/data/output.log
onionr/data/*.log
src/output.log
src/*.log
src/data/output.log
src/data/*.log
# package files
onionr-*.pkg.tar.gz
pkg/
src/
spawnnodes.py
static-data/tor-node-list.dat

View File

@ -1,7 +1,11 @@
test:
image: ubuntu:bionic
image: python
script:
- apt-get update -qy
- apt-get install -y python3-pip tor
- pip3 install -r requirements.txt
- apt-get install -y tor
- apt-get install -y firefox-esr
- pip3 install --require-hashes -r requirements.txt
- pip3 install --require-hashes -r requirements-dev.txt
- pip3 install --require-hashes -r requirements-notifications.txt
- python3 --version
- make test

57
.onionr.yml Normal file
View File

@ -0,0 +1,57 @@
# lazypkg config
name: onionr-git
version: 0.1
release: 1
summary: anonymous P2P communication platform
description: Onionr is a decentralized, peer-to-peer communication network, designed
to be anonymous and resistant to (meta)data analysis, spam, and corruption.
license: GPL
website: https://onionr.net/
contact: contact@onionr.net
maintainer: Aaron Esau
maintainer-contact: aur@aaronesau.com
relationships:
- conflicts: onionr2
sources:
- git: https://gitlab.com/beardog/onionr.git
branch: master
dependencies:
- deb: git
required: true
- deb: curl
required: true
- deb: tor
required: true
- deb: python3.7
pkgbuild: python
build: true
required: true
- deb: python3-setuptools
pkgbuild: python-setuptools
build: true
required: true
- deb: python3-pip
pkgbuild: python-pip
build: true
required: true
movements:
- install/onionr: /usr/bin/
chown: root:root
chmod: 755
- install/onionr.service: /etc/systemd/system/
chown: root:root
chmod: 644
- '.': /usr/share/onionr
chown: root:root
chmod: 755
scripts:
- build: install/build.sh
- pre_install: install/pre_install.sh
- post_install: install/post_install.sh

23
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,23 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Onionr: init",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/__init__.py",
"cwd": "${workspaceFolder}/src/",
"args" : ["start"]
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"cwd": "${workspaceFolder}/src/"
}
]
}

58
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,58 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Make new test",
"type": "shell",
"command": "cp tests/test_template.py tests/new-test.py",
"group": "test",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Run tests",
"type": "shell",
"command": "source venv/bin/activate; make test",
"group": "test",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Run test by name",
"type": "shell",
"command": "source venv/bin/activate; scripts/run-unit-test-by-name.py",
"group": "test",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Enable dev config",
"type": "process",
"command": "scripts/enable-dev-config.py",
"group": "dev",
"problemMatcher": []
},
{
"label": "Disable dev config",
"type": "process",
"command": "scripts/disable-dev-config.py",
"group": "dev",
"problemMatcher": []
},
{
"label": "Format default config",
"type": "process",
"command": "scripts/pretty-default-config.py",
"group": "dev",
"problemMatcher": []
}
]
}

48
CHANGELOG.md Normal file
View File

@ -0,0 +1,48 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [8.0.1] - 2020-12-22
* Fix subprocess in 3.9x with dumb hack
* Dependency bumps
## [8.0.0] - 2020-12-04
* Decrease PoW until better implementation is made
## [7.2.0] - 2020-12-03
* Purge blocks not meeting current pow on startup
* Check block POW before LAN sync
* WSL fixes
## [7.1.0] - 2020-11-23
* Check for ownership of existing dirs in createdirs, this prevents the rare edge case where a user might use a home directory in a location an attacker could write (allowing arbitrary code execution via plugins). This was already partially mitigated by the chmod of the home directory in any case, but this further fixes the issue.
## [7.0.0] - 2020-11-22
* Removed communicator timers
* Removed direct connections and chat (these will be either plugins or separate programs/processes in the future)
## [5.1.0] - 2020-09-07
* Moved plugin web files to be in the plugin folder to reduce staticfiles blueprint coupling
* Added basic sidebar on index page
* Many bug fixes
## [5.0.1] - 2020-08-08
* bumped deadsimplekv to 0.3.2
* bumped urllib3 to 1.25.10
## [5.0.0] - 2020-07-23
- Removed single-process POW support (was only needed on Windows)

View File

@ -12,18 +12,11 @@ Contributors in project-related spaces/contexts are expected to follow the [Code
Bugs can be reported using GitLab issues. Please try to see if an issue is already opened for a particular thing.
Please provide the following information when reporting a bug:
* Operating system
* Python version
* Onionr version
* Onionr logs or output with errors, any possible relevant information.
* A description of what you were doing before the bug was experienced
* Screenshots can often be helpful, but videos are rarely helpful.
See the [issue template](ISSUE_TEMPLATE.md) for what to include when reporting a bug.
If a bug is a security issue, please contact us privately.
And most importantly, please be patient. Onionr is a free open source project maintained by volunteers in their free time.
Please be patient. Onionr is a free open source project maintained by volunteers in their free time.
## Asking Questions
@ -35,6 +28,6 @@ Do your best to use good english.
For any non-trivial changes, please get in touch with us first to discuss your plans.
Please try to use a similar coding style as the project.
Please try to use a similar coding style as the project. We like PEP-8 despite being lazy with it in the past.
**Thanks for contributing to Onionr!**

View File

@ -1,28 +1,31 @@
FROM ubuntu:bionic
FROM python:3.10
EXPOSE 8080
#Base settings
ENV HOME /root
USER root
RUN mkdir /app
WORKDIR /app
ENV ONIONR_DOCKER=true
#Install needed packages
RUN apt update && apt install -y python3 python3-dev python3-pip tor locales nano sqlite3
RUN apt-get update && apt-get install -y tor locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
WORKDIR /srv/
ADD ./requirements.txt /srv/requirements.txt
RUN pip3 install -r requirements.txt
ADD ./requirements-x86-all-plugins.txt /app/requirements.txt
RUN pip3 install --require-hashes -r requirements.txt
WORKDIR /root/
#Add Onionr source
COPY . /root/
VOLUME /root/data/
COPY . /app/
#Set upstart command
CMD bash
VOLUME /app/data/
#Expose ports
EXPOSE 8080
#Default to running as nonprivileged user
RUN chmod g=u -R /app
USER 1000
ENV HOME=/app
CMD ["bash", "./onionr.sh", "start"]

View File

@ -5,8 +5,9 @@
# Steps to Reproduce
# Version Information
Onionr:
OS:
Python:
Tor:
I2P:
* Onionr:
* OS:
* Python:
* Tor:
* CPU:

View File

@ -1,6 +1,3 @@
The Onionr logo was created by [Anhar Ismail](https://github.com/anharismail) under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

View File

@ -25,16 +25,16 @@ test:
soft-reset:
@echo "Soft-resetting Onionr..."
rm -f onionr/$(ONIONR_HOME)/blocks/*.dat onionr/data/*.db onionr/$(ONIONR_HOME)/block-nonces.dat | true > /dev/null 2>&1
./onionr.sh soft-reset
@./onionr.sh version | grep -v "Failed" --color=always
reset:
@echo "Hard-resetting Onionr..."
rm -rf onionr/$(ONIONR_HOME)/ | true > /dev/null 2>&1
rm -rf $(ONIONR_HOME)/ | true > /dev/null 2>&1
cd onionr/static-data/www/ui/; rm -rf ./dist; python compile.py
#@./onionr.sh version | grep -v "Failed" --color=always
plugins-reset:
@echo "Resetting plugins..."
rm -rf onionr/$(ONIONR_HOME)/plugins/ | true > /dev/null 2>&1
@./onionr.sh reset-plugins | true > /dev/null 2>&1
@./onionr.sh version | grep -v "Failed" --color=always

View File

@ -1,20 +0,0 @@
url="https://onionr.net/"
pkgname="onionr"
pkgver=0.0
pkgrel=1
pkgdesc="P2P anonymous storage network"
arch=("x86_64")
license=('GPL')
source=("onionr-${pkgver}::git+https://gitlab.com/beardog/onionr.git#branch=master")
md5sums=('SKIP')
makedepends=('git', 'python3-pip')
build() {
cd "$pkgname-${pkgver}"
make
}
package() {
cd "$pkgname-${pkgver}"
# make install
}

158
README.md
View File

@ -5,92 +5,106 @@
</p>
<p align="center">
Private P2P Communication Network 🕵️
Privacy Respecting Communication Network 📡
</p>
<p align="center">
WIP anonymous social platform, mail, file sharing and marketplace
</p>
(***pre-alpha & experimental, not well tested or easy to use yet***)
<img src="https://img.shields.io/badge/License-aGPLv3-yellow"> <img src='https://img.shields.io/badge/python%20version%20%F0%9F%90%8D-3.10+-blue'>
[![Open Source Love](https://badges.frapsoft.com/os/v3/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/)
<img src='https://gitlab.com/beardog/Onionr/badges/master/build.svg'> - [Onionr.net](https://onionr.net/) - [.onion](http://onionr.onionkvc5ibm37bmxwr56bdxcdnb6w3wm4bdghh5qo6f6za7gn7styid.onion/)
<a href='https://twitter.com/onionrnet'><img src='https://img.shields.io/twitter/follow/onionrnet?style=social'></a> - [Discord](https://discord.gg/DVF2bEAzrt) - Matrix: #onionr:amorgan.xyz
<hr>
| | | |
| ----------- | ----------- | ----------- |
| [Install](#install-and-run-on-linux) | [Features](#main-features) | [Screenshots](#screenshots)|
| [Docs](#documentation) | [Get involved](#help-out) | [Onionr.net](https://onionr.net/)/[.onion](http://onionrbak72t5zhbzuey2fdkpczlvhowgcpqc6uoyrd3uxztzxwz5cyd.onion/) |
**The main repository for this software is at https://gitlab.com/beardog/Onionr/**
# About
---
Onionr is a decentralized, peer-to-peer communication network, designed to be anonymous and resistant to (meta)data analysis, spam, and corruption.
**The main repository for this software is at https://gitlab.com/beardog/onionr/**
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.
***Note that this README reflects the state of the rewrite, and not the original alpha network***
Mirrors [Gitea](https://git.voidnet.tech/kev/onionr)
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 gives the individual the ability to speak freely, without fear of surveillance and censorship.
---
# Onionr internals
## Blocks
At the core, Onionr is an anonymous Distributed Hash Table (DHT) syncing prepackaged blocks using a simple Gossip protocol with Dandelion++ as an overlay network on top of Tor and I2P.
Onionr stores data in independent packages referred to as 'blocks'. The blocks are distributed to all nodes, but are not required to be stored. Blocks and user IDs cannot be easily proven to have been created by a particular user. Even if Dandelion++ is defeated and there is enough evidence to believe that a specific node is linked to a block's creation, nodes still operate behind Tor or I2P and as such cannot be trivially unmasked. Anonymity is achieved by a stateless network, with no given indication of what node a block originates from. In fact, since one is not required to participate in routing or storage to insert a message, blocks often do not originate from any identifiable node, similar to how Bitcoin transactions do not necessarily originate from a wallet directly associated with a node.
## Onionr Gossip
Onionr works via epidemic/gossip style routing, with message delivery taking roughly log<sub>C</sub>(N) cycles where C is the number of nodes to send a message to each cycle and N is the number of connected nodes. So a network of 100 million nodes can deliver messages in a few minutes even with high packet loss and malfunctioning nodes.
Through Dandelion++ message forwarding and key privacy, it is intended to be nigh impossible to discover the identity of a message creator or recipient. Via 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. 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.
Users are identified by ed25519/curve25519 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.
The whitepaper (subject to change prior to alpha release) is available [here](docs/whitepaper.md).
Since Onionr is technically just a data format, any routing scheme can technically be used to pass messages.
![Tor stinks slide image](docs/tor-stinks-02.png)
The whitepaper is available [here](docs/whitepaper.md).
## Main Features
---
# Main Features
* [X] 🌐 Fully p2p/decentralized, no trackers or other single points of failure
* [X] 🔒 End to end encryption of user data
* [X] 📢 Optional non-encrypted blocks, useful for blog posts or public file sharing
* [X] 💻 Easy HTTP API for integration to websites
* [X] 🕵️ Metadata analysis resistance and anonymity
* [X] 📡 Transport agnosticism (no internet required)
## Software Suite
Onionr ships with various application plugins ready for use out of the box:
# Roadmap
Currently usable:
* Mail
* Public anonymous chat
* Simple webpage hosting - Will be greatly extended
* File sharing (Work in progress)
Not yet usable:
* Instant messaging
* Forum/BBS
**Onionr API and functionality is subject to non-backwards compatible change during pre-alpha development**
# Screenshots
<img alt='Node statistics page screenshot' src='docs/onionr-1.png' width=600>
Node statistics
<img alt='Friend/contact manager screenshot' src='docs/onionr-2.png' width=600>
Friend/contact manager
<img alt='Encrypted, metadata-masking mail application screenshot' src='docs/onionr-3.png' width=600>
Encrypted, metadata-masking mail application. One of the first distributed mail systems to have basic forward secrecy.
See [ROADMAP.md](ROADMAP.md)
# Documentation
More docs coming soon.
* [Block specification](docs/specs/block-spec.md)
* [HTTP API](docs/http-api.md)
# Install and Run on Linux
The following applies to Ubuntu Bionic. Other distros may have different package or command names.
The following applies to Ubuntu Bionic. Other distributions may have different package or command names.
Master may be unstable, you should use the latest release tag. (checkout via git: `$ git checkout release-latest`)
`$ sudo apt install python3-pip python3-dev tor`
* Have python3.6+, python3-pip, Tor (daemon, not browser) installed. python3-dev is recommended.
* Clone the git repo: `$ git clone https://gitlab.com/beardog/onionr`
* Have python3.10, python3-pip, Tor (daemon, not browser) installed. python3-dev is recommended.
* You may need build-essentials or the equivalent of your platform
* Clone the git repo: `$ git clone https://gitlab.com/beardog/onionr --tags`
* cd into install direction: `$ cd onionr/`
* Install the Python dependencies ([virtualenv strongly recommended](https://virtualenv.pypa.io/en/stable/userguide/)): `$ pip3 install --require-hashes -r requirements.txt`
* Install the Python dependencies ([virtualenv strongly recommended](https://virtualenv.pypa.io/en/stable/userguide/)): `$ pip3 install --require-hashes -r requirements-x86-all-plugins.txt`
(--require-hashes is intended to prevent exploitation via compromise of PyPi/CA certificates)
Require-hashes is suggested for supply-chain security but is optional. The hashes are not correct for ARM machines. If you are just running a node or want a bare-bones install you can use requirements-base-x86.txt and selectively install the requirements.txt files in static-data/official-plugins/ subdirectories
## Run Onionr
* Run Onionr normally: `$ ./onionr.sh start`
* Run Onionr in background as daemon: `$ ./start-daemon.sh`
* Gracefully stop Onionr from CLI `$ ./onionr.sh stop`
# Contact/Community
* Email: onionr [ at ] voidnet.tech
* Twitter: [@onionrnet](https://twitter.com/onionrnet)
* Matrix: #onionr:amorgan.xyz
* Discord: https://discord.gg/DVF2bEAzrt (Discord is bad for freedom and privacy, this is only provided for convenience)
# Help out
@ -99,35 +113,45 @@ Everyone is welcome to contribute. Help is wanted for the following:
* Development (Get in touch first)
* Creation of a shared lib for use from other languages and faster proof-of-work
* Android and IOS development
* Windows and Mac support (already partially supported, testers needed)
* General bug fixes and development of new features
* Mac support (testers needed)
* Bug fixes and development of new features
* Testing
* Translations/localizations
* UI/UX design
* Running stable nodes
* Security review/audit
* Automatic I2P setup
* I2P support
## Watch the talk from BSidesPDX 2019
<a href="https://www.youtube.com/watch?v=mrULtmSkKxg">
<img src="docs/talk.png" alt="improving anonymous networking talk link" width="600">
</a>
## Contribute money:
Donating at least $5 gets you cool Onionr stickers. Get in touch if you want them.
Donating at least $3 gets you cool Onionr stickers. Get in touch if you want them.
Bitcoin: [1onion55FXzm6h8KQw3zFw2igpHcV7LPq](bitcoin:1onion55FXzm6h8KQw3zFw2igpHcV7LPq) (Contact us for a unique address or for other coins)
![sticker](docs/sticker.png)
Monero: 4B5BA24d1P3R5aWEpkGY5TP7buJJcn2aSGBVRQCHhpiahxeB4aWsu15XwmuTjC6VF62NApZeJGTS248RMVECP8aW73Uj2ax
USD (Card/Paypal): [Ko-Fi](https://www.ko-fi.com/beardogkf)
* Bitcoin: [bc1qpayme9rlpkch0qp3r79lvm5racr7t6llauwfmg](bitcoin:bc1qpayme9rlpkch0qp3r79lvm5racr7t6llauwfmg) (Contact us for a unique address or for other coins)
Note: probably not tax deductible
* Monero: 4B5BA24d1P3R5aWEpkGY5TP7buJJcn2aSGBVRQCHhpiahxeB4aWsu15XwmuTjC6VF62NApZeJGTS248RMVECP8aW73Uj2ax
# Contact
* USD (Card/Paypal (no account required)): [Ko-Fi](https://www.ko-fi.com/beardogkf)
Email: beardog [ at ] mailbox.org
* Sign up for [privacy.com (refferal link)](https://privacy.com/join/FNNDF) to protect your personal information when contributing or shopping elsewhere, we both get $5 USD.
Onionr Mail: TRH763JURNY47QPBTTQ4LLPYCYQK6Q5YA33R6GANKZK5C5DKCIGQ
Note: not tax deductible
## Disclaimers and legal
# Security
No matter how good Onionr and other software gets, there will always be ways for clever or well-funded adversaries to break your security.
Onionr is alpha software. This means it is unstable, probably insecure, and experimental.
No matter how good Onionr and other software gets, there will always be ways for clever or well-funded adversaries to break your security.
Onionr does not protect your identity if you associate your user ID with your name either on Onionr or elsewhere.
*Do not rely on Onionr or any other software to hold up if your life or liberty are at stake.*
@ -139,12 +163,8 @@ The Tor Project and I2P developers do not own, create, or endorse this project,
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.
## Onionr Logo
The Onionr logo was created by [Anhar Ismail](https://github.com/anharismail) under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
The Onionr logo was created by [Anhar Ismail](https://github.com/anharismail) under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
If you modify and redistribute our code ("forking"), please use a different logo and project name to avoid confusion. Please do not use the project name or logo in a way that makes it seem like we endorse you without our permission.
![node web illustration](docs/onionr-web.png)

46
ROADMAP.md Normal file
View File

@ -0,0 +1,46 @@
# Onionr Roadmap
## Taraxacum Release (9.0)
* [ X ] Implement new block format with verifiable delay function
* [ X ] Implement overhauled gossip system with dandelion++
The new system is separated from the underlying networks used and makes it much easier to implement new transport methods. Dandelion++ is also better than the old block mixing we did.
## Misc
* [ ] Spruce up documentation
* [ ] Restore LAN transport
* [ ] Restore webUI as a plugin
* [ ] Restore static site/file sharing plugin
* [ ] Restore/reimplement mail plugin
* [ ] Restore/reimplement friends plugin
* [ ] Refresh test suite
* [ ] Revamped key/encrypted messaging (encrypted blocks)
## Web of trust release (~10.0)
To facilitate the below market plugin/application, Onionr will need a web of trust system.
* [ ] Web of trust plugin or module
## Market Plugin Release (~10.1)
The Onionr team believes the Monero community is currently lacking a good p2p market, and as such we hope to build a solution using Onionr as a transport. This may be a separate project and as opposed to a plugin.
* A new marketplace plugin will be developed with the following *tenative* features:
* [ ] Account management
* [ ] Monero management
* [ ] Store front discovery and search
* [ ] Product listing search
* [ ] User reviews

View File

@ -17,7 +17,7 @@ The following exploits are of particular interest:
* Discovering true server IPs when behind Tor/I2P (aside from Tor/i2p-level attacks)
* Easily discovering which nodes are the block creator
* XSS, CSRF, clickjacking, DNS rebinding
* Timing attacks against the local http server ([see blog post](https://www.chaoswebs.net/blog/timebleed-breaking-privacy-with-a-simple-timing-attack.html))
* Timing attacks against the local http server that are exploitable from a browser ([see blog post](https://www.chaoswebs.net/blog/timebleed-breaking-privacy-with-a-simple-timing-attack.html))
* Discovering direct connection servers as a non participant.
* Cryptography/protocol issues
* Denying nodes access to the network by segmenting them out with Sybil nodes

8
base-requirements.in Normal file
View File

@ -0,0 +1,8 @@
PyNaCl==1.5.0
psutil==5.9.1
filenuke==0.0.0
ujson==5.4.0
cffi==1.15.1
onionrblocks==7.0.0
ordered-set==4.1.0
json-rpc==1.13.0

View File

@ -1,4 +1,6 @@
# Onionr Documentation
<img src="onionr-logo.png" width="200px">
# Documentation
The Onionr [whitepaper](whitepaper.md) is the best place to start both for users and developers.
@ -16,4 +18,4 @@ The Onionr [whitepaper](whitepaper.md) is the best place to start both for users
* [Technical overview](dev/overview.md)
* [Project layout](dev/layout.md)
* [Plugin development guide](dev/plugins.md)
* [Testing](dev/testing.md)
* [Auto generated API docs (HTML)](html/onionr/index.html)

Binary file not shown.

View File

@ -0,0 +1,9 @@
# DaemonEvents
For things that need to be processed by the daemon
Observer pattern
Register listeners dynamically per event
Spawn new greenlets

4
docs/dev/error-codes.md Normal file
View File

@ -0,0 +1,4 @@
# Exit codes
10: run with no command
3: command does not exist

View File

@ -0,0 +1,19 @@
# Generating requirements.txt
To generate a requirements.txt file, install pip-tools from pip
Onionr requirements files should have hashes to prevent backdooring by the pypi server.
Put your package versions in requirements.in like normal. Child dependencies are usually not necessary:
```
requests==0.1.1
flask==0.1.1
```
Then generate the requirements.txt:
`$ pip-compile requirements.in --generate-hashes -o requirements.txt`
Your requirements.txt will have hash-pinned requirements of all dependencies and child dependencies.

View File

@ -1,118 +0,0 @@
# Onionr HTTP API
All HTTP interfaces in the Onionr reference client use the [Flask](http://flask.pocoo.org/) web framework with the [gevent](http://www.gevent.org/) WSGI server.
## Client & Public difference
The client API server is a locked down interface intended for authenticated local communication.
The public API server is available only remotely from Tor & I2P. It is the interface in which peers use to communicate with one another.
# Client API
Please note: endpoints that simply provide static web app files are not documented here.
* /serviceactive/pubkey
- Methods: GET
- Returns true or false based on if a given public key has an active direct connection service.
* /queueResponseAdd/key (DEPRECATED)
- Methods: POST
- Accepts form key 'data' to set queue response information from a plugin
- Returns success if no error occurs
* /queueResponse/key (DEPRECATED)
- Methods: GET
- Returns the queue response for a key. Returns failure with a 404 code if a code is not set.
* /ping
- Methods: GET
- Returns "pong!"
* /getblocksbytype/type
- Methods: GET
- Returns a list of stored blocks by a given type
* /getblockbody/hash
- Methods: GET
- Returns the main data section of a block
* /getblockdata/hash
- Methods: GET
- Returns the entire data contents of a block, including metadata.
* /getblockheader/hash
- Methods: GET
- Returns the header (metadata section) of a block.
* /hitcount
- Methods: GET
- Return the amount of requests the public api server has received this session
* /lastconnect
- Methods: GET
- Returns the epoch timestamp of when the last incoming connection to the public API server was logged
* /site/hash
- Methods: GET
- Returns HTML content out of a block
* /waitforshare/hash
- Methods: POST
- Prevents the public API server from listing or sharing a block until it has been uploaded to at least 1 peer.
* /shutdown
- Methods: GET
- Shutdown Onionr. You should probably use /shutdownclean instead.
* /shutdownclean
- Methods: GET
- Tells the communicator daemon to shutdown Onionr. Slower but cleaner.
* /getstats
- Methods: GET
- Returns some JSON serialized statistics
* /getuptime
- Methods: GET
- Returns uptime in seconds
* /getActivePubkey
- Methods: GET
- Returns the current active public key in base32 format
* /getHumanReadable/pubkey
- Methods: GET
- Echos the specified public key in mnemonic format
* /insertblock
- Methods: POST
- Accepts JSON data for creating a new block. 'message' contains the block data, 'to' specifies the peer's public key to encrypt the data to, 'sign' is a boolean for signing the message.
# Public API
v0
* /
- Methods: GET
- Returns a basic HTML informational banner describing Onionr.
* /getblocklist
- Methods: GET
- URI Parameters:
- date: unix epoch timestamp for offset
- Returns a list of block hashes stored on the node since an offset (all blocks if no timestamp is specified)
* /getdata/block-hash
- Methods: GET
- Returns data for a block based on a provided hash
* /www/file-path
- Methods: GET
- Returns file data. Intended for manually sharing file data directly from an Onionr node.
* /ping
- Methods: GET
- Returns 'pong!'
* /pex
- Methods: GET
- Returns a list of peer addresses reached within recent time
* /announce
- Methods: POST
- Accepts form data for 'node' (valid node address) and 'random' which is a nonce when hashed (blake2b_256) in the format `hash(peerAddress+serverAddress+nonce)`, begins with at least 5 zeros.
- Returns 200 with 'Success' if no error occurs. If the post is invalid, 'failure' with code 406 is returned.
* /upload
- Methods: POST
- Accepts form data for 'block' as a 'file' upload.
- Returns 200 with 'success' if no error occurs. If the block cannot be accepted, 'failure' with 400 is returned.
# Direct Connection API
These are constant endpoints available on direct connection servers. Plugin endpoints for direct connections are not documented here.
* /ping
- Methods: GET
- Returns 200 with 'pong!'
* /close
- Methods: GET
- Kills the direct connection server, destroying the onion address.
- Returns 200 with 'goodbye'

44
docs/dev/running-tests.md Normal file
View File

@ -0,0 +1,44 @@
# Running Onionr tests
Onionr has four types of tests:
* unittests
* integration tests
* selenium tests (web tests)
* runtime-tests
## unittests
Onionr uses Python's built in unittest module. These tests are located in tests/ (top level)
Run all tests with `$ make test`, which will also run integration tests.
Please note that one unittest tests if runtime-tests have passed recently. This is simply a forceful reminder to run those tests as well.
You can also run a single unittest in a loop by using the script scripts/run-unit-test-by-name.py
## integration tests
These tests are pretty basic and test on stdout of Onionr commands.
They are also run from `$ make test`
The runtime-tests do most of the actual integration testing.
## selenium tests
These are browser automation tests to test if the UI is working as how it should for a user.
There's only a couple and they're incomplete, so they can be ignored for now (test manually)
## runtime-tests
These are important. They look into the Onionr client Flask app when Onionr daemon is running and test a bunch of things.
If you do it a lot you should make your own Onionr network (disable official bootstrap)
You run this while the daemon is running (probably should make sure onboarding is done), with `$ onionr.sh runtime-test`
It's necessary to do this before running `$ make test` for unittesting

View File

@ -0,0 +1,43 @@
# Onionr Security Mechanisms
## bigbrother 👁️
Bigbrother is a cheeky module that uses Python3.8+ sys auditing events to log and/or block certain sensitive events.
It has a little overhead, so one can disable it in config in general.security_auditing
[ChaosWebs.net/blog/preventing-arbitrary-code-execution-in-python38-with-auditing.html](https://chaoswebs.net/blog/preventing-arbitrary-code-execution-in-python38-with-auditing.html)
### Threat model
It is intended to log bugs leaking private file system information, block+log network leaks, and block+log eval-like arbitrary code execution. It is not intended to block malicious browser scripts or malicious Python plugins. It cannot work with subprocesses that do not activate the module.
It's not intended to be bulletproof by any means, but it helps.
### What big brother does
* Disk access checks for disk access outside. Only logs, does not block
* Network leaks. (Non Tor/LAN) Blocks and logs
* Arbitrary code execution: logs and blocks non-whitelisted bytecode importing/compiling and subprocesses.
## Sybil attacks
As with any decentralized network, sybil nodes could collude to spy or cause mayhem. Due to the gossip nature of Onionr, sybil nodes would have a hard time fully stopping the network. In terms of spying, they could not conclusively prove the origin of messages due to the multiple transport nature of the network and layering behind Tor/etc.
## Tor configuration
When managed by Onionr, Tor has a control port password that gets stored in Onionr config.
Tor is also configured to reject requests to non-onion services, which helps to stop redirect based denial of service attacks.
## Web security
Onionr secures both it's main web APIs with anti-dns-rebinding logic, which validates the host header used in connections to it. This is to prevent exfiltration of data and side channel deanonymization.
Onionr secures the client API with a token that must be passed in most requests, with the exception of static API files. This is to prevent CSRF and side channel deanonymization.
Onionr binds most services to random loopback addresses to reduce all cross-site web attacks, including discovery of Onionr on a computer from a normal website. This is not supported on Mac because Mac does not support non 'typical' loopback addresses.
Onionr has a strict content-security-policy, rejecting all non-localhost requests and denying inline scripts and similar insecure sources.

View File

@ -0,0 +1,9 @@
# Interesting papers related to Onionr development
A paper being listed here is not end-all-be-all endorsement of every detail inside.
* [Epidemic Routing for Partially-Connected Ad Hoc Networks](https://web.archive.org/web/20200208074703/http://issg.cs.duke.edu/epidemic/epidemic.pdf)
* [Freenet: A distibuted decentralized information storage and retrieval system](https://freenetproject.org/assets/papers/ddisrs.pdf)
* [Protecting Free Expression Online with Freenet](https://freenetproject.org/assets/papers/ddisrs.pdf)
* [Bitmessage: A PeertoPeer Message Authentication and Delivery System](https://archive.org/details/BitmessageWhitepaper/)
* [MuON: Epidemic based Mutual Anonymity](https://web.archive.org/web/20060901153544/http://www.csl.mtu.edu/cs6461/www/Reading/MuON_ICNP2005.pdf)

72
docs/dev/setup.md Normal file
View File

@ -0,0 +1,72 @@
<h1 align="center">Onionr Developer Guide</h1>
This page assumes that Onionr is already installed and normal user requirements are setup.
The Onionr development environment is simple. All one really needs is a supported Python version (currently 3.7-3.8 as of writing).
There are additional requirements specified in requirements-dev.txt
**Developers agree to the [CoC](../../CODE_OF_CONDUCT.md) and to contribute new code under GPLv3 or later**. Developers should stick to PEP8 in most cases, and write unittests or integration tests where possible.
## Developer Scripts
run-onionr-node.py can be used to start a node with specific parameters
Intended to be used from VSCode (but could work otherwise), there are scripts in scripts/ named enable/disable-dev-config.py.
These make modifications to the default config for the purpose of making testing Onionr nodes easier.
Be sure to disable it again before pushing work.
There are also scripts to generate new tests.
*When adjusting PoW, it will make your node not compatible with the existing network*
Generally, one should disable bootstrap list usage when testing non trivial changes. This is a config option: general.use_bootstrap_list. and can be configured through enable-dev-config.py and run-onionr-node.py
# Current state of Onionr [2021-01-14]
Onionr in it's current form is functional, albeit buggy.
## Current major components
Onionr runs via two main HTTP gevent servers serving Flask apps.
Dir: apiservers
* 1 Parent app hosts all public API endpoints for the Tor transport.
* 1 Parent app hosts all UI-related files and endpoints. Some commands and internal modules interact with this API as well
* The HTTP servers have strict anti-dns-rebinding and CSRF countermeasures, so there is a script to craft requests to the UI-related API in scripts/
* Block storage is currently handled via metadata in sqlite (mostly defunct now), and block data storage in a different database. This is in blocks/ in running Onionr daemon data directory
* cryptography is currently handled in onionrcrypto/ except for ephemeral messages which are handled by onionr
* Transport clients run from looping threads mostly created in communicator/__init__.py, this includes block lookups and uploading on the Tor transport
## Road map
There are several big ways Onionr will be improved in the next major version:
* Migration to the [new modular block system](https://git.voidnet.tech/kev/onionrblocks)
* Probability proof of work -> verifiable delay function
* Friend system built on top of signing proofs (Private networks?)
* Gossip transport improvements such as with neighbor improvements. See streamfill/ and [simple gossip](https://github.com/onion-sudo/simplegossip) for incomplete experiments
* Finish removing "communicator"
* I2P transports
* Gossip
* Torrents (patch for sha1?)
* Modular transports
* Currently transports are just threads coupled together.
* It would be better if there was a generic way to tell any loaded transport what blocks are wanted and feed back received blocks to the database
* Migrate to SafeDB for peers and blocks
* SafeDB wrapper that contacts http endpoint to store if it is running, otherwise directly open DB
* Separate UI logic from daemon. Refactor code to
* Improve cryptography
* Restore phrases or deterministic keys (generate key from password, be very careful)
* Change identities to be dual keys (ed25519+curve25519)
* Finish treasurechest
* Interact via [named pipes](https://en.wikipedia.org/wiki/Named_pipe)
* Ephemeral key management
* Encrypt/decrypt/sign/verify functions to keep key out of main memory
* PGP-like symmetric messages

View File

@ -1,4 +1,4 @@
# Onionr Block Spec v1.1.0
# Onionr Block Spec v2.0.0
# Block Description
@ -20,13 +20,13 @@ The metadata section has the following fields. If a block contains any other fie
## meta
Max byte size: 1000
Max byte size (when in escaped json string format): 1000
Meta is a string field which can contain arbitrary sub fields. It is intended for applications and plugins to use it for arbitrary metadata information. In the reference client, if the data section is encrypted or signed, the meta section also is.
Meta is a string field which can contain arbitrary sub fields. It is intended for applications and plugins to use it for arbitrary metadata information. If the data section is encrypted or signed, the meta section also is.
Common meta fields, such as 'type' are used by the reference Onionr client to describe the type of a block.
## sig
## sig (optional)
Max byte size: 200
@ -34,30 +34,30 @@ Sig is a field for storing public key signatures of the block, typically ed25519
Note: the max field size is larger than a EdDSA signature (which is what is typically used) in order to allow other primitives for signing in alternative implementations or future versions.
## signer
## signer (optional, necessary if sig is present)
Max byte size: 200
Signer is a field for specifying the public key which signed the block. In the reference client this is a base64 encoded ed25519 public key.
## time
## time (mandatory)
Max byte size: 10
Time is an integer field for specifying the time of which a block was created. The trustworthiness of this field is based on one's trust of the block creator, however blocks with a time field set in the future (past a reasonable clock skew) are thrown out by the reference client.
Time is an integer field for specifying the time of which a block was created. The trustworthiness of this field is based on one's trust of the block creator, however blocks with a time field set in the future at the point of block receipt (past a reasonable clock skew) are thrown out by the reference client.
## expire
## expire (optional)
Max byte size: 10
Expire is an integer field for specifying the time of which the block creator has indicated that the block should be deleted. The purpose of this is for voluntarily freeing the burden of unwanted blocks on the Onionr network, rather than security/privacy (since blocks could be trivially kept past expiration). Regardless, the reference client deletes blocks after a preset time if the expire field is either not set or longer than the preset time.
## pow
## pow (effectively mandatory)
Max byte size: 1000
Pow is a field for placing the nonce found to make a block meet a target proof of work. In theory, a block could meet a target without a random token in this field.
## encryptType
## encryptType (optional)
encryptType is a field to specify the mode of encryption for a block. The values supported by Onionr are 'asym' and 'sym'.
encryptType is a field to specify the mode of encryption for a block. The values supported by Onionr are 'asym' and 'sym'.

View File

@ -0,0 +1,5 @@
# Onionr Forward Secrecy Spec v0.0.0
# Introduction
Due to the natural trade-offs of implementing [forward secrecy](https://en.wikipedia.org/wiki/Forward_secrecy) in a distributed, decentralized system, Onionr has optional ephemeral keys.

28
docs/docker.md Normal file
View File

@ -0,0 +1,28 @@
# Running Onionr in Docker
A Dockerfile is included in the root directory of Onionr.
In Docker version 20.10 (and probably others), there is a strange bug where Onionr must be run with -it or stdout will be garbled and it may hang.
## Clone and build the image
`$ git clone https://git.voidnet.tech/kev/onionr/`
`$ cd onionr`
`$ sudo docker build -t onionr .`
## Run Onionr
`$ sudo docker run -it -p 8080:8080 onionr`
Onionr will be accessible over any network interface by default, so make sure to either change the entry point bind-address argument or set a firewall rule.
That said, Onionr does protect it's interface by default with a web token, which will be shown in stdout.
**However, anyone who can access the port may be able to see what Onionr sites you have saved and potentially deanonymize your node**
## View the UI
Visit the address and port for the machine Onionr is running on, for example: http://192.168.1.5:8080/#<long-token-taken-from-stdout>
If you want a secure connection to the interface, either use a proxy such as nginx or caddy, or use [SSH tunneling](./vps-cloud-guide.md).

24
docs/faq.md Normal file
View File

@ -0,0 +1,24 @@
<h1 align="center">Onionr FAQ</h1>
(Most of the FAQ answers apply to planned features and do not reflect in the demo network)
* How does Onionr route messages?
Onionr creates a message with an anti-spam proof (usually). It is then forwarded between nodes using binomial tree broadcast.
The network is structured based on the particular transport being used, for Tor, .onion addresses are used to determine closeness between nodes.
Churn due to connectivity changes or issues, membership changes or malicious activity means nodes need to sometimes look far away for missed messages.
To help with scale, messages can be intelligently deleted or forwarded, for example a mail message can be marked by its recipient at a given point for deletion, or forum posts can be set to expire after a short period or after lack of activity.
* Why do you use Python instead of [language]?
I'm very comfortable in Python, and I believe it is a maintainable language if you use it correctly with modern features, also it has many quality libraries useful to the project, like pyncal and stem. Most places in the project are IO bound.
* What do you think of bad actors who might use Onionr?
Users should be able to exclude viewing, processing, and hosting content they do not want to. To this end, I want to enable user-configurable filtering based on lists provided by friends, fuzzy hashing, and voting.

BIN
docs/onionr-1.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 56 KiB

BIN
docs/onionr-2.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 31 KiB

BIN
docs/onionr-3.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
docs/sticker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
docs/talk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,7 @@
# Deterministic address
Deterministic addresses are simply Onionr user IDs that are generated from a passphrase rather than general entropy.
To generate an Onionr deterministic, create a random passphrase of at least 25 characters of length. **It is very important that your passphrase is highly random. 9+ words is recommended for your passphrase**
`$ onionr add-id true`

View File

@ -2,6 +2,6 @@
After installing Onionr, there are several things to do:
1. Setup a [deterministic address](usage/deterministic.md) (optional)
2. Add friends' ids
3. Publish your id
1. Setup a [deterministic address](deterministic.md) (optional)
2. Start your node `/path/to/onionr.sh start`
3. Copy your ID and share it with friends

View File

@ -1,13 +1,18 @@
# Onionr Installation
The following steps work broadly speaking for Windows, Mac, and Linux.
The following steps work broadly speaking for WSL, Mac, and Linux.
1. Verify python3.6+ is installed: if its not see https://www.python.org/downloads/
1. Verify python3.7+ is installed: if not, see https://www.python.org/downloads/
2. Verify Tor is installed (does not need to be running, binary can be put into system path or Onionr directory)
3. [Optional but recommended]: setup virtual environment using [virtualenv](https://virtualenv.pypa.io/en/latest/), activate the virtual environment
4. Clone Onionr: git clone https://gitlab.com/beardog/onionr
4. Clone Onionr: `$ git clone https://gitlab.com/beardog/onionr`
5. Install the Python module dependencies: pip3 install --require-hashes -r requirements.txt
5. Install the Python module dependencies: `$ pip3 install --require-hashes -r requirements.txt`
Note: if an alternative python install is needed, use virtualenv or run Onionr commands with:
`$ /path/to/python /path/to/onionr/onionr/__init__.py`

16
docs/usage/mail.md Normal file
View File

@ -0,0 +1,16 @@
To use OnionrMail, open the web interface:
`$ onionr.sh openweb`
Navigate to the mail interface from the navbar.
## Receiving mail
Copy your ID from the textbox below the navbar. Publish the ID so that someone (or general people) know your ID to send messages to it. Note that associating the ID with your real ID publicly removes anonymity.
## Sending mail
1. optionally add the recipient as a friend via the friends page.
2. click compose in the mail menu
3. either select the recipient from the friend list or paste their ID in manually into the recipient box
4. send away!

59
docs/usage/pages.md Normal file
View File

@ -0,0 +1,59 @@
Onionr sites come in two forms:
* Single-page sites, identified by the hash of a single page contained within a single Onionr block.
* Multi-page sites, identified by a user ID. Contains directory archives of a full site.
# Metadata Awareness
Before creating an Onionr site, one should be cautious of the metadata one could be leaking. For example, some HTML generators may insert author meta tags. Onionr does not filter out any web page data.
# No JavaScript, no third-party resources
Currently, in order to protect Onionr users, JavaScript is disabled within Onionr sites. JS will remain present in the HTML file, but be non functional. Additionally, third party resources outside of Onionr cannot be loaded.
# Creating multi page sites
Multi page sites are the most useful, as they can contain an arbitrary amount of static files.
To create a single page site, create a directory for your site and write standard HTML file(s) within them. CSS, images and other files can be placed in the directory as well. The home page should be name index.html and in the parent level directory.
Then, create a strong passphrase for the site. If the site will be updated, be sure to write it down or remember it. A strong passphrase can be generated by running:
`$ scripts/passphrase-generator.py`
Sample output: lovesick blubberer haemoglobin... and so on.
## Generating or updating the site:
`$ ./onionr.sh addsite`
All files in the current working directory will be added to the site.
The command will prompt for a passphrase.
After the site is generated, a user ID that identifies the site will be outputted.
# Creating single page sites
Single page sites are incredibly straight forward.
Single page sites cannot be modified or updated, but are somewhat more secure due to having lower complexity.
To create a single page site, write a standard HTML file. Inline or data-uri CSS can be included, as well as data-uri images. Data-URI generators can be found online.
After creating the HTML file, run this command:
`$ ./onionr.sh addhtml filename.html`
![single page screenshot](single-page.png)
# Viewing sites
To view a site, open the Onionr web interface and paste the site hash or ID into the site opener box that looks like this:
![site opener box screenshot](site-opener.png)
Then, press open.

6
docs/usage/safety.md Normal file
View File

@ -0,0 +1,6 @@
Onionr and all privacy-oriented software are not silver bullets.
For example, if one gives away too much about themselves on an Onionr forum, it doesn't matter how good Onionr's privacy is.
TODO: expand this page

BIN
docs/usage/single-page.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
docs/usage/site-opener.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

18
docs/vps-cloud-guide.md Normal file
View File

@ -0,0 +1,18 @@
# Cloud/Server Hosting Onionr
Cloud hosting is not the recommended way to run Onionr, as it gives the cloud provider control over your data.
That said, it is quite useful and by running a 24/7 Onionr node you contribute to the network's health.
![https://cock.li/img/cockbox.png](https://cockbox.org/?r=12)
[Cockbox](https://cockbox.org/?r=12) is the recommended provider, as they do not demand personal information and accept Monero. This is an affiliate link, which gives us a commission at no expense or complication to you.
1. [Install Onionr like normal](./basic-onionr-user-guide.pdf) or [from Docker](./docker.md)
2. Run with specific host and port to bind to: `$ ./run-onionr-node.py --bind-address 0.0.0.0 --port 8080`
3. Get the web security token: `$ ./onionr.sh get-web` (the long string at the end of the URL)
4. [Configure Firefox for SSH tunneling](https://web.archive.org/web/20210123034529/https://gist.github.com/brentjanderson/6ed800376e53746d2d28ba7b6bdcdc12). `Set network.proxy.allow_hijacking_localhost` to true in about:config
Disable random host binding in config (general.security.random_bind_ip = false) if you have Onionr auto start. You may also want to disable deniable block inserts.

View File

@ -1,15 +1,18 @@
<p align="center">
<img src="onionr-logo.png" alt="<h1>Onionr</h1>" width=200>
<h1 align="center">Onionr</h1>
</p>
<p align="center">Anonymous, Decentralized, Distributed Network</p>
June 2020
# Introduction
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, threats of violence, network exploitation (e.g. denial of service attacks) and others.
We hold that in order to protect individual privacy, users must have the ability to communicate anonymously and with decentralization.
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:
@ -57,12 +60,14 @@ To mitigate maliciously slow or unreliable nodes, Onionr builds a profile on nod
## Block Format
Onionr blocks are very simple. They are structured in two main parts: a metadata section and a data section, with a line feed delimiting where metadata ends and data begins.
Onionr blocks are very simple. They are structured in two main parts: a metadata section and a data section, with a line feed delimiting where metadata ends and data begins.
Metadata defines what kind of data is in a block, signature data, encryption settings, and other arbitrary information.
Optionally, a random token can be inserted into the metadata for use in Proof of Work.
The proof of work function should be a Verifiable Delay Function (VDF). We have chosen MiMC for it's simplicity.
### Block Encryption
For encryption, Onionr uses ephemeral Curve25519 keys for key exchange and XSalsa20-Poly1305 as a symmetric cipher or optionally using only XSalsa20-Poly1305 with a pre-shared key.
@ -83,9 +88,7 @@ Blocks are stored indefinitely until the allocated space is filled, at which poi
## Block Timestamping
Onionr can provide evidence of when a block was inserted by requesting other users to sign a hash of the current time with the block data hash: sha3_256(time + sha3_256(block data)).
This can be done either by the creator of the block prior to generation, or by any node after insertion.
Onionr blocks are by default not accepted if their timestamp is set too far in the past, or is in the future.
In addition, randomness beacons such as the one operated by [NIST](https://beacon.nist.gov/home), [Chile](https://beacon.clcert.cl/), or the hash of the latest blocks in a cryptocurrency network could be used to affirm that a block was at least not *created* before a given time.
@ -97,7 +100,7 @@ The benefits of such a system are increased privacy, and the ability to anonymou
# Threat Model
The goal of Onionr is to provide a method of distributing information in a manner in which the difficulty of discovering the identity of those sending and receiving the information is greatly increased. In this section we detail what information we want to protect and who we're protecting it from.
The goal of Onionr is to provide a method of distributing information in a manner in which the difficulty of discovering the identity of those sending and receiving the information is greatly increased. In this section we detail what information we want to protect and who we're protecting it from.
In this threat model, "protected" means available in plaintext only to those which it was intended, and regardless non-malleable
@ -131,7 +134,7 @@ Onionr does not protect the following:
## Assumptions
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.

9
git-update.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
echo "This will git pull origin master, then update dependencies and default plugins."
echo "Enter to continue, ctrl-c to stop."
read
git pull origin master
pip3 install -r --require-hashes requirements.txt
./onionr.sh reset-plugins

35
install/CentOS-install Normal file
View File

@ -0,0 +1,35 @@
yum install epel-release
yum clean all
yum update -y
yum group install "Development Tools"
yum install centos-release-scl
yum install wget zlib zlib-devel openssl-devel bzip2-devel libffi-devel python-gevent -y
yum install rh-python38 rh-python38-python-devel
scl enable rh-python38 bash
yum update -y
pip3 install --require-hashes -r requirements.txt
chown nobody. ../
su -l nobody -s /bin/bash
scl enable rh-python38 bash
./onionr.sh start
Like a black hole, NSA pulls in every signal that comes near, but no electron is ever allowed to escape│
│ -James Bamford │
└───────────────────────────────────────────────────────────────────────────────────────────────────────┘
[+] Tor is starting...
[+] Jan 11 18:35:55.000 [notice] Bootstrapped 0%: Starting
[+] Jan 11 18:35:56.000 [notice] Bootstrapped 10%: Finishing handshake with directory server
[+] Jan 11 18:35:56.000 [notice] Bootstrapped 80%: Connecting to the Tor network
[+] Jan 11 18:35:56.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
[+] Finished starting Tor.
[+] Onionr v8.0.1 (x86_64) (API v2)
[+] Private P2P Communication - GPLv3 - https://Onionr.net
[+] CPython 3.8.6 on Linux-3.10.0-1062.4.1.el7.x86_64-x86_64-with-glibc2.2.5 3.10.0-1062.4.1.el7.x86_64
[+] Onionr data dir: /root/.local/share/onionr/
[+] Onionr daemon is running under 5186
[+] Not binding to LAN due to no private network configured.
[+] First run detected. Run openhome to get setup.
./onionr.sh openhome

60
install/PKGBUILD Normal file
View File

@ -0,0 +1,60 @@
# Maintainer: Aaron Esau <aur@aaronesau.com>
pkgname="onionr-git"
pkgver="0.1"
pkgrel="1"
conflicts=("onionr2")
license=("GPL")
arch=("i686" "x86_64")
md5sums=("SKIP")
url="https://onionr.net/"
pkgdesc="anonymous P2P communication platform"
source=("${pkgname}-${pkgver}::git+https://gitlab.com/beardog/onionr.git#branch=master")
makedepends=("python" "python-setuptools" "python-pip")
depends=("git" "curl" "tor")
rinstall() {
if [ -f "$1" ]; then
install -D "$1" "$2/" "$3" "$4"
return 0
fi
for file in $(find "$1" -type f -printf '%P\n'); do
install -D "$1/$file" "$2/$file" "$3" "$4"
done
return 0
}
prepare() {
# pre_build
cd "${srcdir}/${pkgname}-${pkgver}"
}
build() {
# build
cd "${srcdir}/${pkgname}-${pkgver}"
sh install/build.sh
}
check() {
# post_build
cd "${srcdir}/${pkgname}-${pkgver}"
}
package() {
# "movements"
# ensure target directories exist
mkdir -p "$pkgdir//usr/bin/"
mkdir -p "$pkgdir//etc/systemd/system/"
mkdir -p "$pkgdir//usr/share/onionr"
# copy files over and change perms
rinstall "${srcdir}/${pkgname}-${pkgver}/install/onionr" "${pkgdir}//usr/bin/" --mode=755 --owner="root" --group="root"
rinstall "${srcdir}/${pkgname}-${pkgver}/install/onionr.service" "${pkgdir}//etc/systemd/system/" --mode=644 --owner="root" --group="root"
rinstall "${srcdir}/${pkgname}-${pkgver}/." "${pkgdir}//usr/share/onionr" --mode=755 --owner="root" --group="root"
}

5
install/README.md Normal file
View File

@ -0,0 +1,5 @@
# Service/System Installation Notes
Currently, the most reliable and well tested way to use Onionr is straight from the master branch of the repository, or from the released bundles.
System services and system-wide installation is not supported well yet.

5
install/build.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
sudo pip3 install -r requirements.txt
make plugins-reset
find . -name '__pycache__' -type d | xargs rm -rf

52
install/create_release.py Executable file
View File

@ -0,0 +1,52 @@
import os
version = ''
contents = ''
with open('../onionr/onionr.py', 'r') as f:
contents = f.read()
version = contents.split("ONIONR_VERSION = '")[1].split("'")[0]
print('Current Onionr release version is %s (MAJOR.MINOR.VERSION)\n' % version)
new_version = input('Enter new version: ')
try:
int(new_version.replace('.', ''))
except:
print('Invalid version number, try again.')
exit(1337)
confirm = input('Please confirm the version change from %s to %s (y/N): ' % (version, new_version))
print('\n------\n')
if confirm.lower().startswith('y'):
print('- Updating version in onionr.py')
with open('../onionr/onionr.py', 'w+') as f:
f.write(contents.replace("ONIONR_VERSION = '%s'" % version, "ONIONR_VERSION = '%s'" % new_version))
print('- Updating version in PKGBUILD')
with open('../onionr/PKGBUILD', 'w+') as f:
f.write(f.read().replace("pkgver=%s" % version, "pkgver=%s" % new_version))
print('- Committing changes')
os.system('cd ..; git add onionr/onionr.py; git commit -m "Increment Onionr version to %s"' % new_version)
print('- Adding tag')
os.system('cd ..; git tag %s' % new_version)
print('- Pushing changes')
# os.system('cd ..; git push origin --tags')
print('\n------\n\nAll done. Create a merge request into master at this link:\n\nhttps://gitlab.com/beardog/Onionr/merge_requests/new?merge_request%5Bsource_project_id%5D=5020889&merge_request%5Btarget_branch%5D=master&merge_request%5Btarget_project_id%5D=5020889')
print('\nNOTE: The default configuration file was not changed. Please make sure it is not in dev mode, and that log.verbosity is "error".')
else:
print('Change cancelled. No action has been taken.')

View File

@ -22,27 +22,31 @@ fi
# install basic dependencies
pacman --needed --noconfirm -S git curl python python-pip tor
echo -e "\033[0;32mInstalling pacman dependencies...\033[0m"
! ((pacman --needed --noconfirm -S git curl python python-pip tor > /dev/null) 2>&1 | grep -v warning 1>&2) | grep .
# get the repository
echo -e "\033[0;32mCloning Onionr repository...\033[0m"
rm -rf "$OUTPUT_DIR" "$DATA_DIR" "$LOG_DIR"
git clone https://gitlab.com/beardog/onionr "$OUTPUT_DIR"
git clone --quiet https://gitlab.com/beardog/onionr "$OUTPUT_DIR" > /dev/null
cd "$OUTPUT_DIR"
git checkout "$BRANCH"
git checkout -q "$BRANCH" > /dev/null
# install python dependencies
pip3 install --no-input -r "$OUTPUT_DIR/requirements.txt" --require-hashes
echo -e "\033[0;32mInstalling pip dependencies...\033[0m"
# create nologin onionr user if not exists
pip3 install --no-input -r "$OUTPUT_DIR/requirements.txt" --require-hashes > /dev/null
id -u onionr &>/dev/null || useradd -r -s /sbin/nologin onionr
# set permissions on Onionr directory
chmod 755 "$OUTPUT_DIR"
chown -R onionr:onionr "$OUTPUT_DIR"
chown -R root:root "$OUTPUT_DIR"
# create directories
@ -50,7 +54,7 @@ mkdir -p "$OUTPUT_DIR/onionr/data" "$LOG_DIR"
mv "$OUTPUT_DIR/onionr/data" "$DATA_DIR"
chmod -R 750 "$DATA_DIR" "$LOG_DIR"
chown -R onionr:onionr "$DATA_DIR" "$LOG_DIR"
chown -R root:root "$DATA_DIR" "$LOG_DIR"
# create executable
@ -61,6 +65,8 @@ chown root:root "$EXECUTABLE"
# create systemd service
echo -e "\033[0;32mCreating systemd unit...\033[0m"
SERVICE='/etc/systemd/system/onionr.service'
cp "$OUTPUT_DIR/install/onionr.service" "$SERVICE"
@ -74,7 +80,7 @@ systemctl start onionr
# pretty header thing
"$EXECUTABLE" --header 'Onionr successfully installed.'
"$EXECUTABLE" details
# and we're good!

View File

@ -22,27 +22,31 @@ fi
# install basic dependencies
apt -y install git curl python3.7 python3-pip python3-setuptools tor
echo -e "\033[0;32mInstalling apt dependencies...\033[0m"
apt-get install -y git curl python3.7 python3-pip python3-setuptools tor > /dev/null
# get the repository
echo -e "\033[0;32mCloning Onionr repository...\033[0m"
rm -rf "$OUTPUT_DIR" "$DATA_DIR" "$LOG_DIR"
git clone https://gitlab.com/beardog/onionr "$OUTPUT_DIR"
git clone --quiet https://gitlab.com/beardog/onionr "$OUTPUT_DIR" > /dev/null
cd "$OUTPUT_DIR"
git checkout "$BRANCH"
git checkout -q "$BRANCH" > /dev/null
# install python dependencies
python3.7 -m pip install --no-input -r "$OUTPUT_DIR/requirements.txt" --require-hashes
echo -e "\033[0;32mInstalling pip dependencies...\033[0m"
# create nologin onionr user if not exists
python3.7 -m pip install --no-input -r "$OUTPUT_DIR/requirements.txt" --require-hashes > /dev/null
id -u onionr &>/dev/null || useradd -r -s /sbin/nologin onionr
# set permissions on Onionr directory
chmod 755 "$OUTPUT_DIR"
chown -R onionr:onionr "$OUTPUT_DIR"
chown -R root:root "$OUTPUT_DIR"
# create directories
@ -50,7 +54,7 @@ mkdir -p "$OUTPUT_DIR/onionr/data" "$LOG_DIR"
mv "$OUTPUT_DIR/onionr/data" "$DATA_DIR"
chmod -R 750 "$DATA_DIR" "$LOG_DIR"
chown -R onionr:onionr "$DATA_DIR" "$LOG_DIR"
chown -R root:root "$DATA_DIR" "$LOG_DIR"
# create executable
@ -61,6 +65,8 @@ chown root:root "$EXECUTABLE"
# create systemd service
echo -e "\033[0;32mCreating systemd unit...\033[0m"
SERVICE='/etc/systemd/system/onionr.service'
cp "$OUTPUT_DIR/install/onionr.service" "$SERVICE"

View File

@ -1,12 +1,16 @@
#!/bin/sh
set -e
[ "root" != "$USER" ] && exec sudo $0 "$@"
if [[ $EUID -eq 0 ]]; then
export ONIONR_HOME=${ONIONR_HOME:-/var/lib/onionr}
export LOG_DIR=${LOG_DIR:-/var/log/onionr}
else
export ONIONR_HOME=${ONIONR_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/onionr}
export LOG_DIR=${LOG_DIR:-$ONIONR_HOME/logs}
fi
export OUTPUT_DIR=${OUTPUT_DIR:=/usr/share/onionr}
export ONIONR_HOME=${ONIONR_HOME:=/etc/onionr}
export LOG_DIR=${LOG_DIR:=/var/log/onionr}
mkdir -p "$ONIONR_HOME" "$LOG_DIR"
cd "$OUTPUT_DIR"
exec su onionr -s /bin/sh -c "./onionr.sh ""$@"""
chmod 0700 "$ONIONR_HOME" "$LOG_DIR"
exec ${ONIONR_BASEDIR:-/usr/share/onionr}/onionr.sh "$@"

48
install/onionr.install Normal file
View File

@ -0,0 +1,48 @@
pre_install {
# pre_install
cd "${srcdir}/${pkgname}-${pkgver}"
sh install/pre_install.sh
}
post_install {
# post_install
cd "${srcdir}/${pkgname}-${pkgver}"
sh install/post_install.sh
}
pre_upgrade {
# pre_upgrade
cd "${srcdir}/${pkgname}-${pkgver}"
}
post_upgrade {
# post_upgrade
cd "${srcdir}/${pkgname}-${pkgver}"
}
pre_remove {
# pre_remove
cd "${srcdir}/${pkgname}-${pkgver}"
}
post_remove {
# post_remove
cd "${srcdir}/${pkgname}-${pkgver}"
}

View File

@ -1,15 +1,20 @@
[Unit]
Description=Onionr Daemon
Requires=network.target tor.service
After=network.target tor.service
Documentation=https://onionr.net/docs/
After=network-online.target
Requires=network-online.target
[Service]
Environment="DATA_DIR=/usr/share/onionr"
Environment="LOG_DIR=/var/log/onionr/"
ExecStart=/usr/bin/onionr --start
ExecStop=/usr/bin/onionr --stop
Type=simple
Restart=always
Environment="ONIONR_HOME=/var/lib/onionr"
Environment="LOG_DIR=/var/log/onionr"
ExecStart=/usr/bin/onionr start
ExecStop=/usr/bin/onionr stop
KillMode=mixed
KillSignal=SIGQUIT
TimeoutStopSec=30s
Restart=on-abnormal
[Install]
WantedBy=tor.service
WantedBy=multi-user.target

3
install/post_build.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
sh run_tests.sh

5
install/post_install.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
systemctl daemon-reload
systemctl enable onionr
systemctl start onionr

3
install/pre_install.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
pip3 install --no-input -r "$OUTPUT_DIR/requirements.txt" --require-hashes > /dev/null

15
make-release.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/bash
rm -rf dist
mkdir dist
mkdir dist/onionr/
cp -t dist/onionr/ -r docs static-data install src onionr.sh start-daemon.sh setprofile.sh requirements.txt requirements-notifications.txt
cp *.md dist/onionr/
PIP_USER=false
export PIP_USER
cd dist
tar -czvf onionr-no-deps.tar.gz onionr
cd ..
pip3 install --require-hashes -r requirements.txt --target=dist/onionr/src/
pip3 install --require-hashes -r requirements-notifications.txt --target=dist/onionr/src/
cd dist
tar -czvf onionr.tar.gz onionr

View File

@ -1,4 +1,9 @@
#!/bin/sh
ORIG_ONIONR_RUN_DIR=`pwd`
export ORIG_ONIONR_RUN_DIR
export PYTHONDONTWRITEBYTECODE=1
export PYTHONUNBUFFERED=1
export PYTHONOPTIMIZE="true"
cd "$(dirname "$0")"
cd onionr/
./onionr.py "$@"
cd src
./__init__.py "$@"

View File

@ -1,531 +0,0 @@
'''
Onionr - Private P2P Communication
This file handles all incoming http requests to the client, using Flask
'''
'''
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 random, threading, hmac, base64, time, os, json, socket
from gevent.pywsgi import WSGIServer, WSGIHandler
from gevent import Timeout
import flask
from flask import request, Response, abort, send_from_directory
import core
import onionrexceptions, onionrcrypto, blockimporter, onionrevents as events, logger, config, onionrblockapi
import httpapi
from httpapi import friendsapi, profilesapi, configapi, miscpublicapi
from onionrservices import httpheaders
import onionr
from onionrutils import bytesconverter, stringvalidators, epoch, mnemonickeys
config.reload()
class FDSafeHandler(WSGIHandler):
'''Our WSGI handler. Doesn't do much non-default except timeouts'''
def handle(self):
timeout = Timeout(60, exception=Exception)
timeout.start()
try:
WSGIHandler.handle(self)
except Timeout as ex:
raise
def setBindIP(filePath=''):
'''Set a random localhost IP to a specified file (intended for private or public API localhost IPs)'''
if config.get('general.random_bind_ip', True):
hostOctets = [str(127), str(random.randint(0x02, 0xFF)), str(random.randint(0x02, 0xFF)), str(random.randint(0x02, 0xFF))]
data = '.'.join(hostOctets)
# Try to bind IP. Some platforms like Mac block non normal 127.x.x.x
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.bind((data, 0))
except OSError:
# if mac/non-bindable, show warning and default to 127.0.0.1
logger.warn('Your platform appears to not support random local host addresses 127.x.x.x. Falling back to 127.0.0.1.')
data = '127.0.0.1'
s.close()
else:
data = '127.0.0.1'
if filePath != '':
with open(filePath, 'w') as bindFile:
bindFile.write(data)
return data
class PublicAPI:
'''
The new client api server, isolated from the public api
'''
def __init__(self, clientAPI):
assert isinstance(clientAPI, API)
app = flask.Flask('PublicAPI')
self.i2pEnabled = config.get('i2p.host', False)
self.hideBlocks = [] # Blocks to be denied sharing
self.host = setBindIP(clientAPI._core.publicApiHostFile)
self.torAdder = clientAPI._core.hsAddress
self.i2pAdder = clientAPI._core.i2pAddress
self.bindPort = config.get('client.public.port')
self.lastRequest = 0
self.hitCount = 0 # total rec requests to public api since server started
logger.info('Running public api on %s:%s' % (self.host, self.bindPort))
@app.before_request
def validateRequest():
'''Validate request has the correct hostname'''
# If high security level, deny requests to public (HS should be disabled anyway for Tor, but might not be for I2P)
if config.get('general.security_level', default=1) > 0:
abort(403)
if type(self.torAdder) is None and type(self.i2pAdder) is None:
# abort if our hs addresses are not known
abort(403)
if request.host not in (self.i2pAdder, self.torAdder):
# Disallow connection if wrong HTTP hostname, in order to prevent DNS rebinding attacks
abort(403)
self.hitCount += 1 # raise hit count for valid requests
@app.after_request
def sendHeaders(resp):
'''Send api, access control headers'''
resp = httpheaders.set_default_onionr_http_headers(resp)
# Network API version
resp.headers['X-API'] = onionr.API_VERSION
self.lastRequest = epoch.get_rounded_epoch(roundS=5)
return resp
@app.route('/')
def banner():
# Display a bit of information to people who visit a node address in their browser
try:
with open('static-data/index.html', 'r') as html:
resp = Response(html.read(), mimetype='text/html')
except FileNotFoundError:
resp = Response("")
return resp
@app.route('/getblocklist')
def getBlockList():
return httpapi.miscpublicapi.public_block_list(clientAPI, self, request)
@app.route('/getdata/<name>')
def getBlockData(name):
# Share data for a block if we have it
return httpapi.miscpublicapi.public_get_block_data(clientAPI, self, name)
@app.route('/www/<path:path>')
def wwwPublic(path):
# A way to share files directly over your .onion
if not config.get("www.public.run", True):
abort(403)
return send_from_directory(config.get('www.public.path', 'static-data/www/public/'), path)
@app.route('/ping')
def ping():
# Endpoint to test if nodes are up
return Response("pong!")
@app.route('/pex')
def peerExchange():
response = ','.join(clientAPI._core.listAdders(recent=3600))
if len(response) == 0:
response = ''
return Response(response)
@app.route('/announce', methods=['post'])
def acceptAnnounce():
resp = httpapi.miscpublicapi.announce(clientAPI, request)
return resp
@app.route('/upload', methods=['post'])
def upload():
'''Accept file uploads. In the future this will be done more often than on creation
to speed up block sync
'''
return httpapi.miscpublicapi.upload(clientAPI, request)
# Set instances, then startup our public api server
clientAPI.setPublicAPIInstance(self)
while self.torAdder == '':
clientAPI._core.refreshFirstStartVars()
self.torAdder = clientAPI._core.hsAddress
time.sleep(0.1)
self.httpServer = WSGIServer((self.host, self.bindPort), app, log=None, handler_class=FDSafeHandler)
self.httpServer.serve_forever()
class API:
'''
Client HTTP api
'''
callbacks = {'public' : {}, 'private' : {}}
def __init__(self, onionrInst, debug, API_VERSION):
'''
Initialize the api server, preping variables for later use
This initialization defines all of the API entry points and handlers for the endpoints and errors
This also saves the used host (random localhost IP address) to the data folder in host.txt
'''
self.debug = debug
self._core = onionrInst.onionrCore
self.startTime = epoch.get_epoch()
self._crypto = onionrcrypto.OnionrCrypto(self._core)
app = flask.Flask(__name__)
bindPort = int(config.get('client.client.port', 59496))
self.bindPort = bindPort
# Be extremely mindful of this. These are endpoints available without a password
self.whitelistEndpoints = ('site', 'www', 'onionrhome', 'homedata', 'board', 'profiles', 'profilesindex',
'boardContent', 'sharedContent', 'mail', 'mailindex', 'friends', 'friendsindex',
'clandestine', 'clandestineIndex')
self.clientToken = config.get('client.webpassword')
self.timeBypassToken = base64.b16encode(os.urandom(32)).decode()
self.publicAPI = None # gets set when the thread calls our setter... bad hack but kinda necessary with flask
#threading.Thread(target=PublicAPI, args=(self,)).start()
self.host = setBindIP(self._core.privateApiHostFile)
logger.info('Running api on %s:%s' % (self.host, self.bindPort))
self.httpServer = ''
self.queueResponse = {}
onionrInst.setClientAPIInst(self)
app.register_blueprint(friendsapi.friends)
app.register_blueprint(profilesapi.profile_BP)
app.register_blueprint(configapi.config_BP)
httpapi.load_plugin_blueprints(app)
@app.before_request
def validateRequest():
'''Validate request has set password and is the correct hostname'''
# For the purpose of preventing DNS rebinding attacks
if request.host != '%s:%s' % (self.host, self.bindPort):
abort(403)
if request.endpoint in self.whitelistEndpoints:
return
try:
if not hmac.compare_digest(request.headers['token'], self.clientToken):
if not hmac.compare_digest(request.form['token'], self.clientToken):
abort(403)
except KeyError:
if not hmac.compare_digest(request.form['token'], self.clientToken):
abort(403)
@app.after_request
def afterReq(resp):
# Security headers
resp = httpheaders.set_default_onionr_http_headers(resp)
if request.endpoint == 'site':
resp.headers['Content-Security-Policy'] = "default-src 'none'; style-src data: 'unsafe-inline'; img-src data:"
else:
resp.headers['Content-Security-Policy'] = "default-src 'none'; script-src 'self'; object-src 'none'; style-src 'self'; img-src 'self'; media-src 'none'; frame-src 'none'; font-src 'none'; connect-src 'self'"
return resp
@app.route('/board/', endpoint='board')
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/', path)
@app.route('/mail/', endpoint='mailindex')
def loadMailIndex():
return send_from_directory('static-data/www/mail/', 'index.html')
@app.route('/clandestine/<path:path>', endpoint='clandestine')
def loadClandestine(path):
return send_from_directory('static-data/www/clandestine/', path)
@app.route('/clandestine/', endpoint='clandestineIndex')
def loadClandestineIndex():
return send_from_directory('static-data/www/clandestine/', 'index.html')
@app.route('/friends/<path:path>', endpoint='friends')
def loadContacts(path):
return send_from_directory('static-data/www/friends/', path)
@app.route('/friends/', endpoint='friendsindex')
def loadContacts():
return send_from_directory('static-data/www/friends/', 'index.html')
@app.route('/profiles/<path:path>', endpoint='profiles')
def loadContacts(path):
return send_from_directory('static-data/www/profiles/', path)
@app.route('/profiles/', endpoint='profilesindex')
def loadContacts():
return send_from_directory('static-data/www/profiles/', 'index.html')
@app.route('/serviceactive/<pubkey>')
def serviceActive(pubkey):
try:
if pubkey in self._core.onionrInst.communicatorInst.active_services:
return Response('true')
except AttributeError as e:
pass
return Response('false')
@app.route('/board/<path:path>', endpoint='boardContent')
def boardContent(path):
return send_from_directory('static-data/www/board/', path)
@app.route('/shared/<path:path>', endpoint='sharedContent')
def sharedContent(path):
return send_from_directory('static-data/www/shared/', path)
@app.route('/', endpoint='onionrhome')
def hello():
# ui home
return send_from_directory('static-data/www/private/', 'index.html')
@app.route('/private/<path:path>', endpoint='homedata')
def homedata(path):
return send_from_directory('static-data/www/private/', path)
@app.route('/www/<path:path>', endpoint='www')
def wwwPublic(path):
if not config.get("www.private.run", True):
abort(403)
return send_from_directory(config.get('www.private.path', 'static-data/www/private/'), path)
@app.route('/hitcount')
def get_hit_count():
return Response(str(self.publicAPI.hitCount))
@app.route('/queueResponseAdd/<name>', methods=['post'])
def queueResponseAdd(name):
# Responses from the daemon. TODO: change to direct var access instead of http endpoint
self.queueResponse[name] = request.form['data']
return Response('success')
@app.route('/queueResponse/<name>')
def queueResponse(name):
# Fetch a daemon queue response
resp = 'failure'
try:
resp = self.queueResponse[name]
except KeyError:
pass
else:
del self.queueResponse[name]
if resp == 'failure':
return resp, 404
else:
return resp
@app.route('/ping')
def ping():
# Used to check if client api is working
return Response("pong!")
@app.route('/getblocksbytype/<name>')
def getBlocksByType(name):
blocks = self._core.getBlocksByType(name)
return Response(','.join(blocks))
@app.route('/getblockbody/<name>')
def getBlockBodyData(name):
resp = ''
if stringvalidators.validate_hash(name):
try:
resp = onionrblockapi.Block(name, decrypt=True).bcontent
except TypeError:
pass
else:
abort(404)
return Response(resp)
@app.route('/getblockdata/<name>')
def getData(name):
resp = ""
if stringvalidators.validate_hash(name):
if name in self._core.getBlockList():
try:
resp = self.getBlockData(name, decrypt=True)
except ValueError:
pass
else:
abort(404)
else:
abort(404)
return Response(resp)
@app.route('/getblockheader/<name>')
def getBlockHeader(name):
resp = self.getBlockData(name, decrypt=True, headerOnly=True)
return Response(resp)
@app.route('/lastconnect')
def lastConnect():
return Response(str(self.publicAPI.lastRequest))
@app.route('/site/<name>', endpoint='site')
def site(name):
bHash = name
resp = 'Not Found'
if stringvalidators.validate_hash(bHash):
try:
resp = onionrblockapi.Block(bHash).bcontent
except onionrexceptions.NoDataAvailable:
abort(404)
except TypeError:
pass
try:
resp = base64.b64decode(resp)
except:
pass
if resp == 'Not Found' or not resp:
abort(404)
return Response(resp)
@app.route('/waitforshare/<name>', methods=['post'])
def waitforshare(name):
'''Used to prevent the **public** api from sharing blocks we just created'''
assert name.isalnum()
if name in self.publicAPI.hideBlocks:
self.publicAPI.hideBlocks.remove(name)
return Response("removed")
else:
self.publicAPI.hideBlocks.append(name)
return Response("added")
@app.route('/shutdown')
def shutdown():
try:
self.publicAPI.httpServer.stop()
self.httpServer.stop()
except AttributeError:
pass
return Response("bye")
@app.route('/shutdownclean')
def shutdownClean():
# good for calling from other clients
self._core.daemonQueueAdd('shutdown')
return Response("bye")
@app.route('/getstats')
def getStats():
# returns node stats
#return Response("disabled")
while True:
try:
return Response(self._core.serializer.getStats())
except AttributeError:
pass
@app.route('/getuptime')
def showUptime():
return Response(str(self.getUptime()))
@app.route('/getActivePubkey')
def getActivePubkey():
return Response(self._core._crypto.pubKey)
@app.route('/getHumanReadable/<name>')
def getHumanReadable(name):
return Response(mnemonickeys.get_human_readable_ID(name))
@app.route('/insertblock', methods=['POST'])
def insertBlock():
encrypt = False
bData = request.get_json(force=True)
message = bData['message']
# Detect if message (block body) is not specified
if type(message) is None:
return 'failure', 406
subject = 'temp'
encryptType = ''
sign = True
meta = {}
to = ''
try:
if bData['encrypt']:
to = bData['to']
encrypt = True
encryptType = 'asym'
except KeyError:
pass
try:
if not bData['sign']:
sign = False
except KeyError:
pass
try:
bType = bData['type']
except KeyError:
bType = 'bin'
try:
meta = json.loads(bData['meta'])
except KeyError:
pass
threading.Thread(target=self._core.insertBlock, args=(message,), kwargs={'header': bType, 'encryptType': encryptType, 'sign':sign, 'asymPeer': to, 'meta': meta}).start()
return Response('success')
self.httpServer = WSGIServer((self.host, bindPort), app, log=None, handler_class=FDSafeHandler)
self.httpServer.serve_forever()
def setPublicAPIInstance(self, inst):
assert isinstance(inst, PublicAPI)
self.publicAPI = inst
def validateToken(self, token):
'''
Validate that the client token matches the given token. Used to prevent CSRF and data exfiltration
'''
if len(self.clientToken) == 0:
logger.error("client password needs to be set")
return False
try:
if not hmac.compare_digest(self.clientToken, token):
return False
else:
return True
except TypeError:
return False
def getUptime(self):
while True:
try:
return epoch.get_epoch() - self.startTime
except (AttributeError, NameError):
# Don't error on race condition with startup
pass
def getBlockData(self, bHash, decrypt=False, raw=False, headerOnly=False):
assert stringvalidators.validate_hash(bHash)
bl = onionrblockapi.Block(bHash, core=self._core)
if decrypt:
bl.decrypt()
if bl.isEncrypted and not bl.decrypted:
raise ValueError
if not raw:
if not headerOnly:
retData = {'meta':bl.bheader, 'metadata': bl.bmetadata, 'content': bl.bcontent}
for x in list(retData.keys()):
try:
retData[x] = retData[x].decode()
except AttributeError:
pass
else:
validSig = False
signer = bytesconverter.bytes_to_str(bl.signer)
if bl.isSigned() and stringvalidators.validate_pub_key(signer) and bl.isSigner(signer):
validSig = True
bl.bheader['validSig'] = validSig
bl.bheader['meta'] = ''
retData = {'meta': bl.bheader, 'metadata': bl.bmetadata}
return json.dumps(retData)
else:
return bl.raw

View File

@ -1,51 +0,0 @@
'''
Onionr - Private P2P Communication
Import block data and save it
'''
'''
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 core, onionrexceptions, logger
from onionrutils import validatemetadata, blockmetadata
def importBlockFromData(content, coreInst):
retData = False
dataHash = coreInst._crypto.sha3Hash(content)
if coreInst._blacklist.inBlacklist(dataHash):
raise onionrexceptions.BlacklistedBlock('%s is a blacklisted block' % (dataHash,))
if not isinstance(coreInst, core.Core):
raise Exception("coreInst must be an Onionr core instance")
try:
content = content.encode()
except AttributeError:
pass
metas = blockmetadata.get_block_metadata_from_data(content) # returns tuple(metadata, meta), meta is also in metadata
metadata = metas[0]
if validatemetadata.validate_metadata(coreInst, metadata, metas[2]): # check if metadata is valid
if coreInst._crypto.verifyPow(content): # check if POW is enough/correct
logger.info('Block passed proof, saving.', terminal=True)
try:
blockHash = coreInst.setData(content)
except onionrexceptions.DiskAllocationReached:
pass
else:
coreInst.addToBlockDB(blockHash, dataSaved=True)
blockmetadata.process_block_metadata(coreInst, blockHash) # caches block metadata values to block database
retData = True
return retData

View File

@ -1,393 +0,0 @@
#!/usr/bin/env python3
'''
Onionr - Private P2P Communication
This file contains both the OnionrCommunicate class for communcating with peers
and code to operate as a daemon, getting commands from the command queue database (see core.Core.daemonQueue)
'''
'''
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, os, time
import core, config, logger, onionr
import onionrexceptions, onionrpeers, onionrevents as events, onionrplugins as plugins, onionrblockapi as block
from communicatorutils import servicecreator, onionrcommunicatortimers
from communicatorutils import downloadblocks, lookupblocks, lookupadders
from communicatorutils import servicecreator, connectnewpeers, uploadblocks
from communicatorutils import daemonqueuehandler, announcenode, deniableinserts
from communicatorutils import cooldownpeer, housekeeping, netcheck
from onionrutils import localcommand, epoch, basicrequests
from etc import humanreadabletime
import onionrservices, onionr, onionrproofs
OnionrCommunicatorTimers = onionrcommunicatortimers.OnionrCommunicatorTimers
config.reload()
class OnionrCommunicatorDaemon:
def __init__(self, onionrInst, proxyPort, developmentMode=config.get('general.dev_mode', False)):
onionrInst.communicatorInst = self
# configure logger and stuff
onionr.Onionr.setupConfig('data/', self = self)
self.proxyPort = proxyPort
self.isOnline = True # Assume we're connected to the internet
# list of timer instances
self.timers = []
# initialize core with Tor socks port being 3rd argument
self.proxyPort = proxyPort
self._core = onionrInst.onionrCore
self.blocksToUpload = []
# loop time.sleep delay in seconds
self.delay = 1
# lists of connected peers and peers we know we can't reach currently
self.onlinePeers = []
self.offlinePeers = []
self.cooldownPeer = {}
self.connectTimes = {}
self.peerProfiles = [] # list of peer's profiles (onionrpeers.PeerProfile instances)
self.newPeers = [] # Peers merged to us. Don't add to db until we know they're reachable
self.announceProgress = {}
self.announceCache = {}
# amount of threads running by name, used to prevent too many
self.threadCounts = {}
# set true when shutdown command received
self.shutdown = False
# list of new blocks to download, added to when new block lists are fetched from peers
self.blockQueue = {}
# list of blocks currently downloading, avoid s
self.currentDownloading = []
# timestamp when the last online node was seen
self.lastNodeSeen = None
# Dict of time stamps for peer's block list lookup times, to avoid downloading full lists all the time
self.dbTimestamps = {}
# Clear the daemon queue for any dead messages
if os.path.exists(self._core.queueDB):
self._core.clearDaemonQueue()
# Loads in and starts the enabled plugins
plugins.reload()
# time app started running for info/statistics purposes
self.startTime = epoch.get_epoch()
if developmentMode:
OnionrCommunicatorTimers(self, self.heartbeat, 30)
# Set timers, function reference, seconds
# requiresPeer True means the timer function won't fire if we have no connected peers
peerPoolTimer = OnionrCommunicatorTimers(self, self.getOnlinePeers, 60, maxThreads=1)
OnionrCommunicatorTimers(self, self.runCheck, 2, maxThreads=1)
# Timers to periodically lookup new blocks and download them
OnionrCommunicatorTimers(self, self.lookupBlocks, self._core.config.get('timers.lookupBlocks', 25), requiresPeer=True, maxThreads=1)
OnionrCommunicatorTimers(self, self.getBlocks, self._core.config.get('timers.getBlocks', 30), requiresPeer=True, maxThreads=2)
# Timer to reset the longest offline peer so contact can be attempted again
OnionrCommunicatorTimers(self, self.clearOfflinePeer, 58)
# Timer to cleanup old blocks
blockCleanupTimer = OnionrCommunicatorTimers(self, housekeeping.clean_old_blocks, 65, myArgs=[self])
# Timer to discover new peers
OnionrCommunicatorTimers(self, self.lookupAdders, 60, requiresPeer=True)
# Timer for adjusting which peers we actively communicate to at any given time, to avoid over-using peers
OnionrCommunicatorTimers(self, cooldownpeer.cooldown_peer, 30, myArgs=[self], requiresPeer=True)
# Timer to read the upload queue and upload the entries to peers
OnionrCommunicatorTimers(self, self.uploadBlock, 5, requiresPeer=True, maxThreads=1)
# Timer to process the daemon command queue
OnionrCommunicatorTimers(self, self.daemonCommands, 6, maxThreads=3)
# Timer that kills Onionr if the API server crashes
#OnionrCommunicatorTimers(self, self.detectAPICrash, 30, maxThreads=1)
# Setup direct connections
if config.get('general.socket_servers', False):
self.services = onionrservices.OnionrServices(self._core)
self.active_services = []
self.service_greenlets = []
OnionrCommunicatorTimers(self, servicecreator.service_creator, 5, maxThreads=50, myArgs=[self])
else:
self.services = None
# This timer creates deniable blocks, in an attempt to further obfuscate block insertion metadata
if config.get('general.insert_deniable_blocks', True):
deniableBlockTimer = OnionrCommunicatorTimers(self, deniableinserts.insert_deniable_block, 180, myArgs=[self], requiresPeer=True, maxThreads=1)
deniableBlockTimer.count = (deniableBlockTimer.frequency - 175)
# Timer to check for connectivity, through Tor to various high-profile onion services
netCheckTimer = OnionrCommunicatorTimers(self, netcheck.net_check, 600, myArgs=[self])
# Announce the public API server transport address to other nodes if security level allows
if config.get('general.security_level', 1) == 0 and config.get('general.announce_node', True):
# Default to high security level incase config breaks
announceTimer = OnionrCommunicatorTimers(self, announcenode.announce_node, 3600, myArgs=[self], requiresPeer=True, maxThreads=1)
announceTimer.count = (announceTimer.frequency - 120)
else:
logger.debug('Will not announce node.')
# Timer to delete malfunctioning or long-dead peers
cleanupTimer = OnionrCommunicatorTimers(self, self.peerCleanup, 300, requiresPeer=True)
# Timer to cleanup dead ephemeral forward secrecy keys
forwardSecrecyTimer = OnionrCommunicatorTimers(self, housekeeping.clean_keys, 15, myArgs=[self], maxThreads=1)
# Adjust initial timer triggers
peerPoolTimer.count = (peerPoolTimer.frequency - 1)
cleanupTimer.count = (cleanupTimer.frequency - 60)
blockCleanupTimer.count = (blockCleanupTimer.frequency - 5)
# Main daemon loop, mainly for calling timers, don't do any complex operations here to avoid locking
try:
while not self.shutdown:
for i in self.timers:
if self.shutdown:
break
i.processTimer()
time.sleep(self.delay)
# Debug to print out used FDs (regular and net)
#proc = psutil.Process()
#print(proc.open_files(), len(psutil.net_connections()))
except KeyboardInterrupt:
self.shutdown = True
pass
logger.info('Goodbye. (Onionr is cleaning up, and will exit)', terminal=True)
try:
self.service_greenlets
except AttributeError:
pass
else:
for server in self.service_greenlets:
server.stop()
localcommand.local_command(self._core, 'shutdown') # shutdown the api
time.sleep(0.5)
def lookupAdders(self):
'''Lookup new peer addresses'''
lookupadders.lookup_new_peer_transports_with_communicator(self)
def lookupBlocks(self):
'''Lookup new blocks & add them to download queue'''
lookupblocks.lookup_blocks_from_communicator(self)
def getBlocks(self):
'''download new blocks in queue'''
downloadblocks.download_blocks_from_communicator(self)
def decrementThreadCount(self, threadName):
'''Decrement amount of a thread name if more than zero, called when a function meant to be run in a thread ends'''
try:
if self.threadCounts[threadName] > 0:
self.threadCounts[threadName] -= 1
except KeyError:
pass
def pickOnlinePeer(self):
'''randomly picks peer from pool without bias (using secrets module)'''
retData = ''
while True:
peerLength = len(self.onlinePeers)
if peerLength <= 0:
break
try:
# get a random online peer, securely. May get stuck in loop if network is lost or if all peers in pool magically disconnect at once
retData = self.onlinePeers[self._core._crypto.secrets.randbelow(peerLength)]
except IndexError:
pass
else:
break
return retData
def clearOfflinePeer(self):
'''Removes the longest offline peer to retry later'''
try:
removed = self.offlinePeers.pop(0)
except IndexError:
pass
else:
logger.debug('Removed ' + removed + ' from offline list, will try them again.')
self.decrementThreadCount('clearOfflinePeer')
def getOnlinePeers(self):
'''
Manages the self.onlinePeers attribute list, connects to more peers if we have none connected
'''
logger.debug('Refreshing peer pool...')
maxPeers = int(config.get('peers.max_connect', 10))
needed = maxPeers - len(self.onlinePeers)
for i in range(needed):
if len(self.onlinePeers) == 0:
self.connectNewPeer(useBootstrap=True)
else:
self.connectNewPeer()
if self.shutdown:
break
else:
if len(self.onlinePeers) == 0:
logger.debug('Couldn\'t connect to any peers.' + (' Last node seen %s ago.' % humanreadabletime.human_readable_time(time.time() - self.lastNodeSeen) if not self.lastNodeSeen is None else ''), terminal=True)
else:
self.lastNodeSeen = time.time()
self.decrementThreadCount('getOnlinePeers')
def addBootstrapListToPeerList(self, peerList):
'''
Add the bootstrap list to the peer list (no duplicates)
'''
for i in self._core.bootstrapList:
if i not in peerList and i not in self.offlinePeers and i != self._core.hsAddress and len(str(i).strip()) > 0:
peerList.append(i)
self._core.addAddress(i)
def connectNewPeer(self, peer='', useBootstrap=False):
'''Adds a new random online peer to self.onlinePeers'''
connectnewpeers.connect_new_peer_to_communicator(self, peer, useBootstrap)
def removeOnlinePeer(self, peer):
'''Remove an online peer'''
try:
del self.connectTimes[peer]
except KeyError:
pass
try:
del self.dbTimestamps[peer]
except KeyError:
pass
try:
self.onlinePeers.remove(peer)
except ValueError:
pass
def peerCleanup(self):
'''This just calls onionrpeers.cleanupPeers, which removes dead or bad peers (offline too long, too slow)'''
onionrpeers.peerCleanup(self._core)
self.decrementThreadCount('peerCleanup')
def printOnlinePeers(self):
'''logs online peer list'''
if len(self.onlinePeers) == 0:
logger.warn('No online peers', terminal=True)
else:
logger.info('Online peers:', terminal=True)
for i in self.onlinePeers:
score = str(self.getPeerProfileInstance(i).score)
logger.info(i + ', score: ' + score, terminal=True)
def peerAction(self, peer, action, data='', returnHeaders=False):
'''Perform a get request to a peer'''
if len(peer) == 0:
return False
#logger.debug('Performing ' + action + ' with ' + peer + ' on port ' + str(self.proxyPort))
url = 'http://%s/%s' % (peer, action)
if len(data) > 0:
url += '&data=' + data
self._core.setAddressInfo(peer, 'lastConnectAttempt', epoch.get_epoch()) # mark the time we're trying to request this peer
retData = basicrequests.do_get_request(self._core, url, port=self.proxyPort)
# if request failed, (error), mark peer offline
if retData == False:
try:
self.getPeerProfileInstance(peer).addScore(-10)
self.removeOnlinePeer(peer)
if action != 'ping' and not self.shutdown:
logger.warn('Lost connection to ' + peer, terminal=True)
self.getOnlinePeers() # Will only add a new peer to pool if needed
except ValueError:
pass
else:
self._core.setAddressInfo(peer, 'lastConnect', epoch.get_epoch())
self.getPeerProfileInstance(peer).addScore(1)
return retData # If returnHeaders, returns tuple of data, headers. if not, just data string
def getPeerProfileInstance(self, peer):
'''Gets a peer profile instance from the list of profiles, by address name'''
for i in self.peerProfiles:
# if the peer's profile is already loaded, return that
if i.address == peer:
retData = i
break
else:
# if the peer's profile is not loaded, return a new one. connectNewPeer adds it the list on connect
retData = onionrpeers.PeerProfiles(peer, self._core)
return retData
def getUptime(self):
return epoch.get_epoch() - self.startTime
def heartbeat(self):
'''Show a heartbeat debug message'''
logger.debug('Heartbeat. Node running for %s.' % humanreadabletime.human_readable_time(self.getUptime()))
self.decrementThreadCount('heartbeat')
def daemonCommands(self):
'''
Process daemon commands from daemonQueue
'''
daemonqueuehandler.handle_daemon_commands(self)
def uploadBlock(self):
'''Upload our block to a few peers'''
uploadblocks.upload_blocks_from_communicator(self)
def announce(self, peer):
'''Announce to peers our address'''
if announcenode.announce_node(self) == False:
logger.warn('Could not introduce node.', terminal=True)
def detectAPICrash(self):
'''exit if the api server crashes/stops'''
if localcommand.local_command(self._core, 'ping', silent=False) not in ('pong', 'pong!'):
for i in range(300):
if localcommand.local_command(self._core, 'ping') in ('pong', 'pong!') or self.shutdown:
break # break for loop
time.sleep(1)
else:
# This executes if the api is NOT detected to be running
events.event('daemon_crash', onionr = self._core.onionrInst, data = {})
logger.fatal('Daemon detected API crash (or otherwise unable to reach API after long time), stopping...', terminal=True)
self.shutdown = True
self.decrementThreadCount('detectAPICrash')
def runCheck(self):
if run_file_exists(self):
logger.debug('Status check; looks good.')
self.decrementThreadCount('runCheck')
def startCommunicator(onionrInst, proxyPort):
OnionrCommunicatorDaemon(onionrInst, proxyPort)
def run_file_exists(daemon):
if os.path.isfile(daemon._core.dataDir + '.runcheck'):
os.remove(daemon._core.dataDir + '.runcheck')
return True
return False

View File

@ -1,33 +0,0 @@
# communicatorutils
The files in this submodule handle various subtasks and utilities for the onionr communicator.
## Files:
announcenode.py: Uses a communicator instance to announce our transport address to connected nodes
connectnewpeers.py: takes a communicator instance and has it connect to as many peers as needed, and/or to a new specified peer.
cooldownpeer.py: randomly selects a connected peer in a communicator and disconnects them for the purpose of security and network balancing.
daemonqueuehandler.py: checks for new commands in the daemon queue and processes them accordingly.
deniableinserts.py: insert fake blocks with the communicator for plausible deniability
downloadblocks.py: iterates a communicator instance's block download queue and attempts to download the blocks from online peers
housekeeping.py: cleans old blocks and forward secrecy keys
lookupadders.py: ask connected peers to share their list of peer transport addresses
lookupblocks.py: lookup new blocks from connected peers from the communicator
netcheck.py: check if the node is online based on communicator status and onion server ping results
onionrcommunicataortimers.py: create a timer for a function to be launched on an interval. Control how many possible instances of a timer may be running a function at once and control if the timer should be ran in a thread or not.
proxypicker.py: returns a string name for the appropriate proxy to be used with a particular peer transport address.
servicecreator.py: iterate connection blocks and create new direct connection servers for them.
uploadblocks.py: iterate a communicator's upload queue and upload the blocks to connected peers

View File

@ -1,85 +0,0 @@
'''
Onionr - Private P2P Communication
Use a communicator instance to announce our transport address to connected nodes
'''
'''
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 base64
import onionrproofs, logger
from etc import onionrvalues
from onionrutils import basicrequests, bytesconverter
def announce_node(daemon):
'''Announce our node to our peers'''
ov = onionrvalues.OnionrValues()
retData = False
announceFail = False
# Do not let announceCache get too large
if len(daemon.announceCache) >= 10000:
daemon.announceCache.popitem()
if daemon._core.config.get('general.security_level', 0) == 0:
# Announce to random online peers
for i in daemon.onlinePeers:
if not i in daemon.announceCache and not i in daemon.announceProgress:
peer = i
break
else:
peer = daemon.pickOnlinePeer()
for x in range(1):
if x == 1 and daemon._core.config.get('i2p.host'):
ourID = daemon._core.config.get('i2p.own_addr').strip()
else:
ourID = daemon._core.hsAddress.strip()
url = 'http://' + peer + '/announce'
data = {'node': ourID}
combinedNodes = ourID + peer
if ourID != 1:
#TODO: Extend existingRand for i2p
existingRand = bytesconverter.bytes_to_str(daemon._core.getAddressInfo(peer, 'powValue'))
# Reset existingRand if it no longer meets the minimum POW
if type(existingRand) is type(None) or not existingRand.endswith('0' * ov.announce_pow):
existingRand = ''
if peer in daemon.announceCache:
data['random'] = daemon.announceCache[peer]
elif len(existingRand) > 0:
data['random'] = existingRand
else:
daemon.announceProgress[peer] = True
proof = onionrproofs.DataPOW(combinedNodes, forceDifficulty=ov.announce_pow)
del daemon.announceProgress[peer]
try:
data['random'] = base64.b64encode(proof.waitForResult()[1])
except TypeError:
# Happens when we failed to produce a proof
logger.error("Failed to produce a pow for announcing to " + peer)
announceFail = True
else:
daemon.announceCache[peer] = data['random']
if not announceFail:
logger.info('Announcing node to ' + url)
if basicrequests.do_post_request(daemon._core, url, data) == 'Success':
logger.info('Successfully introduced node to ' + peer, terminal=True)
retData = True
daemon._core.setAddressInfo(peer, 'introduced', 1)
daemon._core.setAddressInfo(peer, 'powValue', data['random'])
daemon.decrementThreadCount('announce_node')
return retData

View File

@ -1,92 +0,0 @@
'''
Onionr - Private P2P Communication
Connect a new peer to our communicator instance. Does so randomly if no peer is specified
'''
'''
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 time, sys
import onionrexceptions, logger, onionrpeers
from utils import networkmerger
from onionrutils import stringvalidators, epoch
# secrets module was added into standard lib in 3.6+
if sys.version_info[0] == 3 and sys.version_info[1] < 6:
from dependencies import secrets
elif sys.version_info[0] == 3 and sys.version_info[1] >= 6:
import secrets
def connect_new_peer_to_communicator(comm_inst, peer='', useBootstrap=False):
config = comm_inst._core.config
retData = False
tried = comm_inst.offlinePeers
if peer != '':
if stringvalidators.validate_transport(peer):
peerList = [peer]
else:
raise onionrexceptions.InvalidAddress('Will not attempt connection test to invalid address')
else:
peerList = comm_inst._core.listAdders()
mainPeerList = comm_inst._core.listAdders()
peerList = onionrpeers.getScoreSortedPeerList(comm_inst._core)
# If we don't have enough peers connected or random chance, select new peers to try
if len(peerList) < 8 or secrets.randbelow(4) == 3:
tryingNew = []
for x in comm_inst.newPeers:
if x not in peerList:
peerList.append(x)
tryingNew.append(x)
for i in tryingNew:
comm_inst.newPeers.remove(i)
if len(peerList) == 0 or useBootstrap:
# Avoid duplicating bootstrap addresses in peerList
comm_inst.addBootstrapListToPeerList(peerList)
for address in peerList:
if not config.get('tor.v3onions') and len(address) == 62:
continue
# Don't connect to our own address
if address == comm_inst._core.hsAddress:
continue
# Don't connect to invalid address or if its already been tried/connected, or if its cooled down
if len(address) == 0 or address in tried or address in comm_inst.onlinePeers or address in comm_inst.cooldownPeer:
continue
if comm_inst.shutdown:
return
# Ping a peer,
if comm_inst.peerAction(address, 'ping') == 'pong!':
time.sleep(0.1)
if address not in mainPeerList:
# Add a peer to our list if it isn't already since it successfully connected
networkmerger.mergeAdders(address, comm_inst._core)
if address not in comm_inst.onlinePeers:
logger.info('Connected to ' + address, terminal=True)
comm_inst.onlinePeers.append(address)
comm_inst.connectTimes[address] = epoch.get_epoch()
retData = address
# add peer to profile list if they're not in it
for profile in comm_inst.peerProfiles:
if profile.address == address:
break
else:
comm_inst.peerProfiles.append(onionrpeers.PeerProfiles(address, comm_inst._core))
break
else:
# Mark a peer as tried if they failed to respond to ping
tried.append(address)
logger.debug('Failed to connect to ' + address)
return retData

View File

@ -1,52 +0,0 @@
'''
Onionr - Private P2P Communication
Select a random online peer in a communicator instance and have them "cool down"
'''
'''
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/>.
'''
from onionrutils import epoch
def cooldown_peer(comm_inst):
'''Randomly add an online peer to cooldown, so we can connect a new one'''
onlinePeerAmount = len(comm_inst.onlinePeers)
minTime = 300
cooldownTime = 600
toCool = ''
tempConnectTimes = dict(comm_inst.connectTimes)
# Remove peers from cooldown that have been there long enough
tempCooldown = dict(comm_inst.cooldownPeer)
for peer in tempCooldown:
if (epoch.get_epoch() - tempCooldown[peer]) >= cooldownTime:
del comm_inst.cooldownPeer[peer]
# Cool down a peer, if we have max connections alive for long enough
if onlinePeerAmount >= comm_inst._core.config.get('peers.max_connect', 10, save = True):
finding = True
while finding:
try:
toCool = min(tempConnectTimes, key=tempConnectTimes.get)
if (epoch.get_epoch() - tempConnectTimes[toCool]) < minTime:
del tempConnectTimes[toCool]
else:
finding = False
except ValueError:
break
else:
comm_inst.removeOnlinePeer(toCool)
comm_inst.cooldownPeer[toCool] = epoch.get_epoch()
comm_inst.decrementThreadCount('cooldown_peer')

View File

@ -1,56 +0,0 @@
'''
Onionr - P2P Anonymous Storage Network
Handle daemon queue commands in the 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 logger
import onionrevents as events
from onionrutils import localcommand
def handle_daemon_commands(comm_inst):
cmd = comm_inst._core.daemonQueue()
response = ''
if cmd is not False:
events.event('daemon_command', onionr = comm_inst._core.onionrInst, data = {'cmd' : cmd})
if cmd[0] == 'shutdown':
comm_inst.shutdown = True
elif cmd[0] == 'announceNode':
if len(comm_inst.onlinePeers) > 0:
comm_inst.announce(cmd[1])
else:
logger.debug("No nodes connected. Will not introduce node.")
elif cmd[0] == 'runCheck': # deprecated
logger.debug('Status check; looks good.')
open(comm_inst._core.dataDir + '.runcheck', 'w+').close()
elif cmd[0] == 'connectedPeers':
response = '\n'.join(list(comm_inst.onlinePeers)).strip()
if response == '':
response = 'none'
elif cmd[0] == 'localCommand':
response = localcommand.local_command(comm_inst._core, cmd[1])
elif cmd[0] == 'pex':
for i in comm_inst.timers:
if i.timerFunction.__name__ == 'lookupAdders':
i.count = (i.frequency - 1)
elif cmd[0] == 'uploadBlock':
comm_inst.blocksToUpload.append(cmd[1])
if cmd[0] not in ('', None):
if response != '':
localcommand.local_command(comm_inst._core, 'queueResponseAdd/' + cmd[4], post=True, postData={'data': response})
response = ''
comm_inst.decrementThreadCount('daemonCommands')

View File

@ -1,31 +0,0 @@
'''
Onionr - Private P2P Communication
Use the communicator to insert fake mail messages
'''
'''
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 secrets
from etc import onionrvalues
def insert_deniable_block(comm_inst):
'''Insert a fake block in order to make it more difficult to track real blocks'''
fakePeer = ''
chance = 10
if secrets.randbelow(chance) == (chance - 1):
# This assumes on the libsodium primitives to have key-privacy
fakePeer = onionrvalues.DENIABLE_PEER_ADDRESS
data = secrets.token_hex(secrets.randbelow(1024) + 1)
comm_inst._core.insertBlock(data, header='pm', encryptType='asym', asymPeer=fakePeer, disableForward=True, meta={'subject': 'foo'})
comm_inst.decrementThreadCount('insert_deniable_block')

View File

@ -1,118 +0,0 @@
'''
Onionr - Private P2P Communication
Download blocks using the communicator instance
'''
'''
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 communicator, onionrexceptions
import logger, onionrpeers
from onionrutils import blockmetadata, stringvalidators, validatemetadata
def download_blocks_from_communicator(comm_inst):
assert isinstance(comm_inst, communicator.OnionrCommunicatorDaemon)
for blockHash in list(comm_inst.blockQueue):
if len(comm_inst.onlinePeers) == 0:
break
triedQueuePeers = [] # List of peers we've tried for a block
try:
blockPeers = list(comm_inst.blockQueue[blockHash])
except KeyError:
blockPeers = []
removeFromQueue = True
if comm_inst.shutdown or not comm_inst.isOnline:
# Exit loop if shutting down or offline
break
# Do not download blocks being downloaded or that are already saved (edge cases)
if blockHash in comm_inst.currentDownloading:
#logger.debug('Already downloading block %s...' % blockHash)
continue
if blockHash in comm_inst._core.getBlockList():
#logger.debug('Block %s is already saved.' % (blockHash,))
try:
del comm_inst.blockQueue[blockHash]
except KeyError:
pass
continue
if comm_inst._core._blacklist.inBlacklist(blockHash):
continue
if comm_inst._core.storage_counter.isFull():
break
comm_inst.currentDownloading.append(blockHash) # So we can avoid concurrent downloading in other threads of same block
if len(blockPeers) == 0:
peerUsed = comm_inst.pickOnlinePeer()
else:
blockPeers = comm_inst._core._crypto.randomShuffle(blockPeers)
peerUsed = blockPeers.pop(0)
if not comm_inst.shutdown and peerUsed.strip() != '':
logger.info("Attempting to download %s from %s..." % (blockHash[:12], peerUsed))
content = comm_inst.peerAction(peerUsed, 'getdata/' + blockHash) # block content from random peer (includes metadata)
if content != False and len(content) > 0:
try:
content = content.encode()
except AttributeError:
pass
realHash = comm_inst._core._crypto.sha3Hash(content)
try:
realHash = realHash.decode() # bytes on some versions for some reason
except AttributeError:
pass
if realHash == blockHash:
content = content.decode() # decode here because sha3Hash needs bytes above
metas = blockmetadata.get_block_metadata_from_data(content) # returns tuple(metadata, meta), meta is also in metadata
metadata = metas[0]
if validatemetadata.validate_metadata(comm_inst._core, metadata, metas[2]): # check if metadata is valid, and verify nonce
if comm_inst._core._crypto.verifyPow(content): # check if POW is enough/correct
logger.info('Attempting to save block %s...' % blockHash[:12])
try:
comm_inst._core.setData(content)
except onionrexceptions.DiskAllocationReached:
logger.error('Reached disk allocation allowance, cannot save block %s.' % blockHash)
removeFromQueue = False
else:
comm_inst._core.addToBlockDB(blockHash, dataSaved=True)
blockmetadata.process_block_metadata(comm_inst._core, blockHash) # caches block metadata values to block database
else:
logger.warn('POW failed for block %s.' % blockHash)
else:
if comm_inst._core._blacklist.inBlacklist(realHash):
logger.warn('Block %s is blacklisted.' % (realHash,))
else:
logger.warn('Metadata for block %s is invalid.' % blockHash)
comm_inst._core._blacklist.addToDB(blockHash)
else:
# if block didn't meet expected hash
tempHash = comm_inst._core._crypto.sha3Hash(content) # lazy hack, TODO use var
try:
tempHash = tempHash.decode()
except AttributeError:
pass
# Punish peer for sharing invalid block (not always malicious, but is bad regardless)
onionrpeers.PeerProfiles(peerUsed, comm_inst._core).addScore(-50)
if tempHash != 'ed55e34cb828232d6c14da0479709bfa10a0923dca2b380496e6b2ed4f7a0253':
# Dumb hack for 404 response from peer. Don't log it if 404 since its likely not malicious or a critical error.
logger.warn('Block hash validation failed for ' + blockHash + ' got ' + tempHash)
else:
removeFromQueue = False # Don't remove from queue if 404
if removeFromQueue:
try:
del comm_inst.blockQueue[blockHash] # remove from block queue both if success or false
logger.info('%s blocks remaining in queue' % [len(comm_inst.blockQueue)], terminal=True)
except KeyError:
pass
comm_inst.currentDownloading.remove(blockHash)
comm_inst.decrementThreadCount('getBlocks')

View File

@ -1,60 +0,0 @@
'''
Onionr - Private P2P Communication
Cleanup old Onionr blocks and forward secrecy keys using the communicator. Ran from a timer usually
'''
'''
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 sqlite3
import logger
from onionrusers import onionrusers
from onionrutils import epoch
def clean_old_blocks(comm_inst):
'''Delete old blocks if our disk allocation is full/near full, and also expired blocks'''
# Delete expired blocks
for bHash in comm_inst._core.getExpiredBlocks():
comm_inst._core._blacklist.addToDB(bHash)
comm_inst._core.removeBlock(bHash)
logger.info('Deleted block: %s' % (bHash,))
while comm_inst._core.storage_counter.isFull():
oldest = comm_inst._core.getBlockList()[0]
comm_inst._core._blacklist.addToDB(oldest)
comm_inst._core.removeBlock(oldest)
logger.info('Deleted block: %s' % (oldest,))
comm_inst.decrementThreadCount('clean_old_blocks')
def clean_keys(comm_inst):
'''Delete expired forward secrecy keys'''
conn = sqlite3.connect(comm_inst._core.peerDB, timeout=10)
c = conn.cursor()
time = epoch.get_epoch()
deleteKeys = []
for entry in c.execute("SELECT * FROM forwardKeys WHERE expire <= ?", (time,)):
logger.debug('Forward key: %s' % entry[1])
deleteKeys.append(entry[1])
for key in deleteKeys:
logger.debug('Deleting forward key %s' % key)
c.execute("DELETE from forwardKeys where forwardKey = ?", (key,))
conn.commit()
conn.close()
onionrusers.deleteExpiredKeys(comm_inst._core)
comm_inst.decrementThreadCount('clean_keys')

View File

@ -1,49 +0,0 @@
'''
Onionr - Private P2P Communication
Lookup new peer transport addresses using the 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 logger
from onionrutils import stringvalidators
def lookup_new_peer_transports_with_communicator(comm_inst):
logger.info('Looking up new addresses...')
tryAmount = 1
newPeers = []
for i in range(tryAmount):
# Download new peer address list from random online peers
if len(newPeers) > 10000:
# Don't get new peers if we have too many queued up
break
peer = comm_inst.pickOnlinePeer()
newAdders = comm_inst.peerAction(peer, action='pex')
try:
newPeers = newAdders.split(',')
except AttributeError:
pass
else:
# Validate new peers are good format and not already in queue
invalid = []
for x in newPeers:
x = x.strip()
if not stringvalidators.validate_transport(x) or x in comm_inst.newPeers or x == comm_inst._core.hsAddress:
# avoid adding if its our address
invalid.append(x)
for x in invalid:
newPeers.remove(x)
comm_inst.newPeers.extend(newPeers)
comm_inst.decrementThreadCount('lookupAdders')

View File

@ -1,88 +0,0 @@
'''
Onionr - Private P2P Communication
Lookup new blocks with the communicator using a random connected peer
'''
'''
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 logger, onionrproofs
from onionrutils import stringvalidators, epoch
def lookup_blocks_from_communicator(comm_inst):
logger.info('Looking up new blocks...')
tryAmount = 2
newBlocks = ''
existingBlocks = comm_inst._core.getBlockList()
triedPeers = [] # list of peers we've tried this time around
maxBacklog = 1560 # Max amount of *new* block hashes to have already in queue, to avoid memory exhaustion
lastLookupTime = 0 # Last time we looked up a particular peer's list
new_block_count = 0
for i in range(tryAmount):
listLookupCommand = 'getblocklist' # This is defined here to reset it each time
if len(comm_inst.blockQueue) >= maxBacklog:
break
if not comm_inst.isOnline:
break
# check if disk allocation is used
if comm_inst._core.storage_counter.isFull():
logger.debug('Not looking up new blocks due to maximum amount of allowed disk space used')
break
peer = comm_inst.pickOnlinePeer() # select random online peer
# if we've already tried all the online peers this time around, stop
if peer in triedPeers:
if len(comm_inst.onlinePeers) == len(triedPeers):
break
else:
continue
triedPeers.append(peer)
# Get the last time we looked up a peer's stamp to only fetch blocks since then.
# Saved in memory only for privacy reasons
try:
lastLookupTime = comm_inst.dbTimestamps[peer]
except KeyError:
lastLookupTime = 0
else:
listLookupCommand += '?date=%s' % (lastLookupTime,)
try:
newBlocks = comm_inst.peerAction(peer, listLookupCommand) # get list of new block hashes
except Exception as error:
logger.warn('Could not get new blocks from %s.' % peer, error = error)
newBlocks = False
else:
comm_inst.dbTimestamps[peer] = epoch.get_rounded_epoch(roundS=60)
if newBlocks != False:
# if request was a success
for i in newBlocks.split('\n'):
if stringvalidators.validate_hash(i):
# if newline seperated string is valid hash
if not i in existingBlocks:
# if block does not exist on disk and is not already in block queue
if i not in comm_inst.blockQueue:
if onionrproofs.hashMeetsDifficulty(i) and not comm_inst._core._blacklist.inBlacklist(i):
if len(comm_inst.blockQueue) <= 1000000:
comm_inst.blockQueue[i] = [peer] # add blocks to download queue
new_block_count += 1
else:
if peer not in comm_inst.blockQueue[i]:
if len(comm_inst.blockQueue[i]) < 10:
comm_inst.blockQueue[i].append(peer)
if new_block_count > 0:
block_string = ""
if new_block_count > 1:
block_string = "s"
logger.info('Discovered %s new block%s' % (new_block_count, block_string), terminal=True)
comm_inst.decrementThreadCount('lookupBlocks')
return

View File

@ -1,41 +0,0 @@
'''
Onionr - Private P2P Communication
Determine if our node is able to use Tor based on the status of a communicator instance
and the result of pinging onion http servers
'''
'''
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 logger
from utils import netutils
from onionrutils import localcommand, epoch
def net_check(comm_inst):
'''Check if we are connected to the internet or not when we can't connect to any peers'''
rec = False # for detecting if we have received incoming connections recently
c = comm_inst._core
if len(comm_inst.onlinePeers) == 0:
try:
if (epoch.get_epoch() - int(localcommand.local_command(c, '/lastconnect'))) <= 60:
comm_inst.isOnline = True
rec = True
except ValueError:
pass
if not rec and not netutils.checkNetwork(c, torPort=comm_inst.proxyPort):
if not comm_inst.shutdown:
logger.warn('Network check failed, are you connected to the Internet, and is Tor working?')
comm_inst.isOnline = False
else:
comm_inst.isOnline = True
comm_inst.decrementThreadCount('net_check')

View File

@ -1,63 +0,0 @@
'''
Onionr - Private P2P Communication
This file contains timer control for the 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 threading, onionrexceptions, logger
class OnionrCommunicatorTimers:
def __init__(self, daemonInstance, timerFunction, frequency, makeThread=True, threadAmount=1, maxThreads=5, requiresPeer=False, myArgs=[]):
self.timerFunction = timerFunction
self.frequency = frequency
self.threadAmount = threadAmount
self.makeThread = makeThread
self.requiresPeer = requiresPeer
self.daemonInstance = daemonInstance
self.maxThreads = maxThreads
self._core = self.daemonInstance._core
self.args = myArgs
self.daemonInstance.timers.append(self)
self.count = 0
def processTimer(self):
# mark how many instances of a thread we have (decremented at thread end)
try:
self.daemonInstance.threadCounts[self.timerFunction.__name__]
except KeyError:
self.daemonInstance.threadCounts[self.timerFunction.__name__] = 0
# execute thread if it is time, and we are not missing *required* online peer
if self.count == self.frequency and not self.daemonInstance.shutdown:
try:
if self.requiresPeer and len(self.daemonInstance.onlinePeers) == 0:
raise onionrexceptions.OnlinePeerNeeded
except onionrexceptions.OnlinePeerNeeded:
pass
else:
if self.makeThread:
for i in range(self.threadAmount):
if self.daemonInstance.threadCounts[self.timerFunction.__name__] >= self.maxThreads:
logger.debug('%s is currently using the maximum number of threads, not starting another.' % self.timerFunction.__name__)
else:
self.daemonInstance.threadCounts[self.timerFunction.__name__] += 1
newThread = threading.Thread(target=self.timerFunction, args=self.args, daemon=True)
newThread.start()
else:
self.timerFunction()
self.count = -1 # negative 1 because its incremented at bottom
self.count += 1

View File

@ -1,26 +0,0 @@
'''
Onionr - Private P2P Communication
Just picks a proxy to use based on a peer's address
'''
'''
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 pick_proxy(peer_address):
if peer_address.endswith('.onion'):
return 'tor'
elif peer_address.endswith('.i2p'):
return 'i2p'
raise ValueError("Peer address was not string ending with acceptable value")

View File

@ -1,41 +0,0 @@
'''
Onionr - Private P2P Communication
Creates an onionr direct connection service by scanning all connection blocks
'''
'''
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 communicator, onionrblockapi
from onionrutils import stringvalidators
def service_creator(daemon):
assert isinstance(daemon, communicator.OnionrCommunicatorDaemon)
core = daemon._core
utils = core._utils
# Find socket connection blocks
# TODO cache blocks and only look at recently received ones
con_blocks = core.getBlocksByType('con')
for b in con_blocks:
if not b in daemon.active_services:
bl = onionrblockapi.Block(b, core=core, decrypt=True)
bs = utils.bytesToStr(bl.bcontent) + '.onion'
if stringvalidators.validate_pub_key(bl.signer) and stringvalidators.validate_transport(bs):
signer = utils.bytesToStr(bl.signer)
daemon.active_services.append(b)
daemon.active_services.append(signer)
daemon.services.create_server(signer, bs)
daemon.decrementThreadCount('service_creator')

View File

@ -1,54 +0,0 @@
'''
Onionr - Private P2P Communication
Upload blocks in the upload queue to peers from the 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 logger
from communicatorutils import proxypicker
import onionrblockapi as block
from onionrutils import localcommand, stringvalidators, basicrequests
def upload_blocks_from_communicator(comm_inst):
# when inserting a block, we try to upload it to a few peers to add some deniability
triedPeers = []
finishedUploads = []
core = comm_inst._core
comm_inst.blocksToUpload = core._crypto.randomShuffle(comm_inst.blocksToUpload)
if len(comm_inst.blocksToUpload) != 0:
for bl in comm_inst.blocksToUpload:
if not stringvalidators.validate_hash(bl):
logger.warn('Requested to upload invalid block')
comm_inst.decrementThreadCount('uploadBlock')
return
for i in range(min(len(comm_inst.onlinePeers), 6)):
peer = comm_inst.pickOnlinePeer()
if peer in triedPeers:
continue
triedPeers.append(peer)
url = 'http://' + peer + '/upload'
data = {'block': block.Block(bl).getRaw()}
proxyType = proxypicker.pick_proxy(peer)
logger.info("Uploading block to " + peer, terminal=True)
if not basicrequests.do_post_request(core, url, data=data, proxyType=proxyType) == False:
localcommand.local_command(core, 'waitforshare/' + bl, post=True)
finishedUploads.append(bl)
for x in finishedUploads:
try:
comm_inst.blocksToUpload.remove(x)
except ValueError:
pass
comm_inst.decrementThreadCount('uploadBlock')

View File

@ -1,150 +0,0 @@
'''
Onionr - Private P2P Communication
This file deals with configuration management.
'''
'''
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, json, logger
# set data dir
dataDir = os.environ.get('ONIONR_HOME', os.environ.get('DATA_DIR', 'data/'))
if not dataDir.endswith('/'):
dataDir += '/'
_configfile = os.path.abspath(dataDir + 'config.json')
_config = {}
def get(key, default = None, save = False):
'''
Gets the key from configuration, or returns `default`
'''
key = str(key).split('.')
data = _config
last = key.pop()
for item in key:
if (not item in data) or (not type(data[item]) == dict):
return default
data = data[item]
if not last in data:
if save:
set(key, default, savefile = True)
return default
return data[last]
def set(key, value = None, savefile = False):
'''
Sets the key in configuration to `value`
'''
global _config
key = str(key).split('.')
data = _config
last = key.pop()
for item in key:
if (not item in data) or (not type(data[item]) == dict):
data[item] = dict()
data = data[item]
if value is None:
del data[last]
else:
data[last] = value
if savefile:
save()
def is_set(key):
key = str(key).split('.')
data = _config
last = key.pop()
for item in key:
if (not item in data) or (not type(data[item]) == dict):
return False
data = data[item]
if not last in data:
return False
return True
def check():
'''
Checks if the configuration file exists, creates it if not
'''
if not os.path.exists(os.path.dirname(get_config_file())):
os.makedirs(os.path.dirname(get_config_file()))
def save():
'''
Saves the configuration data to the configuration file
'''
check()
try:
with open(get_config_file(), 'w', encoding="utf8") as configfile:
json.dump(get_config(), configfile, indent=2)
except json.JSONDecodeError:
logger.warn('Failed to write to configuration file.')
def reload():
'''
Reloads the configuration data in memory from the file
'''
check()
try:
with open(get_config_file(), 'r', encoding="utf8") as configfile:
set_config(json.loads(configfile.read()))
except:
pass
#logger.debug('Failed to parse configuration file.')
def get_config():
'''
Gets the entire configuration as an array
'''
return _config
def set_config(config):
'''
Sets the configuration to the array in arguments
'''
global _config
_config = config
def get_config_file():
'''
Returns the absolute path to the configuration file
'''
return _configfile
def set_config_file(configfile):
'''
Sets the path to the configuration file
'''
global _configfile
_configfile = os.abs.abspath(configfile)

View File

@ -1,462 +0,0 @@
'''
Onionr - Private P2P Communication
Core Onionr library, useful for external programs. Handles peer & data processing
'''
'''
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, sys, json
import logger, netcontroller, config
from onionrblockapi import Block
import coredb
import deadsimplekv as simplekv
import onionrcrypto, onionrproofs, onionrevents as events, onionrexceptions
import onionrblacklist
from onionrusers import onionrusers
from onionrstorage import removeblock, setdata
import dbcreator, onionrstorage, serializeddata, subprocesspow
from etc import onionrvalues, powchoice
from onionrutils import localcommand, stringvalidators, bytesconverter, epoch
from onionrutils import blockmetadata
import storagecounter
class Core:
def __init__(self, torPort=0):
'''
Initialize Core Onionr library
'''
# set data dir
self.dataDir = os.environ.get('ONIONR_HOME', os.environ.get('DATA_DIR', 'data/'))
if not self.dataDir.endswith('/'):
self.dataDir += '/'
try:
self.usageFile = self.dataDir + 'disk-usage.txt'
self.config = config
self.maxBlockSize = 10000000 # max block size in bytes
self.onionrInst = None
self.queueDB = self.dataDir + 'queue.db'
self.peerDB = self.dataDir + 'peers.db'
self.blockDB = self.dataDir + 'blocks.db'
self.blockDataLocation = self.dataDir + 'blocks/'
self.blockDataDB = self.blockDataLocation + 'block-data.db'
self.publicApiHostFile = self.dataDir + 'public-host.txt'
self.privateApiHostFile = self.dataDir + 'private-host.txt'
self.addressDB = self.dataDir + 'address.db'
self.hsAddress = ''
self.i2pAddress = config.get('i2p.own_addr', None)
self.bootstrapFileLocation = 'static-data/bootstrap-nodes.txt'
self.bootstrapList = []
self.requirements = onionrvalues.OnionrValues()
self.torPort = torPort
self.dataNonceFile = self.dataDir + 'block-nonces.dat'
self.dbCreate = dbcreator.DBCreator(self)
self.forwardKeysFile = self.dataDir + 'forward-keys.db'
self.keyStore = simplekv.DeadSimpleKV(self.dataDir + 'cachedstorage.dat', refresh_seconds=5)
self.storage_counter = storagecounter.StorageCounter(self)
# Socket data, defined here because of multithreading constraints with gevent
self.killSockets = False
self.startSocket = {}
self.socketServerConnData = {}
self.socketReasons = {}
self.socketServerResponseData = {}
if not os.path.exists(self.dataDir):
os.mkdir(self.dataDir)
if not os.path.exists(self.dataDir + 'blocks/'):
os.mkdir(self.dataDir + 'blocks/')
if not os.path.exists(self.blockDB):
self.createBlockDB()
if not os.path.exists(self.forwardKeysFile):
self.dbCreate.createForwardKeyDB()
if not os.path.exists(self.peerDB):
self.createPeerDB()
if not os.path.exists(self.addressDB):
self.createAddressDB()
if os.path.exists(self.dataDir + '/hs/hostname'):
with open(self.dataDir + '/hs/hostname', 'r') as hs:
self.hsAddress = hs.read().strip()
# Load bootstrap address list
if os.path.exists(self.bootstrapFileLocation):
with open(self.bootstrapFileLocation, 'r') as bootstrap:
bootstrap = bootstrap.read()
for i in bootstrap.split('\n'):
self.bootstrapList.append(i)
else:
logger.warn('Warning: address bootstrap file not found ' + self.bootstrapFileLocation)
self.use_subprocess = powchoice.use_subprocess(self)
# Initialize the crypto object
self._crypto = onionrcrypto.OnionrCrypto(self)
self._blacklist = onionrblacklist.OnionrBlackList(self)
self.serializer = serializeddata.SerializedData(self)
except Exception as error:
logger.error('Failed to initialize core Onionr library.', error=error, terminal=True)
logger.fatal('Cannot recover from error.', terminal=True)
sys.exit(1)
return
def refreshFirstStartVars(self):
'''
Hack to refresh some vars which may not be set on first start
'''
if os.path.exists(self.dataDir + '/hs/hostname'):
with open(self.dataDir + '/hs/hostname', 'r') as hs:
self.hsAddress = hs.read().strip()
def addPeer(self, peerID, name=''):
'''
Adds a public key to the key database (misleading function name)
'''
return coredb.keydb.addkeys.add_peer(self, peerID, name)
def addAddress(self, address):
'''
Add an address to the address database (only tor currently)
'''
return coredb.keydb.addkeys.add_address(self, address)
def removeAddress(self, address):
'''
Remove an address from the address database
'''
return coredb.keydb.removekeys.remove_address(self, address)
def removeBlock(self, block):
'''
remove a block from this node (does not automatically blacklist)
**You may want blacklist.addToDB(blockHash)
'''
removeblock.remove_block(self, block)
def createAddressDB(self):
'''
Generate the address database
'''
self.dbCreate.createAddressDB()
def createPeerDB(self):
'''
Generate the peer sqlite3 database and populate it with the peers table.
'''
self.dbCreate.createPeerDB()
def createBlockDB(self):
'''
Create a database for blocks
'''
self.dbCreate.createBlockDB()
def addToBlockDB(self, newHash, selfInsert=False, dataSaved=False):
'''
Add a hash value to the block db
Should be in hex format!
'''
coredb.blockmetadb.add.add_to_block_DB(self, newHash, selfInsert, dataSaved)
def setData(self, data):
'''
Set the data assciated with a hash
'''
return onionrstorage.setdata.set_data(self, data)
def getData(self, hash):
'''
Simply return the data associated to a hash
'''
return onionrstorage.getData(self, hash)
def daemonQueue(self):
'''
Gives commands to the communication proccess/daemon by reading an sqlite3 database
This function intended to be used by the client. Queue to exchange data between "client" and server.
'''
return coredb.daemonqueue.daemon_queue(self)
def daemonQueueAdd(self, command, data='', responseID=''):
'''
Add a command to the daemon queue, used by the communication daemon (communicator.py)
'''
return coredb.daemonqueue.daemon_queue_add(self, command, data, responseID)
def daemonQueueGetResponse(self, responseID=''):
'''
Get a response sent by communicator to the API, by requesting to the API
'''
return coredb.daemonqueue.daemon_queue_get_response(self, responseID)
def clearDaemonQueue(self):
'''
Clear the daemon queue (somewhat dangerous)
'''
return coredb.daemonqueue.clear_daemon_queue(self)
def listAdders(self, randomOrder=True, i2p=True, recent=0):
'''
Return a list of addresses
'''
return coredb.keydb.listkeys.list_adders(self, randomOrder, i2p, recent)
def listPeers(self, randomOrder=True, getPow=False, trust=0):
'''
Return a list of public keys (misleading function name)
randomOrder determines if the list should be in a random order
trust sets the minimum trust to list
'''
return coredb.keydb.listkeys.list_peers(self, randomOrder, getPow, trust)
def getPeerInfo(self, peer, info):
'''
Get info about a peer from their database entry
id text 0
name text, 1
adders text, 2
dateSeen not null, 3
trust int 4
hashID text 5
'''
return coredb.keydb.userinfo.get_user_info(self, peer, info)
def setPeerInfo(self, peer, key, data):
'''
Update a peer for a key
'''
return coredb.keydb.userinfo.set_peer_info(self, peer, key, data)
def getAddressInfo(self, address, info):
'''
Get info about an address from its database entry
address text, 0
type int, 1
knownPeer text, 2
speed int, 3
success int, 4
powValue 5
failure int 6
lastConnect 7
trust 8
introduced 9
'''
return coredb.keydb.transportinfo.get_address_info(self, address, info)
def setAddressInfo(self, address, key, data):
'''
Update an address for a key
'''
return coredb.keydb.transportinfo.set_address_info(self, address, key, data)
def getBlockList(self, dateRec = None, unsaved = False):
'''
Get list of our blocks
'''
return coredb.blockmetadb.get_block_list(self, dateRec, unsaved)
def getBlockDate(self, blockHash):
'''
Returns the date a block was received
'''
return coredb.blockmetadb.get_block_date(self, blockHash)
def getBlocksByType(self, blockType, orderDate=True):
'''
Returns a list of blocks by the type
'''
return coredb.blockmetadb.get_blocks_by_type(self, blockType, orderDate)
def getExpiredBlocks(self):
'''Returns a list of expired blocks'''
return coredb.blockmetadb.expiredblocks.get_expired_blocks(self)
def updateBlockInfo(self, hash, key, data):
'''
sets info associated with a block
hash - the hash of a block
dateReceived - the date the block was recieved, not necessarily when it was created
decrypted - if we can successfully decrypt the block (does not describe its current state)
dataType - data type of the block
dataFound - if the data has been found for the block
dataSaved - if the data has been saved for the block
sig - optional signature by the author (not optional if author is specified)
author - multi-round partial sha3-256 hash of authors public key
dateClaimed - timestamp claimed inside the block, only as trustworthy as the block author is
expire - expire date for a block
'''
return coredb.blockmetadb.updateblockinfo.update_block_info(self, hash, key, data)
def insertBlock(self, data, header='txt', sign=False, encryptType='', symKey='', asymPeer='', meta = {}, expire=None, disableForward=False):
'''
Inserts a block into the network
encryptType must be specified to encrypt a block
'''
allocationReachedMessage = 'Cannot insert block, disk allocation reached.'
if self.storage_counter.isFull():
logger.error(allocationReachedMessage)
return False
retData = False
if type(data) is None:
raise ValueError('Data cannot be none')
createTime = epoch.get_epoch()
dataNonce = bytesconverter.bytes_to_str(self._crypto.sha3Hash(data))
try:
with open(self.dataNonceFile, 'r') as nonces:
if dataNonce in nonces:
return retData
except FileNotFoundError:
pass
# record nonce
with open(self.dataNonceFile, 'a') as nonceFile:
nonceFile.write(dataNonce + '\n')
if type(data) is bytes:
data = data.decode()
data = str(data)
plaintext = data
plaintextMeta = {}
plaintextPeer = asymPeer
retData = ''
signature = ''
signer = ''
metadata = {}
# metadata is full block metadata, meta is internal, user specified metadata
# only use header if not set in provided meta
meta['type'] = str(header)
if encryptType in ('asym', 'sym', ''):
metadata['encryptType'] = encryptType
else:
raise onionrexceptions.InvalidMetadata('encryptType must be asym or sym, or blank')
try:
data = data.encode()
except AttributeError:
pass
if encryptType == 'asym':
meta['rply'] = createTime # Duplicate the time in encrypted messages to prevent replays
if not disableForward and sign and asymPeer != self._crypto.pubKey:
try:
forwardEncrypted = onionrusers.OnionrUser(self, asymPeer).forwardEncrypt(data)
data = forwardEncrypted[0]
meta['forwardEnc'] = True
expire = forwardEncrypted[2] # Expire time of key. no sense keeping block after that
except onionrexceptions.InvalidPubkey:
pass
#onionrusers.OnionrUser(self, asymPeer).generateForwardKey()
fsKey = onionrusers.OnionrUser(self, asymPeer).generateForwardKey()
#fsKey = onionrusers.OnionrUser(self, asymPeer).getGeneratedForwardKeys().reverse()
meta['newFSKey'] = fsKey
jsonMeta = json.dumps(meta)
plaintextMeta = jsonMeta
if sign:
signature = self._crypto.edSign(jsonMeta.encode() + data, key=self._crypto.privKey, encodeResult=True)
signer = self._crypto.pubKey
if len(jsonMeta) > 1000:
raise onionrexceptions.InvalidMetadata('meta in json encoded form must not exceed 1000 bytes')
user = onionrusers.OnionrUser(self, symKey)
# encrypt block metadata/sig/content
if encryptType == 'sym':
if len(symKey) < self.requirements.passwordLength:
raise onionrexceptions.SecurityError('Weak encryption key')
jsonMeta = self._crypto.symmetricEncrypt(jsonMeta, key=symKey, returnEncoded=True).decode()
data = self._crypto.symmetricEncrypt(data, key=symKey, returnEncoded=True).decode()
signature = self._crypto.symmetricEncrypt(signature, key=symKey, returnEncoded=True).decode()
signer = self._crypto.symmetricEncrypt(signer, key=symKey, returnEncoded=True).decode()
elif encryptType == 'asym':
if stringvalidators.validate_pub_key(asymPeer):
# Encrypt block data with forward secrecy key first, but not meta
jsonMeta = json.dumps(meta)
jsonMeta = self._crypto.pubKeyEncrypt(jsonMeta, asymPeer, encodedData=True).decode()
data = self._crypto.pubKeyEncrypt(data, asymPeer, encodedData=True).decode()
signature = self._crypto.pubKeyEncrypt(signature, asymPeer, encodedData=True).decode()
signer = self._crypto.pubKeyEncrypt(signer, asymPeer, encodedData=True).decode()
try:
onionrusers.OnionrUser(self, asymPeer, saveUser=True)
except ValueError:
# if peer is already known
pass
else:
raise onionrexceptions.InvalidPubkey(asymPeer + ' is not a valid base32 encoded ed25519 key')
# compile metadata
metadata['meta'] = jsonMeta
metadata['sig'] = signature
metadata['signer'] = signer
metadata['time'] = createTime
# ensure expire is integer and of sane length
if type(expire) is not type(None):
assert len(str(int(expire))) < 14
metadata['expire'] = expire
# send block data (and metadata) to POW module to get tokenized block data
if self.use_subprocess:
payload = subprocesspow.SubprocessPOW(data, metadata, self).start()
else:
payload = onionrproofs.POW(metadata, data).waitForResult()
if payload != False:
try:
retData = self.setData(payload)
except onionrexceptions.DiskAllocationReached:
logger.error(allocationReachedMessage)
retData = False
else:
# Tell the api server through localCommand to wait for the daemon to upload this block to make statistical analysis more difficult
if localcommand.local_command(self, '/ping', maxWait=10) == 'pong!':
if self.config.get('general.security_level', 1) == 0:
localcommand.local_command(self, '/waitforshare/' + retData, post=True, maxWait=5)
self.daemonQueueAdd('uploadBlock', retData)
else:
pass
self.addToBlockDB(retData, selfInsert=True, dataSaved=True)
blockmetadata.process_block_metadata(self, retData)
if retData != False:
if plaintextPeer == onionrvalues.DENIABLE_PEER_ADDRESS:
events.event('insertdeniable', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, onionr = self.onionrInst, threaded = True)
else:
events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, onionr = self.onionrInst, threaded = True)
return retData
def introduceNode(self):
'''
Introduces our node into the network by telling X many nodes our HS address
'''
if localcommand.local_command(self, '/ping', maxWait=10) == 'pong!':
self.daemonQueueAdd('announceNode')
logger.info('Introduction command will be processed.', terminal=True)
else:
logger.warn('No running node detected. Cannot introduce.', terminal=True)

View File

@ -1 +0,0 @@
from . import keydb, blockmetadb, daemonqueue

View File

@ -1,77 +0,0 @@
'''
Onionr - Private P2P Communication
This module works with information relating to blocks stored on the node
'''
'''
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 sqlite3
from . import expiredblocks, updateblockinfo, add
def get_block_list(core_inst, dateRec = None, unsaved = False):
'''
Get list of our blocks
'''
if dateRec == None:
dateRec = 0
conn = sqlite3.connect(core_inst.blockDB, timeout=30)
c = conn.cursor()
execute = 'SELECT hash FROM hashes WHERE dateReceived >= ? ORDER BY dateReceived ASC;'
args = (dateRec,)
rows = list()
for row in c.execute(execute, args):
for i in row:
rows.append(i)
conn.close()
return rows
def get_block_date(core_inst, blockHash):
'''
Returns the date a block was received
'''
conn = sqlite3.connect(core_inst.blockDB, timeout=30)
c = conn.cursor()
execute = 'SELECT dateReceived FROM hashes WHERE hash=?;'
args = (blockHash,)
for row in c.execute(execute, args):
for i in row:
return int(i)
conn.close()
return None
def get_blocks_by_type(core_inst, blockType, orderDate=True):
'''
Returns a list of blocks by the type
'''
conn = sqlite3.connect(core_inst.blockDB, timeout=30)
c = conn.cursor()
if orderDate:
execute = 'SELECT hash FROM hashes WHERE dataType=? ORDER BY dateReceived;'
else:
execute = 'SELECT hash FROM hashes WHERE dataType=?;'
args = (blockType,)
rows = list()
for row in c.execute(execute, args):
for i in row:
rows.append(i)
conn.close()
return rows

View File

@ -1,43 +0,0 @@
'''
Onionr - Private P2P Communication
Add an entry to the block metadata database
'''
'''
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, sqlite3
from onionrutils import epoch, blockmetadata
def add_to_block_DB(core_inst, newHash, selfInsert=False, dataSaved=False):
'''
Add a hash value to the block db
Should be in hex format!
'''
if not os.path.exists(core_inst.blockDB):
raise Exception('Block db does not exist')
if blockmetadata.has_block(core_inst, newHash):
return
conn = sqlite3.connect(core_inst.blockDB, timeout=30)
c = conn.cursor()
currentTime = epoch.get_epoch() + core_inst._crypto.secrets.randbelow(301)
if selfInsert or dataSaved:
selfInsert = 1
else:
selfInsert = 0
data = (newHash, currentTime, '', selfInsert)
c.execute('INSERT INTO hashes (hash, dateReceived, dataType, dataSaved) VALUES(?, ?, ?, ?);', data)
conn.commit()
conn.close()

View File

@ -1,35 +0,0 @@
'''
Onionr - Private P2P Communication
Get a list of expired blocks still stored
'''
'''
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 sqlite3
from onionrutils import epoch
def get_expired_blocks(core_inst):
'''Returns a list of expired blocks'''
conn = sqlite3.connect(core_inst.blockDB, timeout=30)
c = conn.cursor()
date = int(epoch.get_epoch())
execute = 'SELECT hash FROM hashes WHERE expire <= %s ORDER BY dateReceived;' % (date,)
rows = list()
for row in c.execute(execute):
for i in row:
rows.append(i)
conn.close()
return rows

View File

@ -1,33 +0,0 @@
'''
Onionr - Private P2P Communication
Update block information in the metadata database by a field name
'''
'''
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 sqlite3
def update_block_info(core_inst, hash, key, data):
if key not in ('dateReceived', 'decrypted', 'dataType', 'dataFound', 'dataSaved', 'sig', 'author', 'dateClaimed', 'expire'):
return False
conn = sqlite3.connect(core_inst.blockDB, timeout=30)
c = conn.cursor()
args = (data, hash)
c.execute("UPDATE hashes SET " + key + " = ? where hash = ?;", args)
conn.commit()
conn.close()
return True

View File

@ -1,97 +0,0 @@
'''
Onionr - Private P2P Communication
Write and read the daemon queue, which is how messages are passed into the onionr daemon in a more
direct way than the http api
'''
'''
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 sqlite3, os
import onionrevents as events
from onionrutils import localcommand, epoch
def daemon_queue(core_inst):
'''
Gives commands to the communication proccess/daemon by reading an sqlite3 database
This function intended to be used by the client. Queue to exchange data between "client" and server.
'''
retData = False
if not os.path.exists(core_inst.queueDB):
core_inst.dbCreate.createDaemonDB()
else:
conn = sqlite3.connect(core_inst.queueDB, timeout=30)
c = conn.cursor()
try:
for row in c.execute('SELECT command, data, date, min(ID), responseID FROM commands group by id'):
retData = row
break
except sqlite3.OperationalError:
core_inst.dbCreate.createDaemonDB()
else:
if retData != False:
c.execute('DELETE FROM commands WHERE id=?;', (retData[3],))
conn.commit()
conn.close()
events.event('queue_pop', data = {'data': retData}, onionr = core_inst.onionrInst)
return retData
def daemon_queue_add(core_inst, command, data='', responseID=''):
'''
Add a command to the daemon queue, used by the communication daemon (communicator.py)
'''
retData = True
date = epoch.get_epoch()
conn = sqlite3.connect(core_inst.queueDB, timeout=30)
c = conn.cursor()
t = (command, data, date, responseID)
try:
c.execute('INSERT INTO commands (command, data, date, responseID) VALUES(?, ?, ?, ?)', t)
conn.commit()
except sqlite3.OperationalError:
retData = False
core_inst.daemonQueue()
events.event('queue_push', data = {'command': command, 'data': data}, onionr = core_inst.onionrInst)
conn.close()
return retData
def daemon_queue_get_response(core_inst, responseID=''):
'''
Get a response sent by communicator to the API, by requesting to the API
'''
assert len(responseID) > 0
resp = localcommand.local_command(core_inst, 'queueResponse/' + responseID)
return resp
def clear_daemon_queue(core_inst):
'''
Clear the daemon queue (somewhat dangerous)
'''
conn = sqlite3.connect(core_inst.queueDB, timeout=30)
c = conn.cursor()
try:
c.execute('DELETE FROM commands;')
conn.commit()
except:
pass
conn.close()
events.event('queue_clear', onionr = core_inst.onionrInst)

View File

@ -1 +0,0 @@
from . import addkeys, listkeys, removekeys, userinfo, transportinfo

View File

@ -1,91 +0,0 @@
'''
Onionr - Private P2P Communication
add user keys or transport addresses
'''
'''
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 sqlite3
import onionrevents as events
from onionrutils import stringvalidators
def add_peer(core_inst, peerID, name=''):
'''
Adds a public key to the key database (misleading function name)
'''
if peerID in core_inst.listPeers() or peerID == core_inst._crypto.pubKey:
raise ValueError("specified id is already known")
# This function simply adds a peer to the DB
if not stringvalidators.validate_pub_key(peerID):
return False
events.event('pubkey_add', data = {'key': peerID}, onionr = core_inst.onionrInst)
conn = sqlite3.connect(core_inst.peerDB, timeout=30)
hashID = core_inst._crypto.pubKeyHashID(peerID)
c = conn.cursor()
t = (peerID, name, 'unknown', hashID, 0)
for i in c.execute("SELECT * FROM peers WHERE id = ?;", (peerID,)):
try:
if i[0] == peerID:
conn.close()
return False
except ValueError:
pass
except IndexError:
pass
c.execute('INSERT INTO peers (id, name, dateSeen, hashID, trust) VALUES(?, ?, ?, ?, ?);', t)
conn.commit()
conn.close()
return True
def add_address(core_inst, address):
'''
Add an address to the address database (only tor currently)
'''
if type(address) is None or len(address) == 0:
return False
if stringvalidators.validate_transport(address):
if address == core_inst.config.get('i2p.ownAddr', None) or address == core_inst.hsAddress:
return False
conn = sqlite3.connect(core_inst.addressDB, timeout=30)
c = conn.cursor()
# check if address is in database
# this is safe to do because the address is validated above, but we strip some chars here too just in case
address = address.replace('\'', '').replace(';', '').replace('"', '').replace('\\', '')
for i in c.execute("SELECT * FROM adders WHERE address = ?;", (address,)):
try:
if i[0] == address:
conn.close()
return False
except ValueError:
pass
except IndexError:
pass
t = (address, 1)
c.execute('INSERT INTO adders (address, type) VALUES(?, ?);', t)
conn.commit()
conn.close()
events.event('address_add', data = {'address': address}, onionr = core_inst.onionrInst)
return True
else:
return False

View File

@ -1,83 +0,0 @@
'''
Onionr - Private P2P Communication
get lists for user keys or transport addresses
'''
'''
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 sqlite3
import logger
from onionrutils import epoch
def list_peers(core_inst, randomOrder=True, getPow=False, trust=0):
'''
Return a list of public keys (misleading function name)
randomOrder determines if the list should be in a random order
trust sets the minimum trust to list
'''
conn = sqlite3.connect(core_inst.peerDB, timeout=30)
c = conn.cursor()
payload = ''
if trust not in (0, 1, 2):
logger.error('Tried to select invalid trust.')
return
if randomOrder:
payload = 'SELECT * FROM peers WHERE trust >= ? ORDER BY RANDOM();'
else:
payload = 'SELECT * FROM peers WHERE trust >= ?;'
peerList = []
for i in c.execute(payload, (trust,)):
try:
if len(i[0]) != 0:
if getPow:
peerList.append(i[0] + '-' + i[1])
else:
peerList.append(i[0])
except TypeError:
pass
conn.close()
return peerList
def list_adders(core_inst, randomOrder=True, i2p=True, recent=0):
'''
Return a list of transport addresses
'''
conn = sqlite3.connect(core_inst.addressDB, timeout=30)
c = conn.cursor()
if randomOrder:
addresses = c.execute('SELECT * FROM adders ORDER BY RANDOM();')
else:
addresses = c.execute('SELECT * FROM adders;')
addressList = []
for i in addresses:
if len(i[0].strip()) == 0:
continue
addressList.append(i[0])
conn.close()
testList = list(addressList) # create new list to iterate
for address in testList:
try:
if recent > 0 and (epoch.get_epoch() - core_inst.getAddressInfo(address, 'lastConnect')) > recent:
raise TypeError # If there is no last-connected date or it was too long ago, don't add peer to list if recent is not 0
except TypeError:
addressList.remove(address)
return addressList

View File

@ -1,40 +0,0 @@
'''
Onionr - Private P2P Communication
Remove a transport address but don't ban them
'''
'''
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 sqlite3
import onionrevents as events
from onionrutils import stringvalidators
def remove_address(core_inst, address):
'''
Remove an address from the address database
'''
if stringvalidators.validate_transport(address):
conn = sqlite3.connect(core_inst.addressDB, timeout=30)
c = conn.cursor()
t = (address,)
c.execute('Delete from adders where address=?;', t)
conn.commit()
conn.close()
events.event('address_remove', data = {'address': address}, onionr = core_inst.onionrInst)
return True
else:
return False

View File

@ -1,72 +0,0 @@
'''
Onionr - Private P2P Communication
get or set transport address meta information
'''
'''
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 sqlite3
def get_address_info(core_inst, address, info):
'''
Get info about an address from its database entry
address text, 0
type int, 1
knownPeer text, 2
speed int, 3
success int, 4
powValue 5
failure int 6
lastConnect 7
trust 8
introduced 9
'''
conn = sqlite3.connect(core_inst.addressDB, timeout=30)
c = conn.cursor()
command = (address,)
infoNumbers = {'address': 0, 'type': 1, 'knownPeer': 2, 'speed': 3, 'success': 4, 'powValue': 5, 'failure': 6, 'lastConnect': 7, 'trust': 8, 'introduced': 9}
info = infoNumbers[info]
iterCount = 0
retVal = ''
for row in c.execute('SELECT * FROM adders WHERE address=?;', command):
for i in row:
if iterCount == info:
retVal = i
break
else:
iterCount += 1
conn.close()
return retVal
def set_address_info(core_inst, address, key, data):
'''
Update an address for a key
'''
conn = sqlite3.connect(core_inst.addressDB, timeout=30)
c = conn.cursor()
command = (data, address)
if key not in ('address', 'type', 'knownPeer', 'speed', 'success', 'failure', 'powValue', 'lastConnect', 'lastConnectAttempt', 'trust', 'introduced'):
raise Exception("Got invalid database key when setting address info")
else:
c.execute('UPDATE adders SET ' + key + ' = ? WHERE address=?', command)
conn.commit()
conn.close()

View File

@ -1,69 +0,0 @@
'''
Onionr - Private P2P Communication
get or set information about a user id
'''
'''
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 sqlite3
def get_user_info(core_inst, peer, info):
'''
Get info about a peer from their database entry
id text 0
name text, 1
adders text, 2
dateSeen not null, 3
trust int 4
hashID text 5
'''
conn = sqlite3.connect(core_inst.peerDB, timeout=30)
c = conn.cursor()
command = (peer,)
infoNumbers = {'id': 0, 'name': 1, 'adders': 2, 'dateSeen': 3, 'trust': 4, 'hashID': 5}
info = infoNumbers[info]
iterCount = 0
retVal = ''
for row in c.execute('SELECT * FROM peers WHERE id=?;', command):
for i in row:
if iterCount == info:
retVal = i
break
else:
iterCount += 1
conn.close()
return retVal
def set_peer_info(core_inst, peer, key, data):
'''
Update a peer for a key
'''
conn = sqlite3.connect(core_inst.peerDB, timeout=30)
c = conn.cursor()
command = (data, peer)
# TODO: validate key on whitelist
if key not in ('id', 'name', 'pubkey', 'forwardKey', 'dateSeen', 'trust'):
raise Exception("Got invalid database key when setting peer info")
c.execute('UPDATE peers SET ' + key + ' = ? WHERE id=?', command)
conn.commit()
conn.close()

View File

@ -1,156 +0,0 @@
'''
Onionr - Private P2P Communication
DBCreator, creates sqlite3 databases used by Onionr
'''
'''
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 sqlite3, os
class DBCreator:
def __init__(self, coreInst):
self.core = coreInst
def createAddressDB(self):
'''
Generate the address database
types:
1: I2P b32 address
2: Tor v2 (like facebookcorewwwi.onion)
3: Tor v3
'''
conn = sqlite3.connect(self.core.addressDB)
c = conn.cursor()
c.execute('''CREATE TABLE adders(
address text,
type int,
knownPeer text,
speed int,
success int,
powValue text,
failure int,
lastConnect int,
lastConnectAttempt int,
trust int,
introduced int
);
''')
conn.commit()
conn.close()
def createPeerDB(self):
'''
Generate the peer sqlite3 database and populate it with the peers table.
'''
# generate the peer database
conn = sqlite3.connect(self.core.peerDB)
c = conn.cursor()
c.execute('''CREATE TABLE peers(
ID text not null,
name text,
adders text,
dateSeen not null,
trust int,
hashID text);
''')
c.execute('''CREATE TABLE forwardKeys(
peerKey text not null,
forwardKey text not null,
date int not null,
expire int not null
);''')
conn.commit()
conn.close()
return
def createBlockDB(self):
'''
Create a database for blocks
hash - the hash of a block
dateReceived - the date the block was recieved, not necessarily when it was created
decrypted - if we can successfully decrypt the block (does not describe its current state)
dataType - data type of the block
dataFound - if the data has been found for the block
dataSaved - if the data has been saved for the block
sig - optional signature by the author (not optional if author is specified)
author - multi-round partial sha3-256 hash of authors public key
dateClaimed - timestamp claimed inside the block, only as trustworthy as the block author is
expire int - block expire date in epoch
'''
if os.path.exists(self.core.blockDB):
raise FileExistsError("Block database already exists")
conn = sqlite3.connect(self.core.blockDB)
c = conn.cursor()
c.execute('''CREATE TABLE hashes(
hash text not null,
dateReceived int,
decrypted int,
dataType text,
dataFound int,
dataSaved int,
sig text,
author text,
dateClaimed int,
expire int
);
''')
conn.commit()
conn.close()
return
def createBlockDataDB(self):
if os.path.exists(self.core.blockDataDB):
raise FileExistsError("Block data database already exists")
conn = sqlite3.connect(self.core.blockDataDB)
c = conn.cursor()
c.execute('''CREATE TABLE blockData(
hash text not null,
data blob not null
);
''')
conn.commit()
conn.close()
def createForwardKeyDB(self):
'''
Create the forward secrecy key db (*for *OUR* keys*)
'''
if os.path.exists(self.core.forwardKeysFile):
raise FileExistsError("Block database already exists")
conn = sqlite3.connect(self.core.forwardKeysFile)
c = conn.cursor()
c.execute('''CREATE TABLE myForwardKeys(
peer text not null,
publickey text not null,
privatekey text not null,
date int not null,
expire int not null
);
''')
conn.commit()
conn.close()
return
def createDaemonDB(self):
'''
Create the daemon queue database
'''
conn = sqlite3.connect(self.core.queueDB, timeout=10)
c = conn.cursor()
# Create table
c.execute('''CREATE TABLE commands (id integer primary key autoincrement, command text, data text, date text, responseID text)''')
conn.commit()
conn.close()

View File

@ -1,11 +0,0 @@
# etc
Files that don't really fit anywhere else, but aren't used very frequently.
## Files
humanreadabletime.py: take integer seconds and return a human readable time string
pgpwords.py: represent data using the pgp word list: https://en.wikipedia.org/wiki/PGP_word_list
onionrvalues.py: spec values for onionr blocks and other things

Some files were not shown because too many files have changed in this diff Show More