Pages:
Author

Topic: Namecoin into i2p integration [WORKS!] - page 2. (Read 11326 times)

legendary
Activity: 1386
Merit: 1097
January 27, 2012, 11:57:21 PM
#25
pent, you didn't say anything in the direct oposite of my post :-).

We can discuss what is main purpose of Internet/Tor/I2P, but the fact is that Tor is TCP mixing network (not HTTP-only mixing network).
hero member
Activity: 490
Merit: 500
January 27, 2012, 11:47:16 PM
#24
Very nice! I was thinking about the same project for Tor. Unfortunately I'm too busy so I hope somebody else will do the job for me :-)).

Quote
And unlike I2P, Tor is just a proxy service, primary made for HTTP proxying.

This is incorrect, Tor is acting as a SOCKS5 proxy and is relaying any TCP traffic, not only HTTP.

1.2
Differences to TOR
The main characteristic in which I2P differs from TOR is the focus of the project.
While TOR was designed with the intention to enable anonymous internet brows-
ing, I2P’s focus is to provide an anonymous network, isolated inside the internet,
offering various protocols and applications within. It is however possible to utilize
I2P outproxies to reach the internet and thus enable anonymous web browsing.
Due to the focus of the project, there was only one public outproxy in place at
the time of this writing (false.i2p). Another difference to the TOR network
is, that I2P tunnels can only be used unidirectional compared to TOR’s bidi-
rectional tunnels. Also, as mentioned in Section 1.1 I2P uses garlic encryption
where TOR uses onion encryption. Both implementations are based on layered
encryption, garlic encryption offering the possibility to store multiple messages
inside the innermost layer [3].

http://userpage.fu-berlin.de/~semu/docs/2011_seminar_ehlert_i2p.pdf
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
January 27, 2012, 10:31:48 PM
#23
if this is implemented for tor/i2p it would be the next best thing after bitcoin show'ed up
It will be a really new Internet Dimension.

meh, more like an exact copy of the one a few ppl try to ruin these days
hero member
Activity: 490
Merit: 500
January 27, 2012, 10:22:55 PM
#22
if this is implemented for tor/i2p it would be the next best thing after bitcoin show'ed up
It will be a really new Internet Dimension.
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
January 27, 2012, 10:21:09 PM
#21
Very nice! I was thinking about the same project for Tor. Unfortunately I'm too busy so I hope somebody else will do the job for me :-)).

Quote
And unlike I2P, Tor is just a proxy service, primary made for HTTP proxying.

This is incorrect, Tor is acting as a SOCKS5 proxy and is relaying any TCP traffic, not only HTTP.

if this is implemented for tor/i2p it would be the next best thing after bitcoin show'ed up
legendary
Activity: 1386
Merit: 1097
January 27, 2012, 10:01:16 PM
#20
Very nice! I was thinking about the same project for Tor. Unfortunately I'm too busy so I hope somebody else will do the job for me :-)).

Quote
And unlike I2P, Tor is just a proxy service, primary made for HTTP proxying.

This is incorrect, Tor is acting as a SOCKS5 proxy and is relaying any TCP traffic, not only HTTP.
hero member
Activity: 490
Merit: 500
January 27, 2012, 09:31:15 PM
#19
Actually it works!

This is the proof of concept.

Anonymous, authoritative domain pent.bit resolving into anonymous encrypted i2p network. No one (except the owner) will never ever shut it down by any reason. I believe this is the next step for FREE INTERNET.

I picked some random i2p hash address from address book for testing and assigned to http://pent.bit (need patched i2p router software to check it)

In some reason I cant update my domain with new address for my eepsite, so i created a bug request.

By the power of chance this randomly picked i2p host now resolving and responding at http://www.pent.bit (need patched i2p router software to check it) Smiley And there is a some TV serials in HD 720p are available for direct download ==LOL== Hello my dear SOPA ))



My own domain with instruction will be located here and soon i release patches in github under gpl3.

