A simple proxy for MozRepl over HTTP GET using express/nodejs

npm install fireprox
6 downloads in the last week
13 downloads in the last month
<p>A simple proxy for <a href="">MozRepl</a> over HTTP GET using <a href="">express</a>/<a href="">nodejs</a>,
to control Firefox:</p>

<pre><code>Any browser/client &lt;--&gt; fireprox &lt;--&gt; MozRepl &lt;--&gt; Firefox

<p>I threw this together because I needed an easy way to programatically read the current
url from Firefox into my javascript web application <a href=""></a>,
but was unable to workaround browser security restrictions or get
<a href="">Firefox WebDriver</a> to work reliably.</p>

<h2 id="to-install-and-run">To Install and Run</h2>

<p>To install globally:</p>

<pre><code>npm install -g fireprox

<p>To configure (optional):</p>

<pre><code>export MOZREPL_HOST=&lt;your MozRepl host name or ip, default=localhost&gt;
export MOZREPL_PORT=&lt;your MozRepl port, default=4242&gt;
export FIREPROX_PORT=&lt;Fireprox port, default=8080&gt;

<p>To start:</p>

<pre><code>cd /usr/lib    (or wherever your global node_modules lives)
npm start fireprox

<p>If all goes well you should see the MozRepl welcome message.</p>

<h2 id="usage">Usage</h2>

<p>Point any browser/client to <code>http://fireprox:8080/exec/COMMAND</code> where:</p>

<p><code>fireprox:8080</code> is the nodejs server running fireprox</p>

<p><code>COMMAND</code> is any MozRepl command</p>

<h2 id="examples">Examples</h2>

<p>To get the firefox current url, browse to:</p>


<p>To show &lsquo;foo&rsquo; in an alert box, browse to:</p>


<p>(note you&rsquo;ll need to manually close this alert before fireprox returns).</p>

<p>To configure for hosting MozRepl at <code>sweep:5050</code> and fireprox on port <code>8181</code>:</p>

<pre><code>export MOZREPL_HOST=sweep
export MOZREPL_PORT=5050
export FIREPROX_PORT=8181

<h2 id="credits">Credits</h2>

<p>Inspired by <a href="">codediesel</a>.</p>

<h2 id="license">License</h2>


npm loves you