Page 1 of 1

Namecoin Bundle : namecoin + proxy for firefox, IE & chrome

Posted: Sun Oct 30, 2011 12:19 pm
by khal
Aim of this bundle is to provide an all in one package that people can install to really use the decentralized part of the namecoin DNS system, instead on relying on external DNS or proxy servers. This is a first shot made with some existing tools, that only need you to be improved :)

This bundle is composed of :
- namecoin binary (v0.3.24.64)
- an uptodate blockchain (block 25387)
- nmcsocks binary (v0.4) : a socks5 proxy written by itsnotlupus
- some scripts to launch and stop

How to use it :
- Unzip on the desktop (or where you want)
- Launch :
* linux : namecoinBundle.sh (on gnome, select : Launch in a terminal, must stay open, otherwise relaunch)
* windows : namecoin.bat, then nmcSocks.bat (both must stay open, otherwise relaunch)

If you don't have FoxyProxy in Firefox, IE or Chrome :
- Install FoxyProxy Standard (in firefox Open "Tools" → "Add-ons" and search for "Foxy Proxy Standard", install this extension and restart Firefox)
- Configure FoxyProx : Go to "Tools" → "Foxy Proxy Standard" → "Options", Open "File" → "Import Settings" and select the file "etc/FoxyProxy.xml"
All settings will be owerwritten with the new ones.

If you already have FoxyProxy in Firefox, IE or Chrome :
- Add another proxy :
* in firefox Open "Tools" → "Add-ons" and search for "Foxy Proxy Standard",
* "Add a new proxy" and put "127.0.0.1" in the IP, "9055" in the port, check "Proxy Socks" and "SOCKS v5"
* Select the last tab "URL pattern" and "Add a new pattern" with the name "Dot-BIT" and the pattern "*.bit/*"
* Validate your new proxy ("OK" button")
* Change the FoxyProxy mode to "Use proxies based on their pre-defined patterns and priorities"

How it works :
- FoxyProxy is configured to redirect all .bit requests to the locally running nmcsocks proxy (listening on port 9055). All other requests are processed the normal way by firefox, IE or Chrome.
- nmcsocks resolves DNS requests by asking namecoin
- nmcsocks acts like a proxy to provide web pages

README :
- a new wallet is generated at first launch. This namecoin archive is configured to run in parallel with other namecoin instances (another port, another data folder, etc).

- nmcsocks binary is provided by https://github.com/itsnotlupus/nmcsocks/downloads and i wasn't able to build a working binary with current tree (node.js:438, var fn = runInThisContext(source, this.filename, true); node.js:134, throw e; // process.nextTick error, or 'error' event on first tick).
A node.js specialist is welcome to give some help :)

TODO :

- i don't know how scripts works in osx, so, no osx release
Help is welcome too.

- a small GUI reduced in the state/notification zone would be better than .sh and .bat scripts
Help is welcome too.

Files :
http://dot-bit.org/files/NamecoinBundleLinux.7z
http://dot-bit.org/files/NamecoinBundleWindows.7z (tested on XP, can somebody report if it works on win7 too ?)

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Mon Oct 31, 2011 10:42 pm
by moa
Good work khal ... needed doing.

How does it interact with existing FoxyProxy config? i.e. does it overwrite everything with a new config template or just insert what it needs and leave everything else alone?

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Mon Oct 31, 2011 11:50 pm
by khal
moa wrote:Good work khal ... needed doing.

How does it interact with existing FoxyProxy config? i.e. does it overwrite everything with a new config template or just insert what it needs and leave everything else alone?
Everything is owerwritten, i'll precise it.

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Fri Nov 04, 2011 2:17 am
by vinced
Very nice.

Do you think merging this with Tor browser bundle will be interesting to users and the Tor project?

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Sun Nov 06, 2011 11:27 pm
by khal
I discovered the Tor browser bundle after your message and made some test to include nmcsocks in the "process". It almost works :p

Here is what i've done :
* extract the Tor Browser Bundle
* put nmcsocks binary in the App folder
* copy the namecoin data folder (all blockchain files + bitcoin.conf) in the folder "Data/Namecoin"
* configure the "Proxy Application (optionnal)" in Settings, General :
- check "Start a proxy app...."
- Value : "./App/nmcsocks"
- Arguments "--dir=Data/Namecoin --tor"
* edit Data/Vidalia/vidalia.conf and change "AutoControl=true" to "AutoControl=false" (tor will be listening on the same port, 9050, each time)

But, there is still a problem :
* when firefox is launched, its proxy configuration is updated to use the port used by tor, 9050, and there is no way to configure it to automatically use the 9055 port used by nmcsocks. So, each time you launch this tor firefox, you need to change proxy setting from port 9050 to port 9055 (Edit, Preferences, Advanced, Network, Setting).

* I've discovered a bug in nmcsocks with some namecoin names using "dns" records : it returns "Host not found" (ex: http://dns.bit)

* I successfully browse those tor only websites :
- http://acrimonious.bit (zgnbvbgfmoew7uz3.onion)
- http://torbook.bit (ajqaivfxtqy3fdlr.onion)
And this mixed one :
- http://instawallet.bit (zgnbvbgfmoew7uz3.onion)

So, i would say this could be of some interest to tor users, but i would like to be able to build working binaries of nmcsocks before...
Another choice could be to use [Half-working] .bit resolver in Power DNS, a python script, which may be easier to compile. But, it's not finished yet (and no proxy support).

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Sat Nov 19, 2011 4:26 pm
by lordcirth
Im running it on Win7, its not working for me, but that might be my fault. Using Chrome, manually entered FoxyProxy info, running the batches, still not working. Any suggestions?
TY

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Mon Nov 28, 2011 12:22 pm
by khal
lordcirth wrote:Im running it on Win7, its not working for me, but that might be my fault. Using Chrome, manually entered FoxyProxy info, running the batches, still not working. Any suggestions?
TY
Difficult to say without more infos... I guess your FoxyProxy configuration is not right. If you have both .bat still opened this side may be ok.

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Mon Dec 12, 2011 12:56 pm
by runeks
I'm experiencing the same problem as lordcirth. Running namecoinBundle.sh:

Code: Select all

rune@runescomp:~/Desktop/NamecoinBundleLinux$ ./namecoinBundle.sh 
Launching namecoin... 
namecoin server starting

Launching nnmcsocks... 
Using namecoin config directory:  /home/rune/Desktop/NamecoinBundleLinux/etc
Chain proxying is disabled.
Success! NmcProxy started on 127.0.0.1:9055
seems like it's listening on port 9055:

Code: Select all

rune@runescomp:~/Desktop/NamecoinBundleLinux$ netstat -na|grep 9055
tcp        0      0 127.0.0.1:9055          0.0.0.0:*               LISTEN     
FoxyProxy is configured correctly as far as I can see. Choosing either "Use proxies based on their pre-defined patterns and priorities" or "Use proxy "Namecoin .bit" for all URLs" makes no difference: in both cases only non-.bit domains work.

Any ideas?

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Tue Dec 20, 2011 7:20 am
by runeks
Found the problem: FoxyProxy for Chrome is broken. Just use Chrome's built-in proxy configuration instead. Works like a charm.

Re: Namecoin Bundle : namecoin + proxy for firefox, IE & chr

Posted: Tue Dec 20, 2011 10:08 am
by khal
Thanks for reporting the solution runeks.
lordcirth, does it solve the problem for you too ?