{% extends "_layout.html" %} {% block title %}I2P Software Update Specification{% endblock %} {% block content %} Page last updated August 2010, current as of router version 0.8.
I2P uses a simple, yet secure, system for automated software update. The router console periodically pulls a news file from a configurable I2P URL. There is a hardcoded backup URL pointing to the project website, in case the default project news host goes down.
The contents of the news file are displayed on the home page of the router console. In addition, the news file contains the most recent version number of the software. If the version is higher than the router's version number, it will display an indication to the user that an update is available.
The router may optionally download, or download and install, the new version if configured to do so.
The news.xml file may contain the following elements:
<i2p.news date="$Date: 2010-01-22 00:00:00 $" /> <i2p.release version="0.7.14" date="2010/01/22" minVersion="0.6" />
The elements may be included inside XML comments to prevent interpretation by browsers. The i2p.release element and version are required. All others are optional and are currently unused.
The news source is trusted only to indicate that a new version is available. It does not specify the URL of the update, the checksum, or any other information.
The signed update file, traditionally named i2pupdate.sud, is simply a zip file with a prepended 56 byte header. The header contains:
The signature covers only the zip archive - not the prepended version. The signature must match one of the DSA public keys configured into the router, which has a hardcoded default list of keys of the current project release managers.
For version comparison purposes, version fields contain [0-9]*, field separators are '-', '_', and '.', and all other characters are ignored.
The router downloads the update file from one in a configurable list of I2P URLs, using the built-in HTTP client and proxy. There are several hardcoded default URLs. The router verifies that the update file version is newer before installation. It also, of course, verifies the signature.
The zip file is extracted in the base $I2P installation directory.
Recent router versions support Pack200 decompression. Files inside the zip archive with a .jar.pack or .war.pack suffix are transparently decompressed to a .jar or .war file. Update files containing .pack files are traditionally named with a '.su2' suffix. Pack200 shrinks the update files by about 60%.