The P2P format was created for the original PeerGuardian. It is simple and easily editable with any text editor, but is not very compact for transport in bandwidth limited situations.
The P2P format had no official specification, but applications always follow the basic format:
Some organization:188.8.131.52-184.108.40.206 Another organization:220.127.116.11-18.104.22.168
The encoding of a P2P list is not formally defined, but many parsers assume they are ASCII or ISO-8859-1. PeerGuardian 2 (Windows) assumes P2P lists are encoded in ISO-8859-1 if they do not begin with a UTF-8 BOM.
PeerGuardian Linux allows to specify the encoding of the blocklist to be read.
TODO: which encoding is assumed by PeerGuardian Linux if none specified?
PeerGuardian 2 (Windows) and PeerGuardian Linux treat lines which start with a # as a single-line comment and ignores empty lines, like so:
# This is a comment Some organization:22.214.171.124-126.96.36.199 Another organization:188.8.131.52-184.108.40.206 # This is another comment Yet another organization:220.127.116.11-18.104.22.168 And another:22.214.171.124-126.96.36.199
A cross-platform C++ library for working with the P2P format is freely available here.
Based upon the old PhoenixLabs Wiki page