I have always been interested in P2P Networks and Clients and would like to know what features people of this forum would put in them. Here are my ideas:
Connection:LAN Peer Discovery (Broadcast?)
Bootstrap Connections : Automatic startup nodes that will send the new node about 10 nodes currently connected to the network
Discovered Peers : Peers discovered while using the program are kept in a file, and are queried once joining the network again (this does not include startup nodes)
Brute Force Peer Discovery : Sending handshakes to each IP address in order (a little archaic imo, but necessary if the rest fail)
Handshake:Obfuscate data in HTML Packets (looks like a regular HTTP packet)
Diffie Hellman Key ExchangeTransfer the Diffie Hellman elected numbers within HTTP packets (obfuscation)
Connection agreement has been reached once each node sends the other node an Encrypted HELO message (that gets successfully decrypted by the other node)
All Nodes will have this handshake regime
Packets:Each packet will be encrypted with the key provided by the Diffie Hellman Key Exchange Handshake
Algorithm has yet to be decided, but it has to be powerful enough to prevent decryption by brute force
Each packet will also be compressed with zlib (or any other powerful cross-compatible encryption library)
Will operate on the TCP/IPv6 Protocol
Files will be split into 256kb chunks, with about 20 packets per chunk (feasible?)
Types of Nodes:All nodes pass queries through them to other nodes
Client Node - These nodes can upload and download and query
Seeding Node - Nodes that exist solely to upload a file
Reflection Node - Nodes that exist to reflect data chunks other nodes contain (decided based upon rariety or demand)
Proxy Node - Nodes that exist solely to act as proxies for other nodes
Tracker Node - These nodes track a certain hash of data (or merkle hash tree's) and keep a list of nodes that contain that data, then pass this list off to any nodes wanting that hash of data
Farm Node - Nodes that keep lists of Filenames and Hash's of other nodes data and act as data farms
HUB Node - Nodes that keep a list of other nodes within its private HUB (passworded)
Demand/Rareity HandlingRare files will be determined by a node performing its own network search for the hash of another nodes data (when requested for reflection), no reflector node can hold more than 1 chunk of another nodes data
Demand will be determined by how many searches have been performed from that data, once the data has been reflected demand will be determined by the amount of demand for the chunk the reflector node is holding
Download/Upload EfficiencyDownload/Uploads will firstly be favoured by nodes within the same LAN as the requesting node
Download/Uploads will secondly be favoured by nodes within the same ISP (WHOIS) as the requesting node
Download/Uploads will thirdly be favoured by nodes who are closer geographically to the requesting node
Uploads will be favoured on the node depending on rare/demanding the data is
AnonymityThe Encryption provided by the Diffie Hellman Key Exchange should be enough to prevent any ISP shaping and sniffing
Clients should have the option to route through TOR/I2P/A third party proxy
Uploaders should have the option of distributing there files through reflector nodes
Clients should have the option to use proxy nodes within the network
All queries should be passed from the node that did the query until TTL is reached (Time to Live), and passed back through the respective nodes to anonymise queries
HashingMerkle hashing tree's should be used to split hash's into chunks, so someone can search for a merkle hash tree and provided a node has at least on of those chunks it can be used in uploading, this allows coincidental data sharing
Hash searches should be valid
File AvailabilitySearches can be performed, by filename or hash, these searches are passed down through each node to all the nodes there connected to until TTL is reached (standard is 10).
Links (such as ED2K links) will be available, just using theprotocol://<hash> (client will search for the hash)
Files (such as .torrent) will be available, will be pointers towards trackers within the network (as well as hash's etc.), in typical XML format
PortsCommunication done passively over port 80 (no mucking about with port forwarding)
Dirty NodesSpamming, DOSing and Advertising Nodes will be known as 'Dirty' Nodes
Common String Checks (including variables), hash checks and filesize checks will be excluded from a clients search if to common
Flood Checks, if more than 15 queries come from the same user in under 5 seconds disconnect from that node, or 6 single same queries from the same node
Theres my ideas, let me know if you like them, or hate them