Skip to content

Commit

Permalink
fix: CJDNS addresses start with [fc and not [fc00
Browse files Browse the repository at this point in the history
  • Loading branch information
0xB10C committed Oct 30, 2024
1 parent a7fccf1 commit 8a445f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/websocket/www/js/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function networkFromAddress(address) {
return NETWORK_ONION;
} else if (address.includes(".i2p")) {
return NETWORK_I2P;
} else if (address.includes("[fc00")) {
} else if (address.includes("[fc")) {
return NETWORK_CJDNS;
} else if (address.includes("[")) {
return NETWORK_IPV6;
Expand Down Expand Up @@ -118,7 +118,7 @@ function testNetworkFromAddress() {
["[2604:d500:4:1::2]", NETWORK_IPV6],
["abcdefghijklmno.onion", NETWORK_ONION],
["abcdefghijklmno.b32.i2p", NETWORK_I2P],
["[fc00:1245::1]", NETWORK_CJDNS],
["[fcd1:c209:bc03:1a75:80d8:fake:0000:0000]", NETWORK_CJDNS],
];

for (test of testcases) {
Expand Down
2 changes: 1 addition & 1 deletion tools/websocket/www/p2p-circle.html
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,4 @@ <h1>P2P connections and messages</h1>
</script>
<script src="js/lib.js"></script>

</html>
</html>

0 comments on commit 8a445f7

Please sign in to comment.