From 0bdd0d0484a34568e1b8c8d499dc568cc51fdf07 Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Thu, 24 Aug 2023 19:56:04 +0200 Subject: [PATCH] Show the unencoded IP addresses before the noderef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This shows what the noderef will expose and can be an important warning to advanced users who have VPN addresses and real node addresses that they don’t want to show. (in this case they’ll have to change the bindTo to the one address to use in the config) --- src/freenet/clients/http/ConnectionsToadlet.java | 6 ++++++ src/freenet/l10n/freenet.l10n.en.properties | 1 + 2 files changed, 7 insertions(+) diff --git a/src/freenet/clients/http/ConnectionsToadlet.java b/src/freenet/clients/http/ConnectionsToadlet.java index eb5d752eff5..bc28d120e54 100644 --- a/src/freenet/clients/http/ConnectionsToadlet.java +++ b/src/freenet/clients/http/ConnectionsToadlet.java @@ -895,6 +895,12 @@ void drawNoderefBox(HTMLNode contentNode, SimpleFieldSet fs, boolean showNoderef new HTMLNode[] { HTMLNode.STRONG }); referenceInfoboxContent.addChild("pre", "id", "reference", fs.toOrderedStringWithBase64() + '\n'); } + + if(!isOpennet()) { + HTMLNode myIps = referenceInfoboxContent.addChild("p"); + myIps.addChild("span", NodeL10n.getBase().getString("DarknetConnectionsToadlet.myIps", "ips", fs.get("physical.udp"))); + } + } protected abstract String getPageTitle(String titleCountString); diff --git a/src/freenet/l10n/freenet.l10n.en.properties b/src/freenet/l10n/freenet.l10n.en.properties index e4c8dbc7aa4..9719356032f 100644 --- a/src/freenet/l10n/freenet.l10n.en.properties +++ b/src/freenet/l10n/freenet.l10n.en.properties @@ -346,6 +346,7 @@ DarknetConnectionsToadlet.foafReachableThroughTitle=Reachable Through DarknetConnectionsToadlet.connError=Connection failed (buggy node?) DarknetConnectionsToadlet.routingDisabled=Not routing traffic (we are currently connected to the node but we or it refuse to route traffic) DarknetConnectionsToadlet.routingDisabledShort=Not routing traffic +DarknetConnectionsToadlet.myIps=The physical.udp field of the noderef contains the IP addresses ${ips}. To change this, set bindTo=THE_ADDRESSES (comma separated) in the file freenet.ini (the node must be stopped before editing). DarknetConnectionsToadlet.noLoadStats=Don't know how many requests we can send so can't send any DarknetConnectionsToadlet.noLoadStatsShort=No load stats DarknetConnectionsToadlet.myName=Nickname for this node: ${name}