diff --git a/Slackware/i2p-base/doinst.sh b/Slackware/i2p-base/doinst.sh
index 087ee112c..cc2277f36 100644
--- a/Slackware/i2p-base/doinst.sh
+++ b/Slackware/i2p-base/doinst.sh
@@ -1,43 +1,155 @@
#!/bin/sh
+#
+#
+# Now in the future we only need to look for '#I2P' and '#/I2P'
+# for modifications to rc.local and rc.local_shutdown.
+# I was a moron for not doing it this way in the first place :-) -- Sponge
+#
+#
+
touch /etc/rc.d/rc.local
touch /etc/rc.d/rc.local_shutdown
-I2PRCA=`grep -c /etc/rc.d/rc.local -e i2p`
-I2PRCB=`grep -c /etc/rc.d/rc.local_shutdown -e i2p`
-
echo
+echo -n "Check 1: /etc/rc.d/rc.local "
+I2PRCA=`grep -c /etc/rc.d/rc.local -e '/etc/rc.d/rc.i2p'`
if [ $I2PRCA -eq 0 ] ; then
+ echo '#I2P' >> /etc/rc.d/rc.local
+ echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local
echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local
echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local
echo "fi" >> /etc/rc.d/rc.local
- echo "/etc/rc.d/rc.local modified."
+ echo '#/I2P' >> /etc/rc.d/rc.local
+ echo "modified."
else
- echo "/etc/rc.d/rc.local looks OK"
+ echo -n "looks OK so far,"
+ # Fix old installs, or where people have modified.
+
+ echo -n " Check 1A: "
+ I2PRCC=`grep -c /etc/rc.d/rc.local -e 'i2p-\*\.tmp'`
+
+ if [ $I2PRCC -eq 0 ] ; then
+ DATA=$(cat /etc/rc.d/rc.local | sed -re 's/if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/#I2P\n\( cd \/tmp ; rm -Rf i2p-*.tmp \)\nif \[ -x \/etc\/rc.d\/rc.i2p \] ; then/')
+ echo "${DATA}" > /etc/rc.d/rc.local
+ echo -n "additional modifications applied,"
+ else
+ echo -n "looks OK so far,"
+ fi
+
+ echo -n " Check 1B: "
+ I2PRCE=`grep -c /etc/rc.d/rc.local -e 'i2p-\*\.tmp'`
+ if [ $I2PRCE -eq 0 ] ; then
+ DATATOP=$(cat /etc/rc.d/rc.local | sed -n '0,/i2p-\*\.tmp/p' | sed '$d' )
+ DATABOT=$(cat /etc/rc.d/rc.local | sed -n '/i2p-\*\.tmp/,$p' | sed -n '/^fi/,$p' | sed "1d")
+ echo "${DATATOP}" > /etc/rc.d/rc.local
+ echo '#I2P' >> /etc/rc.d/rc.local
+ echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local
+ echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local
+ echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local
+ echo "fi" >> /etc/rc.d/rc.local
+ echo '#/I2P' >> /etc/rc.d/rc.local
+ echo "${DATABOT}" >> /etc/rc.d/rc.local
+
+ echo -n "additional modifications applied,"
+ else
+ echo -n "looks ok so far,"
+ fi
+ echo -n " Check 1C: "
+ I2PRCF=`grep -c /etc/rc.d/rc.local -e '#/I2P'`
+ if [ $I2PRCF -eq 0 ] ; then
+ DATATOP=$(cat /etc/rc.d/rc.local | sed -n '0,/^#I2P/p' | sed '$d' )
+ DATABOT=$(cat /etc/rc.d/rc.local | sed -n '/^#I2P/,$p' | sed -n '/^fi/,$p' | sed "1d")
+ echo "${DATATOP}" > /etc/rc.d/rc.local
+ echo '#I2P' >> /etc/rc.d/rc.local
+ echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local
+ echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local
+ echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local
+ echo "fi" >> /etc/rc.d/rc.local
+ echo '#/I2P' >> /etc/rc.d/rc.local
+ echo "${DATABOT}" >> /etc/rc.d/rc.local
+
+ echo -n "additional modifications applied,"
+ else
+ echo -n "looks ok so far,"
+ fi
+ echo " Done."
fi
+echo -n "Check 2: /etc/rc.d/rc.local_shutdown "
+I2PRCB=`grep -c /etc/rc.d/rc.local_shutdown -e '/etc/rc.d/rc.i2p'`
if [ $I2PRCB -eq 0 ] ; then
+ echo "#I2P" >> /etc/rc.d/rc.local_shutdown
echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown
echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown
echo "fi" >> /etc/rc.d/rc.local_shutdown
- echo "/etc/rc.d/rc.local_shutdown modified."
+ echo "#/I2P" >> /etc/rc.d/rc.local_shutdown
+ echo "modified."
else
- echo "/etc/rc.d/rc.local_shutdown looks OK"
+ echo -n "looks OK so far,"
+ # Fix old installs
+
+ echo -n " Check 1A: "
+ I2PRCG=`grep -c /etc/rc.d/rc.local_shutdown -e '#I2P'`
+ if [ $I2PRCG -eq 0 ] ; then
+ DATATOP=$(cat /etc/rc.d/rc.local_shutdown | sed -n '0,/^if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/p' | sed '$d' )
+ DATABOT=$(cat /etc/rc.d/rc.local_shutdown | sed -n '/^if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/,$p' | sed -n '/^fi/,$p' | sed "1d")
+ echo "${DATATOP}" > /etc/rc.d/rc.local_shutdown
+ echo '#I2P' >> /etc/rc.d/rc.local_shutdown
+ echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown
+ echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown
+ echo "fi" >> /etc/rc.d/rc.local_shutdown
+ echo "#/I2P" >> /etc/rc.d/rc.local_shutdown
+ echo "${DATABOT}" >> /etc/rc.d/rc.local_shutdown
+ echo -n "additional modifications applied,"
+ else
+ echo -n "looks OK so far,"
+ fi
+ echo -n " Check 1B: "
+ I2PRCH=`grep -c /etc/rc.d/rc.local_shutdown -e '#/I2P'`
+ if [ $I2PRCH -eq 0 ] ; then
+ DATATOP=$(cat /etc/rc.d/rc.local_shutdown | sed -n '0,/^#I2P/p' | sed '$d' )
+ DATABOT=$(cat /etc/rc.d/rc.local_shutdown | sed -n '/^#I2P/,$p' | sed -n '/^fi/,$p' | sed "1d")
+ echo "${DATATOP}" > /etc/rc.d/rc.local_shutdown
+ echo '#I2P' >> /etc/rc.d/rc.local_shutdown
+ echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown
+ echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown
+ echo "fi" >> /etc/rc.d/rc.local_shutdown
+ echo "#/I2P" >> /etc/rc.d/rc.local_shutdown
+ echo "${DATABOT}" >> /etc/rc.d/rc.local_shutdown
+ echo -n "additional modifications applied,"
+ else
+ echo -n "looks OK so far,"
+ fi
+ echo " Done."
fi
if [ -f /etc/rc.d/rc.i2p ] ; then
if [ -x /etc/rc.d/rc.i2p ] ; then
chmod +x /etc/rc.d/rc.i2p.new
fi
- echo
+ # Hopefully get admin's attention.
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -e "\007" ; sleep 0.3
echo "It apears that you already have /etc/rc.d/rc.i2p"
- echo "You may wish to replace it with /etc/rc.d/rc.i2p.new"
- echo
+ echo "You should replace it with /etc/rc.d/rc.i2p.new as soon as possible"
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -ne "\007" ; sleep 0.3
+ echo -e "\007" ; sleep 0.3
else
mv /etc/rc.d/rc.i2p.new /etc/rc.d/rc.i2p
echo
echo "Installation finished. The i2p start/stop script has been"
- echo "installed on /etc/rc.d directory. You should chmod +x"
+ echo "installed in /etc/rc.d . You should chmod +x"
echo '/etc/rc.d/rc.i2p to start it on boot.'
echo
fi
diff --git a/Slackware/i2p-base/i2p-base.SlackBuild b/Slackware/i2p-base/i2p-base.SlackBuild
index 7101fb950..2d35eacb8 100644
--- a/Slackware/i2p-base/i2p-base.SlackBuild
+++ b/Slackware/i2p-base/i2p-base.SlackBuild
@@ -1,46 +1,57 @@
#!/bin/sh
-# Heavily based on the Slackware 12.1 SlackBuild
-# Slackware build script for i2p
-
+#
+# Heavily based on the Slackware 12.2 SlackBuild
+# Slackware build script for I2P
+#
# PLEASE READ THIS:
-# Probably you will never have to update i2p packages with upgradepkg,
-# just because i2p have an auto-update function.
-# How to start i2p:
-# After installpkg command, doinst.sh will execute a postinstallation script
-# needed by i2p. After that you have to chmod +x /etc/rc.d/rc.i2p and start
-# i2p service with /etc/rc.d/rc.i2p start.
+# How to start I2P:
+# After installpkg command, doinst.sh will execute a post-installation script
+# needed by I2P. After that you have to chmod +x /etc/rc.d/rc.i2p and start
+# I2P service with /etc/rc.d/rc.i2p start.
+#
# Now tell your browser to user this proxy: localhost on port 4444 and open
# this page: http://localhost:7657/index.jsp
-# Here you can configure i2p, watch network status and navigate anonimously.
+#
+# Here you can configure I2P, watch network status and navigate anonimously.
# It's suggested to subscribe to various dns host, like i2host.i2p
# For any additional information, visit i2host.i2p and forum.i2p
+#
CWD=$(pwd)
TMP=/tmp
PKG=/$TMP/package-base-i2p
-rm -rf $PKG
-mkdir -p $PKG
-# put here installation dir, without first and last /
-# es: usr/local
NAME=i2p-base
-VERSION=0.0.1
+VERSION=0.0.2
BUILD=1sponge
ARCH=noarch
INSTALL_DIR=opt
+
+# Less than slackware 13?
+SLKPLT=$(cat /etc/slackware-version | sed -re "s/(Slackware )([0-9]*)(.*)/\2/")
+if [ $SLKPLT -lt 13 ] ; then
+ EXT=tgz
+else
+ EXT=txz
+fi
+
+rm -rf $PKG
+mkdir -p $PKG
cd $PKG
chown -R root:root .
mkdir -p $PKG/etc/rc.d
mkdir -p $PKG/install
-sed "s|directory|/$INSTALL_DIR/i2p/i2prouter|g" $CWD/rc.i2p_def > $PKG/etc/rc.d/rc.i2p.new
+sed "s|directory|/$INSTALL_DIR/i2p/i2prouter|g" "$CWD/rc.i2p_def" > $PKG/etc/rc.d/rc.i2p.new
chmod 644 $PKG/etc/rc.d/rc.i2p.new
-sed "s|directory|/$INSTALL_DIR/i2p/|g" $CWD/doinst.sh > $PKG/install/doinst.sh
-cat $CWD/slack-desc > $PKG/install/slack-desc
+cat "$CWD/doinst.sh" > $PKG/install/doinst.sh
+cat "$CWD/slack-desc" > $PKG/install/slack-desc
cd $PKG
#
-# Not really that important to exec this.
-#requiredbuilder -v -y -s $CWD $PKG
+# Not really that important to exec this
+# as there aren't any deps we don't know.
#
-cat $CWD/slack-required > $PKG/install/slack-required
-makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.tgz
+# requiredbuilder -v -y -s $CWD $PKG
+#
+cat "$CWD/slack-required" > $PKG/install/slack-required
+makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.$EXT
diff --git a/Slackware/i2p-base/rc.i2p_def b/Slackware/i2p-base/rc.i2p_def
index 268968042..8e059c23d 100644
--- a/Slackware/i2p-base/rc.i2p_def
+++ b/Slackware/i2p-base/rc.i2p_def
@@ -9,6 +9,22 @@ i2p_stop() {
/bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory stop )"
}
+i2p_restart() {
+ /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory restart)"
+}
+
+i2p_status() {
+ /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory status )"
+}
+
+i2p_console() {
+ /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory console )"
+}
+
+i2p_dump() {
+ /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory dump )"
+}
+
case "$1" in
'start')
i2p_start
@@ -17,11 +33,19 @@ case "$1" in
i2p_stop
;;
'restart')
- i2p_stop
- i2p_start
+ i2p_restart
+ ;;
+'status')
+ i2p_status
+ ;;
+'console')
+ i2p_console
+ ;;
+'dump')
+ i2p_dump
;;
*)
- echo "usage $0 start|stop|restart"
+ echo "usage $0 start|stop|restart|status|console|dump"
;;
esac
diff --git a/Slackware/i2p/i2p.SlackBuild b/Slackware/i2p/i2p.SlackBuild
index a8ecf3be2..fc95ce379 100755
--- a/Slackware/i2p/i2p.SlackBuild
+++ b/Slackware/i2p/i2p.SlackBuild
@@ -1,28 +1,35 @@
#!/bin/sh
-# Heavily based on the Slackware 12.1 SlackBuild
-# Slackware build script for i2p
-
+#
+# Heavily based on the Slackware 12.2 SlackBuild
+# Slackware build script for I2P
+#
# PLEASE READ THIS:
-# Probably you will never have to update i2p packages with upgradepkg,
-# just because i2p have an auto-update function.
-# How to start i2p:
-# After installpkg command, doinst.sh will execute a postinstallation script
-# needed by i2p. After that you have to chmod +x /etc/rc.d/rc.i2p and start
-# i2p service with /etc/rc.d/rc.i2p start.
-# Now tell your browser to user this proxy: localhost on port 4444 and open
-# this page: http://localhost:7657/index.jsp
-# Here you can configure i2p, watch network status and navigate anonimously.
-# It's suggested to subscribe to various dns host, like i2host.i2p
-# For any additional information, visit i2host.i2p and forum.i2p
+# Probably you will never have to update I2P packages with upgradepkg,
+# just because I2P has an auto-update function.
+# Really you should not ever use any "upgrade" method.
+#
+# The correct way to upgrade is to:
+# 1: install the upgrade
+# 2: remove the old package
+#
+# It is a terrible shame that upgradepkg doesn't do this, infact,
+# it would actually be the correct way for *any* package!
+#
+#
BUILD=1sponge
-
-# put here installation dir, without first and last /
-# eg: usr/local
INSTALL_DIR=opt
NAME=i2p
ARCH=noarch
+# Less than slackware 13?
+SLKPLT=$(cat /etc/slackware-version | sed -re "s/(Slackware )([0-9]*)(.*)/\2/")
+if [ $SLKPLT -lt 13 ] ; then
+ EXT=tgz
+else
+ EXT=txz
+fi
+
#
# This mess is here due to the totally moronic way i2p does versioning.
@@ -117,7 +124,7 @@ cd $PKG
# requiredbuilder fucks up REALLY bad, and thinks java is perl?!
# It also did not catch the shell requirements! BOOOOOOOOOOO! HISSSSSSSS!
#
-#requiredbuilder -v -y -s $CWD $PKG
+# requiredbuilder -v -y -s $CWD $PKG
#
cat $CWD/slack-required > $PKG/install/slack-required
-makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.tgz
+makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.$EXT
diff --git a/android/README.txt b/android/README.txt
index e8886a579..eeb48885b 100644
--- a/android/README.txt
+++ b/android/README.txt
@@ -1,9 +1,13 @@
-These instructions are for the 1.5 SDK.
+These instructions are for the 1.5 Android SDK.
The build file is not compatible with the 1.1 SDK any more.
+1.6 and 2.0 SDKs are untested.
#Unzip the android SDK in ../../
#So then the android tools will be in ../../android-sdk-linux_x86-1.5_r2/tools/
+# create a file local.properties with the following line:
+# sdk-location=/path/to/your/android-sdk-linux_x86-1.5_r2
+
#then build the android apk file:
ant debug
diff --git a/apps/addressbook/java/src/addressbook/AddressBook.java b/apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java
similarity index 98%
rename from apps/addressbook/java/src/addressbook/AddressBook.java
rename to apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java
index 2694cae78..6249cadaa 100644
--- a/apps/addressbook/java/src/addressbook/AddressBook.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
import java.io.File;
import java.io.IOException;
@@ -193,7 +193,8 @@ public class AddressBook {
(! host.endsWith(".router.i2p")) &&
(! host.endsWith(".console.i2p")) &&
- ((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AAAA")) ||
+ // null cert ends with AAAA but other zero-length certs would be AA
+ ((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AA")) ||
(dest.length() > MIN_DEST_LENGTH && dest.length() <= MAX_DEST_LENGTH)) &&
dest.replaceAll("[a-zA-Z0-9~-]", "").length() == 0
;
diff --git a/apps/addressbook/java/src/addressbook/ConfigParser.java b/apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java
similarity index 99%
rename from apps/addressbook/java/src/addressbook/ConfigParser.java
rename to apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java
index 7fbb214f0..be74de990 100644
--- a/apps/addressbook/java/src/addressbook/ConfigParser.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
import java.io.BufferedReader;
import java.io.BufferedWriter;
diff --git a/apps/addressbook/java/src/addressbook/Daemon.java b/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java
similarity index 99%
rename from apps/addressbook/java/src/addressbook/Daemon.java
rename to apps/addressbook/java/src/net/i2p/addressbook/Daemon.java
index a8a9a2da6..34b550df6 100644
--- a/apps/addressbook/java/src/addressbook/Daemon.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
import java.io.File;
import java.util.HashMap;
diff --git a/apps/addressbook/java/src/addressbook/DaemonThread.java b/apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java
similarity index 98%
rename from apps/addressbook/java/src/addressbook/DaemonThread.java
rename to apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java
index fb869d807..b5afaaa2f 100644
--- a/apps/addressbook/java/src/addressbook/DaemonThread.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
/**
* A thread that waits five minutes, then runs the addressbook daemon.
diff --git a/apps/addressbook/java/src/addressbook/Log.java b/apps/addressbook/java/src/net/i2p/addressbook/Log.java
similarity index 98%
rename from apps/addressbook/java/src/addressbook/Log.java
rename to apps/addressbook/java/src/net/i2p/addressbook/Log.java
index f608b20e2..a1ba1a2fc 100644
--- a/apps/addressbook/java/src/addressbook/Log.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/Log.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
import java.io.BufferedWriter;
import java.io.File;
diff --git a/apps/addressbook/java/src/addressbook/Servlet.java b/apps/addressbook/java/src/net/i2p/addressbook/Servlet.java
similarity index 98%
rename from apps/addressbook/java/src/addressbook/Servlet.java
rename to apps/addressbook/java/src/net/i2p/addressbook/Servlet.java
index 34af69c1c..8f26788e4 100644
--- a/apps/addressbook/java/src/addressbook/Servlet.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/Servlet.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
import javax.servlet.GenericServlet;
import javax.servlet.ServletConfig;
diff --git a/apps/addressbook/java/src/addressbook/Subscription.java b/apps/addressbook/java/src/net/i2p/addressbook/Subscription.java
similarity index 99%
rename from apps/addressbook/java/src/addressbook/Subscription.java
rename to apps/addressbook/java/src/net/i2p/addressbook/Subscription.java
index 1847535a9..a97635b12 100644
--- a/apps/addressbook/java/src/addressbook/Subscription.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/Subscription.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
/**
* A subscription to a remote address book.
diff --git a/apps/addressbook/java/src/addressbook/SubscriptionIterator.java b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java
similarity index 98%
rename from apps/addressbook/java/src/addressbook/SubscriptionIterator.java
rename to apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java
index 2c3e13b73..b033181e0 100644
--- a/apps/addressbook/java/src/addressbook/SubscriptionIterator.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
import java.util.Iterator;
import java.util.List;
diff --git a/apps/addressbook/java/src/addressbook/SubscriptionList.java b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionList.java
similarity index 99%
rename from apps/addressbook/java/src/addressbook/SubscriptionList.java
rename to apps/addressbook/java/src/net/i2p/addressbook/SubscriptionList.java
index 77597eef6..ac5d3236d 100644
--- a/apps/addressbook/java/src/addressbook/SubscriptionList.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionList.java
@@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-package addressbook;
+package net.i2p.addressbook;
import java.io.File;
import java.io.IOException;
diff --git a/apps/addressbook/web.xml b/apps/addressbook/web.xml
index 22d0d7d23..0c3548c68 100644
--- a/apps/addressbook/web.xml
+++ b/apps/addressbook/web.xml
@@ -6,11 +6,11 @@
"+ "You can resolve the conflict by considering which key you trust, "+ "and either discarding the addresshelper link, "+ "discarding the host entry from your host database, "+ - "or naming one of them differently.
") + "or naming one of them differently.") .getBytes(); private final static byte[] ERR_BAD_PROTOCOL = @@ -376,22 +385,16 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable // Did addresshelper key conflict? if (ahelperConflict) { - String str; - byte[] header; - str = FileUtil.readTextFile((new File(_errorDir, "ahelper-conflict-header.ht")).getAbsolutePath(), 100, true); - if (str != null) header = str.getBytes(); - else header = ERR_AHELPER_CONFLICT; if (out != null) { + // Fixme untranslated long alias = I2PAppContext.getGlobalContext().random().nextLong(); String trustedURL = protocol + uriPath + urlEncoding; String conflictURL = protocol + alias + ".i2p/?" + initialFragments; + byte[] header = getErrorPage("ahelper-conflict", ERR_AHELPER_CONFLICT); out.write(header); - out.write(("To visit the destination in your host database, click here. To visit the conflicting addresshelper link by temporarily giving it a random alias, click here.
").getBytes()); - out.write("