Skip to content

Commit

Permalink
Show the unencoded IP addresses before the noderef
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
ArneBab committed Sep 3, 2023
1 parent fcc32a2 commit 0bdd0d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/freenet/clients/http/ConnectionsToadlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/freenet/l10n/freenet.l10n.en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 0bdd0d0

Please sign in to comment.