Giter Club home page Giter Club logo

operatorvariant's Introduction

#Firesea IRC

Notes

  • Uses a modified version of node-irc, shimmed out for fxos. Need to fix this up and contribute back upstream.
  • API for node-irc
  • Uses brick
  • my node-irc has a bunch of logging statements commented out, comment these back in for help debugging
  • this is a packaged app. refreshing a packaged app is broken. What I have to do is, quit the simulator (leave dashboard open), Refresh, Connect, Refresh

Running in Desktop Firefox

  1. Turn on mozTCPSocket pref
  2. Add tcp-socket permission for a domain
  • Hosting it locally
  1. Run

Idea from @asutherland

1. Turn on mozTCPSocket pref

  • Open "about:config" in the browser.
  • Right-click anywhere in the config setting listing, and choose "New", "Boolean" from the context menu.
  • Enter "dom.mozTCPSocket.enabled" in the "Enter the preference name" box and click the "OK" button.
  • Select "true" on the next dialog box and click the "OK" button.

Add tcp-socket permission for a domain (locally)

So you could run this from github pages, or from your local machine. Hosting it locally is a better idea, because theoritically Github could serve you different assets that abuse the ability to create TCP sockets. Far-fetched but possible.

I'd recommend (this part optional, but recommended) that you add a domain to your hosts file that redirects back to your machine, that way you're not allowing any site on localhost to use TCP sockets. I added the following to the bottom of my /etc/hosts file:

127.0.0.1 firesea.mozilla.org

For whichever method you choose (locally or gh-pages), you need to add a permission for it. If you are hosting it locally, you would:

Bring up the error console in firefox by hitting control-shift-J. Paste the code into the "Code" box and click the "evaluate" button.

host = 'http://firesea.mozilla.org:8000';
perm = Components.classes["@mozilla.org/permissionmanager;1"]
                 .createInstance(Components.interfaces.nsIPermissionManager);
ios = Components.classes["@mozilla.org/network/io-service;1"]
                .getService(Components.interfaces.nsIIOService);
uri = ios.newURI(host, null, null);
perm.add(uri, 'tcp-socket', 1);

This will allow http://firesea.mozilla.org:8000 permssion to create and use TCP sockets. Tailor as needed.

XXX: TODO find out how to remove permission since it's not in about:permissions

Run

I serve this locally with the command python -m SimpleHTTPServer. I should host the assets somewhere so you don't have to host them yourself, and create an add-on to add the pref and permission, but I haven't yet. I don't know when TCPSockets will land in desktop FF pref'd off.

Once serving, go to http://firesea.mozilla.org:8000 and enjoy.

operatorvariant's People

Contributors

louisstow avatar errietta avatar rhelmer avatar mc96107 avatar douglassherk avatar nickdesaulniers avatar flaburgan avatar zachwick avatar

Watchers

Francisco Jordano avatar Fernando Jiménez Moreno avatar Yura Zenevich avatar  avatar Wander Lairson Costa avatar Michael Henretty avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.