2016-06-30 10:11:33 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2022-09-23 00:54:12 +02:00
|
|
|
"""Common variables and structures, referred in different threads"""
|
2016-06-30 10:11:33 +02:00
|
|
|
import logging
|
|
|
|
import os
|
|
|
|
import queue
|
|
|
|
import threading
|
|
|
|
|
|
|
|
listening_port = 8444
|
2017-07-01 15:05:06 +02:00
|
|
|
listening_host = ''
|
2016-07-09 19:37:54 +02:00
|
|
|
send_outgoing_connections = True
|
2017-01-14 13:42:15 +01:00
|
|
|
listen_for_connections = True
|
2016-06-30 10:11:33 +02:00
|
|
|
data_directory = 'minode_data/'
|
2016-07-19 11:53:24 +02:00
|
|
|
source_directory = os.path.dirname(os.path.realpath(__file__))
|
2017-01-14 13:42:15 +01:00
|
|
|
trusted_peer = None
|
2017-07-01 15:05:06 +02:00
|
|
|
ip_enabled = True
|
2016-06-30 10:11:33 +02:00
|
|
|
|
2017-02-13 19:02:36 +01:00
|
|
|
log_level = logging.INFO
|
2016-06-30 10:11:33 +02:00
|
|
|
|
|
|
|
magic_bytes = b'\xe9\xbe\xb4\xd9'
|
|
|
|
protocol_version = 3
|
2016-07-19 11:53:24 +02:00
|
|
|
services = 3 # NODE_NETWORK, NODE_SSL
|
2016-06-30 10:11:33 +02:00
|
|
|
stream = 1
|
|
|
|
nonce = os.urandom(8)
|
2024-05-22 21:20:50 +02:00
|
|
|
user_agent = b'/MiNode:0.3.3/'
|
2016-06-30 10:11:33 +02:00
|
|
|
timeout = 600
|
|
|
|
header_length = 24
|
2017-07-01 15:05:06 +02:00
|
|
|
i2p_dest_obj_type = 0x493250
|
2017-07-03 09:23:02 +02:00
|
|
|
i2p_dest_obj_version = 1
|
2016-06-30 10:11:33 +02:00
|
|
|
|
2017-06-09 20:41:33 +02:00
|
|
|
i2p_enabled = False
|
2017-07-20 16:12:32 +02:00
|
|
|
i2p_transient = False
|
2017-06-09 20:41:33 +02:00
|
|
|
i2p_sam_host = '127.0.0.1'
|
|
|
|
i2p_sam_port = 7656
|
2017-07-01 16:01:48 +02:00
|
|
|
i2p_tunnel_length = 2
|
2017-06-09 20:41:33 +02:00
|
|
|
i2p_session_nick = b''
|
|
|
|
i2p_dest_pub = b''
|
|
|
|
|
2016-06-30 10:11:33 +02:00
|
|
|
nonce_trials_per_byte = 1000
|
|
|
|
payload_length_extra_bytes = 1000
|
|
|
|
|
|
|
|
shutting_down = False
|
|
|
|
|
|
|
|
vector_advertise_queue = queue.Queue()
|
|
|
|
address_advertise_queue = queue.Queue()
|
|
|
|
|
|
|
|
connections = set()
|
|
|
|
connections_lock = threading.Lock()
|
|
|
|
|
2017-07-01 15:05:06 +02:00
|
|
|
i2p_dialers = set()
|
|
|
|
|
2016-06-30 10:11:33 +02:00
|
|
|
hosts = set()
|
|
|
|
|
|
|
|
core_nodes = set()
|
|
|
|
|
|
|
|
node_pool = set()
|
|
|
|
unchecked_node_pool = set()
|
|
|
|
|
2017-07-01 15:05:06 +02:00
|
|
|
i2p_core_nodes = set()
|
|
|
|
i2p_node_pool = set()
|
|
|
|
i2p_unchecked_node_pool = set()
|
|
|
|
|
2016-06-30 10:11:33 +02:00
|
|
|
outgoing_connections = 8
|
2017-05-25 12:03:51 +02:00
|
|
|
connection_limit = 250
|
2016-06-30 10:11:33 +02:00
|
|
|
|
|
|
|
objects = {}
|