diff --git a/build.xml b/build.xml index ae7f5531f..7f80f3a55 100644 --- a/build.xml +++ b/build.xml @@ -230,6 +230,7 @@ + diff --git a/installer/resources/blocklist.txt b/installer/resources/blocklist.txt new file mode 100644 index 000000000..8a1614e7f --- /dev/null +++ b/installer/resources/blocklist.txt @@ -0,0 +1,35 @@ +# Blocking is now enabled by default. +# To disable blocking, set router.blocklist.enable=false on configadvanced.jsp and restart. +# +# Add additional entries as desired, sorting not required. +# This file is only read at router startup. +# To manually block a router after startup, use the form on http://localhost:7657/configpeer.jsp +# Warning - a large list will increase memory usage. +# Please do not block too broadly, it will segment and harm the network. +# For example, http://www.bluetack.co.uk/config/splist.zip is very broad and includes Tor users, it is not recommended. +# A more reasonable list: http://www.bluetack.co.uk/config/level1.zip +# +# You may also wish to add the bogons from http://www.cymru.com/Documents/bogon-list.html , +# but you will have top update your blocklist manually as IP ranges are assigned. +# You must update this list yourself, it is not overwritten by the update process. +# +# * Acceptable formats (IPV4 only): +# * #comment (# must be in column 1) +# * comment:IP-IP +# * comment:morecomments:IP-IP +# * (comments also allowed before any of the following) +# * IP-IP +# * IP/masklength +# * IP +# * hostname (DNS looked up at list readin time, not dynamically, so may not be much use) +# * 44-byte Base64 router hash +# * +# * No whitespace allowed after the last ':'. +# * +# * For further information and downloads: +# * http://www.bluetack.co.uk/forums/index.php?autocom=faq&CODE=02&qid=17 +# * http://blocklist.googlepages.com/ +# * http://www.cymru.com/Documents/bogon-list.html +# +Chinese Floodfill Flooder:159.226.40.7 +Friend of the Chinese Floodfill Flooder:159.226.40.3 diff --git a/router/java/src/net/i2p/router/Blocklist.java b/router/java/src/net/i2p/router/Blocklist.java index 2d8da6c52..4543a49a3 100644 --- a/router/java/src/net/i2p/router/Blocklist.java +++ b/router/java/src/net/i2p/router/Blocklist.java @@ -85,8 +85,7 @@ public class Blocklist { static final String BLOCKLIST_FILE_DEFAULT = "blocklist.txt"; public void startup() { - String enabled = _context.getProperty(PROP_BLOCKLIST_ENABLED, "false"); - if (! "true".equals(enabled)) + if (! Boolean.valueOf(_context.getProperty(PROP_BLOCKLIST_ENABLED, "true")).booleanValue()) return; String file = _context.getProperty(PROP_BLOCKLIST_FILE, BLOCKLIST_FILE_DEFAULT); // Maybe someday we'll read in multiple files and merge them