http://zpuzc2b2chuon3q62sfh5r6ys3y7zdpdohm2ohkvy7j7fogn4iqa.b32.i2p/ (need i2p router software to check it).

It is still not .bit because there is a delay in first_update namecoin procedure.
hero member
Activity: 490
Merit: 500
January 27, 2012, 02:23:35 PM
#18
And unlike I2P, Tor is just a proxy service, primary made for HTTP proxying.

I2P has ability for different service communications inside its anonymous network. For example, torrent client i2psnark. It is operates via encrypted tunnels, while Tor strongly do not recommend to let torrent traffic go through Tor network.

So the future of NameCoin is in I2P.
hero member
Activity: 490
Merit: 500
January 27, 2012, 02:08:47 PM
#17
There is no sense in anonymous .bit domains delegated to regular NS servers or pointing destination to regular ip4/ip6 addresses.

There is no sense in that because it is more simplier way to use regular domain with whois protect.

The future of NameCoin is in anonymous networks.

I2P has ugly and not authoritative DNS system, but has very strong anonymous crypted network.
Tor has authoritative .onion domains, but they are looks not user-friendly.

NameCoin Has authoritative anonymous domain system, but has no anonymous network implementations.

They all made for each other.
hero member
Activity: 742
Merit: 500
January 27, 2012, 01:44:53 PM
#16
I have knotwork.bit, I also have knotwork.i2p, knotwork.com and knotwork.net

Do I have to tell namecoin just one destination, or can I tell it about an i2p way to get there, a .onion way to get there, a .com way and a .net way and so on?

-MarkM-

I think you can (and should) put all of the possible ways. I'm not sure how good the current namecoin resolvers are at picking the "correct" one though.  I know using the public DNS servers will only give you the IPs.  If you run namecoind locally you should be able to choose which way to go.
hero member
Activity: 490
Merit: 500
January 27, 2012, 01:26:50 PM
#15
Having .com/.net or other IP-resolving correspondences is a de-anonymizer option for your location. And I am talking here for fully anonymous domain and hosting network.

For i2p with .bit you can specify:

"i2p" : { "destination" : "====516byte-hash-here====" },
--OR --
"i2p" : { "b32" : "====32byte-hash-here====.b32.i2p" },
--OR --
"i2p" : { "name" : "knotwork.i2p" },

OR even all together
"i2p" : { "destination" : "====516byte-hash-here====" ,
            "b32" : "====32byte-hash-here====.b32.i2p" ,
            "name" : "knotwork.i2p"
}

You can specify alternate "tor" and "ip4" locations if you wish, but this will not work with I2P tunnel proxy.

And here is a problem. i2p "destination" field has length of 516+ bytes. So it counsumes >50% of total allowable record length ( 1Kb).
It is better to use .b32.i2p hash address.
using of regular i2p domain name is not recommended. regular i2p domains has strong resolving issues.


legendary
Activity: 2940
Merit: 1090
January 27, 2012, 10:02:27 AM
#14
I have knotwork.bit, I also have knotwork.i2p, knotwork.com and knotwork.net

Do I have to tell namecoin just one destination, or can I tell it about an i2p way to get there, a .onion way to get there, a .com way and a .net way and so on?

-MarkM-
legendary
Activity: 1078
Merit: 1005
January 25, 2012, 12:39:36 AM
#13
Are the proposed Value templates are final? Can they change? They looks like a drafts.
They are drafts but it's feedback from implementers (ie. people like you) that will help decide whether they're final. If you implement it, it'll no doubt become the final spec for namecoin/i2p integration.
hero member
Activity: 490
Merit: 500
January 25, 2012, 12:08:26 AM
#12

You need to check if the returned name is the same as the one you asked for. If it is, and expires_in is greater than 0 you have the right record. Another approach is to monitor the namecoin network for blocks. When you get one do a "name_scan" to obtain the complete history. Cache that and do fast lookups using it. Whenever a new block arrives invalidate the cache and repopulate it.

Well, thanks ) That was i looked for.

Are the proposed Value templates are final? Can they change? They looks like a drafts.
legendary
Activity: 1078
Merit: 1005
January 24, 2012, 11:57:11 PM
#11
The usual way to lookup a single name is "name_scan" with the numeric argument set to 1. eg:

Code:
namecoind name_scan d/bluishcoder 1
[
    {
        "name" : "d/bluishcoder",
        "value" : "{\"map\":{\"\":\"69.164.206.88\"}}",
        "txid" : "ebad6e9dfcb8d1204a49a6da089f6a102ea5779612c745d94766153215bc9a3f",
        "expires_in" : 27317
    }
]

You need to check if the returned name is the same as the one you asked for. If it is, and expires_in is greater than 0 you have the right record. Another approach is to monitor the namecoin network for blocks. When you get one do a "name_scan" to obtain the complete history. Cache that and do fast lookups using it. Whenever a new block arrives invalidate the cache and repopulate it.

hero member
Activity: 490
Merit: 500
January 24, 2012, 11:18:01 PM
#10
If you aren't there already, you might want to get on Freenode, channel #namecoin and/or #namecoin-dev - there are a few dedicated folks there that might be able to assist with coding ideas and questions.
thanks. i will
rjk
sr. member
Activity: 448
Merit: 250
1ngldh
January 24, 2012, 11:16:34 PM
#9
If you aren't there already, you might want to get on Freenode, channel #namecoin and/or #namecoin-dev - there are a few dedicated folks there that might be able to assist with coding ideas and questions.
hero member
Activity: 490
Merit: 500
January 24, 2012, 11:13:53 PM
#8
Okay. So we have an active domain bit.bit (I am not the owner). It has some history:
Code:
[pentarh@pentbook src]$ ./namecoind name_history d/bit
[
    {
        "name" : "d/bit",
        "value" : "[email protected]",
        "txid" : "c584be36a35b152c87c356b9efe4499d5e6e00bc26fed5d3324ce1582fa5cc9a",
        "address" : "N4u9f2h52Ft44Qe5bfo91xxMNLn1VC82au",
        "expires_in" : -27256,
        "expired" : 1
    },
    {
        "name" : "d/bit",
        "value" : "Krecovery",
        "txid" : "f7331a599cf4e59dbe30172822889ea87057ee75f1a3a48dcafe0621be10b4dc",
        "address" : "NG8iqBEqX85odxxjJCcFqyAGfVzF38TobT",
        "expires_in" : -26589,
        "expired" : 1
    },
    {
        "name" : "d/bit",
        "value" : "{\"map\": {\"\": \"78.47.86.43\", \"www\": \"78.47.86.43\"}}",
        "txid" : "988e3a9805fc60f1fbe30fbdb061a79bd6e73f5cbff039dbdd4cde1925cef855",
        "address" : "N32tEoKFnrtsbKBredM56BjxD4KmGtTdfH",
        "expires_in" : -17393,
        "expired" : 1
    },
    {
        "name" : "d/bit",
        "value" : "{\"ip\": \"78.47.86.43\", \"email\": \"[email protected]\", \"info\": { \"status\": \"For sale.\" }, \"map\": {\"\": \"78.47.86.43\", \"www\": \"78.47.86.43\"}}",
        "txid" : "bb12684745370c4d785a640fdb1d2dfbe1f6a0ef41ff55f5b18b9c1f331ce614",
        "address" : "MzMm4F3mRA9hMpa7ABN9nZCZAq3JWd4UWA",
        "expires_in" : 11258
    },
    {
        "name" : "d/bit",
        "value" : "{\"ip\": \"78.47.86.43\", \"email\": \"[email protected]\", \"info\": { \"status\": \"For sale.\" }, \"map\": {\"\": \"78.47.86.43\", \"www\": \"78.47.86.43\"}}",
        "txid" : "9b091fbb236b59de79f926c32b77b0348e34db5c6de3fe69dc2edd252e757d61",
        "address" : "N4yKKfvMjF9NX4PNzPguiPbegMmzjhiLJ1",
        "expires_in" : 22440
    }
]

The only two last records are valid, all others expired.

Native namecoind has no methods for suppressing such expired records. So I make a small patch, which is implementing direct name resolution in namecoind

Method: name_resolve
Args:
Example:
Code:

[pentarh@pentbook src]$ ./namecoind name_resolve d/bit
[
    {
        "name" : "d/bit",
        "value" : "{\"ip\": \"78.47.86.43\", \"email\": \"[email protected]\", \"info\": { \"status\": \"For sale.\" }, \"map\": {\"\": \"78.47.86.43\", \"www\": \"78.47.86.43\"}}",
        "txid" : "bb12684745370c4d785a640fdb1d2dfbe1f6a0ef41ff55f5b18b9c1f331ce614",
        "address" : "MzMm4F3mRA9hMpa7ABN9nZCZAq3JWd4UWA",
        "expires_in" : 11258
    },
    {
        "name" : "d/bit",
        "value" : "{\"ip\": \"78.47.86.43\", \"email\": \"[email protected]\", \"info\": { \"status\": \"For sale.\" }, \"map\": {\"\": \"78.47.86.43\", \"www\": \"78.47.86.43\"}}",
        "txid" : "9b091fbb236b59de79f926c32b77b0348e34db5c6de3fe69dc2edd252e757d61",
        "address" : "N4yKKfvMjF9NX4PNzPguiPbegMmzjhiLJ1",
        "expires_in" : 22440
    }
]
Actually I dont know what to do with two active records Sad Is the only last valid, or both (split brain)? Current patch is:
Code:
--- namecoin.cpp.old    2012-01-25 04:34:52.000000000 +0200
+++ namecoin.cpp.new    2012-01-25 02:01:06.000000000 +0200
@@ -677,6 +677,61 @@
     return oRes;
 }
 
+
+Value name_resolve(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() < 1)
+        throw runtime_error(
+            "name_resolve \n"
+            "Return an active name record.\n");
+    
+    Array oRes;
+    vector vchName = vchFromValue(params[0]);
+    string name = stringFromVch(vchName);
+    CRITICAL_BLOCK(cs_main)
+    {
+        vector vtxPos;
+        CNameDB dbName("r");
+        if (!dbName.ReadName(vchName, vtxPos))
+            throw JSONRPCError(-4, "failed to read from name DB");
+        
+        CDiskTxPos txPos;
+        BOOST_FOREACH(txPos, vtxPos)
+        {
+            CTransaction tx;
+            if (!tx.ReadFromDisk(txPos))
+            {
+                error("could not read txpos %s", txPos.ToString().c_str());
+                continue;
+            }
+
+            Object oName;
+            vector vchValue;
+            int nHeight;
+            uint256 hash;
+            if (!txPos.IsNull() && GetValueOfTxPos(txPos, vchValue, hash, nHeight))
+            {
+                if(nHeight + GetDisplayExpirationDepth(nHeight) - pindexBest->nHeight <= 0)
+                {
+                   // Not returning expired record
+                   continue;
+               }
+                oName.push_back(Pair("name", name));
+                string value = stringFromVch(vchValue);
+                oName.push_back(Pair("value", value));
+                oName.push_back(Pair("txid", tx.GetHash().GetHex()));
+                string strAddress = "";
+                GetNameAddress(txPos, strAddress);
+                oName.push_back(Pair("address", strAddress));
+                oName.push_back(Pair("expires_in", nHeight + GetDisplayExpirationDepth(nHeight) - pindexBest->nHeight));
+                oRes.push_back(oName);
+            }
+        }
+    }
+    return oRes;
+}
+
+
 Value name_scan(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() > 2)
@@ -1197,6 +1252,7 @@
     mapCallTable.insert(make_pair("name_list", &name_list));
     mapCallTable.insert(make_pair("name_scan", &name_scan));
     mapCallTable.insert(make_pair("name_history", &name_history));
+    mapCallTable.insert(make_pair("name_resolve", &name_resolve));
     mapCallTable.insert(make_pair("name_debug", &name_debug));
     mapCallTable.insert(make_pair("name_debug1", &name_debug1));
     mapCallTable.insert(make_pair("name_clean", &name_clean));

And I'm in the way to resolve in java this mess into i2p network address Smiley Smiley Smiley
Code:
[pentarh@pentbook src]$ ./namecoind name_resolve d/pent
[
    {
        "name" : "d/pent",
        "value" : "{ \"ip\" : \"192.168.1.1\", \"ip6\" : \"2001:4860:0:1001::68\", \"i2p\": { \"destination\": \"s2bzxafMCmDEujaZF44c558MBqYKC95YvoTqNaqMVGIoV68BUlCQu4Z6pjmuxSptHWo38LPx55nEqLLaKFljX7yr30o-iRBwsIev5M1HeX62YVJYxTP5acUxTKaG15dLwKLXRsqeHES8g21vwbz9LsHYsDR9IOYaJFnsBIOfLK4H5GYgcdogazZcuSvVrvX7jdpleGI7g6I81vzuGD0X0NZ~tpj~gypQsomwIZUYknTiaZ37X9TV7DpRbeYkevX7qnSX3odnk007Lhgrt2vN07-DpUHQLmTgr-GbYUVT0Xq-PB5Q2Oi5Rfl1MKQGQ7WXQyVW7MwmQpwgFMMqzQM8SDHqpqrxpsv3VHZ~GIkcKU4rlPazOzxan6PLmvaPigtbKJ0MCHUwD~zHAU~26DuSkRLvquCtxKqfOWE5z8JyaN~zxHivj7X8J7YpibXJdD53RcQ7ozsz9bvOTi0kQItuLR9ROlrxEfReUmWr0VKaCgmV4OvLfyi8~034nj7NAdKeAAAA\", \"name\" : \"example.i2p\", \"b32\" : \"b4szsgxsqgzqg76y3gcxolir54pwjokjjkbane645myukzqrbyoq.b32.i2p\" }, \"map\" : { \"www\": { \"ip\" : \"192.168.1.2\", \"ip6\" : \"2001:4860:0:1001::69\", \"i2p\": { \"name\" : \"example.i2p\", \"b32\" : \"b4szsgxsqgzqg76y3gcxolir54pwjokjjkbane645myukzqrbyoq.b32.i2p\" } } } }",
        "txid" : "f4d4b0849517767b2ef820a513902ee8dde87bd4794a2599198ed4f0b68a36f0",
        "address" : "N7t7sLxHzA7tiXYMExKtBgb4jGX12cHiYN",
        "expires_in" : 36000
    }
]
hero member
Activity: 490
Merit: 500
January 24, 2012, 06:42:37 PM
#7
Actually, the official namecoind is so raw... Its has no suitable method for signle name resolution.

I can query for "name_history ", but I think it can return possibly large data.

namecoind also needs to be patched ))
hero member
Activity: 490
Merit: 500
January 24, 2012, 04:44:39 PM
#6
I will publish in near time i2p code hacks to support .bit zone.

Actually there is three variants:

- Resolve directly via namecoin HTTP-JSON-RPC interface of nearly installed namecoind
- Resolve directly via namecoin-friendly name server via IP
- Resolve directly via namecoin-friendly name server which is inside i2p network

Well, the 1st one is most simplier and authoritative, but will need a namecoin software installed along with i2p software. With all blockchain download.
The 2nd one will need to specify remote namecoin-friendly DNS via IP. This is not authoritative, not reliable and isnt secure.
The 3rd one will allow to put namecoin resloution DNS servers somewhere inside i2p network. This is more secure, but still isnt reliable and authoritative.

Working on 1st one.
Pages:
Jump to: