forked from I2P_Developers/i2p.i2p
merge of '42f7898ab54db310e16aa6fbedb1b078afe0ae18'
and '9d4166108eac930384ccb9c5859eede93f4d63ed'
This commit is contained in:
@@ -2,15 +2,32 @@
|
||||
# Start/stop i2p service.
|
||||
|
||||
i2p_start() {
|
||||
/bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory start )"
|
||||
# Check if router is up first!
|
||||
/bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory status )" > /dev/null
|
||||
if [ ! $? -eq 0 ] ; then {
|
||||
# I2p is already running, so tell the user.
|
||||
echo "I2P is already running..."
|
||||
i2p_status
|
||||
}
|
||||
else
|
||||
{
|
||||
# Just in-case there are leftover junk in /tmp...
|
||||
rm -Rf `grep /tmp/hsperfdata_root/* -le i2p` /tmp/i2p-*.tmp /tmp/router.ping
|
||||
# Now that all junk is cleaned up, start.
|
||||
/bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory start )"
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
i2p_stop() {
|
||||
/bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory stop )"
|
||||
rm -Rf `grep /tmp/hsperfdata_root/* -le i2p` /tmp/i2p-*.tmp /tmp/router.ping
|
||||
}
|
||||
|
||||
i2p_restart() {
|
||||
/bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory restart)"
|
||||
# We want a FULL cycle here, not the wrappers idea of this!
|
||||
i2p_stop
|
||||
i2p_start
|
||||
}
|
||||
|
||||
i2p_status() {
|
||||
|
||||
@@ -85,23 +85,26 @@ cp -a ../i2p $PKG/$INSTALL_DIR/
|
||||
mkdir -p $PKG/install
|
||||
|
||||
#############################################################################
|
||||
# Preconfigureation to make package smaller
|
||||
# Preconfigureation to make package smaller, and...
|
||||
# we keep as much as reasonable in the installation directory.
|
||||
# This makes the install map fairly well to the standard installation.
|
||||
# It also makes it easier to find the log and pid files!
|
||||
#############################################################################
|
||||
cd $PKG/$INSTALL_DIR/i2p
|
||||
|
||||
# wrapper.config $INSTALL_PATH and $SYSTEM_java_io_tmpdir
|
||||
sed "s|\$INSTALL_PATH|$INSTALL_DIR/i2p|g" wrapper.config > a
|
||||
sed "s|\$SYSTEM_java_io_tmpdir|/var/tmp|g" a > wrapper.config
|
||||
sed "s|\$INSTALL_PATH|/$INSTALL_DIR/i2p|g" wrapper.config > a
|
||||
sed "s|\$SYSTEM_java_io_tmpdir|/$INSTALL_DIR/i2p|g" a > wrapper.config
|
||||
# eepget %INSTALL_PATH
|
||||
sed "s|\$INSTALL_PATH|$INSTALL_DIR/i2p|g" eepget > a
|
||||
sed "s|\$INSTALL_PATH|/$INSTALL_DIR/i2p|g" eepget > a
|
||||
rm eepget
|
||||
mv a eepget
|
||||
# runplain.sh %INSTALL_PATH and %SYSTEM_java_io_tmpdir
|
||||
sed "s|%INSTALL_PATH|$INSTALL_DIR/i2p|g" runplain.sh > a
|
||||
sed "s|%SYSTEM_java_io_tmpdir|/var/tmp|g" a > runplain.sh
|
||||
sed "s|%INSTALL_PATH|/$INSTALL_DIR/i2p|g" runplain.sh > a
|
||||
sed "s|%SYSTEM_java_io_tmpdir|/$INSTALL_DIR/i2p|g" a > runplain.sh
|
||||
# i2prouter %INSTALL_PATH and %SYSTEM_java_io_tmpdir
|
||||
sed "s|%INSTALL_PATH|$INSTALL_DIR/i2p|g" i2prouter > a
|
||||
sed "s|%SYSTEM_java_io_tmpdir|/var/tmp|g" a > i2prouter
|
||||
sed "s|%INSTALL_PATH|/$INSTALL_DIR/i2p|g" i2prouter > a
|
||||
sed "s|%SYSTEM_java_io_tmpdir|/$INSTALL_DIR/i2p|g" a > i2prouter
|
||||
|
||||
chmod 744 ./i2prouter
|
||||
chmod 744 ./osid
|
||||
|
||||
@@ -42,7 +42,6 @@ public class Config {
|
||||
/**
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public static String getProperty( String name )
|
||||
{
|
||||
@@ -98,7 +97,6 @@ public class Config {
|
||||
*
|
||||
* @param name
|
||||
* @param defaultValue
|
||||
* @return
|
||||
*/
|
||||
public static String getProperty( String name, String defaultValue )
|
||||
{
|
||||
@@ -109,7 +107,6 @@ public class Config {
|
||||
*
|
||||
* @param name
|
||||
* @param defaultValue
|
||||
* @return
|
||||
*/
|
||||
public static int getProperty( String name, int defaultValue )
|
||||
{
|
||||
|
||||
@@ -270,7 +270,7 @@ public class Folder {
|
||||
/**
|
||||
* Returns the element on the current page on the given position.
|
||||
*
|
||||
* @param Position of the element on the current page.
|
||||
* @param x Position of the element on the current page.
|
||||
* @return Element on the current page on the given position.
|
||||
*/
|
||||
public Object getElementAtPosXonCurrentPage( int x )
|
||||
@@ -331,7 +331,7 @@ public class Folder {
|
||||
* Gets index of an element in the array regardless of sorting direction.
|
||||
*
|
||||
* @param element
|
||||
* @return
|
||||
* @return index
|
||||
*/
|
||||
private int getIndexOf( Object element )
|
||||
{
|
||||
@@ -348,7 +348,7 @@ public class Folder {
|
||||
* Sorting direction is taken into account.
|
||||
*
|
||||
* @param element
|
||||
* @return
|
||||
* @return The next element
|
||||
*/
|
||||
public Object getNextElement( Object element )
|
||||
{
|
||||
@@ -369,7 +369,7 @@ public class Folder {
|
||||
* Sorting direction is taken into account.
|
||||
*
|
||||
* @param element
|
||||
* @return
|
||||
* @return The previous element
|
||||
*/
|
||||
public Object getPreviousElement( Object element )
|
||||
{
|
||||
@@ -388,7 +388,7 @@ public class Folder {
|
||||
* Retrieves element at index i. Depends on sorting direction.
|
||||
*
|
||||
* @param i
|
||||
* @return
|
||||
* @return Element at index i
|
||||
*/
|
||||
private Object getElement( int i )
|
||||
{
|
||||
@@ -404,8 +404,6 @@ public class Folder {
|
||||
|
||||
/**
|
||||
* Returns true, if folder shows points to the last page.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isLastPage()
|
||||
{
|
||||
@@ -414,8 +412,6 @@ public class Folder {
|
||||
|
||||
/**
|
||||
* Returns true, if folder shows points to the first page.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isFirstPage()
|
||||
{
|
||||
@@ -427,7 +423,6 @@ public class Folder {
|
||||
* The sorting direction influences which element is taken for comparison.
|
||||
*
|
||||
* @param element
|
||||
* @return
|
||||
*/
|
||||
public boolean isLastElement( Object element )
|
||||
{
|
||||
@@ -441,7 +436,6 @@ public class Folder {
|
||||
* The sorting direction influences which element is taken for comparison.
|
||||
*
|
||||
* @param element
|
||||
* @return
|
||||
*/
|
||||
public boolean isFirstElement( Object element )
|
||||
{
|
||||
|
||||
@@ -56,16 +56,12 @@ public class Attachment {
|
||||
public void setBuffer(ReadBuffer buffer) {
|
||||
this.buffer = buffer;
|
||||
}
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
||||
public String getTransferEncoding() {
|
||||
// TODO Auto-generated method stub
|
||||
return transferEncoding;
|
||||
}
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
||||
public String getContentType() {
|
||||
// TODO Auto-generated method stub
|
||||
return contentType;
|
||||
@@ -82,9 +78,7 @@ public class Attachment {
|
||||
public void setTransferEncoding(String transferEncoding) {
|
||||
this.transferEncoding = transferEncoding;
|
||||
}
|
||||
/**
|
||||
* @param string
|
||||
*/
|
||||
|
||||
public void setData(String data ) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@@ -78,8 +78,8 @@ public class Mail {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param address
|
||||
* @return
|
||||
* @param address E-mail address to be validated
|
||||
* @return Is the e-mail address valid?
|
||||
*/
|
||||
public static boolean validateAddress( String address )
|
||||
{
|
||||
@@ -105,7 +105,6 @@ public class Mail {
|
||||
}
|
||||
/**
|
||||
* @param address
|
||||
* @return
|
||||
*/
|
||||
public static String getAddress(String address )
|
||||
{
|
||||
|
||||
@@ -47,9 +47,9 @@ public class MailCache {
|
||||
/**
|
||||
* Fetch any needed data from pop3 server.
|
||||
*
|
||||
* @param id message id to get
|
||||
* @param uidl message id to get
|
||||
* @param headerOnly fetch only header lines?
|
||||
* @return
|
||||
* @return An e-mail
|
||||
*/
|
||||
public Mail getMail( String uidl, boolean headerOnly ) {
|
||||
|
||||
|
||||
@@ -67,29 +67,25 @@ public class RequestWrapper {
|
||||
|
||||
/**
|
||||
* @param b
|
||||
* @return
|
||||
*/
|
||||
public HttpSession getSession(boolean b) {
|
||||
return httpRequest.getSession( b );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param key
|
||||
* @return
|
||||
* @param name Specific parameter key
|
||||
* @return parameter value
|
||||
*/
|
||||
public String getParameter(String name ) {
|
||||
return getParameter( name, null );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public HttpSession getSession() {
|
||||
return httpRequest.getSession();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @return List of request parameter names
|
||||
*/
|
||||
public Enumeration getParameterNames() {
|
||||
if( multiPartRequest != null ) {
|
||||
@@ -106,24 +102,19 @@ public class RequestWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @return The total length of the content.
|
||||
*/
|
||||
public int getContentLength() {
|
||||
return httpRequest.getContentLength();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @return The content type of the request.
|
||||
*/
|
||||
public String getContentType() {
|
||||
return httpRequest.getContentType();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param partName
|
||||
* @return
|
||||
*/
|
||||
public String getContentType( String partName )
|
||||
{
|
||||
String result = null;
|
||||
@@ -143,19 +134,11 @@ public class RequestWrapper {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* @param string
|
||||
* @return
|
||||
*/
|
||||
|
||||
public Object getAttribute(String string) {
|
||||
return httpRequest.getAttribute( string );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param new_subject
|
||||
* @param string
|
||||
* @return
|
||||
*/
|
||||
public String getParameter( String name, String defaultValue )
|
||||
{
|
||||
String result = defaultValue;
|
||||
@@ -184,10 +167,7 @@ public class RequestWrapper {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* @param new_filename
|
||||
* @return
|
||||
*/
|
||||
|
||||
public String getFilename(String partName )
|
||||
{
|
||||
String result = null;
|
||||
@@ -198,10 +178,7 @@ public class RequestWrapper {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* @param new_filename
|
||||
* @return
|
||||
*/
|
||||
|
||||
public InputStream getInputStream(String partName )
|
||||
{
|
||||
InputStream result = null;
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2010-10-22 sponge
|
||||
* Sanity and some fixs for slackware package
|
||||
|
||||
2010-10-22 sponge
|
||||
* Fix rc.i2p for slackware package
|
||||
|
||||
2010-10-10 sponge
|
||||
* Fulfill Request for name resolving in BOB
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 04;
|
||||
public final static long BUILD = 05;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
||||
10
router/java/src/net/i2p/router/package.html
Normal file
10
router/java/src/net/i2p/router/package.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
The I2P router application handles the I2P network communication.
|
||||
</p>
|
||||
<p>
|
||||
It encompasses sending and receiving messages, building up tunnels, encrypting and decrypting (on multiple levels) where applicable, and so on.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
10
router/java/src/net/i2p/router/peermanager/package.html
Normal file
10
router/java/src/net/i2p/router/peermanager/package.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
The peer manager logs information about the history and quality of network peers.
|
||||
</p>
|
||||
<p>
|
||||
Peer capacity, speed and other parameters are calculated to determine in what cases we should use each peer.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
10
router/java/src/net/i2p/router/startup/package.html
Normal file
10
router/java/src/net/i2p/router/startup/package.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
The I2P startup package loads the configuration when I2P is started.
|
||||
</p>
|
||||
<p>
|
||||
The startup consists of a number of different jobs, like loading data from files for the network database, creating new router information (keypairs), and so on.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
The NTCP transport allows passing I2P messages on top of TCP. The N in NTCP stands for 'New', as the NTCP transport replaces an older TCP transport which had issues concerning congestion collapse.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
7
router/java/src/net/i2p/router/transport/package.html
Normal file
7
router/java/src/net/i2p/router/transport/package.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
The transport system allows the usage of communication layers that are below I2P in the stack, on which I2P messages are sent.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
The UDP transport (also known as 'SSU transport') allows passing I2P messages on top of UDP.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user