I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c5ac0981 authored by zzz's avatar zzz
Browse files

propagate from branch 'i2p.i2p.zzz.test' (head 0bb4b6c8acec3e78fe1d79924fef7186cfe31973)

            to branch 'i2p.i2p' (head b13b20bc5c20fd4ce45a91cacd483bc9fdea7118)
parents 129fc5b8 6b0a2464
No related branches found
No related tags found
No related merge requests found
Showing
with 960 additions and 242 deletions
This product includes both public domain code and licensed code as described below.
For all code, unless otherwise stated in the appropriate license, the following applies:
NO WARRANTY
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
LICENSES
--------
Core:
Public domain except as listed below:
ElGamal and DSA code:
Copyright (c) 2003, TheCrypto
See licenses/LICENSE-ElGamalDSA.txt
SHA256 and HMAC-SHA256:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
See licenses/LICENSE-SHA256.txt
AES code:
Under the Cryptix (MIT) license, written by the Cryptix team
(That's what our website says but all our AES code looks like it is public domain)
Crypto filters:
From the xlattice app - http://xlattice.sourceforge.net/
See licenses/LICENSE-BSD.txt
SNTP code:
Copyright (c) 2004, Adam Buckley
See licenses/LICENSE-SNTP.txt
PRNG:
Copyright (C) 2001, 2002, Free Software Foundation, Inc.
See licenses/LICENSE-LGPLv2.1.txt
GMP 4.1.3:
Copyright 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
See licenses/LICENSE-LGPLv2.1.txt
HashCash code:
Copyright 2006 Gregory Rubin grrubin@gmail.com
See licenses/LICENSE-HashCash.txt
Router:
Public domain
Installer:
Launch4j:
Copyright (C) 2005 Grzegorz Kowal
See licenses/LICENSE-GPLv2.txt
Izpack:
See licenses/LICENSE-Apache1.1.txt
Wrapper:
Copyright (c) 1999, 2004 Tanuki Software
See licenses/LICENSE-Wrapper.txt
Applications:
Addressbook:
Copyright (c) 2004 Ragnarok
See licenses/LICENSE-Addressbook.txt
BOB:
Copyright (C) sponge
DWTFYWTPL
I2PSnark:
Copyright (C) 2003 Mark J. Wielaard
See licenses/LICENSE-GPLv2.txt
I2PTunnel:
(c) 2003 - 2004 mihi
GPLv2 with exception.
See licenses/LICENSE-I2PTunnel.txt
See licenses/LICENSE-GPLv2.txt
I2PTunnel SOCKS Proxy:
Copyright (c) 2004 by human
GPLv2 with exception.
See licenses/LICENSE-I2PTunnel.txt
See licenses/LICENSE-GPLv2.txt
Jetty 5.1.12:
Copyright 2000-2004 Mort Bay Consulting Pty. Ltd.
See licenses/LICENSE-Apache1.1.txt
See licenses/LICENSE-Apache2.0.txt
See licenses/NOTICE-Ant.txt
See licenses/NOTICE-Commons-Logging.txt
JRobin 1.4.0:
See licenses/LICENSE-LGPLv2.1.txt
Ministreaming Lib:
By mihi.
See licenses/LICENSE-BSD.txt
Proxyscript:
By Cervantes.
Public domain.
Router console:
Public domain.
SAM:
Public domain.
Streaming Lib:
Public domain.
SusiDNS:
Copyright (C) 2005 <susi23@mail.i2p>
See licenses/LICENSE-GPLv2.txt
SusiMail:
Copyright (C) 2004-2005 <susi23@mail.i2p>
See licenses/LICENSE-GPLv2.txt
Systray:
Public domain.
Bundles systray4j code:
See licenses/LICENSE-GPLv2.txt
Other Applications and Libraries
--------------------------------
The following applications and libraries are not used or bundled in
binary packages, therefore the licenses are not included in binary
distributions. See the source package for the additional license information.
Atalk:
Public domain
SAM C Library:
Copyright (c) 2004, Matthew P. Cashdollar <mpc@innographx.com>
See apps/sam/c/doc/license.txt
SAM C# Library:
Public domain.
See apps/sam/csharp/README
SAM Perl Library:
See licenses/LICENSE-GPLv2.txt
SAM Python Library:
Public domain.
ou will need atleast monotone > = 0.41 to get the most recent build source
and connect it to an already running i2p router.
OR:
You may download the actual "stable" source from
http://code.google.com/p/i2p/downloads/list
You will need to follwing tools to build the i2p and i2p-base packages:
bash >= 3.1.017
requiredbuilder >= 0.16.3 ( http://www.stabellini.net/requiredbuilder.html )
jre >= 6u11
jdk >= 6u11
apache-ant >= 1.7.1
perl >= 5.10.0
python >= 2.5.2
Reccomended:
monotone >= 0.41 ( http://pkgs.dr.ea.ms )
See also:
i2p/readme.txt
AND
i2p-base/readme.txt
for information and handy tips.
<?xml version="1.0" encoding="ISO-8859-1"?>
<project basedir="." default="slackpkg">
<target name="slackpkg">
<echo message="Building Slackware package." />
<exec executable="./i2p-base.SlackBuild">
</exec>
</target>
</project>
#!/bin/sh
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
if [ $I2PRCA -eq 0 ] ; then
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."
else
echo "/etc/rc.d/rc.local looks OK"
fi
if [ $I2PRCB -eq 0 ] ; then
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."
else
echo "/etc/rc.d/rc.local_shutdown looks OK"
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
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
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 '/etc/rc.d/rc.i2p to start it on boot.'
echo
fi
exit
#!/bin/sh
# Heavily based on the Slackware 12.1 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
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
BUILD=1sim
ARCH=noarch
INSTALL_DIR=opt
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
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
cd $PKG
requiredbuilder -v -y -s $CWD $PKG
makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.tgz
#!/bin/sh
# Start/stop i2p service.
i2p_start() {
/bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory start )"
}
i2p_stop() {
/bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory stop )"
}
case "$1" in
'start')
i2p_start
;;
'stop')
i2p_stop
;;
'restart')
i2p_stop
i2p_start
;;
*)
echo "usage $0 start|stop|restart"
;;
esac
An rc file called rc.i2p has been placed into the /etc/rc.d directory.
If you want to change installation dir, change the variable INSTALL_DIR
on base-i2p.SlackBuild and rebuild the package. You also will need to do the
same for the i2p package.
The install script will insert everything needed into /etc/rc.d/rc.local and
into /etc/rc.d/rc.local_shutdown automatically.
If you want to start I2P at boot you have to chmod +x /etc/rc.d/rc.i2p
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
base-i2p: base-i2p (I2P anonymizing network base config files)
base-i2p:
base-i2p: I2P is an anonymizing network, offering a simple layer that
base-i2p: identity-sensitive applications can use to securely communicate. All
base-i2p: data is wrapped with several layers of encryption, and the network is
base-i2p: both distributed and dynamic, with no trusted parties.
base-i2p: Many applications are available that interface with I2P, including
base-i2p: mail, peer-peer file sharing, IRC chat, and others.
base-i2p:
base-i2p: This package provides the startup files.
base-i2p:
bash >= 3.1.017
<?xml version="1.0" encoding="ISO-8859-1"?>
<project basedir="." default="slackpkg">
<target name="slackpkg">
<echo message="Building Slackware package." />
<exec executable="./i2p.SlackBuild">
</exec>
</target>
</project>
#!/bin/sh
INST_DIR=directory
( cd install
echo
for i in *.config ; {
if [ -f $INST_DIR/$i ] ; then
echo "Please check ${INST_DIR}${i}, as there is a new version."
cp $i $INST_DIR/$i.new
else
cp $i $INST_DIR/$i
fi
}
)
( cd $INST_DIR
if [ -f blocklist.txt ] ; then
echo "Please check ${INST_DIR}blocklist.txt, as there is a new version."
else
mv blocklist.txt.new blocklist.txt
fi
)
( cd $INST_DIR/eepsite
if [ -f jetty.xml ] ; then
rm jetty.xml.new
else
mv jetty.xml.new jetty.xml
fi
)
( cd $INST_DIR/eepsite/docroot
if [ -f index.html ] ; then
rm index.html.new
else
mv index.html.new index.html
fi
if [ -f favicon.ico ] ; then
rm favicon.ico.new
else
mv favicon.ico.new favicon.ico
fi
)
echo
echo "FINISHING I2P INSTALLATION. PLEASE WAIT."
cd $INST_DIR
sh postinstall.sh || (
echo "ERROR: failed execution of postinstall.sh. Please"
echo "cd into i2p installation directory and run "
echo "postinstall.sh manually with ./postinstall.sh"
exit 1
)
sleep 10
sh i2prouter stop || exit 1
echo
echo "Installation finished."
echo
exit
#!/bin/sh
# Heavily based on the Slackware 12.1 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
BUILD=1sim
# put here installation dir, without first and last /
# es: usr/local
INSTALL_DIR=opt
NAME=i2p
ARCH=noarch
#
# This mess is here due to the totally moronic way i2p does versioning.
# We correct it here.
#
ROUTER=$(echo -ne "_")$(cat ../../router/java/src/net/i2p/router/RouterVersion.java | grep -e "public final static long BUILD" | cut -f2 -d"=" | cut -f1 -d";" | sed -re "s/ //g")
if [ "$ROUTER" == "_" ] ; then
ROUTER="_0"
fi
#
# That was the easy one, now for the tough one.
#
CORE=$(cat ../../core/java/src/net/i2p/CoreVersion.java | grep -e "public final static String VERSION" | cut -f2 -d'"' | sed -re "s/ //g")
CORE1=$(echo -n $CORE.x.x | sed -re "s/(.*)\.(.*)\.(.*)\.(.*)/\1/")
CORE2=$(echo -n $CORE.x | sed -re "s/(.*)\.(.*)\.(.*)\.(.*)/\1/")
if [ "$CORE.x.x" == "$CORE1" ] ; then
CORE=$(echo -ne $CORE".0.0")
fi
if [ "$CORE.x" == "$CORE2" ] ; then
CORE=$(echo -ne $CORE".0")
fi
VERSION=$(echo $CORE$ROUTER)
#
# Whew!
# OK, let's build i2p
#
CWD=$(pwd)
TMP=/tmp
PKG=$TMP/package-i2p
rm -rf $PKG
mkdir -p $PKG
cd $CWD/../../
ant distclean
ant dist
tar xjvf i2p.tar.bz2 -C $TMP
cd $TMP/i2p
chown -R root:root .
mkdir -p $PKG/$INSTALL_DIR/
cp -a ../i2p $PKG/$INSTALL_DIR/
mkdir -p $PKG/install
mv $PKG/$INSTALL_DIR/i2p/*.config $PKG/install
mv $PKG/$INSTALL_DIR/i2p/blocklist.txt $PKG/$INSTALL_DIR/i2p/blocklist.txt.new
mv $PKG/$INSTALL_DIR/i2p/eepsite/jetty.xml $PKG/$INSTALL_DIR/i2p/eepsite/jetty.xml.new
mv $PKG/$INSTALL_DIR/i2p/eepsite/docroot/index.html $PKG/$INSTALL_DIR/i2p/eepsite/docroot/index.html.new
mv $PKG/$INSTALL_DIR/i2p/eepsite/docroot/favicon.ico $PKG/$INSTALL_DIR/i2p/eepsite/docroot/favicon.ico.new
sed "s|directory|/$INSTALL_DIR/i2p/|g" $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
requiredbuilder -v -y -s $CWD $PKG
makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.tgz
Building:
The i2p package will be installed in /opt/i2p
If you want to change installation dir, change the variable INSTALL_DIR
on i2p.SlackBuild and rebuild the package. You will also need to do the same
in the base-i2p package.
Installation and Upgrade:
Probably you will never have to update i2p packages. However if you do,
be sure to installpkg first, then removepkg or custom config files can
be lost with upgradepkg. I2P has an auto-update function. However using
installpkg then removepkg lowers the demand on the I2P network as a
whole, and is by far faster.
After installpkg command, doinst.sh will execute a postinstallation script
needed by I2P. Be sure to also install the base-i2p package.
Optional:
chmod +x /etc/rc.d/rc.i2p only if you want it to start on boot and stop on
shutdown.
How to start I2P:
Start I2P service with-
sh /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 addressbook hosts so that you can
get to the many available eepsites and other service on I2P. These are not
set up by default for security reasons.
Please see the faqs on http://www.i2p2.i2p/ or http://www.i2p2.de/ on how
to subscribe to the various addressbook services.
To stop I2P:
/etc/rc.d/rc.i2p stop
For any additional information:
Within I2P- http://www.i2p2.i2p/, http://forum.i2p/, http://zzz.i2p
Internet (not reccomended!) - http://www.i2p2.de/, http://forum.i2p2.de/
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler----------------------------------------------------------|
i2p: i2p (an anonymizing network)
i2p:
i2p: I2P is an anonymizing network, offering a simple layer that
i2p: identity-sensitive applications can use to securely communicate. All
i2p: data is wrapped with several layers of encryption, and the network is
i2p: both distributed and dynamic, with no trusted parties.
i2p: Many applications are available that interface with I2P, including
i2p: mail, peer-peer file sharing, IRC chat, and others.
i2p: WARNING: To upgrade installpkg FIRST _THEN_ removepkg.
i2p: For more information, see: http://www.i2p2.de/
i2p:
glibc >= 2.7-i486-17 | glibc-solibs >= 2.7-i486-17
perl >= 5.10.0-i486-1
#bob.config
#Tue Dec 30 00:00:00 UTC 2008
# Please leave this file here for testing.
# Thank you,
# Sponge
i2cp.tcp.port=7654
BOB.host=localhost
inbound.lengthVariance=0
i2cp.messageReliability=BestEffort
BOB.port=45067
outbound.length=1
inbound.length=1
outbound.lengthVariance=0
i2cp.tcp.host=localhost
compile.on.save=false
do.depend=false do.depend=false
do.jar=true do.jar=true
javac.debug=true javac.debug=true
......
application.title=BOB application.title=BOB
application.vendor=root application.vendor=root
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=false
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=8
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=8
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=8
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=80
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
build.classes.dir=${build.dir}/classes build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned: # This directory is removed when the project is cleaned:
...@@ -30,13 +36,31 @@ file.reference.mstreaming.jar-1=../ministreaming/java/build/mstreaming.jar ...@@ -30,13 +36,31 @@ file.reference.mstreaming.jar-1=../ministreaming/java/build/mstreaming.jar
file.reference.NetBeansProjects-i2p.i2p=../i2p.i2p/ file.reference.NetBeansProjects-i2p.i2p=../i2p.i2p/
file.reference.streaming.jar=../../bob/i2p/i2p.i2p/build/streaming.jar file.reference.streaming.jar=../../bob/i2p/i2p.i2p/build/streaming.jar
file.reference.streaming.jar-1=../streaming/java/build/streaming.jar file.reference.streaming.jar-1=../streaming/java/build/streaming.jar
file.reference.wrapper-freebsd=../../installer/lib/wrapper/freebsd/
file.reference.wrapper-linux=../../installer/lib/wrapper/linux/
file.reference.wrapper-linux64=../../installer/lib/wrapper/linux64/
file.reference.wrapper-macosx=../../installer/lib/wrapper/macosx/
file.reference.wrapper-solaris=../../installer/lib/wrapper/solaris/
file.reference.wrapper-win32=../../installer/lib/wrapper/win32/
file.reference.wrapper.jar=../../installer/lib/wrapper/linux/wrapper.jar
file.reference.wrapper.jar-1=../../installer/lib/wrapper/freebsd/wrapper.jar
file.reference.wrapper.jar-2=../../installer/lib/wrapper/linux64/wrapper.jar
file.reference.wrapper.jar-3=../../installer/lib/wrapper/macosx/wrapper.jar
file.reference.wrapper.jar-4=../../installer/lib/wrapper/solaris/wrapper.jar
file.reference.wrapper.jar-5=../../installer/lib/wrapper/win32/wrapper.jar
includes=** includes=**
jar.compress=false jar.compress=false
javac.classpath=\ javac.classpath=\
${file.reference.i2p.jar-1}:\ ${file.reference.i2p.jar-1}:\
${file.reference.i2ptunnel.jar}:\ ${file.reference.i2ptunnel.jar}:\
${file.reference.mstreaming.jar-1}:\ ${file.reference.mstreaming.jar-1}:\
${file.reference.streaming.jar-1} ${file.reference.streaming.jar-1}:\
${file.reference.wrapper.jar-1}:\
${file.reference.wrapper.jar}:\
${file.reference.wrapper.jar-2}:\
${file.reference.wrapper.jar-3}:\
${file.reference.wrapper.jar-4}:\
${file.reference.wrapper.jar-5}
# Space-separated list of extra javac options # Space-separated list of extra javac options
javac.compilerargs= javac.compilerargs=
javac.deprecation=false javac.deprecation=false
...@@ -58,6 +82,12 @@ javadoc.splitindex=true ...@@ -58,6 +82,12 @@ javadoc.splitindex=true
javadoc.use=true javadoc.use=true
javadoc.version=false javadoc.version=false
javadoc.windowtitle= javadoc.windowtitle=
jnlp.codebase.type=local
jnlp.codebase.url=file:/root/NetBeansProjects/i2p.i2p/apps/BOB/dist/
jnlp.descriptor=application
jnlp.enabled=false
jnlp.offline-allowed=false
jnlp.signed=false
main.class=net.i2p.BOB.Main main.class=net.i2p.BOB.Main
manifest.file=manifest.mf manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF meta.inf.dir=${src.dir}/META-INF
......
...@@ -113,6 +113,18 @@ public class BOB { ...@@ -113,6 +113,18 @@ public class BOB {
public final static String PROP_BOB_HOST = "BOB.host"; public final static String PROP_BOB_HOST = "BOB.host";
private static int maxConnections = 0; private static int maxConnections = 0;
private static NamedDB database; private static NamedDB database;
private static Properties props = new Properties();
/**
* Log a warning
*
* @param arg
*/
public static void info(String arg) {
System.out.println("INFO:" + arg);
_log.info(arg);
}
/** /**
* Log a warning * Log a warning
...@@ -120,7 +132,7 @@ public class BOB { ...@@ -120,7 +132,7 @@ public class BOB {
* @param arg * @param arg
*/ */
public static void warn(String arg) { public static void warn(String arg) {
System.out.println(arg); System.out.println("WARNING:" + arg);
_log.warn(arg); _log.warn(arg);
} }
...@@ -130,7 +142,7 @@ public class BOB { ...@@ -130,7 +142,7 @@ public class BOB {
* @param arg * @param arg
*/ */
public static void error(String arg) { public static void error(String arg) {
System.out.println(arg); System.out.println("ERROR: " + arg);
_log.error(arg); _log.error(arg);
} }
...@@ -146,7 +158,6 @@ public class BOB { ...@@ -146,7 +158,6 @@ public class BOB {
// Set up all defaults to be passed forward to other threads. // Set up all defaults to be passed forward to other threads.
// Re-reading the config file in each thread is pretty damn stupid. // Re-reading the config file in each thread is pretty damn stupid.
// I2PClient client = I2PClientFactory.createClient(); // I2PClient client = I2PClientFactory.createClient();
Properties props = new Properties();
String configLocation = System.getProperty(PROP_CONFIG_LOCATION, "bob.config"); String configLocation = System.getProperty(PROP_CONFIG_LOCATION, "bob.config");
// This is here just to ensure there is no interference with our threadgroups. // This is here just to ensure there is no interference with our threadgroups.
...@@ -201,12 +212,13 @@ public class BOB { ...@@ -201,12 +212,13 @@ public class BOB {
props.store(fo, configLocation); props.store(fo, configLocation);
fo.close(); fo.close();
} catch(IOException ioe) { } catch(IOException ioe) {
warn("IOException on BOB config file " + configLocation + ", " + ioe); error("IOException on BOB config file " + configLocation + ", " + ioe);
} }
} }
i = 0;
try { try {
warn("BOB is now running."); info("BOB is now running.");
ServerSocket listener = new ServerSocket(Integer.parseInt(props.getProperty(PROP_BOB_PORT)), 10, InetAddress.getByName(props.getProperty(PROP_BOB_HOST))); ServerSocket listener = new ServerSocket(Integer.parseInt(props.getProperty(PROP_BOB_PORT)), 10, InetAddress.getByName(props.getProperty(PROP_BOB_HOST)));
Socket server; Socket server;
...@@ -219,7 +231,7 @@ public class BOB { ...@@ -219,7 +231,7 @@ public class BOB {
t.start(); t.start();
} }
} catch(IOException ioe) { } catch(IOException ioe) {
warn("IOException on socket listen: " + ioe); error("IOException on socket listen: " + ioe);
ioe.printStackTrace(); ioe.printStackTrace();
} }
} }
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment