Extension Auto-Installer 1.3
作者: Wladimir Palant
Important note: This extension will not work in Firefox 57 and above. Providing this functionality in Firefox is no longer possible, the extension is discontinued.
关于这个附加组件
This is a tool for extension developers tired of the usual test cycle: make a change, create a new extension build, install it in the browser (with wait time and confirmations), restart the browser, test. This extension will receive new extension packages on a TCP port, automatically install them and restart the browser if necessary. All you need to do is send your extension package to this port, e.g. with the wget command line tool:
Or with the curl command line tool (removing Expect header here is important):
It will be even simpler if you integrate this step into the build script of your extension. Note: The response to this request is always "500 No Content" to prevent the command line tools from saving results, this is not an issue.
Configuration
By default, the extension will accept connections on port 8888 with 127.0.0.1 (localhost) as the only address allowed to connect. Connection attempts from other IP addresses will show up in Error Console. To accept connections from other addresses add them to the "Accept IP addresses" options field. If you do that please keep in mind that IP addresses can be spoofed on unprotected networks (e.g. public WiFi).
Firefox Mobile notes
You can also test your extension on a mobile phone while developing on your desktop, simply send the extension package to the IP address of your phone instead of localhost. You have to configure Auto-Installer on your phone however and add the IP address of your desktop to the allowed addresses.
Known issues
Source code / Contributing
The extension source code is available under https://github.com/palant/autoinstaller.
wget --post-file=extension.xpi http://127.0.0.1:8888/
Or with the curl command line tool (removing Expect header here is important):
curl --data-binary '@extension.xpi' -H 'Expect:' http://127.0.0.1:8888/
It will be even simpler if you integrate this step into the build script of your extension. Note: The response to this request is always "500 No Content" to prevent the command line tools from saving results, this is not an issue.
Configuration
By default, the extension will accept connections on port 8888 with 127.0.0.1 (localhost) as the only address allowed to connect. Connection attempts from other IP addresses will show up in Error Console. To accept connections from other addresses add them to the "Accept IP addresses" options field. If you do that please keep in mind that IP addresses can be spoofed on unprotected networks (e.g. public WiFi).
Firefox Mobile notes
You can also test your extension on a mobile phone while developing on your desktop, simply send the extension package to the IP address of your phone instead of localhost. You have to configure Auto-Installer on your phone however and add the IP address of your desktop to the allowed addresses.
Known issues
- Your firewall might ask you about allowing incoming connections even if 127.0.0.1 is the only allowed IP address.
- No connections will be accepted after switching the browser into offline mode and back, Extension Auto-Installer needs to be restarted.
Source code / Contributing
The extension source code is available under https://github.com/palant/autoinstaller.