Documentation ¶
Overview ¶
Package iplist handles the P2P Plaintext Format described by https://en.wikipedia.org/wiki/PeerGuardian#P2P_plaintext_format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPList ¶
type IPList struct {
// contains filtered or unexported fields
}
func New ¶
Create a new IP list. The given ranges must already sorted by the lower bound IP in each range. Behaviour is undefined for lists of overlapping ranges.
func NewFromReader ¶
Creates an IPList from a line-delimited P2P Plaintext file.
type PackedIPList ¶
type PackedIPList []byte
func NewFromPacked ¶
func NewFromPacked(b []byte) PackedIPList
func (PackedIPList) NumRanges ¶
func (me PackedIPList) NumRanges() int
type Range ¶
func ParseBlocklistP2PLine ¶
Parse a line of the PeerGuardian Text Lists (P2P) Format. Returns !ok but no error if a line doesn't contain a range but isn't erroneous, such as comment and blank lines.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
pack-blocklist
Takes P2P blocklist text format in stdin, and outputs the packed format from the iplist package.
|
Takes P2P blocklist text format in stdin, and outputs the packed format from the iplist package. |
Click to show internal directories.
Click to hide internal directories.