Skip to content

Commit

Permalink
Merge branch 'sybil-ip' into 'master'
Browse files Browse the repository at this point in the history
Sybil: Disable IP checks for now

See merge request i2p-hackers/i2p.i2p!191
  • Loading branch information
zzz committed Apr 28, 2024
2 parents d123aea + 32167c5 commit 9ef2687
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
6 changes: 6 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2024-04-27 zzz
* Sybil: Disable IP checks for now

2024-04-26 zzz
* Susimail: Search fixes

2024-04-25 zzz
* Susimail: Add search box (Gitlab MR !190)
* Transport: Remove SSU1 code from IMF/IMS (Gitlab MRs !189)
Expand Down
2 changes: 1 addition & 1 deletion router/java/src/net/i2p/router/RouterVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class RouterVersion {
public final static String VERSION = CoreVersion.VERSION;
/** for example: "beta", "alpha", "rc" */
public final static String QUALIFIER = "";
public final static long BUILD = 2;
public final static long BUILD = 3;
/** for example "-test" */
public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + QUALIFIER + EXTRA;
Expand Down
10 changes: 5 additions & 5 deletions router/java/src/net/i2p/router/sybil/Analysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,11 @@ public synchronized Map<Hash, Points> backgroundAnalysis(boolean includeAll) {
// unused here, just for the console, so use the same for all of them
List<RouterInfo> dummy = new DummyList();
calculateIPGroupsUs(ris, points, dummy, dummy, dummy, dummy, dummy);
calculateIPGroups32(ris, points);
calculateIPGroups24(ris, points);
calculateIPGroups16(ris, points);
calculateIPGroups64(ris, points);
calculateIPGroups48(ris, points);
//calculateIPGroups32(ris, points);
//calculateIPGroups24(ris, points);
//calculateIPGroups16(ris, points);
//calculateIPGroups64(ris, points);
//calculateIPGroups48(ris, points);

// Pairwise distance analysis
// O(n**2)
Expand Down
10 changes: 10 additions & 0 deletions router/java/src/net/i2p/router/sybil/PersistSybil.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
import net.i2p.data.DataHelper;
import net.i2p.data.Hash;
import net.i2p.router.Blocklist;
import net.i2p.router.RouterVersion;
import net.i2p.update.UpdateManager;
import net.i2p.update.UpdateType;
import net.i2p.util.Log;
import net.i2p.util.FileSuffixFilter;
import net.i2p.util.SecureDirectory;
import net.i2p.util.SecureFileOutputStream;
import net.i2p.util.VersionComparator;

/**
* Store and retrieve analysis files from disk.
Expand Down Expand Up @@ -256,6 +258,14 @@ File getBlocklistFile() {
*/
Map<String, Long> readBlocklist() {
File f = getBlocklistFile();
String prev = _context.getProperty("router.previousFullVersion");
if (prev != null &&
VersionComparator.comp(prev, "2.5.0-3") < 0 &&
VersionComparator.comp(RouterVersion.FULL_VERSION, "2.5.0-3") >= 0) {
// clear out and start over
f.delete();
return null;
}
Map<String, Long> rv = readBlocklist(f);
if (rv != null)
notifyVersion(f.lastModified());
Expand Down

0 comments on commit 9ef2687

Please sign in to comment.