2018-06-19 07:01:59 +00:00
'''
2019-06-12 20:12:56 +00:00
Onionr - Private P2P Communication
2018-06-19 07:01:59 +00:00
This file defines values and requirements 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 / > .
'''
2019-07-30 18:13:10 +00:00
import platform
2019-06-13 06:58:17 +00:00
DENIABLE_PEER_ADDRESS = " OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA==== "
2019-07-27 20:29:15 +00:00
PASSWORD_LENGTH = 25
2019-07-30 05:19:22 +00:00
ONIONR_TAGLINE = ' Private P2P Communication - GPLv3 - https://Onionr.net '
ONIONR_VERSION = ' 0.0.0 ' # for debugging and stuff
ONIONR_VERSION_TUPLE = tuple ( ONIONR_VERSION . split ( ' . ' ) ) # (MAJOR, MINOR, VERSION)
API_VERSION = ' 0 ' # increments of 1; only change when something fundamental about how the API works changes. This way other nodes know how to communicate without learning too much information about you.
MIN_PY_VERSION = 6
2019-07-30 18:13:10 +00:00
platform = platform . system ( )
if platform == ' Windows ' :
SCRIPT_NAME = ' run-windows.bat '
else :
SCRIPT_NAME = ' onionr.sh '
2018-06-19 07:01:59 +00:00
class OnionrValues :
def __init__ ( self ) :
self . passwordLength = 20
2019-04-04 21:56:18 +00:00
self . blockMetadataLengths = { ' meta ' : 1000 , ' sig ' : 200 , ' signer ' : 200 , ' time ' : 10 , ' pow ' : 1000 , ' encryptType ' : 4 , ' expire ' : 14 } #TODO properly refine values to minimum needed
2019-05-07 17:56:20 +00:00
self . default_expire = 2592000
self . announce_pow = 5