Opened 6 years ago

Last modified 5 years ago

#5907 new Enhancement

Whitelist, takes precedence over blocklist

Reported by: cfpp2p Owned by: jordan
Priority: Normal Milestone: None Set
Component: libtransmission Version: 2.84
Severity: Normal Keywords:


Place a file(s) with name ending as whitelist in your blocklist directory.

examples: b2-whitelist.txt A1-whitelist.p2p whitelist.dat

The file's data format must be same as what is currently allowed as per blocklist files.

Whitelist will unblock specific peers.

The address or ranges in a whitelist will never be blocked even if in a blocklist. The whitelist always takes precedence over blocklist. It's easy to always allow single or multiple addresses or ranges now. The whitelist files are dealt with in all respects exactly as their counterpart blocklist files except the addresses of whitelist are always allowed no matter what.

  • session.c

    old new  
    24322432  assert (tr_isSession (session));
    24342434  for (l = session->blocklists; l; l = l->next)
    2435     if (tr_blocklistFileHasAddress (l->data, addr))
    2436       return true;
     2435    {
     2436      if (tr_stringEndsWith (tr_blocklistFileGetFilename (l->data), "whitelist.bin"))
     2437   if (tr_blocklistFileHasAddress (l->data, addr))
     2438     return false;
     2439    }
     2440  for (l = session->blocklists; l; l = l->next)
     2441    {
     2442      if (!tr_stringEndsWith (tr_blocklistFileGetFilename (l->data), "whitelist.bin"))
     2443   if (tr_blocklistFileHasAddress (l->data, addr))
     2444     return true;
     2445    }
    24382447  return false;

Change History (1)

Note: See TracTickets for help on using tickets.