[freenet-chat] HOWTO: firefox 'freenet:' protocol handling

David McNab david at rebirthing.co.nz
Sun May 7 21:41:28 UTC 2006


Synopsis:
--------

A 2-minute recipe for getting Firefox to handle 'freenet:'-style URLs,
so that mainstream web pages can link to freesite pages without worrying
about fproxy access specifics.

Purpose:
-------

Allow mainstream websites to contain abstracted freenet links such as:

  <a href="freenet:SSK at blahblah">hot freenet stuff here</a>

without needing to prefix the href with fproxy address details, such as:
 'href="http://localhost:8888/SSK@blahblah"'.

This can be valuable, since many users don't have their fproxy on
localhost:8888 (myself for instance, since i run my freenet node on a
headless server on the other side of my LAN). For such users, links on
mainstream websites with 'href="http://localhost:8888"' will be broken.

This recipe allows the specifics of fproxy access to be buried within
firefox.

Procedure:
---------

1) Stick the following script somewhere in your system:

 #!/bin/sh
 /path/to/firefox -remote "openURL(http://localhost:8888/$1)"

Call it (say) /usr/local/bin/firefox_freenet (we'll refer to the path
later on)

If your fproxy is not on 'localhost:8888', change accordingly.

If you're still in the Redmond Prison, use instead the script:

 c:\pathto\firefox.exe -remote "openURL(http://localhost:8888/%1)"

and write this into a .BAT file somewhere on your disk, say,
c:\freenet\firefox_freenet.bat

2) Within firefox, type into the address bar 'about:config'

3) within the displayed pane, do:

  (i) right-click, New, String.
      For preference name, enter:
        network.protocol-handler.app.freenet
      And for value, enter:
        /usr/local/bin/firefox_freenet

      (in windows hell, enter c:\firefox\firefox_freenet.BAT)

  (ii) right-click, New, Boolean
       For preference name, enter:
        network.protocol-handler.external.freenet
       And for value, enter:
         true

  (iii) right-click, New, Boolean
       For preference name, enter:
        network.protocol-handler.warn-external.freenet
       And for value, enter:
         false

You're done.

Test it out by entering into your firefox address bar the URL:

freenet:USK at PFeLTa1si2Ml5sDeUy7eDhPso6TPdmw-2gWfQ4Jg02w,3ocfrqgUMVWA2PeorZx40TW0c-FiIOL-TWKQHoDbVdE,AQABAAE/Index/25/


-- 
Cheers
David




More information about the chat mailing list