Tuesday, November 17, 2009

Chrome Extension: mDNS Service Browser

As a stepping-stone towards making the browser my main portal to my applications, I have crafted a Google Chrome extension (based on an NPAPI plugin) that lists the services announced through Avahi / mDNS.
It is available here. Note that only Linux based systems are supported.



9 comments:

  1. Hi! So I'm thinking about writing a compatible app that would expose the same functionality to any browser on any system. I don't have a linux box to sniff your plugin's output, would you be prepared to document what scripts should expect to see and where?

    Despite the potential security risks (online services being able to sniff your local net) I think this has real potential! I'm glad to see someone's acting on it!

    ReplyDelete
  2. Hi - my plugin passes a JSON object back to the extension. Each object has the following attributes: "cached", "cookie", "domain", "host_name", "is_local", "multicast", "name", "our_own", "port", "ref", "txt", "type", "wide_area". Those are the attributes available through Avahi "Service Discovery" API just passed as a JSON object.

    ReplyDelete
  3. I tried installing this and get only a page with "Local WEB Services" at the top. There are many _http._tcp and similar service entries available. avahi-browse can see them on the same system.

    Any suggestions?

    ReplyDelete
  4. @Stuart Lynne: It can take a number of seconds before the results show up. How long have you waited?

    ReplyDelete
  5. Long enough... as in hours.

    I tried a different system, and that seems to work correctly.

    The first (non-working) system is Ubuntu 9 with current Chrome. The second (working) is Ubuntu 10.04.

    ReplyDelete
  6. @Stuart Lynne: works on my Ubuntu 9.10 Karmic. The delay I was referring to is in the seconds range. Thanks for reporting on Ubuntu 10.04 Lucid.

    ReplyDelete
  7. Hi, I installed the Extension on Chrome (5.0.375.99) on Ubuntu 10.04 64-bits, and don't see any services (only the title "Local WEB Services"). Avahi-discover does show (web) services.

    I do get output on the CLI:

    sander@athlon64:~$ google-chrome
    *** NSPlugin Viewer *** WARNING: unhandled variable 18 () in NPN_GetValue()
    *** NSPlugin Viewer *** WARNING: unhandled variable 18 () in NPN_GetValue()
    *** NSPlugin Viewer *** WARNING: unhandled variable 18 () in NPN_GetValue()


    Any help?

    ReplyDelete
  8. ... further results: on my 32-bit Ubuntu 10.04, the extension does show the port 80 Web service. Good.

    So: it is a 64-bit problem?

    ReplyDelete
  9. @Quirinius: I haven't made any special provisions for 64bits systems so this could really well be the issue here.

    ReplyDelete