"me-web?" 0.12.0: every address block travels with the app
Build / Desktop, server and tools (push) Successful in 1m15s
Release / Every platform, the server, the release (push) Successful in 26m55s

- The app now carries the whole RIPE Database list of address blocks, all five million, small single-customer blocks
  included, so the provider card and the path can name the block your connection belongs to without a connection to
  the publisher's server. The downloads are about 25 MB larger for it.
- When the publisher's server can't be reached, the provider card still names your network and its block, from the
  public address your router reports or the one the STUN test sees.
- The table is read a small piece at a time, so it takes almost no memory on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-16 19:41:56 +02:00
1 parent aa031c6012
commit 50c40195d3
19 files changed
+318 -256

No files matched your search

+16 -5
View File
@@ -1,6 +1,8 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using MeWeb.Core.Net;
namespace MeWeb.Core.Knowledge;
public class ProviderFact
@@ -33,12 +35,12 @@ public partial class KnowledgeJsonContext : JsonSerializerContext
{
}
public sealed class KnowledgeBase
public sealed class KnowledgeBase(IPlatform platform)
{
readonly Lazy<AsnTable> asn = new(LoadAsn);
readonly Lazy<List<ProviderProfile>> providers = new(LoadProviders);
readonly Lazy<NetworkTable> networks = new(LoadNetworks);
readonly Lazy<RegistryTable> registry = new(LoadRegistry);
readonly Lazy<RegistryTable> registry = new(() => LoadRegistry(platform));
readonly Lazy<Dictionary<string, string>> carriers = new(LoadCarriers);
readonly Lazy<List<ObservedNetwork>> observed = new(LoadObserved);
@@ -67,10 +69,19 @@ public sealed class KnowledgeBase
return stream is null ? null : NetworkTable.Read(stream);
}
static RegistryTable LoadRegistry()
static RegistryTable LoadRegistry(IPlatform platform)
{
using var stream = typeof(KnowledgeBase).Assembly.GetManifestResourceStream("registry.bin");
return stream is null ? null : RegistryTable.Read(stream);
var stream = platform.OpenRegistry();
if (stream is null) return null;
try
{
return RegistryTable.Open(stream);
}
catch (Exception ex) when (ex is IOException or InvalidDataException or EndOfStreamException)
{
stream.Dispose();
return null;
}
}
static Dictionary<string, string> LoadCarriers()