I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 366da1b3 authored by zzz's avatar zzz
Browse files

add b32 config for mosfet

parent bdcb625e
No related branches found
No related tags found
No related merge requests found
...@@ -39,6 +39,7 @@ public class HostsTxtNamingService extends NamingService { ...@@ -39,6 +39,7 @@ public class HostsTxtNamingService extends NamingService {
* given file for hostname=destKey values when resolving names * given file for hostname=destKey values when resolving names
*/ */
public final static String PROP_HOSTS_FILE = "i2p.hostsfilelist"; public final static String PROP_HOSTS_FILE = "i2p.hostsfilelist";
public final static String PROP_B32 = "i2p.naming.hostsTxt.useB32";
/** default hosts.txt filename */ /** default hosts.txt filename */
public final static String DEFAULT_HOSTS_FILE = public final static String DEFAULT_HOSTS_FILE =
...@@ -72,7 +73,8 @@ public class HostsTxtNamingService extends NamingService { ...@@ -72,7 +73,8 @@ public class HostsTxtNamingService extends NamingService {
} }
// Try Base32 decoding // Try Base32 decoding
if (hostname.length() == BASE32_HASH_LENGTH + 8 && hostname.endsWith(".b32.i2p")) { if (hostname.length() == BASE32_HASH_LENGTH + 8 && hostname.endsWith(".b32.i2p") &&
Boolean.valueOf(_context.getProperty(PROP_B32, "true")).booleanValue()) {
d = LookupDest.lookupBase32Hash(_context, hostname.substring(0, BASE32_HASH_LENGTH)); d = LookupDest.lookupBase32Hash(_context, hostname.substring(0, BASE32_HASH_LENGTH));
if (d != null) { if (d != null) {
putCache(hostname, d); putCache(hostname, d);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment