Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: eche|on on December 13, 2010, 11:05:21 AM



Title: setup a server to connect to in I2P - how?
Post by: eche|on on December 13, 2010, 11:05:21 AM
Moin!

I think about running a bitcoind in I2P space for others to connect anon to it.
I know nodes need to connect to other nodes.
Now my question:
Is one connection for bitcoin clients enough? Or do I need to setup at least 2 clients as "proxy"?
How do my node act as a proxy? Looks like my node needs to connect via usual internet and should accept connections via I2P.
Does a bitcoin client with the -noirc option not connect to usual IPs?

thank you.

eche|on


Title: Re: setup a server to connect to in I2P - how?
Post by: SmokeTooMuch on December 13, 2010, 12:40:16 PM
Afaik one connection is enough. All the others are just redundancy.


Title: Re: setup a server to connect to in I2P - how?
Post by: theymos on December 13, 2010, 04:53:01 PM
Only one connection is required, though more is desired for safety.

An I2P "Bitcoin proxy" would have to somehow connect simultaneously to both I2P peers and Internet peers. Otherwise anyone connecting to you would be segmented in I2P.

You will attempt to connect to Internet peers even with -noirc. You will just use the addr/seednode bootstrap mechanism instead of the IRC one. If you want to limit outbound connections to only peers you specify, use -connect=ip or -maxconnections=x in combination with exactly x -addnode=ip switches.

To connect to Bitcoin peers on Tor hidden services, it's necessary to use Tor's MapAddress option. Does I2P's proxy have a similar option of mapping an I2P address to an IP address?


Title: Re: setup a server to connect to in I2P - how?
Post by: BitLex on December 13, 2010, 06:59:09 PM
Quote
it's necessary to use Tor's MapAddress option. Does I2P's proxy have a similar option of mapping an I2P address to an IP address?

good question,
that's exactly where i'm stuck.

i set up one i2p-node, created a server-tunnel on port 8333 and just started a bitcoin-client that is connected to my main-client (and 7 others, not using a proxy).

now i'm trying to connect to that bitcoin-node through i2p,
so i set up a second i2p-node, added the host and target from first node to its addressbook,
set up a socks-tunnel, set bitcoin to use the socks.

but now what?
have to -addnode my 1st node somehow, but i'v no idea how.



update:
played around a bit more, but my bestest result so far was just a one-way connection.

set up a standard-client-tunnel pointing to first-node.i2p, using it as proxy instead of socks on the second i2p-node,
bitcoin tries to connect, but fails,
connections go from 8 to 9, back to 8 to 9 to 8 ..... on first node, second stays at 0.


here's snippets of debug.logs:

first node
Code:
...
accepted connection
sending: version (85 bytes)
MainFrameRepaint
socket closed
disconnecting node
DelayedRepaint
socket closed
disconnecting node
MainFrameRepaint
accepted connection
sending: version (85 bytes)
MainFrameRepaint
DelayedRepaint
socket closed
disconnecting node
...

second node
Code:
...
proxy connecting
ERROR: Proxy returned error -66
...

if anyone figures out, what todo to make it work, let me know and i'll set it up and leave it running.



Title: Re: setup a server to connect to in I2P - how?
Post by: theymos on December 13, 2010, 10:11:00 PM
Addnode only works with IP addresses.

Also, if you manage to get I2P's proxy to translate the IP address properly, make sure you use an address in the 192.0.2.x range. Bitcoin un-proxifies most other private ranges.


Title: Re: setup a server to connect to in I2P - how?
Post by: eche|on on December 14, 2010, 10:48:57 AM
Moin

I2P builds up direct tunnels to a special destination.
E.g. a client in I2P needs to setup one tunnel to each destination (server) it wants to connect to. And need to connect the client to the tunnel-entry (local IP 127.0.0.1 port XXXX).

Which results in mostly only one connection possible.
Point of concern is on howto get bitcoin client forget about IPs and not to connect to the IPs.

eche|on


Title: Re: setup a server to connect to in I2P - how?
Post by: kwukduck on December 22, 2010, 09:38:04 PM
afaik bitcoin gets more ip's from other bitcoin nodes, we have to prevent the client from fetching those IP's somehow and maybe even prevent the server-node from sending them aswell.


Title: Re: setup a server to connect to in I2P - how?
Post by: kwukduck on January 10, 2011, 04:44:40 PM
How to get connected to bitcoin main blockchain using I2P:

1. Make sure you're running I2P....

2. Create a new client tunnel in your I2P-tunnel config,
set the destination to: kjrqzx73thxebwud4qdznwjy7rd4dcuknfaewjbigb7ooccv2pdq.b32.i2p
pick a nice port you want to use, for example 8383.

3. Start your bitcoin client with argument '-connect=127.0.0.1:8383' (8383 is example, use whatever you picked in your client tunnel)

4. Enjoy your anonymity.

[edit]

it seems i can only get this to work with one pc... i donīt have a clue why others canīt connect... iīll try to figure it out...