forked from I2P_Developers/i2p.i2p
merge of 'bfd1fde175d4c3de1a107725991aa1b1d611d298'
and 'eb7a90b602d939a3257fb42ab3d826b54ea4da1b'
This commit is contained in:
@@ -1226,6 +1226,8 @@ public class SnarkManager implements Snark.CompleteListener {
|
||||
}
|
||||
|
||||
Set<String> existingNames = listTorrentFiles();
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("DirMon found: " + DataHelper.toString(foundNames) + " existing: " + DataHelper.toString(existingNames));
|
||||
// lets find new ones first...
|
||||
for (int i = 0; i < foundNames.size(); i++) {
|
||||
if (existingNames.contains(foundNames.get(i))) {
|
||||
|
@@ -874,7 +874,11 @@ public class IndexBean {
|
||||
} else if (tun.getIsRunning() || tun.getIsStarting()) {
|
||||
return "Tunnel must be stopped before modifying destination";
|
||||
}
|
||||
PrivateKeyFile pkf = new PrivateKeyFile(_privKeyFile);
|
||||
|
||||
File keyFile = new File(_privKeyFile);
|
||||
if (!keyFile.isAbsolute())
|
||||
keyFile = new File(_context.getConfigDir(), _privKeyFile);
|
||||
PrivateKeyFile pkf = new PrivateKeyFile(keyFile);
|
||||
try {
|
||||
pkf.createIfAbsent();
|
||||
} catch (Exception e) {
|
||||
|
@@ -113,13 +113,14 @@ class SummaryListener implements RateSummaryListener {
|
||||
String baseName = rs.getName() + "." + period;
|
||||
_name = createName(_context, baseName);
|
||||
_eventName = createName(_context, baseName + ".events");
|
||||
File rrdFile = null;
|
||||
try {
|
||||
RrdBackendFactory factory = RrdBackendFactory.getFactory(getBackendName());
|
||||
String rrdDefName;
|
||||
if (_isPersistent) {
|
||||
// generate full path for persistent RRD files
|
||||
File rrdDir = new SecureFile(_context.getRouterDir(), RRD_DIR);
|
||||
File rrdFile = new File(rrdDir, RRD_PREFIX + _name + RRD_SUFFIX);
|
||||
rrdFile = new File(rrdDir, RRD_PREFIX + _name + RRD_SUFFIX);
|
||||
rrdDefName = rrdFile.getAbsolutePath();
|
||||
if (rrdFile.exists()) {
|
||||
_db = new RrdDb(rrdDefName, factory);
|
||||
@@ -164,6 +165,9 @@ class SummaryListener implements RateSummaryListener {
|
||||
_log.error("Error starting RRD for stat " + baseName, oom);
|
||||
} catch (RrdException re) {
|
||||
_log.error("Error starting RRD for stat " + baseName, re);
|
||||
// corrupt file?
|
||||
if (_isPersistent && rrdFile != null)
|
||||
rrdFile.delete();
|
||||
} catch (IOException ioe) {
|
||||
_log.error("Error starting RRD for stat " + baseName, ioe);
|
||||
}
|
||||
|
@@ -16,9 +16,9 @@ import net.i2p.util.Log;
|
||||
*
|
||||
*/
|
||||
class MessageHandler implements I2PSessionListener {
|
||||
private ConnectionManager _manager;
|
||||
private I2PAppContext _context;
|
||||
private Log _log;
|
||||
private final ConnectionManager _manager;
|
||||
private final I2PAppContext _context;
|
||||
private final Log _log;
|
||||
private final Set<I2PSocketManager.DisconnectListener> _listeners;
|
||||
|
||||
public MessageHandler(I2PAppContext ctx, ConnectionManager mgr) {
|
||||
|
333
build.xml
333
build.xml
@@ -26,6 +26,10 @@
|
||||
<echo message=" pkg: distclean then package everything up (installer, clean tarball, update tarball)" />
|
||||
<echo message=" dist: pkg and javadoc" />
|
||||
<echo message=" installer: build the GUI installer" />
|
||||
<echo message=" installer-freebsd: build the GUI installer (FreeBSD only)" />
|
||||
<echo message=" installer-linux: build the GUI installer (Linux only)" />
|
||||
<echo message=" installer-osx: build the GUI installer (OSX only)" />
|
||||
<echo message=" installer-windows: build the GUI installer (Windows only)" />
|
||||
<echo message=" tarball: tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
|
||||
<echo message=" updater: Package the built files in i2pupdate.zip (extracts safely over existing installs)" />
|
||||
<echo message=" updater200: Updater compressed with pack200 (creates i2pupdate200.zip, 60% smaller)" />
|
||||
@@ -285,12 +289,13 @@
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="jbigi-windows-only" depends="buildProperties, jbigi-list-changes" >
|
||||
|
||||
<!-- Now system-specific jbigis in alphabetical order -->
|
||||
<target name="jbigi-freebsd-only" depends="buildProperties, jbigi-list-changes" >
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.jbigi.tr" value="" />
|
||||
<jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
|
||||
<fileset dir="installer/lib/jbigi" includes="*windows*.dll" />
|
||||
<jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
|
||||
<fileset dir="installer/lib/jbigi" includes="*freebsd*.so" />
|
||||
<manifest>
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
@@ -312,6 +317,19 @@
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="jbigi-linux-nonx86-only" depends="buildProperties, jbigi-list-changes" >
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.jbigi.tr" value="" />
|
||||
<jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
|
||||
<fileset dir="installer/lib/jbigi" includes="*linux-arm*.so,*linux-ppc*.so" />
|
||||
<manifest>
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="jbigi-osx-only" depends="buildProperties, jbigi-list-changes" >
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.jbigi.tr" value="" />
|
||||
@@ -325,6 +343,18 @@
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="jbigi-windows-only" depends="buildProperties, jbigi-list-changes" >
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.jbigi.tr" value="" />
|
||||
<jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
|
||||
<fileset dir="installer/lib/jbigi" includes="*windows*.dll" />
|
||||
<manifest>
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- the apps need to compile the jsps to poupdate -->
|
||||
<target name="poupdate" depends="buildRouter, buildStreaming, buildSystray, buildJetty, buildDesktopGui" >
|
||||
@@ -389,6 +419,8 @@
|
||||
<pathelement location="installer/lib/wrapper/all/wrapper.jar" />
|
||||
<pathelement location="core/lib/junit.jar" />
|
||||
</classpath>
|
||||
<!-- These variables are stored in build.properties.
|
||||
End-users can override by creating the file override.properties -->
|
||||
<link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
|
||||
<link offline="true" href="${jettydocs.url}" packagelistLoc="installer/resources/package-lists/jetty/" />
|
||||
<link offline="true" href="${jrobindocs.url}" packagelistLoc="installer/resources/package-lists/jrobin/" />
|
||||
@@ -412,15 +444,19 @@
|
||||
<target name="getBuildNumber" >
|
||||
<exec executable="grep" outputproperty="buildLine" >
|
||||
<arg value="public final static long BUILD" />
|
||||
<arg value="router/java/src/net/i2p/router/RouterVersion.java" />
|
||||
<arg value="router/java/src/net/i2p/router/RouterVersion.java" />
|
||||
</exec>
|
||||
<exec executable="cut" inputstring="${buildLine}" outputproperty="build.temp" failonerror="true" >
|
||||
<arg value="-f2" />
|
||||
<arg value="-d=" />
|
||||
<arg value="-d=" />
|
||||
</exec>
|
||||
<exec executable="cut" inputstring="${build.temp}" outputproperty="build.number" failonerror="true" >
|
||||
<exec executable="tr" inputstring="${build.temp}" outputproperty="build.temp.tr" failonerror="true">
|
||||
<arg value="-d" />
|
||||
<arg value="[:space:]"/>
|
||||
</exec>
|
||||
<exec executable="cut" inputstring="${build.temp.tr}" outputproperty="build.number" failonerror="true" >
|
||||
<arg value="-f1" />
|
||||
<arg value="-d;" />
|
||||
<arg value="-d;" />
|
||||
</exec>
|
||||
<echo message="Build number is ${build.number}" />
|
||||
</target>
|
||||
@@ -511,17 +547,8 @@
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<target name="preppkg" depends="preppkg-linux, preppkg-osx, preppkg-windows, jbigi">
|
||||
<target name="preppkg" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, preppkg-windows, jbigi">
|
||||
<copy file="build/jbigi.jar" todir="pkg-temp/lib" />
|
||||
<copy todir="pkg-temp/lib/wrapper/freebsd/">
|
||||
<fileset dir="installer/lib/wrapper/freebsd/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/freebsd64/">
|
||||
<fileset dir="installer/lib/wrapper/freebsd64" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/macosx/">
|
||||
<fileset dir="installer/lib/wrapper/macosx/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/solaris/">
|
||||
<fileset dir="installer/lib/wrapper/solaris/" />
|
||||
</copy>
|
||||
@@ -536,6 +563,63 @@
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="preppkg-freebsd" depends="preppkg-unix">
|
||||
<copy todir="pkg-temp/lib/wrapper/freebsd/">
|
||||
<fileset dir="installer/lib/wrapper/freebsd/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/freebsd64/">
|
||||
<fileset dir="installer/lib/wrapper/freebsd64" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="preppkg-freebsd-only" depends="preppkg-freebsd, jbigi-freebsd-only" >
|
||||
<copy file="build/jbigi.jar" todir="pkg-temp/lib" />
|
||||
<copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
|
||||
</target>
|
||||
|
||||
<!-- only what is needed for debian, etc. -->
|
||||
<target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" >
|
||||
<copy file="build/jbigi.jar" todir="pkg-temp/lib" />
|
||||
<copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
|
||||
</target>
|
||||
|
||||
<target name="preppkg-unix" depends="preppkg-base">
|
||||
<copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
|
||||
<!-- <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" /> old feature that per zzz isn't used-->
|
||||
<copy file="installer/resources/eepget" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/i2prouter" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/osid" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
|
||||
<copy todir="pkg-temp/man/">
|
||||
<fileset dir="installer/resources/man/" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- x86 linux only -->
|
||||
<target name="preppkg-linux" depends="preppkg-unix">
|
||||
<copy todir="pkg-temp/lib/wrapper/linux/">
|
||||
<fileset dir="installer/lib/wrapper/linux/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/linux64/">
|
||||
<fileset dir="installer/lib/wrapper/linux64/" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="preppkg-osx" depends="preppkg-unix">
|
||||
<!--<copy file="installer/resources/I2P Router Console.webloc" todir="pkg-temp/" />-->
|
||||
<copy todir="pkg-temp/Start I2P Router.app">
|
||||
<fileset dir="installer/resources/Start I2P Router.app" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/macosx/">
|
||||
<fileset dir="installer/lib/wrapper/macosx/" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="preppkg-osx-only" depends="preppkg-osx, jbigi-osx-only" >
|
||||
<copy file="build/jbigi.jar" todir="pkg-temp/lib" />
|
||||
<copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
|
||||
</target>
|
||||
|
||||
<target name="preppkg-windows" depends="preppkg-base, buildexe">
|
||||
<copy file="i2p.exe" todir="pkg-temp/" failonerror="false" />
|
||||
<copy file="apps/systray/java/lib/systray4j.dll" todir="pkg-temp/lib" />
|
||||
@@ -544,7 +628,7 @@
|
||||
<copy file="installer/resources/eepget.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/fixperms.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/fix_logfile_path.cmd" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/fix_logfile_path.cmd" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/set_config_dir_for_nt_service.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />
|
||||
@@ -557,38 +641,11 @@
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- only what is needed for debian, etc. -->
|
||||
<target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" >
|
||||
<target name="preppkg-windows-only" depends="preppkg-windows, jbigi-windows-only">
|
||||
<copy file="build/jbigi.jar" todir="pkg-temp/lib" />
|
||||
<copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
|
||||
<copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
|
||||
</target>
|
||||
|
||||
<!-- x86 linux only -->
|
||||
<target name="preppkg-linux" depends="preppkg-base">
|
||||
<copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
|
||||
<!-- <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" /> old feature that per zzz isn't used-->
|
||||
<copy file="installer/resources/eepget" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/i2prouter" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/osid" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
|
||||
<copy todir="pkg-temp/man/">
|
||||
<fileset dir="installer/resources/man/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/linux/">
|
||||
<fileset dir="installer/lib/wrapper/linux/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/linux64/">
|
||||
<fileset dir="installer/lib/wrapper/linux64/" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="preppkg-osx" depends="preppkg-linux">
|
||||
<!--<copy file="installer/resources/I2P Router Console.webloc" todir="pkg-temp/" />-->
|
||||
<copy todir="pkg-temp/Start I2P Router.app">
|
||||
<fileset dir="installer/resources/Start I2P Router.app" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="preppkg-base" depends="build, preplicenses, prepConsoleDocs, prepthemeupdates, prepCertificates">
|
||||
<!-- if updater200 was run previously, it left *.pack files in pkg-temp -->
|
||||
<delete>
|
||||
@@ -951,6 +1008,184 @@
|
||||
<!-- thazzit -->
|
||||
</target>
|
||||
|
||||
<!-- Custom installers -->
|
||||
|
||||
<target name="installer-freebsd" depends="clean, preppkg-freebsd-only, getReleaseNumber, getBuildNumber, buildProperties, util-list-changes" >
|
||||
<taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
|
||||
<mkdir dir="pkg-temp/installer" />
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.util.tr" value="" />
|
||||
<jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Copy" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Delete" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Exec" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${release.number}-freebsd-only.jar" installerType="standard" basedir="${basedir}" />
|
||||
</target>
|
||||
|
||||
<target name="installer-linux" depends="clean, preppkg-linux-only, getReleaseNumber, getBuildNumber, buildProperties, util-list-changes" >
|
||||
<taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
|
||||
<mkdir dir="pkg-temp/installer" />
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.util.tr" value="" />
|
||||
<jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Copy" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Delete" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Exec" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${release.number}-linux-only.jar" installerType="standard" basedir="${basedir}" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="installer-osx" depends="clean, checkForIzpack2App, preppkg-osx-only, getReleaseNumber, getBuildNumber, buildProperties, util-list-changes">
|
||||
<taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
|
||||
<mkdir dir="pkg-temp/installer" />
|
||||
<mkdir dir="pkg-temp/osx" />
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.util.tr" value="" />
|
||||
<jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Copy" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Delete" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Exec" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${release.number}-osx-only.jar" installerType="standard" basedir="${basedir}" />
|
||||
<ant target="installer2app" />
|
||||
<delete dir="pkg-temp/osx" />
|
||||
</target>
|
||||
|
||||
<target name="checkForIzpack2App">
|
||||
<available property="izpack2app.available" file="${user.home}/IzPack/utils/wrappers/izpack2app/izpack2app.py" />
|
||||
</target>
|
||||
|
||||
<target name="installer2app" if="izpack2app.available">
|
||||
<mkdir dir="pkg-temp/osx" />
|
||||
<exec executable="python" failonerror="true">
|
||||
<arg value="${user.home}/IzPack/utils/wrappers/izpack2app/izpack2app.py" />
|
||||
<arg value="${basedir}/i2pinstall_${release.number}-osx-only.jar" />
|
||||
<arg value="${basedir}/pkg-temp/osx/i2p-${release.number}-osx-install.app" />
|
||||
</exec>
|
||||
<zip destfile="${basedir}/i2pinstall_${release.number}-osx.zip" level="9"
|
||||
basedir="${basedir}/pkg-temp/osx" whenempty="fail" comment="${release.number}-${build.number}"/>
|
||||
</target>
|
||||
|
||||
<target name="checkForIzpack2Exe">
|
||||
<available property="izpack2exe.available" file="${user.home}/IzPack/utils/wrappers/izpack2exe/izpack2exe.py" />
|
||||
</target>
|
||||
|
||||
<!-- Yes, even though this makes an installer for Windows, we still need to depend on preppkg-unix (because the installer attempts to delete these files
|
||||
and will fail if they don't exist. Thankfully these files are so very small there's not much harm in including them.
|
||||
-->
|
||||
<target name="installer-windows" depends="clean, doBuildEXE, checkForIzpack2Exe, preppkg-windows-only, preppkg-unix, getReleaseNumber, getBuildNumber, buildProperties, util-list-changes" >
|
||||
<taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
|
||||
<mkdir dir="pkg-temp/installer" />
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.util.tr" value="" />
|
||||
<jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Copy" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Delete" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.util.Exec" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${release.number}-windows-only.jar" installerType="standard" basedir="${basedir}" />
|
||||
<ant target="installer2exe" />
|
||||
<delete dir="pkg-temp/win" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="installer2exe" if="izpack2exe.available"> <!-- different from the launch4j exe creator -->
|
||||
<mkdir dir="pkg-temp/win" />
|
||||
<exec executable="python" failonerror="true">
|
||||
<arg value="${user.home}/IzPack/utils/wrappers/izpack2exe/izpack2exe.py" />
|
||||
<arg value="--file=${basedir}/i2pinstall_${release.number}-windows-only.jar" />
|
||||
<arg value="--no-upx" />
|
||||
<arg value="--name=I2P" />
|
||||
<arg value="--output=${basedir}/i2pinstall-${release.number}-windows.exe" />
|
||||
</exec>
|
||||
</target>
|
||||
<target name="installer-all" >
|
||||
<ant target="installer-freebsd" />
|
||||
<ant target="installer-linux" />
|
||||
<ant target="installer-osx" />
|
||||
<ant target="installer-windows" />
|
||||
<ant target="installer" />
|
||||
</target>
|
||||
<!-- end custom installers -->
|
||||
|
||||
<target name="test" depends="buildProperties, jbigi" >
|
||||
<mkdir dir="reports/core/junit/" />
|
||||
<ant dir="core/java/" target="test" />
|
||||
|
@@ -695,7 +695,7 @@ public class NativeBigInteger extends BigInteger {
|
||||
rv.add(_libPrefix + getMiddleName1() + "none_64" + _libSuffix);
|
||||
// Add libjbigi-xxx-none.so
|
||||
// Note that libjbigi-osx-none.jnilib is a 'fat binary' with both PPC and x86-32
|
||||
if ((!_isArm) || (!_isPPC && !_isMac))
|
||||
if (!_isArm && !_isPPC && !_isMac)
|
||||
rv.add(getResourceName(false));
|
||||
return rv;
|
||||
}
|
||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@@ -50,7 +50,7 @@ build-indep:
|
||||
dh_prep
|
||||
# The next line is used by KYTV when building from source packages
|
||||
#[ -r jetty/jetty-5.1.15.tgz ] && ln -sf $(CURDIR)/jetty/jetty-5.1.15.tgz $(CURDIR)/apps/jetty/jetty-5.1.15.tgz
|
||||
ant preppkg-linux javadoc
|
||||
ant preppkg-unix javadoc
|
||||
echo router.updateDisabled=true > $(I2P)/router.config
|
||||
mv $(I2P)/runplain.sh $(I2P)/i2prouter-nowrapper
|
||||
-cp -fv /usr/share/tor/geoip $(CURDIR)/pkg-temp/geoip/geoip.txt
|
||||
|
@@ -1,3 +1,8 @@
|
||||
2011-08-16 zzz
|
||||
* Console: Tweak logs page CSS
|
||||
* Graphs: Delete corrupt rrd file (ticket #483)
|
||||
* UPnP: Fix bug causing failure when the PC has multiple interfaces
|
||||
|
||||
2011-08-06 kytv
|
||||
* Fix #473 (wrapper.logfile set to the wrong path in Windows).
|
||||
|
||||
|
@@ -327,3 +327,4 @@ planet.i2p=W0omtMApOdlTkgJoct08QnzDkeb~xc60df5Cx3k3qqOFmyEkRB65NdpSdvldI5STmXmXl
|
||||
exotrack.i2p=Ly1vs4plBuGisqlMiQOjhVkXFZPBMy9joSCrus~tuLXBRXDrPYG9WXJMzY4gb3LiW0VVawv0kLgikX8eeeruXmgKwQW5zB9UPSP0CQnXTRelE3Jn7lev~re4woHvgS-EGBwWikxqXF3f7W8-LhieI0JhBZxItiWhJJME07oncW0kgS8UIMl0wqN2Y-p0sryFCN056TfGNTXigfxrSLqKnpi6a2OyEkF62qvRID3qXzRque0vKQjqvavq2mqxjFrSgLUoyKod5h9Px6qK08gtoAyDKMLPk7fPgReYKj6awiOxRSGfsMpZD3~ZuV0Sts2XtCau3S3myYMIDe5oKziPtZRIej4KBDxT0YYIw5v4RoqzqF88gNgHDfkPZ25JKTOt5xGcPTG8kwYrtx39PX6NrJmv-I~LUz6sZZlIW24k1qbO7zBxZ6mazldQY1~FJGXzn5MNzsxp44iOZdMDJJh18N0Psthk2hqlQOS4L0Ss1Odm1czhBxf1Y~j3L-QsMttcAAAA
|
||||
outproxyng.h2ik.i2p=1RqMQd58RgA4D~XT34rCjQteJVQwFKQbPK5P03GetL-DyCfKV6Vg61xyxGOZK-K4KTXXf45PG~oDAWIzE7UY5aXN9oAjHXfPrU9hHxv35BaxFqUpsJLgjWu41OwSjl5aN2-freH4gGVSiL62I1y2bcXHc2kVHlbToQOy8bJoS3KSDHEeU0r79f~cY3xf6rBHpHNMJtdYdnWlLq5KFc2cz~8lIut~sSIAwUEfebBkhfl2ctvdEGdSshBWGTxXiahtQX0xraynF-Cex2hxvBAl0g9aoOnrLx~Gses54WPD-m3RArI3fiaxEALRuFa0mfrrEgjOhBtVU8IlTYrTEkR8JSGofsEmuqqM03FIrwOv6lJZi-xemiNUr3OX6VdO4ckIg69BxpCYzP2IxLO5r8lSwyHqGbYPFxBIjbSMsv6tGWWdglV4Y9sQHTarboA-XDih3DzDpomb1~78cSiV3PRidjj4MDggn1abkQbRVd6WLV~eTi54bctS-JwW-I5Xyqq~AAAA
|
||||
inr.i2p=GGB99wXYBnX-wOxQ~Xrvo7AvngoYgifvZZL54ksZWzclcirG7AysqfkAKyv906PxfM4y2DcN2K9m4-D99yFj-1BdnUuIEqfi2yuaaVoWuOffT3h9ne~kZnq3C-wrmczD70Gxk4shvSVxMdUEFvEip8QY4K0R-FiKBsFAfWGTE3b9d-QCzP0H9VP5V-CaYjYVQuMRgMluk9gnoLRipvV7483f~rmGgYX8xwygEAQ3v9P4hrAlJrP0lWJLI1K6KQucP3THIxZ4A9Xxnl0I7EZAT8bHwzschFrcDPYM~DtQdkJTz2VphocbNLfIExTrFt88-xC69WE-fSbaMf9jucT4f5kdpfpRu0kM~am40etxPs8uXGF-L9IXCjgUkJHrWdPHeGhnx-ye2xvUTLO2jyga8iY89Ee3IpqivVUg-iAQJzX9NXC29sf0YzNj8d8mdWRNuzbLSx9CVJ3l1NPJr4k7hmCqf8lBGXNIFZQL4Wez1PPcM4gw0o73gqIxkxvVzVcpAAAA
|
||||
pastethis.i2p=qg6Y8Dj5LHAP3tOGmJXpmqe2ivpgVcs4UHJ0hv~VRGhNTh7awM3qPIhKNMhrq9G5ZgXWB3QlSmi-m2FQVndTNKegdfbdnFMNLOOwh2pm1akhvEp6MeKhv0KjJFKpNOb2ygHu2MXPXuDuh5odO1LRs3Pxr1PdjM~7L5NxRE-o-EuCKH5H1335BAfvY5k1SIU-t-YaIctMKGH88D9OjPEt7PlqXsdXUQnJFO6B4V3E1BdH33Zc6oVxaSSOLuLaSPjrczC4h79U9gJFmR4isWpHmynucEtJmEbJ4atcUe4~m2uYw8tWGGFoMvz9y3y6kRqb1alPpX9wPZb5OGjTJIQTmSGsag2-CJldnqa3mEDCWQ3gs6FLud-s1z~2J51BnFl~LpPPF6yT8879R5zOGAEwfIp4N8fJTbgPNxz4P4LRQLXHk0t1oYPEpwLneiLH-87zzM3IiTeeb3XCDyc2T7zzLGrktb2i6BlyEBJMXbsN2CiviKOHI7CEp~u8Lsp69FSeAAAA
|
||||
|
@@ -670,7 +670,6 @@ div.joblog {
|
||||
|
||||
div.joblog:li {
|
||||
word-wrap: break-word !important;
|
||||
text-align: justify !important;
|
||||
line-height: 80% !important;
|
||||
}
|
||||
|
||||
|
@@ -963,7 +963,6 @@ div.main li {
|
||||
|
||||
div.joblog li {
|
||||
word-wrap: break-word !important;
|
||||
text-align: justify !important;
|
||||
line-height: 120% !important;
|
||||
margin: 2px 0px 2px 30px;
|
||||
padding: 2px 20px 2px 0px;
|
||||
|
@@ -1008,7 +1008,6 @@ div.joblog i {
|
||||
|
||||
div.joblog li {
|
||||
word-wrap: break-word !important;
|
||||
text-align: justify !important;
|
||||
line-height: 115% !important;
|
||||
padding: 0;
|
||||
font-size: 9pt !important;
|
||||
|
@@ -18,10 +18,10 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 19;
|
||||
public final static long BUILD = 21;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String EXTRA = "-rc";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||
|
@@ -4,7 +4,9 @@
|
||||
package net.i2p.router.transport;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -12,6 +14,7 @@ import java.util.Set;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.util.Addresses;
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.util.Translate;
|
||||
|
||||
@@ -527,7 +530,7 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
|
||||
// Just in case...
|
||||
// this confuses my linksys? - zzz
|
||||
removeMapping(protocol, port, fp, true);
|
||||
//removeMapping(protocol, port, fp, true);
|
||||
|
||||
Action add = _service.getAction("AddPortMapping");
|
||||
if(add == null) {
|
||||
@@ -538,7 +541,13 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
|
||||
add.setArgumentValue("NewRemoteHost", "");
|
||||
add.setArgumentValue("NewExternalPort", port);
|
||||
add.setArgumentValue("NewInternalClient", _router.getInterfaceAddress());
|
||||
// bugfix, see below for details
|
||||
String intf = _router.getInterfaceAddress();
|
||||
String us = getOurAddress(intf);
|
||||
if (_log.shouldLog(Log.WARN) && !us.equals(intf))
|
||||
_log.warn("Requesting port forward to " + us + ':' + port +
|
||||
" when cybergarage wanted " + intf);
|
||||
add.setArgumentValue("NewInternalClient", us);
|
||||
add.setArgumentValue("NewInternalPort", port);
|
||||
add.setArgumentValue("NewProtocol", protocol);
|
||||
add.setArgumentValue("NewPortMappingDescription", description);
|
||||
@@ -552,7 +561,72 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bug fix:
|
||||
* If the SSDP notify or search response sockets listen on more than one interface,
|
||||
* cybergarage can get our IP address wrong, and then we send the wrong one
|
||||
* to the UPnP device, which will reject it if it enforces strict addressing.
|
||||
*
|
||||
* For example, if we have interfaces 192.168.1.1 and 192.168.2.1, we could
|
||||
* get a response from 192.168.1.99 on the 192.168.2.1 interface, but when
|
||||
* we send something to 192.168.1.99 it will go out the 192.168.1.1 interface
|
||||
* with a request to forward to 192.168.2.1.
|
||||
*
|
||||
* So return the address of ours that is closest to his.
|
||||
*
|
||||
* @since 0.8.8
|
||||
*/
|
||||
private String getOurAddress(String deflt) {
|
||||
String rv = deflt;
|
||||
String hisIP = null;
|
||||
// see ControlRequest.setRequestHost()
|
||||
String him = _router.getURLBase();
|
||||
if (him != null && him.length() > 0) {
|
||||
try {
|
||||
URL url = new URL(him);
|
||||
hisIP = url.getHost();
|
||||
} catch (MalformedURLException mue) {}
|
||||
}
|
||||
if (hisIP == null) {
|
||||
him = _router.getLocation();
|
||||
if (him != null && him.length() > 0) {
|
||||
try {
|
||||
URL url = new URL(him);
|
||||
hisIP = url.getHost();
|
||||
} catch (MalformedURLException mue) {}
|
||||
}
|
||||
}
|
||||
if (hisIP == null)
|
||||
return rv;
|
||||
try {
|
||||
byte[] hisBytes = InetAddress.getByName(hisIP).getAddress();
|
||||
if (hisBytes.length != 4)
|
||||
return deflt;
|
||||
long hisLong = DataHelper.fromLong(hisBytes, 0, 4);
|
||||
long distance = Long.MAX_VALUE;
|
||||
|
||||
// loop through all our IP addresses, including the default, and
|
||||
// return the one closest to the router's IP
|
||||
Set<String> myAddresses = Addresses.getAddresses(true, false); // yes local, no IPv6
|
||||
myAddresses.add(deflt);
|
||||
for (String me : myAddresses) {
|
||||
if (me.startsWith("127.") || me.equals("0.0.0.0"))
|
||||
continue;
|
||||
try {
|
||||
byte[] myBytes = InetAddress.getByName(me).getAddress();
|
||||
long myLong = DataHelper.fromLong(myBytes, 0, 4);
|
||||
long newDistance = myLong ^ hisLong;
|
||||
if (newDistance < distance) {
|
||||
rv = me;
|
||||
distance = newDistance;
|
||||
}
|
||||
} catch (UnknownHostException uhe) {}
|
||||
}
|
||||
} catch (UnknownHostException uhe) {}
|
||||
return rv;
|
||||
}
|
||||
|
||||
/** blocking */
|
||||
private boolean removeMapping(String protocol, int port, ForwardPort fp, boolean noLog) {
|
||||
if(isDisabled || !isNATPresent())
|
||||
|
@@ -230,6 +230,7 @@ public class ControlPoint implements HTTPRequestListener
|
||||
if (rootDev == null)
|
||||
return;
|
||||
rootDev.setSSDPPacket(ssdpPacket);
|
||||
Debug.warning("Add root device", new Exception("received on " + ssdpPacket.getLocalAddress()));
|
||||
addDevice(rootNode);
|
||||
|
||||
// Thanks for Oliver Newell (2004/10/16)
|
||||
|
@@ -191,6 +191,7 @@ public class HTTPMUSocket
|
||||
try {
|
||||
ssdpMultiSock.receive(recvPacket.getDatagramPacket());
|
||||
recvPacket.setTimeStamp(System.currentTimeMillis());
|
||||
Debug.warning("Received SSDP multicast packet on " + getLocalAddress() + " from " + recvPacket.getRemoteAddress());
|
||||
}
|
||||
catch (Exception e) {
|
||||
//Debug.warning(e);
|
||||
|
@@ -195,6 +195,7 @@ public class HTTPUSocket
|
||||
try {
|
||||
ssdpUniSock.receive(recvPacket.getDatagramPacket());
|
||||
recvPacket.setTimeStamp(System.currentTimeMillis());
|
||||
Debug.warning("Received SSDP unicast packet on " + getLocalAddress() + " from " + recvPacket.getRemoteAddress());
|
||||
}
|
||||
catch (Exception e) {
|
||||
//Debug.warning(e);
|
||||
|
@@ -29,6 +29,7 @@ import java.net.*;
|
||||
import org.cybergarage.net.*;
|
||||
import org.cybergarage.http.*;
|
||||
import org.cybergarage.upnp.*;
|
||||
import org.cybergarage.util.Debug;
|
||||
|
||||
public class SSDPNotifySocket extends HTTPMUSocket implements Runnable
|
||||
{
|
||||
@@ -47,6 +48,7 @@ public class SSDPNotifySocket extends HTTPMUSocket implements Runnable
|
||||
useIPv6Address = true;
|
||||
}
|
||||
open(addr, SSDP.PORT, bindAddr);
|
||||
Debug.warning("Opened SSDP notify socket at " + bindAddr + ':' + SSDP.PORT);
|
||||
setControlPoint(null);
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* CyberUPnP for Java
|
||||
*
|
||||
* Copyright (C) Satoshi Konno 2002-2003
|
||||
*
|
||||
*
|
||||
* File: SSDPSearchResponseSocketList.java
|
||||
*
|
||||
* Revision;
|
||||
@@ -14,7 +14,7 @@
|
||||
* - Added post() to send a SSDPSearchRequest.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
|
||||
package org.cybergarage.upnp.ssdp;
|
||||
|
||||
import java.util.*;
|
||||
@@ -22,6 +22,7 @@ import java.util.*;
|
||||
import org.cybergarage.net.*;
|
||||
|
||||
import org.cybergarage.upnp.*;
|
||||
import org.cybergarage.util.Debug;
|
||||
|
||||
public class SSDPSearchResponseSocketList extends Vector
|
||||
{
|
||||
@@ -68,6 +69,7 @@ public class SSDPSearchResponseSocketList extends Vector
|
||||
for (int n=0; n<nHostAddrs; n++) {
|
||||
String bindAddr = HostInterface.getHostAddress(n);
|
||||
SSDPSearchResponseSocket socket = new SSDPSearchResponseSocket(bindAddr, port);
|
||||
Debug.warning("Opened SSDP search response socket at " + bindAddr + ':' + port);
|
||||
add(socket);
|
||||
}
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@ public class SSDPSearchSocket extends HTTPMUSocket implements Runnable
|
||||
public SSDPSearchSocket(String bindAddr)
|
||||
{
|
||||
open(bindAddr);
|
||||
Debug.warning("Opened SSDP search socket at " + bindAddr + ':' + SSDP.PORT);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user