propagate from branch 'i2p.i2p.zzz.update' (head 1ca3b931ebecd4ec80e7e135b634d085934c092b)

to branch 'i2p.i2p' (head c917793878189c29441f69133e029cfdfe3c0895)
This commit is contained in:
str4d
2012-11-05 10:38:54 +00:00
255 changed files with 20277 additions and 8880 deletions

View File

@ -10,6 +10,7 @@ trans.fr = apps/i2ptunnel/locale/messages_fr.po
trans.hu = apps/i2ptunnel/locale/messages_hu.po
trans.it = apps/i2ptunnel/locale/messages_it.po
trans.nl = apps/i2ptunnel/locale/messages_nl.po
trans.pt = apps/i2ptunnel/locale/messages_pt.po
trans.ru = apps/i2ptunnel/locale/messages_ru.po
trans.sv_SE = apps/i2ptunnel/locale/messages_sv.po
trans.uk_UA = apps/i2ptunnel/locale/messages_uk.po
@ -32,6 +33,7 @@ trans.hu = apps/routerconsole/locale/messages_hu.po
trans.it = apps/routerconsole/locale/messages_it.po
trans.nl = apps/routerconsole/locale/messages_nl.po
trans.pl = apps/routerconsole/locale/messages_pl.po
trans.pt = apps/routerconsole/locale/messages_pt.po
trans.ru = apps/routerconsole/locale/messages_ru.po
trans.sv_SE = apps/routerconsole/locale/messages_sv.po
trans.uk_UA = apps/routerconsole/locale/messages_uk.po
@ -70,6 +72,7 @@ trans.hu = apps/susidns/locale/messages_hu.po
trans.it = apps/susidns/locale/messages_it.po
trans.nl = apps/susidns/locale/messages_nl.po
trans.pl = apps/susidns/locale/messages_pl.po
trans.pt = apps/susidns/locale/messages_pt.po
trans.ru = apps/susidns/locale/messages_ru.po
trans.sv_SE = apps/susidns/locale/messages_sv.po
trans.uk_UA = apps/susidns/locale/messages_uk.po

View File

@ -128,7 +128,7 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
#
# requiredbuilder fucks up REALLY bad, and thinks java is perl?!
# requiredbuilder messes up REALLY bad, and thinks java is perl?!
# It also did not catch the shell requirements! BOOOOOOOOOOO! HISSSSSSSS!
#
# requiredbuilder -v -y -s $CWD $PKG

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB.Demos.echo.echoclient;
@ -55,7 +47,7 @@ public class Main {
// exit on anything not legal
break;
}
c = (char)(b & 0x7f); // We only really give a fuck about ASCII
c = (char)(b & 0x7f); // We only care about ASCII
S = new String(S + c);
}
return S;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB.Demos.echo.echoserver;
@ -52,7 +44,7 @@ public class Main {
if(b < 20) {
break;
}
c = (char)(b & 0x7f); // We only really give a fuck about ASCII
c = (char)(b & 0x7f); // We only care about ASCII
S = new String(S + c);
}
return S;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -94,7 +86,7 @@ public class I2Plistener implements Runnable {
}
} catch (I2PException e) {
// bad shit
// bad stuff
System.out.println("Exception " + e);
}
} finally {

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -302,14 +294,14 @@ public class MUXlisten implements Runnable {
// Hopefully nuke stuff here...
{
String boner = tg.getName();
String groupName = tg.getName();
try {
_log.warn("destroySocketManager " + boner);
_log.warn("destroySocketManager " + groupName);
socketManager.destroySocketManager();
_log.warn("destroySocketManager Successful" + boner);
_log.warn("destroySocketManager Successful" + groupName);
} catch (Exception e) {
// nop
_log.warn("destroySocketManager Failed" + boner);
_log.warn("destroySocketManager Failed" + groupName);
_log.warn(e.toString());
}
}
@ -333,25 +325,25 @@ public class MUXlisten implements Runnable {
// Wait around till all threads are collected.
if (tg != null) {
String boner = tg.getName();
// System.out.println("BOB: MUXlisten: Starting thread collection for: " + boner);
_log.warn("BOB: MUXlisten: Starting thread collection for: " + boner);
String groupName = tg.getName();
// System.out.println("BOB: MUXlisten: Starting thread collection for: " + groupName);
_log.warn("BOB: MUXlisten: Starting thread collection for: " + groupName);
if (tg.activeCount() + tg.activeGroupCount() != 0) {
// visit(tg, 0, boner);
// visit(tg, 0, groupName);
int foo = tg.activeCount() + tg.activeGroupCount();
// hopefully no longer needed!
// int bar = lives;
// System.out.println("BOB: MUXlisten: Waiting on threads for " + boner);
// System.out.println("\nBOB: MUXlisten: ThreadGroup dump BEGIN " + boner);
// visit(tg, 0, boner);
// System.out.println("BOB: MUXlisten: ThreadGroup dump END " + boner + "\n");
// System.out.println("BOB: MUXlisten: Waiting on threads for " + groupName);
// System.out.println("\nBOB: MUXlisten: ThreadGroup dump BEGIN " + groupName);
// visit(tg, 0, groupName);
// System.out.println("BOB: MUXlisten: ThreadGroup dump END " + groupName + "\n");
// Happily spin forever :-(
while (foo != 0) {
foo = tg.activeCount() + tg.activeGroupCount();
// if (lives != bar && lives != 0) {
// System.out.println("\nBOB: MUXlisten: ThreadGroup dump BEGIN " + boner);
// visit(tg, 0, boner);
// System.out.println("BOB: MUXlisten: ThreadGroup dump END " + boner + "\n");
// System.out.println("\nBOB: MUXlisten: ThreadGroup dump BEGIN " + groupName);
// visit(tg, 0, groupName);
// System.out.println("BOB: MUXlisten: ThreadGroup dump END " + groupName + "\n");
// }
// bar = lives;
try {
@ -361,8 +353,8 @@ public class MUXlisten implements Runnable {
}
}
}
// System.out.println("BOB: MUXlisten: Threads went away. Success: " + boner);
_log.warn("BOB: MUXlisten: Threads went away. Success: " + boner);
// System.out.println("BOB: MUXlisten: Threads went away. Success: " + groupName);
_log.warn("BOB: MUXlisten: Threads went away. Success: " + groupName);
tg.destroy();
// Zap reference to the ThreadGroup so the JVM can GC it.
tg = null;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -94,7 +86,7 @@ public class TCPtoI2P implements Runnable {
// exit on anything not legal
break;
}
c = (char) (b & 0x7f); // We only really give a fuck about ASCII
c = (char) (b & 0x7f); // We only care about ASCII
S = new String(S + c);
}
return S;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="fortuna">
<property name="cvs.base.dir" value="java/gnu-crypto" />
<property name="cvs.etc.dir" value="${cvs.base.dir}/etc" />
<property name="cvs.lib.dir" value="${cvs.base.dir}/lib" />
<property name="cvs.object.dir" value="${cvs.base.dir}/classes" />
<property name="cvs.base.crypto.object.dir" value="${cvs.object.dir}/gnu/crypto" />
<property name="cvs.cipher.object.dir" value="${cvs.base.crypto.object.dir}/cipher" />
<property name="cvs.hash.object.dir" value="${cvs.base.crypto.object.dir}/hash" />
<property name="cvs.prng.object.dir" value="${cvs.base.crypto.object.dir}/prng" />
<patternset id="fortuna.files">
<include name="${cvs.base.crypto.object.dir}/Registry.class"/>
<include name="${cvs.prng.object.dir}/Fortuna*.class"/>
<include name="${cvs.prng.object.dir}/BasePRNG.class"/>
<include name="${cvs.prng.object.dir}/RandomEventListener.class"/>
<include name="${cvs.prng.object.dir}/IRandom.class"/>
<include name="${cvs.cipher.object.dir}/CipherFactory.class"/>
<include name="${cvs.cipher.object.dir}/IBlockCipher.class"/>
<include name="${cvs.hash.object.dir}/HashFactory.class"/>
<include name="${cvs.hash.object.dir}/IMessageDigest.class"/>
</patternset>
<target name="all" depends="build,jar"
description="Create and test the custom Fortuna library" />
<target name="build" depends="-init,checkout"
description="Build the source and tests">
<ant dir="${cvs.base.dir}" target="jar" />
</target>
<target name="builddep" />
<target name="checkout" depends="-init" unless="cvs.source.available"
description="Check out GNU Crypto sources from CVS HEAD">
<cvs cvsRoot=":ext:anoncvs@savannah.gnu.org:/cvsroot/gnu-crypto"
cvsRsh="ssh"
dest="java"
package="gnu-crypto" />
</target>
<target name="clean"
description="Remove generated tests and object files">
<ant dir="${cvs.base.dir}" target="clean" />
</target>
<target name="cleandep" />
<target name="compile" />
<target name="distclean" depends="clean"
description="Remove all generated files">
<delete dir="build" />
<delete dir="jartemp" />
<!--
Annoyingly the GNU Crypto distclean task called here doesn't clean
*all* derived files from java/gnu-crypto/lib like it should.....
-->
<ant dir="${cvs.base.dir}" target="distclean" />
<!--
.....and so we mop up the rest ourselves.
-->
<delete dir="${cvs.lib.dir}" />
</target>
<target name="-init">
<available property="cvs.source.available" file="${cvs.base.dir}" />
</target>
<target name="jar" depends="build"
description="Create the custom Fortuna jar library">
<delete dir="build" />
<delete dir="jartemp" />
<mkdir dir="build" />
<mkdir dir="jartemp/${cvs.object.dir}" />
<copy todir="jartemp">
<fileset dir=".">
<patternset refid="fortuna.files" />
</fileset>
</copy>
<jar basedir="jartemp/${cvs.object.dir}" jarfile="build/fortuna.jar">
<manifest>
<section name="fortuna">
<attribute name="Implementation-Title" value="I2P Custom GNU Crypto Fortuna Library" />
<attribute name="Implementation-Version" value="CVS HEAD" />
<attribute name="Implementation-Vendor" value="Free Software Foundation" />
<attribute name="Implementation-Vendor-Id" value="FSF" />
<attribute name="Implementation-URL" value="http://www.gnu.org/software/gnu-crypto" />
</section>
</manifest>
</jar>
<delete dir="jartemp" />
</target>
<target name="test" depends="jar"
description="Perform crypto tests on custom Fortuna jar library" />
<!--
Add this when Fortuna tests are added to GNU Crypto, else write some
-->
<target name="update" depends="checkout"
description="Update GNU Crypto sources to latest CVS HEAD">
<cvs command="update -d" cvsRsh="ssh" dest="java/gnu-crypto" />
</target>
</project>

View File

@ -209,10 +209,10 @@ public class KBucketSet<T extends SimpleDataStructure> {
int s1, e1, s2, e2;
s1 = b0.getRangeBegin();
e2 = b0.getRangeEnd();
if (B_FACTOR > 1 &&
(s1 & (B_FACTOR - 1)) == 0 &&
((e2 + 1) & (B_FACTOR - 1)) == 0 &&
e2 > s1 + B_FACTOR) {
if (B_VALUE == 1 ||
((s1 & (B_FACTOR - 1)) == 0 &&
((e2 + 1) & (B_FACTOR - 1)) == 0 &&
e2 > s1 + B_FACTOR)) {
// The bucket is a "whole" kbucket with a range > B_FACTOR,
// so it should be split into two "whole" kbuckets each with
// a range >= B_FACTOR.
@ -529,7 +529,10 @@ public class KBucketSet<T extends SimpleDataStructure> {
getReadLock();
try {
for (KBucket b : _buckets) {
if (b.getLastChanged() < old || b.getKeyCount() < BUCKET_SIZE * 3 / 4)
int curSize = b.getKeyCount();
// Always explore the closest bucket
if ((b.getRangeBegin() == 0) ||
(b.getLastChanged() < old || curSize < BUCKET_SIZE * 3 / 4))
rv.add(generateRandomKey(b));
}
} finally { releaseReadLock(); }
@ -759,8 +762,8 @@ public class KBucketSet<T extends SimpleDataStructure> {
public String toString() {
StringBuilder buf = new StringBuilder(1024);
buf.append("Bucket set rooted on: ").append(_us.toString())
.append(" K= ").append(BUCKET_SIZE)
.append(" B= ").append(B_VALUE)
.append(" K=").append(BUCKET_SIZE)
.append(" B=").append(B_VALUE)
.append(" with ").append(size())
.append(" keys in ").append(_buckets.size()).append(" buckets:\n");
getReadLock();

View File

@ -59,7 +59,6 @@ public class BitField
// cleared or clear them explicitly ourselves.
System.arraycopy(bitfield, 0, this.bitfield, 0, arraysize);
this.count = 0;
for (int i = 0; i < size; i++)
if (get(i))
this.count++;

View File

@ -58,7 +58,7 @@ public class I2PSnarkUtil {
private volatile I2PSocketManager _manager;
private boolean _configured;
private volatile boolean _connecting;
private final Set<Hash> _shitlist;
private final Set<Hash> _banlist;
private int _maxUploaders;
private int _maxUpBW;
private int _maxConnections;
@ -86,7 +86,7 @@ public class I2PSnarkUtil {
_opts = new HashMap();
//setProxy("127.0.0.1", 4444);
setI2CPConfig("127.0.0.1", 7654, null);
_shitlist = new ConcurrentHashSet();
_banlist = new ConcurrentHashSet();
_maxUploaders = Snark.MAX_TOTAL_UPLOADERS;
_maxUpBW = DEFAULT_MAX_UP_BW;
_maxConnections = MAX_CONNECTIONS;
@ -244,6 +244,8 @@ public class I2PSnarkUtil {
opts.setProperty("i2p.streaming.maxConnsPerHour", "20");
if (opts.getProperty("i2p.streaming.enforceProtocol") == null)
opts.setProperty("i2p.streaming.enforceProtocol", "true");
if (opts.getProperty("i2p.streaming.disableRejectLogging") == null)
opts.setProperty("i2p.streaming.disableRejectLogging", "true");
_manager = I2PSocketManagerFactory.createManager(_i2cpHost, _i2cpPort, opts);
_connecting = false;
}
@ -283,7 +285,7 @@ public class I2PSnarkUtil {
I2PSocketManager mgr = _manager;
// FIXME this can cause race NPEs elsewhere
_manager = null;
_shitlist.clear();
_banlist.clear();
if (mgr != null) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Disconnecting from I2P", new Exception("I did it"));
@ -306,24 +308,24 @@ public class I2PSnarkUtil {
if (addr.equals(getMyDestination()))
throw new IOException("Attempt to connect to myself");
Hash dest = addr.calculateHash();
if (_shitlist.contains(dest))
throw new IOException("Not trying to contact " + dest.toBase64() + ", as they are shitlisted");
if (_banlist.contains(dest))
throw new IOException("Not trying to contact " + dest.toBase64() + ", as they are banlisted");
try {
I2PSocket rv = _manager.connect(addr);
if (rv != null)
_shitlist.remove(dest);
_banlist.remove(dest);
return rv;
} catch (I2PException ie) {
_shitlist.add(dest);
_context.simpleScheduler().addEvent(new Unshitlist(dest), 10*60*1000);
_banlist.add(dest);
_context.simpleScheduler().addEvent(new Unbanlist(dest), 10*60*1000);
throw new IOException("Unable to reach the peer " + peer + ": " + ie.getMessage());
}
}
private class Unshitlist implements SimpleTimer.TimedEvent {
private class Unbanlist implements SimpleTimer.TimedEvent {
private Hash _dest;
public Unshitlist(Hash dest) { _dest = dest; }
public void timeReached() { _shitlist.remove(_dest); }
public Unbanlist(Hash dest) { _dest = dest; }
public void timeReached() { _banlist.remove(_dest); }
}
/**

View File

@ -377,7 +377,10 @@ class PeerCoordinator implements PeerListener
public boolean needOutboundPeers() {
//return wantedBytes != 0 && needPeers();
// minus one to make it a little easier for new peers to get in on large swarms
return wantedBytes != 0 && !halted && peers.size() < getMaxConnections() - 1;
return wantedBytes != 0 &&
!halted &&
peers.size() < getMaxConnections() - 1 &&
(storage == null || !storage.isChecking());
}
/**
@ -741,7 +744,19 @@ class PeerCoordinator implements PeerListener
break;
if (havePieces.get(p.getId()) && !p.isRequested())
{
piece = p;
// never ever choose one that's in partialPieces, or we
// will create a second one and leak
boolean hasPartial = false;
for (PartialPiece pp : partialPieces) {
if (pp.getPiece() == p.getId()) {
if (_log.shouldLog(Log.INFO))
_log.info("wantPiece() skipping partial for " + peer + ": piece = " + pp);
hasPartial = true;
break;
}
}
if (!hasPartial)
piece = p;
}
else if (p.isRequested())
{
@ -943,13 +958,11 @@ class PeerCoordinator implements PeerListener
*/
public boolean gotPiece(Peer peer, PartialPiece pp)
{
if (metainfo == null || storage == null)
if (metainfo == null || storage == null || storage.isChecking() || halted) {
pp.release();
return true;
int piece = pp.getPiece();
if (halted) {
_log.info("Got while-halted piece " + piece + "/" + metainfo.getPieces() +" from " + peer + " for " + metainfo.getName());
return true; // We don't actually care anymore.
}
int piece = pp.getPiece();
synchronized(wantedPieces)
{
@ -962,12 +975,15 @@ class PeerCoordinator implements PeerListener
// Assume we got a good piece, we don't really care anymore.
// Well, this could be caused by a change in priorities, so
// only return true if we already have it, otherwise might as well keep it.
if (storage.getBitField().get(piece))
if (storage.getBitField().get(piece)) {
pp.release();
return true;
}
}
try
{
// this takes forever if complete, as it rechecks
if (storage.putPiece(pp))
{
if (_log.shouldLog(Log.INFO))
@ -1173,6 +1189,8 @@ class PeerCoordinator implements PeerListener
public PartialPiece getPartialPiece(Peer peer, BitField havePieces) {
if (metainfo == null)
return null;
if (storage != null && storage.isChecking())
return null;
synchronized(wantedPieces) {
// sorts by remaining bytes, least first
Collections.sort(partialPieces);
@ -1277,6 +1295,7 @@ class PeerCoordinator implements PeerListener
PartialPiece pp = iter.next();
if (pp.getPiece() == piece) {
iter.remove();
pp.release();
// there should be only one but keep going to be sure
}
}

View File

@ -592,6 +592,7 @@ class PeerState implements DataLoader
// Send cancel even when we are choked to make sure that it is
// really never ever send.
out.sendCancel(req);
req.getPartialPiece().release();
}
}
}
@ -741,6 +742,10 @@ class PeerState implements DataLoader
out.sendRequest(r);
lastRequest = r;
return true;
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("Got dup from coord: " + pp);
pp.release();
}
}

View File

@ -985,6 +985,8 @@ public class Storage
/**
* Put the piece in the Storage if it is correct.
* Warning - takes a LONG time if complete as it does the recheck here.
* TODO thread the recheck?
*
* @return true if the piece was correct (sha metainfo hash
* matches), otherwise false.

View File

@ -69,6 +69,9 @@ class DHTNodes {
// begin ConcurrentHashMap methods
/**
* @return known nodes, not total net size
*/
public int size() {
return _nodeMap.size();
}
@ -86,8 +89,13 @@ class DHTNodes {
* @return the old value if present, else null
*/
public NodeInfo putIfAbsent(NodeInfo nInfo) {
_kad.add(nInfo.getNID());
return _nodeMap.putIfAbsent(nInfo.getNID(), nInfo);
NodeInfo rv = _nodeMap.putIfAbsent(nInfo.getNID(), nInfo);
// ensure same object in both places
if (rv != null)
_kad.add(rv.getNID());
else
_kad.add(nInfo.getNID());
return rv;
}
public NodeInfo remove(NID nid) {
@ -128,11 +136,19 @@ class DHTNodes {
return _kad.getExploreKeys(MAX_BUCKET_AGE);
}
/**
* Debug info, HTML formatted
* @since 0.9.4
*/
public void renderStatusHTML(StringBuilder buf) {
buf.append(_kad.toString().replace("\n", "<br>\n"));
}
/** */
private class Cleaner extends SimpleTimer2.TimedEvent {
public Cleaner() {
super(SimpleTimer2.getInstance(), CLEAN_TIME);
super(SimpleTimer2.getInstance(), 5 * CLEAN_TIME);
}
public void timeReached() {

View File

@ -39,6 +39,8 @@ class DHTTracker {
private static final long DELTA_EXPIRE_TIME = 3*60*1000;
private static final int MAX_PEERS = 2000;
private static final int MAX_PEERS_PER_TORRENT = 150;
private static final int ABSOLUTE_MAX_PER_TORRENT = MAX_PEERS_PER_TORRENT * 2;
private static final int MAX_TORRENTS = 400;
DHTTracker(I2PAppContext ctx) {
_context = ctx;
@ -62,17 +64,29 @@ class DHTTracker {
_log.debug("Announce " + hash + " for " + ih);
Peers peers = _torrents.get(ih);
if (peers == null) {
if (_torrents.size() >= MAX_TORRENTS)
return;
peers = new Peers();
Peers peers2 = _torrents.putIfAbsent(ih, peers);
if (peers2 != null)
peers = peers2;
}
Peer peer = new Peer(hash.getData());
Peer peer2 = peers.putIfAbsent(peer, peer);
if (peer2 != null)
peer = peer2;
peer.setLastSeen(_context.clock().now());
if (peers.size() < ABSOLUTE_MAX_PER_TORRENT) {
Peer peer = new Peer(hash.getData());
Peer peer2 = peers.putIfAbsent(peer, peer);
if (peer2 != null)
peer = peer2;
peer.setLastSeen(_context.clock().now());
} else {
// We could update setLastSeen if he is already
// in there, but that would tend to keep
// the same set of peers.
// So let it expire so new ones can come in.
//Peer peer = peers.get(hash);
//if (peer != null)
// peer.setLastSeen(_context.clock().now());
}
}
void unannounce(InfoHash ih, Hash hash) {
@ -113,7 +127,7 @@ class DHTTracker {
private class Cleaner extends SimpleTimer2.TimedEvent {
public Cleaner() {
super(SimpleTimer2.getInstance(), CLEAN_TIME);
super(SimpleTimer2.getInstance(), 2 * CLEAN_TIME);
}
public void timeReached() {
@ -122,6 +136,7 @@ class DHTTracker {
long now = _context.clock().now();
int torrentCount = 0;
int peerCount = 0;
boolean tooMany = false;
for (Iterator<Peers> iter = _torrents.values().iterator(); iter.hasNext(); ) {
Peers p = iter.next();
int recent = 0;
@ -136,6 +151,7 @@ class DHTTracker {
}
if (recent > MAX_PEERS_PER_TORRENT) {
// too many, delete at random
// TODO sort and remove oldest?
// TODO per-torrent adjustable expiration?
for (Iterator<Peer> iterp = p.values().iterator(); iterp.hasNext() && p.size() > MAX_PEERS_PER_TORRENT; ) {
iterp.next();
@ -143,6 +159,7 @@ class DHTTracker {
peerCount--;
}
torrentCount++;
tooMany = true;
} else if (recent <= 0) {
iter.remove();
} else {
@ -151,6 +168,8 @@ class DHTTracker {
}
if (peerCount > MAX_PEERS)
tooMany = true;
if (tooMany)
_expireTime = Math.max(_expireTime - DELTA_EXPIRE_TIME, MIN_EXPIRE_TIME);
else
_expireTime = Math.min(_expireTime + DELTA_EXPIRE_TIME, MAX_EXPIRE_TIME);
@ -162,7 +181,7 @@ class DHTTracker {
DataHelper.formatDuration(_expireTime) + " expiration");
_peerCount = peerCount;
_torrentCount = torrentCount;
schedule(CLEAN_TIME);
schedule(tooMany ? CLEAN_TIME / 3 : CLEAN_TIME);
}
}
}

View File

@ -613,6 +613,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
"Rcvd tokens: ").append(_incomingTokens.size()).append("<br>" +
"Pending queries: ").append(_sentQueries.size()).append("<br>");
_tracker.renderStatusHTML(buf);
_knownNodes.renderStatusHTML(buf);
return buf.toString();
}
@ -1107,8 +1108,12 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
if (nInfo.equals(_myNodeInfo))
return _myNodeInfo;
NodeInfo rv = _knownNodes.putIfAbsent(nInfo);
if (rv == null)
if (rv == null) {
rv = nInfo;
// if we didn't know about it before, set the timestamp
// so it isn't immediately removed by the DHTNodes cleaner
rv.getNID().setLastSeen();
}
return rv;
}
@ -1518,7 +1523,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
private class Cleaner extends SimpleTimer2.TimedEvent {
public Cleaner() {
super(SimpleTimer2.getInstance(), CLEAN_TIME);
super(SimpleTimer2.getInstance(), 7 * CLEAN_TIME);
}
public void timeReached() {

View File

@ -995,14 +995,16 @@ public class I2PSnarkServlet extends DefaultServlet {
} else if (snark.isAllocating()) {
statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Allocating") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Allocating");
} else if (err != null) {
if (isRunning && curPeers > 0 && !showPeers)
statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") +
": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
else if (isRunning)
} else if (err != null && curPeers == 0) {
// let's only show this if we have no peers, otherwise PEX and DHT should bail us out, user doesn't care
//if (isRunning && curPeers > 0 && !showPeers)
// statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
// "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") +
// ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
// curPeers + thinsp(noThinsp) +
// ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
//else if (isRunning)
if (isRunning)
statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") +
": " + curPeers + thinsp(noThinsp) +
@ -1149,7 +1151,7 @@ public class I2PSnarkServlet extends DefaultServlet {
out.write("</a>");
out.write("<td align=\"right\" class=\"snarkTorrentETA " + rowClass + "\">");
if(isRunning && remainingSeconds > 0)
if(isRunning && remainingSeconds > 0 && !snark.isChecking())
out.write(DataHelper.formatDuration2(Math.max(remainingSeconds, 10) * 1000)); // (eta 6h)
out.write("</td>\n\t");
out.write("<td align=\"right\" class=\"snarkTorrentDownloaded " + rowClass + "\">");
@ -1636,7 +1638,7 @@ public class I2PSnarkServlet extends DefaultServlet {
out.write("\" ></td></tr>\n" +
"<tr><td>");
out.write(_("Enable DHT") + " (**BETA**)");
out.write(_("Enable DHT"));
out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"useDHT\" value=\"true\" "
+ (useDHT ? "checked " : "")
+ "title=\"");

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -12,9 +12,9 @@ msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-12 00:46+0000\n"
"PO-Revision-Date: 2012-10-12 00:39+0000\n"
"Last-Translator: kytv <killyourtv@i2pmail.org>\n"
"POT-Creation-Date: 2012-10-15 17:57+0000\n"
"PO-Revision-Date: 2012-10-12 00:54+0000\n"
"Last-Translator: BadCluster <badcluster@i2pmail.org>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/I2P/language/"
"it/)\n"
"Language: it\n"
@ -342,7 +342,7 @@ msgstr "Torrent in aggiunta in {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:1374
#, java-format
msgid "Up bandwidth limit is {0} KBps"
msgstr ""
msgstr "La banda di Upload massima è {0} KBps"
#: ../java/src/org/klomp/snark/SnarkManager.java:1396
#, java-format
@ -606,7 +606,7 @@ msgstr "File torrent eliminato: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:642
#, java-format
msgid "Download deleted: {0}"
msgstr ""
msgstr "Downloads cancellati: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:656
#, java-format
@ -701,12 +701,12 @@ msgstr "Ripristina tracker di default"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:997
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:998
msgid "Checking"
msgstr ""
msgstr "Controllo (Check)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1000
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1001
msgid "Allocating"
msgstr ""
msgstr "Allocando"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1005
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1011

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -179,6 +179,7 @@
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="build/i2ptunnel.jar" />
<pathelement location="build/temp-beans.jar" />
<pathelement location="../../../core/java/build/i2p.jar" />
</classpath>
<arg value="-d" />
<arg value="../jsp/WEB-INF/classes" />
@ -202,6 +203,7 @@
<pathelement location="../../jetty/jettylib/jsp-api.jar" />
<pathelement location="build/i2ptunnel.jar" />
<pathelement location="build/temp-beans.jar" />
<pathelement location="../../../core/java/build/i2p.jar" />
</classpath>
</javac>
<copy file="../jsp/web.xml" tofile="../jsp/web-out.xml" />
@ -213,6 +215,7 @@
<uptodate property="precompilejsp.uptodate" targetfile="../jsp/web-out.xml">
<srcfiles dir= "../jsp" includes="*.jsp, *.html, web.xml"/>
<srcfiles dir= "src/net/i2p/i2ptunnel/web" includes="*.java"/>
</uptodate>
<target name="javadoc">
@ -230,7 +233,7 @@
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
<!-- We need the ant runtime, as it includes junit -->
<javac srcdir="./src:./test" debug="true" source="1.5" target="1.5"
<javac srcdir="./src:./test/junit" debug="true" source="1.5" target="1.5"
includeAntRuntime="true"
deprecation="on" destdir="./build/obj" >
<compilerarg line="${javac.compilerargs}" />
@ -248,7 +251,7 @@
<pathelement location="../../../core/java/build/i2p.jar" />
</classpath>
<batchtest>
<fileset dir="./test/">
<fileset dir="./test/junit/">
<include name="**/*Test.java" />
</fileset>
</batchtest>

View File

@ -13,6 +13,7 @@ import java.util.Locale;
import java.util.Properties;
import java.util.StringTokenizer;
import net.i2p.I2PAppContext;
import net.i2p.I2PException;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketOptions;
@ -20,7 +21,6 @@ import net.i2p.data.Base64;
import net.i2p.data.DataHelper;
import net.i2p.data.Destination;
import net.i2p.util.EventDispatcher;
import net.i2p.util.FileUtil;
import net.i2p.util.Log;
import net.i2p.util.PortMapper;
@ -58,6 +58,8 @@ import net.i2p.util.PortMapper;
*/
public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements Runnable {
public static final String AUTH_REALM = "I2P SSL Proxy";
private final static byte[] ERR_DESTINATION_UNKNOWN =
("HTTP/1.1 503 Service Unavailable\r\n"+
"Content-Type: text/html; charset=iso-8859-1\r\n"+
@ -89,17 +91,6 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
"Your browser is misconfigured. Do not use the proxy to access the router console or other localhost destinations.<BR>")
.getBytes();
private final static byte[] ERR_AUTH =
("HTTP/1.1 407 Proxy Authentication Required\r\n"+
"Content-Type: text/html; charset=UTF-8\r\n"+
"Cache-control: no-cache\r\n"+
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.5\r\n" + // try to get a UTF-8-encoded response back for the password
"Proxy-Authenticate: Basic realm=\"I2P SSL Proxy\"\r\n" +
"\r\n"+
"<html><body><H1>I2P ERROR: PROXY AUTHENTICATION REQUIRED</H1>"+
"This proxy is configured to require authentication.<BR>")
.getBytes();
private final static byte[] SUCCESS_RESPONSE =
("HTTP/1.1 200 Connection Established\r\n"+
"Proxy-agent: I2P\r\n"+
@ -165,6 +156,11 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
return super.close(forced);
}
/** @since 0.9.4 */
protected String getRealm() {
return AUTH_REALM;
}
protected void clientConnectionRun(Socket s) {
InputStream in = null;
OutputStream out = null;
@ -237,10 +233,10 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
_log.debug(getPrefix(requestId) + "REST :" + restofline + ":");
_log.debug(getPrefix(requestId) + "DEST :" + destination + ":");
}
} else if (line.toLowerCase(Locale.US).startsWith("proxy-authorization: basic ")) {
} else if (line.toLowerCase(Locale.US).startsWith("proxy-authorization: ")) {
// strip Proxy-Authenticate from the response in HTTPResponseOutputStream
// save for auth check below
authorization = line.substring(27); // "proxy-authorization: basic ".length()
authorization = line.substring(21); // "proxy-authorization: ".length()
line = null;
} else if (line.length() > 0) {
// Additional lines - shouldn't be too many. Firefox sends:
@ -281,30 +277,26 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
}
// Authorization
if (!authorize(s, requestId, authorization)) {
AuthResult result = authorize(s, requestId, method, authorization);
if (result != AuthResult.AUTH_GOOD) {
if (_log.shouldLog(Log.WARN)) {
if (authorization != null)
_log.warn(getPrefix(requestId) + "Auth failed, sending 407 again");
else
_log.warn(getPrefix(requestId) + "Auth required, sending 407");
}
writeErrorMessage(ERR_AUTH, out);
out.write(getAuthError(result == AuthResult.AUTH_STALE).getBytes());
s.close();
return;
}
Destination clientDest = _context.namingService().lookup(destination);
if (clientDest == null) {
String str;
byte[] header;
if (usingWWWProxy)
str = FileUtil.readTextFile((new File(_errorDir, "dnfp-header.ht")).getAbsolutePath(), 100, true);
header = getErrorPage("dnfp-header.ht", ERR_DESTINATION_UNKNOWN);
else
str = FileUtil.readTextFile((new File(_errorDir, "dnfh-header.ht")).getAbsolutePath(), 100, true);
if (str != null)
header = str.getBytes();
else
header = ERR_DESTINATION_UNKNOWN;
header = getErrorPage("dnfh-header.ht", ERR_DESTINATION_UNKNOWN);
writeErrorMessage(header, out, targetRequest, usingWWWProxy, destination);
s.close();
return;
@ -341,12 +333,13 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
}
private static class OnTimeout implements Runnable {
private Socket _socket;
private OutputStream _out;
private String _target;
private boolean _usingProxy;
private String _wwwProxy;
private long _requestId;
private final Socket _socket;
private final OutputStream _out;
private final String _target;
private final boolean _usingProxy;
private final String _wwwProxy;
private final long _requestId;
public OnTimeout(Socket s, OutputStream out, String target, boolean usingProxy, String wwwProxy, long id) {
_socket = s;
_out = out;
@ -355,6 +348,7 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
_wwwProxy = wwwProxy;
_requestId = id;
}
public void run() {
//if (_log.shouldLog(Log.DEBUG))
// _log.debug("Timeout occured requesting " + _target);
@ -391,17 +385,12 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
boolean usingWWWProxy, String wwwProxy, long requestId) {
if (out == null)
return;
byte[] header;
if (usingWWWProxy)
header = getErrorPage(I2PAppContext.getGlobalContext(), "dnfp-header.ht", ERR_DESTINATION_UNKNOWN);
else
header = getErrorPage(I2PAppContext.getGlobalContext(), "dnf-header.ht", ERR_DESTINATION_UNKNOWN);
try {
String str;
byte[] header;
if (usingWWWProxy)
str = FileUtil.readTextFile((new File(_errorDir, "dnfp-header.ht")).getAbsolutePath(), 100, true);
else
str = FileUtil.readTextFile((new File(_errorDir, "dnf-header.ht")).getAbsolutePath(), 100, true);
if (str != null)
header = str.getBytes();
else
header = ERR_DESTINATION_UNKNOWN;
writeErrorMessage(header, out, targetRequest, usingWWWProxy, wwwProxy);
} catch (IOException ioe) {}
}

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,9 +11,8 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.i2ptunnel;
// import java.util.ArrayList;

View File

@ -3,9 +3,7 @@
*/
package net.i2p.i2ptunnel;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -73,10 +71,14 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
* via address helper links
*/
private final ConcurrentHashMap<String, String> addressHelpers = new ConcurrentHashMap(8);
/**
* Used to protect actions via http://proxy.i2p/
*/
private final String _proxyNonce;
public static final String AUTH_REALM = "I2P HTTP Proxy";
/**
* These are backups if the xxx.ht error page is missing.
*/
@ -167,15 +169,6 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
"\r\n" +
"<html><body><H1>I2P ERROR: REQUEST DENIED</H1>" +
"Your browser is misconfigured. Do not use the proxy to access the router console or other localhost destinations.<BR>").getBytes();
private final static byte[] ERR_AUTH =
("HTTP/1.1 407 Proxy Authentication Required\r\n" +
"Content-Type: text/html; charset=UTF-8\r\n" +
"Cache-control: no-cache\r\n" +
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.5\r\n" + // try to get a UTF-8-encoded response back for the password
"Proxy-Authenticate: Basic realm=\"I2P HTTP Proxy\"\r\n" +
"\r\n" +
"<html><body><H1>I2P ERROR: PROXY AUTHENTICATION REQUIRED</H1>" +
"This proxy is configured to require authentication.<BR>").getBytes();
/**
* This constructor always starts the tunnel (ignoring the i2cp.delayOpen option).
@ -300,6 +293,12 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
}
return rv;
}
/** @since 0.9.4 */
protected String getRealm() {
return AUTH_REALM;
}
private static final String HELPER_PARAM = "i2paddresshelper";
public static final String LOCAL_SERVER = "proxy.i2p";
private static final boolean DEFAULT_GZIP = true;
@ -769,10 +768,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
// hop-by-hop header, and we definitely want to block Windows NTLM after a far-end 407.
// Response to far-end shouldn't happen, as we
// strip Proxy-Authenticate from the response in HTTPResponseOutputStream
if(lowercaseLine.startsWith("proxy-authorization: basic ")) // save for auth check below
{
authorization = line.substring(27); // "proxy-authorization: basic ".length()
}
authorization = line.substring(21); // "proxy-authorization: ".length()
line = null;
continue;
} else if(lowercaseLine.startsWith("icy")) {
@ -850,7 +846,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
}
// Authorization
if(!authorize(s, requestId, authorization)) {
AuthResult result = authorize(s, requestId, method, authorization);
if (result != AuthResult.AUTH_GOOD) {
if(_log.shouldLog(Log.WARN)) {
if(authorization != null) {
_log.warn(getPrefix(requestId) + "Auth failed, sending 407 again");
@ -858,7 +855,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
_log.warn(getPrefix(requestId) + "Auth required, sending 407");
}
}
out.write(getErrorPage("auth", ERR_AUTH));
out.write(getAuthError(result == AuthResult.AUTH_STALE).getBytes());
writeFooter(out);
s.close();
return;
@ -1095,61 +1092,6 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
return Base32.encode(_dest.calculateHash().getData()) + ".b32.i2p";
}
/**
* foo => errordir/foo-header_xx.ht for lang xx, or errordir/foo-header.ht,
* or the backup byte array on fail.
*
* .ht files must be UTF-8 encoded and use \r\n terminators so the
* HTTP headers are conformant.
* We can't use FileUtil.readFile() because it strips \r
*
* @return non-null
*/
private byte[] getErrorPage(String base, byte[] backup) {
return getErrorPage(_context, base, backup);
}
private static byte[] getErrorPage(I2PAppContext ctx, String base, byte[] backup) {
File errorDir = new File(ctx.getBaseDir(), "docs");
String lang = ctx.getProperty("routerconsole.lang", Locale.getDefault().getLanguage());
if(lang != null && lang.length() > 0 && !lang.equals("en")) {
File file = new File(errorDir, base + "-header_" + lang + ".ht");
try {
return readFile(file);
} catch(IOException ioe) {
// try the english version now
}
}
File file = new File(errorDir, base + "-header.ht");
try {
return readFile(file);
} catch(IOException ioe) {
return backup;
}
}
private static byte[] readFile(File file) throws IOException {
FileInputStream fis = null;
byte[] buf = new byte[512];
ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
try {
int len = 0;
fis = new FileInputStream(file);
while((len = fis.read(buf)) > 0) {
baos.write(buf, 0, len);
}
return baos.toByteArray();
} finally {
try {
if(fis != null) {
fis.close();
}
} catch(IOException foo) {
}
}
// we won't ever get here
}
/**
* Public only for LocalHTTPServer, not for general use
*/
@ -1163,12 +1105,12 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
private static class OnTimeout implements Runnable {
private Socket _socket;
private OutputStream _out;
private String _target;
private boolean _usingProxy;
private String _wwwProxy;
private long _requestId;
private final Socket _socket;
private final OutputStream _out;
private final String _target;
private final boolean _usingProxy;
private final String _wwwProxy;
private final long _requestId;
public OnTimeout(Socket s, OutputStream out, String target, boolean usingProxy, String wwwProxy, long id) {
_socket = s;

View File

@ -3,19 +3,26 @@
*/
package net.i2p.i2ptunnel;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.Socket;
import java.util.ArrayList;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.data.Base64;
import net.i2p.data.DataHelper;
import net.i2p.util.EventDispatcher;
import net.i2p.util.InternalSocket;
import net.i2p.util.Log;
import net.i2p.util.PasswordManager;
/**
* Common things for HTTPClient and ConnectClient
@ -25,6 +32,25 @@ import net.i2p.util.Log;
*/
public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implements Runnable {
private static final int PROXYNONCE_BYTES = 8;
private static final int MD5_BYTES = 16;
/** 24 */
private static final int NONCE_BYTES = DataHelper.DATE_LENGTH + MD5_BYTES;
private static final long MAX_NONCE_AGE = 30*24*60*60*1000L;
private static final String ERR_AUTH1 =
"HTTP/1.1 407 Proxy Authentication Required\r\n" +
"Content-Type: text/html; charset=UTF-8\r\n" +
"Cache-control: no-cache\r\n" +
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.5\r\n" + // try to get a UTF-8-encoded response back for the password
"Proxy-Authenticate: ";
// put the auth type and realm in between
private static final String ERR_AUTH2 =
"\r\n" +
"\r\n" +
"<html><body><H1>I2P ERROR: PROXY AUTHENTICATION REQUIRED</H1>" +
"This proxy is configured to require authentication.";
protected final List<String> _proxyList;
protected final static byte[] ERR_NO_OUTPROXY =
@ -40,7 +66,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
/** used to assign unique IDs to the threads / clients. no logic or functionality */
protected static volatile long __clientId = 0;
protected static final File _errorDir = new File(I2PAppContext.getGlobalContext().getBaseDir(), "docs");
private final byte[] _proxyNonce;
protected String getPrefix(long requestId) { return "Client[" + _clientId + "/" + requestId + "]: "; }
@ -63,6 +89,8 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
I2PTunnel tunnel) throws IllegalArgumentException {
super(localPort, ownDest, l, notifyThis, handlerName, tunnel);
_proxyList = new ArrayList(4);
_proxyNonce = new byte[PROXYNONCE_BYTES];
_context.random().nextBytes(_proxyNonce);
}
/**
@ -76,8 +104,12 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
throws IllegalArgumentException {
super(localPort, l, sktMgr, tunnel, notifyThis, clientId);
_proxyList = new ArrayList(4);
_proxyNonce = new byte[PROXYNONCE_BYTES];
_context.random().nextBytes(_proxyNonce);
}
//////// Authorization stuff
/** all auth @since 0.8.2 */
public static final String PROP_AUTH = "proxyAuth";
public static final String PROP_USER = "proxyUsername";
@ -90,68 +122,349 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
/** passwords for specific outproxies may be added with outproxyUsername.fooproxy.i2p=user and outproxyPassword.fooproxy.i2p=pw */
public static final String PROP_OUTPROXY_USER_PREFIX = PROP_OUTPROXY_USER + '.';
public static final String PROP_OUTPROXY_PW_PREFIX = PROP_OUTPROXY_PW + '.';
/** new style MD5 auth */
public static final String PROP_PROXY_DIGEST_PREFIX = "proxy.auth.";
public static final String PROP_PROXY_DIGEST_SUFFIX = ".md5";
public static final String BASIC_AUTH = "basic";
public static final String DIGEST_AUTH = "digest";
protected abstract String getRealm();
protected enum AuthResult {AUTH_BAD_REQ, AUTH_BAD, AUTH_STALE, AUTH_GOOD}
/**
* @param authorization may be null
* @since 0.9.4
*/
protected boolean isDigestAuthRequired() {
String authRequired = getTunnel().getClientOptions().getProperty(PROP_AUTH);
if (authRequired == null)
return false;
return authRequired.toLowerCase(Locale.US).equals("digest");
}
/**
* Authorization
* Ref: RFC 2617
* If the socket is an InternalSocket, no auth required.
*
* @param method GET, POST, etc.
* @param authorization may be null, the full auth line e.g. "Basic lskjlksjf"
* @return success
*/
protected boolean authorize(Socket s, long requestId, String authorization) {
// Authorization
// Ref: RFC 2617
// If the socket is an InternalSocket, no auth required.
protected AuthResult authorize(Socket s, long requestId, String method, String authorization) {
String authRequired = getTunnel().getClientOptions().getProperty(PROP_AUTH);
if (Boolean.parseBoolean(authRequired) ||
(authRequired != null && "basic".equals(authRequired.toLowerCase(Locale.US)))) {
if (s instanceof InternalSocket) {
if (_log.shouldLog(Log.INFO))
_log.info(getPrefix(requestId) + "Internal access, no auth required");
return true;
} else if (authorization != null) {
// hmm safeDecode(foo, true) to use standard alphabet is private in Base64
byte[] decoded = Base64.decode(authorization.replace("/", "~").replace("+", "="));
if (decoded != null) {
// We send Accept-Charset: UTF-8 in the 407 so hopefully it comes back that way inside the B64 ?
try {
String dec = new String(decoded, "UTF-8");
String[] parts = dec.split(":");
String user = parts[0];
String pw = parts[1];
// first try pw for that user
String configPW = getTunnel().getClientOptions().getProperty(PROP_PW_PREFIX + user);
if (configPW == null) {
// if not, look at default user and pw
String configUser = getTunnel().getClientOptions().getProperty(PROP_USER);
if (user.equals(configUser))
configPW = getTunnel().getClientOptions().getProperty(PROP_PW);
}
if (configPW != null) {
if (pw.equals(configPW)) {
if (_log.shouldLog(Log.INFO))
_log.info(getPrefix(requestId) + "Good auth - user: " + user + " pw: " + pw);
return true;
} else {
if (_log.shouldLog(Log.WARN))
_log.warn(getPrefix(requestId) + "Bad auth, pw mismatch - user: " + user + " pw: " + pw + " expected: " + configPW);
}
} else {
if (_log.shouldLog(Log.WARN))
_log.warn(getPrefix(requestId) + "Bad auth, no stored pw for user: " + user + " pw: " + pw);
}
} catch (UnsupportedEncodingException uee) {
_log.error(getPrefix(requestId) + "No UTF-8 support? B64: " + authorization, uee);
} catch (ArrayIndexOutOfBoundsException aioobe) {
// no ':' in response
if (_log.shouldLog(Log.WARN))
_log.warn(getPrefix(requestId) + "Bad auth B64: " + authorization, aioobe);
if (authRequired == null)
return AuthResult.AUTH_GOOD;
authRequired = authRequired.toLowerCase(Locale.US);
if (authRequired.equals("false"))
return AuthResult.AUTH_GOOD;
if (s instanceof InternalSocket) {
if (_log.shouldLog(Log.INFO))
_log.info(getPrefix(requestId) + "Internal access, no auth required");
return AuthResult.AUTH_GOOD;
}
if (authorization == null)
return AuthResult.AUTH_BAD;
if (_log.shouldLog(Log.INFO))
_log.info(getPrefix(requestId) + "Auth: " + authorization);
String authLC = authorization.toLowerCase(Locale.US);
if (authRequired.equals("true") || authRequired.equals(BASIC_AUTH)) {
if (!authLC.startsWith("basic "))
return AuthResult.AUTH_BAD;
authorization = authorization.substring(6);
// hmm safeDecode(foo, true) to use standard alphabet is private in Base64
byte[] decoded = Base64.decode(authorization.replace("/", "~").replace("+", "="));
if (decoded != null) {
// We send Accept-Charset: UTF-8 in the 407 so hopefully it comes back that way inside the B64 ?
try {
String dec = new String(decoded, "UTF-8");
String[] parts = dec.split(":");
String user = parts[0];
String pw = parts[1];
// first try pw for that user
String configPW = getTunnel().getClientOptions().getProperty(PROP_PW_PREFIX + user);
if (configPW == null) {
// if not, look at default user and pw
String configUser = getTunnel().getClientOptions().getProperty(PROP_USER);
if (user.equals(configUser))
configPW = getTunnel().getClientOptions().getProperty(PROP_PW);
}
} else {
if (configPW != null) {
if (pw.equals(configPW)) {
if (_log.shouldLog(Log.INFO))
_log.info(getPrefix(requestId) + "Good auth - user: " + user + " pw: " + pw);
return AuthResult.AUTH_GOOD;
}
}
_log.logAlways(Log.WARN, "PROXY AUTH FAILURE: user " + user);
} catch (UnsupportedEncodingException uee) {
_log.error(getPrefix(requestId) + "No UTF-8 support? B64: " + authorization, uee);
} catch (ArrayIndexOutOfBoundsException aioobe) {
// no ':' in response
if (_log.shouldLog(Log.WARN))
_log.warn(getPrefix(requestId) + "Bad auth B64: " + authorization);
_log.warn(getPrefix(requestId) + "Bad auth B64: " + authorization, aioobe);
return AuthResult.AUTH_BAD_REQ;
}
return AuthResult.AUTH_BAD;
} else {
if (_log.shouldLog(Log.WARN))
_log.warn(getPrefix(requestId) + "Bad auth B64: " + authorization);
return AuthResult.AUTH_BAD_REQ;
}
return false;
} else if (authRequired.equals(DIGEST_AUTH)) {
if (!authLC.startsWith("digest "))
return AuthResult.AUTH_BAD;
authorization = authorization.substring(7);
Map<String, String> args = parseArgs(authorization);
AuthResult rv = validateDigest(method, args);
return rv;
} else {
return true;
_log.error("Unknown proxy authorization type configured: " + authRequired);
return AuthResult.AUTH_BAD_REQ;
}
}
/**
* Verify all of it.
* Ref: RFC 2617
* @since 0.9.4
*/
private AuthResult validateDigest(String method, Map<String, String> args) {
String user = args.get("username");
String realm = args.get("realm");
String nonce = args.get("nonce");
String qop = args.get("qop");
String uri = args.get("uri");
String cnonce = args.get("cnonce");
String nc = args.get("nc");
String response = args.get("response");
if (user == null || realm == null || nonce == null || qop == null ||
uri == null || cnonce == null || nc == null || response == null) {
if (_log.shouldLog(Log.INFO))
_log.info("Bad digest request: " + DataHelper.toString(args));
return AuthResult.AUTH_BAD_REQ;
}
// nonce check
AuthResult check = verifyNonce(nonce);
if (check != AuthResult.AUTH_GOOD) {
if (_log.shouldLog(Log.INFO))
_log.info("Bad digest nonce: " + check + ' ' + DataHelper.toString(args));
return check;
}
// get H(A1) == stored password
String ha1 = getTunnel().getClientOptions().getProperty(PROP_PROXY_DIGEST_PREFIX + user +
PROP_PROXY_DIGEST_SUFFIX);
if (ha1 == null) {
_log.logAlways(Log.WARN, "PROXY AUTH FAILURE: user " + user);
return AuthResult.AUTH_BAD;
}
// get H(A2)
String a2 = method + ':' + uri;
String ha2 = PasswordManager.md5Hex(a2);
// response check
String kd = ha1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2;
String hkd = PasswordManager.md5Hex(kd);
if (!response.equals(hkd)) {
_log.logAlways(Log.WARN, "PROXY AUTH FAILURE: user " + user);
if (_log.shouldLog(Log.INFO))
_log.info("Bad digest auth: " + DataHelper.toString(args));
return AuthResult.AUTH_BAD;
}
if (_log.shouldLog(Log.INFO))
_log.info("Good digest auth - user: " + user);
return AuthResult.AUTH_GOOD;
}
/**
* The Base 64 of 24 bytes: (now, md5 of (now, proxy nonce))
* @since 0.9.4
*/
private String getNonce() {
byte[] b = new byte[DataHelper.DATE_LENGTH + PROXYNONCE_BYTES];
byte[] n = new byte[NONCE_BYTES];
long now = _context.clock().now();
DataHelper.toLong(b, 0, DataHelper.DATE_LENGTH, now);
System.arraycopy(_proxyNonce, 0, b, DataHelper.DATE_LENGTH, PROXYNONCE_BYTES);
System.arraycopy(b, 0, n, 0, DataHelper.DATE_LENGTH);
byte[] md5 = PasswordManager.md5Sum(b);
System.arraycopy(md5, 0, n, DataHelper.DATE_LENGTH, MD5_BYTES);
return Base64.encode(n);
}
/**
* Verify the Base 64 of 24 bytes: (now, md5 of (now, proxy nonce))
* @since 0.9.4
*/
private AuthResult verifyNonce(String b64) {
byte[] n = Base64.decode(b64);
if (n == null || n.length != NONCE_BYTES)
return AuthResult.AUTH_BAD;
long now = _context.clock().now();
long stamp = DataHelper.fromLong(n, 0, DataHelper.DATE_LENGTH);
if (now - stamp > MAX_NONCE_AGE)
return AuthResult.AUTH_STALE;
byte[] b = new byte[DataHelper.DATE_LENGTH + PROXYNONCE_BYTES];
System.arraycopy(n, 0, b, 0, DataHelper.DATE_LENGTH);
System.arraycopy(_proxyNonce, 0, b, DataHelper.DATE_LENGTH, PROXYNONCE_BYTES);
byte[] md5 = PasswordManager.md5Sum(b);
if (!DataHelper.eq(md5, 0, n, DataHelper.DATE_LENGTH, MD5_BYTES))
return AuthResult.AUTH_BAD;
return AuthResult.AUTH_GOOD;
}
/**
* What to send if digest auth fails
* @since 0.9.4
*/
protected String getAuthError(boolean isStale) {
boolean isDigest = isDigestAuthRequired();
return
ERR_AUTH1 +
(isDigest ? "Digest" : "Basic") +
" realm=\"" + getRealm() + '"' +
(isDigest ? ", nonce=\"" + getNonce() + "\"," +
" algorithm=MD5," +
" qop=\"auth\"" +
(isStale ? ", stale=true" : "")
: "") +
ERR_AUTH2;
}
/**
* Modified from LoadClientAppsJob.
* All keys are mapped to lower case.
* Ref: RFC 2617
*
* @param args non-null
* @since 0.9.4
*/
private static Map<String, String> parseArgs(String args) {
Map<String, String> rv = new HashMap(8);
char data[] = args.toCharArray();
StringBuilder buf = new StringBuilder(32);
boolean isQuoted = false;
String key = null;
for (int i = 0; i < data.length; i++) {
switch (data[i]) {
case '\"':
if (isQuoted) {
// keys never quoted
if (key != null) {
rv.put(key, buf.toString().trim());
key = null;
}
buf.setLength(0);
}
isQuoted = !isQuoted;
break;
case ' ':
case '\r':
case '\n':
case '\t':
case ',':
// whitespace - if we're in a quoted section, keep this as part of the quote,
// otherwise use it as a delim
if (isQuoted) {
buf.append(data[i]);
} else {
if (key != null) {
rv.put(key, buf.toString().trim());
key = null;
}
buf.setLength(0);
}
break;
case '=':
if (isQuoted) {
buf.append(data[i]);
} else {
key = buf.toString().trim().toLowerCase(Locale.US);
buf.setLength(0);
}
break;
default:
buf.append(data[i]);
break;
}
}
if (key != null)
rv.put(key, buf.toString().trim());
return rv;
}
//////// Error page stuff
/**
* foo => errordir/foo-header_xx.ht for lang xx, or errordir/foo-header.ht,
* or the backup byte array on fail.
*
* .ht files must be UTF-8 encoded and use \r\n terminators so the
* HTTP headers are conformant.
* We can't use FileUtil.readFile() because it strips \r
*
* @return non-null
* @since 0.9.4 moved from I2PTunnelHTTPClient
*/
protected byte[] getErrorPage(String base, byte[] backup) {
return getErrorPage(_context, base, backup);
}
/**
* foo => errordir/foo-header_xx.ht for lang xx, or errordir/foo-header.ht,
* or the backup byte array on fail.
*
* .ht files must be UTF-8 encoded and use \r\n terminators so the
* HTTP headers are conformant.
* We can't use FileUtil.readFile() because it strips \r
*
* @return non-null
* @since 0.9.4 moved from I2PTunnelHTTPClient
*/
protected static byte[] getErrorPage(I2PAppContext ctx, String base, byte[] backup) {
File errorDir = new File(ctx.getBaseDir(), "docs");
String lang = ctx.getProperty("routerconsole.lang", Locale.getDefault().getLanguage());
if(lang != null && lang.length() > 0 && !lang.equals("en")) {
File file = new File(errorDir, base + "-header_" + lang + ".ht");
try {
return readFile(file);
} catch(IOException ioe) {
// try the english version now
}
}
File file = new File(errorDir, base + "-header.ht");
try {
return readFile(file);
} catch(IOException ioe) {
return backup;
}
}
/**
* @since 0.9.4 moved from I2PTunnelHTTPClient
*/
private static byte[] readFile(File file) throws IOException {
FileInputStream fis = null;
byte[] buf = new byte[2048];
ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
try {
int len = 0;
fis = new FileInputStream(file);
while((len = fis.read(buf)) > 0) {
baos.write(buf, 0, len);
}
return baos.toByteArray();
} finally {
try {
if(fis != null) {
fis.close();
}
} catch(IOException foo) {
}
}
// we won't ever get here
}
}

View File

@ -19,8 +19,10 @@ import net.i2p.client.I2PSession;
import net.i2p.data.Base32;
import net.i2p.data.Destination;
import net.i2p.i2ptunnel.socks.I2PSOCKSTunnel;
import net.i2p.util.FileUtil;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import net.i2p.util.SecureFile;
import net.i2p.util.SecureFileOutputStream;
/**
@ -43,6 +45,8 @@ public class TunnelController implements Logging {
private boolean _running;
private boolean _starting;
public static final String KEY_BACKUP_DIR = "i2ptunnel-keyBackup";
/**
* Create a new controller for a tunnel out of the specific config options.
* The config may contain a large number of options - only ones that begin in
@ -102,8 +106,17 @@ public class TunnelController implements Logging {
Destination dest = client.createDestination(fos);
String destStr = dest.toBase64();
log("Private key created and saved in " + keyFile.getAbsolutePath());
log("You should backup this file in a secure place.");
log("New destination: " + destStr);
log("Base32: " + Base32.encode(dest.calculateHash().getData()) + ".b32.i2p");
String b32 = Base32.encode(dest.calculateHash().getData()) + ".b32.i2p";
log("Base32: " + b32);
File backupDir = new SecureFile(I2PAppContext.getGlobalContext().getConfigDir(), KEY_BACKUP_DIR);
if (backupDir.isDirectory() || backupDir.mkdir()) {
String name = b32 + '-' + I2PAppContext.getGlobalContext().clock().now() + ".dat";
File backup = new File(backupDir, name);
if (FileUtil.copy(keyFile, backup, false, true))
log("Private key backup saved to " + backup.getAbsolutePath());
}
} catch (I2PException ie) {
if (_log.shouldLog(Log.ERROR))
_log.error("Error creating new destination", ie);
@ -307,7 +320,9 @@ public class TunnelController implements Logging {
I2PSession session = sessions.get(i);
if (_log.shouldLog(Log.INFO))
_log.info("Acquiring session " + session);
TunnelControllerGroup.getInstance().acquire(this, session);
TunnelControllerGroup group = TunnelControllerGroup.getInstance();
if (group != null)
group.acquire(this, session);
}
_sessions = sessions;
} else {
@ -326,7 +341,9 @@ public class TunnelController implements Logging {
I2PSession s = _sessions.get(i);
if (_log.shouldLog(Log.INFO))
_log.info("Releasing session " + s);
TunnelControllerGroup.getInstance().release(this, s);
TunnelControllerGroup group = TunnelControllerGroup.getInstance();
if (group != null)
group.release(this, s);
}
// _sessions.clear() ????
} else {

View File

@ -12,26 +12,34 @@ import java.util.Properties;
import java.util.Set;
import net.i2p.I2PAppContext;
import net.i2p.app.*;
import static net.i2p.app.ClientAppState.*;
import net.i2p.client.I2PSession;
import net.i2p.client.I2PSessionException;
import net.i2p.data.DataHelper;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import net.i2p.util.OrderedProperties;
import net.i2p.util.SystemVersion;
/**
* Coordinate a set of tunnels within the JVM, loading and storing their config
* to disk, and building new ones as requested.
*
* Warning - this is a singleton. Todo: fix
* This is the entry point from clients.config.
*/
public class TunnelControllerGroup {
private Log _log;
private static TunnelControllerGroup _instance;
public class TunnelControllerGroup implements ClientApp {
private final Log _log;
private volatile ClientAppState _state;
private final I2PAppContext _context;
private final ClientAppManager _mgr;
private static volatile TunnelControllerGroup _instance;
static final String DEFAULT_CONFIG_FILE = "i2ptunnel.config";
private final List<TunnelController> _controllers;
private String _configFile = DEFAULT_CONFIG_FILE;
private final String _configFile;
private static final String REGISTERED_NAME = "i2ptunnel";
/**
* Map of I2PSession to a Set of TunnelController objects
@ -41,48 +49,143 @@ public class TunnelControllerGroup {
*/
private final Map<I2PSession, Set<TunnelController>> _sessions;
/**
* In I2PAppContext will instantiate if necessary and always return non-null.
* As of 0.9.4, when in RouterContext, will return null (except in Android)
* if the TCG has not yet been started by the router.
*
* @throws IllegalArgumentException if unable to load from i2ptunnel.config
*/
public static TunnelControllerGroup getInstance() {
synchronized (TunnelControllerGroup.class) {
if (_instance == null)
_instance = new TunnelControllerGroup(DEFAULT_CONFIG_FILE);
if (_instance == null) {
I2PAppContext ctx = I2PAppContext.getGlobalContext();
if (SystemVersion.isAndroid() || !ctx.isRouterContext()) {
_instance = new TunnelControllerGroup(ctx, null, null);
_instance.startup();
} // else wait for the router to start it
}
return _instance;
}
}
private TunnelControllerGroup(String configFile) {
_log = I2PAppContext.getGlobalContext().logManager().getLog(TunnelControllerGroup.class);
_controllers = Collections.synchronizedList(new ArrayList());
_configFile = configFile;
/**
* Instantiation only. Caller must call startup().
* Config file problems will not throw exception until startup().
*
* @param mgr may be null
* @param args one arg, the config file, if not absolute will be relative to the context's config dir,
* if empty or null, the default is i2ptunnel.config
* @since 0.9.4
*/
public TunnelControllerGroup(I2PAppContext context, ClientAppManager mgr, String[] args) {
_state = UNINITIALIZED;
_context = context;
_mgr = mgr;
_log = _context.logManager().getLog(TunnelControllerGroup.class);
_controllers = new ArrayList();
if (args == null || args.length <= 0)
_configFile = DEFAULT_CONFIG_FILE;
else if (args.length == 1)
_configFile = args[0];
else
throw new IllegalArgumentException("Usage: TunnelControllerGroup [filename]");
_sessions = new HashMap(4);
loadControllers(_configFile);
I2PAppContext.getGlobalContext().addShutdownTask(new Shutdown());
synchronized (TunnelControllerGroup.class) {
if (_instance == null)
_instance = this;
}
if (_instance != this) {
_log.logAlways(Log.WARN, "New TunnelControllerGroup, now you have two");
if (_log.shouldLog(Log.WARN))
_log.warn("I did it", new Exception());
}
_state = INITIALIZED;
}
/**
* @param args one arg, the config file, if not absolute will be relative to the context's config dir,
* if no args, the default is i2ptunnel.config
* @throws IllegalArgumentException if unable to load from config from file
*/
public static void main(String args[]) {
synchronized (TunnelControllerGroup.class) {
if (_instance != null) return; // already loaded through the web
if ( (args == null) || (args.length <= 0) ) {
_instance = new TunnelControllerGroup(DEFAULT_CONFIG_FILE);
} else if (args.length == 1) {
_instance = new TunnelControllerGroup(args[0]);
} else {
System.err.println("Usage: TunnelControllerGroup [filename]");
return;
}
_instance = new TunnelControllerGroup(I2PAppContext.getGlobalContext(), null, args);
_instance.startup();
}
}
/**
* ClientApp interface
* @throws IllegalArgumentException if unable to load config from file
* @since 0.9.4
*/
public void startup() {
loadControllers(_configFile);
if (_mgr != null)
_mgr.register(this);
_context.addShutdownTask(new Shutdown());
}
/**
* ClientApp interface
* @since 0.9.4
*/
public ClientAppState getState() {
return _state;
}
/**
* ClientApp interface
* @since 0.9.4
*/
public String getName() {
return REGISTERED_NAME;
}
/**
* ClientApp interface
* @since 0.9.4
*/
public String getDisplayName() {
return REGISTERED_NAME;
}
/**
* @since 0.9.4
*/
private void changeState(ClientAppState state) {
changeState(state, null);
}
/**
* @since 0.9.4
*/
private synchronized void changeState(ClientAppState state, Exception e) {
_state = state;
if (_mgr != null)
_mgr.notify(this, state, null, e);
}
/**
* Warning - destroys the singleton!
* @since 0.8.8
*/
private static class Shutdown implements Runnable {
private class Shutdown implements Runnable {
public void run() {
shutdown();
}
}
/**
* ClientApp interface
* @since 0.9.4
*/
public void shutdown(String[] args) {
shutdown();
}
/**
* Warning - destroys the singleton!
* Caller must root a new context before calling instance() or main() again.
@ -91,28 +194,31 @@ public class TunnelControllerGroup {
*
* @since 0.8.8
*/
public static void shutdown() {
public void shutdown() {
changeState(STOPPING);
if (_mgr != null)
_mgr.unregister(this);
unloadControllers();
synchronized (TunnelControllerGroup.class) {
if (_instance == null) return;
_instance.unloadControllers();
_instance._log = null;
_instance = null;
if (_instance == this)
_instance = null;
}
/// fixme static
I2PTunnelClientBase.killClientExecutor();
changeState(STOPPED);
}
/**
* Load up all of the tunnels configured in the given file (but do not start
* them)
*
* DEPRECATED for use outside this class. Use startup() or getInstance().
*
* @throws IllegalArgumentException if unable to load from file
*/
public void loadControllers(String configFile) {
public synchronized void loadControllers(String configFile) {
changeState(STARTING);
Properties cfg = loadConfig(configFile);
if (cfg == null) {
if (_log.shouldLog(Log.WARN))
_log.warn("Unable to load the config from " + configFile);
return;
}
int i = 0;
while (true) {
String type = cfg.getProperty("tunnel." + i + ".type");
@ -127,20 +233,28 @@ public class TunnelControllerGroup {
if (_log.shouldLog(Log.INFO))
_log.info(i + " controllers loaded from " + configFile);
changeState(RUNNING);
}
private class StartControllers implements Runnable {
public void run() {
for (int i = 0; i < _controllers.size(); i++) {
TunnelController controller = _controllers.get(i);
if (controller.getStartOnLoad())
controller.startTunnel();
synchronized(TunnelControllerGroup.this) {
for (int i = 0; i < _controllers.size(); i++) {
TunnelController controller = _controllers.get(i);
if (controller.getStartOnLoad())
controller.startTunnel();
}
}
}
}
public void reloadControllers() {
/**
* Stop all tunnels, reload config, and restart those configured to do so.
* WARNING - Does NOT simply reload the configuration!!! This is probably not what you want.
*
* @throws IllegalArgumentException if unable to reload config file
*/
public synchronized void reloadControllers() {
unloadControllers();
loadControllers(_configFile);
}
@ -150,7 +264,7 @@ public class TunnelControllerGroup {
* file or do other silly things)
*
*/
public void unloadControllers() {
public synchronized void unloadControllers() {
stopAllControllers();
_controllers.clear();
if (_log.shouldLog(Log.INFO))
@ -162,14 +276,14 @@ public class TunnelControllerGroup {
* a config file or start it or anything)
*
*/
public void addController(TunnelController controller) { _controllers.add(controller); }
public synchronized void addController(TunnelController controller) { _controllers.add(controller); }
/**
* Stop and remove the given tunnel
*
* @return list of messages from the controller as it is stopped
*/
public List<String> removeController(TunnelController controller) {
public synchronized List<String> removeController(TunnelController controller) {
if (controller == null) return new ArrayList();
controller.stopTunnel();
List<String> msgs = controller.clearMessages();
@ -183,7 +297,7 @@ public class TunnelControllerGroup {
*
* @return list of messages the tunnels generate when stopped
*/
public List<String> stopAllControllers() {
public synchronized List<String> stopAllControllers() {
List<String> msgs = new ArrayList();
for (int i = 0; i < _controllers.size(); i++) {
TunnelController controller = _controllers.get(i);
@ -200,7 +314,7 @@ public class TunnelControllerGroup {
*
* @return list of messages the tunnels generate when started
*/
public List<String> startAllControllers() {
public synchronized List<String> startAllControllers() {
List<String> msgs = new ArrayList();
for (int i = 0; i < _controllers.size(); i++) {
TunnelController controller = _controllers.get(i);
@ -218,7 +332,7 @@ public class TunnelControllerGroup {
*
* @return list of messages the tunnels generate when restarted
*/
public List<String> restartAllControllers() {
public synchronized List<String> restartAllControllers() {
List<String> msgs = new ArrayList();
for (int i = 0; i < _controllers.size(); i++) {
TunnelController controller = _controllers.get(i);
@ -235,7 +349,7 @@ public class TunnelControllerGroup {
*
* @return list of messages the tunnels have generated
*/
public List<String> clearAllMessages() {
public synchronized List<String> clearAllMessages() {
List<String> msgs = new ArrayList();
for (int i = 0; i < _controllers.size(); i++) {
TunnelController controller = _controllers.get(i);
@ -257,8 +371,7 @@ public class TunnelControllerGroup {
* Save the configuration of all known tunnels to the given file
*
*/
public void saveConfig(String configFile) throws IOException {
_configFile = configFile;
public synchronized void saveConfig(String configFile) throws IOException {
File cfgFile = new File(configFile);
if (!cfgFile.isAbsolute())
cfgFile = new File(I2PAppContext.getGlobalContext().getConfigDir(), configFile);
@ -279,16 +392,17 @@ public class TunnelControllerGroup {
/**
* Load up the config data from the file
*
* @return properties loaded or null if there was an error
* @return properties loaded
* @throws IllegalArgumentException if unable to load from file
*/
private Properties loadConfig(String configFile) {
private synchronized Properties loadConfig(String configFile) {
File cfgFile = new File(configFile);
if (!cfgFile.isAbsolute())
cfgFile = new File(I2PAppContext.getGlobalContext().getConfigDir(), configFile);
if (!cfgFile.exists()) {
if (_log.shouldLog(Log.ERROR))
_log.error("Unable to load the controllers from " + cfgFile.getAbsolutePath());
return null;
throw new IllegalArgumentException("Unable to load the controllers from " + cfgFile.getAbsolutePath());
}
Properties props = new Properties();
@ -298,7 +412,7 @@ public class TunnelControllerGroup {
} catch (IOException ioe) {
if (_log.shouldLog(Log.ERROR))
_log.error("Error reading the controllers from " + cfgFile.getAbsolutePath(), ioe);
return null;
throw new IllegalArgumentException("Error reading the controllers from " + cfgFile.getAbsolutePath(), ioe);
}
}
@ -307,7 +421,9 @@ public class TunnelControllerGroup {
*
* @return list of TunnelController objects
*/
public List<TunnelController> getControllers() { return _controllers; }
public synchronized List<TunnelController> getControllers() {
return new ArrayList(_controllers);
}
/**

View File

@ -29,8 +29,8 @@ import net.i2p.util.Addresses;
/**
* Ugly little accessor for the edit page
*
* Warning - This class is not part of the i2ptunnel API, and at some point
* it will be moved from the jar to the war.
* Warning - This class is not part of the i2ptunnel API,
* it has been moved from the jar to the war.
* Usage by classes outside of i2ptunnel.war is deprecated.
*/
public class EditBean extends IndexBean {
@ -38,6 +38,8 @@ public class EditBean extends IndexBean {
public static boolean staticIsClient(int tunnel) {
TunnelControllerGroup group = TunnelControllerGroup.getInstance();
if (group == null)
return false;
List controllers = group.getControllers();
if (controllers.size() > tunnel) {
TunnelController cur = (TunnelController)controllers.get(tunnel);
@ -55,6 +57,7 @@ public class EditBean extends IndexBean {
else
return "127.0.0.1";
}
public String getTargetPort(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null && tun.getTargetPort() != null)
@ -62,6 +65,7 @@ public class EditBean extends IndexBean {
else
return "";
}
public String getSpoofedHost(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null && tun.getSpoofedHost() != null)
@ -69,12 +73,13 @@ public class EditBean extends IndexBean {
else
return "";
}
public String getPrivateKeyFile(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null && tun.getPrivKeyFile() != null)
return tun.getPrivKeyFile();
if (tunnel < 0)
tunnel = _group.getControllers().size();
tunnel = _group == null ? 999 : _group.getControllers().size();
return "i2ptunnel" + tunnel + "-privKeys.dat";
}
@ -221,19 +226,7 @@ public class EditBean extends IndexBean {
/** all proxy auth @since 0.8.2 */
public boolean getProxyAuth(int tunnel) {
return getBooleanProperty(tunnel, I2PTunnelHTTPClientBase.PROP_AUTH) &&
getProxyUsername(tunnel).length() > 0 &&
getProxyPassword(tunnel).length() > 0;
}
public String getProxyUsername(int tunnel) {
return getProperty(tunnel, I2PTunnelHTTPClientBase.PROP_USER, "");
}
public String getProxyPassword(int tunnel) {
if (getProxyUsername(tunnel).length() <= 0)
return "";
return getProperty(tunnel, I2PTunnelHTTPClientBase.PROP_PW, "");
return getProperty(tunnel, I2PTunnelHTTPClientBase.PROP_AUTH, "false") != "false";
}
public boolean getOutproxyAuth(int tunnel) {
@ -354,10 +347,17 @@ public class EditBean extends IndexBean {
if (opts == null) return "";
StringBuilder buf = new StringBuilder(64);
int i = 0;
boolean isMD5Proxy = "httpclient".equals(tun.getType()) ||
"connectclient".equals(tun.getType());
for (Iterator iter = opts.keySet().iterator(); iter.hasNext(); ) {
String key = (String)iter.next();
if (_noShowSet.contains(key))
continue;
// leave in for HTTP and Connect so it can get migrated to MD5
// hide for SOCKS until migrated to MD5
if ((!isMD5Proxy) &&
_nonProxyNoShowSet.contains(key))
continue;
String val = opts.getProperty(key);
if (i != 0) buf.append(' ');
buf.append(key).append('=').append(val);

View File

@ -27,6 +27,7 @@ import net.i2p.data.Certificate;
import net.i2p.data.Destination;
import net.i2p.data.PrivateKeyFile;
import net.i2p.data.SessionKey;
import net.i2p.i2ptunnel.I2PTunnelConnectClient;
import net.i2p.i2ptunnel.I2PTunnelHTTPClient;
import net.i2p.i2ptunnel.I2PTunnelHTTPClientBase;
import net.i2p.i2ptunnel.I2PTunnelIRCClient;
@ -36,18 +37,21 @@ import net.i2p.util.Addresses;
import net.i2p.util.ConcurrentHashSet;
import net.i2p.util.FileUtil;
import net.i2p.util.Log;
import net.i2p.util.PasswordManager;
import net.i2p.util.SecureFile;
/**
* Simple accessor for exposing tunnel info, but also an ugly form handler
*
* Warning - This class is not part of the i2ptunnel API, and at some point
* it will be moved from the jar to the war.
* Warning - This class is not part of the i2ptunnel API,
* it has been moved from the jar to the war.
* Usage by classes outside of i2ptunnel.war is deprecated.
*/
public class IndexBean {
protected final I2PAppContext _context;
protected final Log _log;
protected final TunnelControllerGroup _group;
private final String _fatalError;
private String _action;
private int _tunnel;
//private long _prevNonce;
@ -83,15 +87,14 @@ public class IndexBean {
private int _hashCashValue;
private int _certType;
private String _certSigner;
private String _newProxyUser;
private String _newProxyPW;
public static final int RUNNING = 1;
public static final int STARTING = 2;
public static final int NOT_RUNNING = 3;
public static final int STANDBY = 4;
/** deprecated unimplemented, now using routerconsole realm */
//public static final String PROP_TUNNEL_PASSPHRASE = "i2ptunnel.passphrase";
public static final String PROP_TUNNEL_PASSPHRASE = "consolePassword";
//static final String PROP_NONCE = IndexBean.class.getName() + ".nonce";
//static final String PROP_NONCE_OLD = PROP_NONCE + '2';
/** 3 wasn't enough for some browsers. They are reloading the page for some reason - maybe HEAD? @since 0.8.1 */
@ -104,11 +107,23 @@ public class IndexBean {
public static final String DEFAULT_THEME = "light";
public static final String PROP_CSS_DISABLED = "routerconsole.css.disabled";
public static final String PROP_JS_DISABLED = "routerconsole.javascript.disabled";
private static final String PROP_PW_ENABLE = "routerconsole.auth.enable";
public IndexBean() {
_context = I2PAppContext.getGlobalContext();
_log = _context.logManager().getLog(IndexBean.class);
_group = TunnelControllerGroup.getInstance();
TunnelControllerGroup tcg;
String error;
try {
tcg = TunnelControllerGroup.getInstance();
error = tcg == null ? _("Tunnels are not initialized yet, please reload in two minutes.")
: null;
} catch (IllegalArgumentException iae) {
tcg = null;
error = iae.toString();
}
_group = tcg;
_fatalError = error;
_tunnel = -1;
_curNonce = "-1";
addNonce();
@ -116,6 +131,13 @@ public class IndexBean {
_otherOptions = new ConcurrentHashMap(4);
}
/**
* @since 0.9.4
*/
public boolean isInitialized() {
return _group != null;
}
public static String getNextNonce() {
synchronized (_nonces) {
return _nonces.get(0);
@ -145,14 +167,11 @@ public class IndexBean {
}
}
/** deprecated unimplemented, now using routerconsole realm */
public void setPassphrase(String phrase) {
}
public void setAction(String action) {
if ( (action == null) || (action.trim().length() <= 0) ) return;
_action = action;
}
public void setTunnel(String tunnel) {
if ( (tunnel == null) || (tunnel.trim().length() <= 0) ) return;
try {
@ -162,17 +181,17 @@ public class IndexBean {
}
}
/** just check if console password option is set, jetty will do auth */
private boolean validPassphrase() {
String pass = _context.getProperty(PROP_TUNNEL_PASSPHRASE);
return pass != null && pass.trim().length() > 0;
}
private String processAction() {
if ( (_action == null) || (_action.trim().length() <= 0) || ("Cancel".equals(_action)))
return "";
if ( (!haveNonce(_curNonce)) && (!validPassphrase()) )
return _("Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.");
if (_group == null)
return "Error - tunnels are not initialized yet";
// If passwords are turned on, all is assumed good
if (!_context.getBooleanProperty(PROP_PW_ENABLE) &&
!haveNonce(_curNonce))
return _("Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.")
+ ' ' +
_("If the problem persists, verify that you have cookies enabled in your browser.");
if ("Stop all".equals(_action))
return stopAll();
else if ("Start all".equals(_action))
@ -200,33 +219,33 @@ public class IndexBean {
else
return "Action " + _action + " unknown";
}
private String stopAll() {
if (_group == null) return "";
List<String> msgs = _group.stopAllControllers();
return getMessages(msgs);
}
private String startAll() {
if (_group == null) return "";
List<String> msgs = _group.startAllControllers();
return getMessages(msgs);
}
private String restartAll() {
if (_group == null) return "";
List<String> msgs = _group.restartAllControllers();
return getMessages(msgs);
}
private String reloadConfig() {
if (_group == null) return "";
private String reloadConfig() {
_group.reloadControllers();
return _("Configuration reloaded for all tunnels");
}
private String start() {
if (_tunnel < 0) return "Invalid tunnel";
List controllers = _group.getControllers();
List<TunnelController> controllers = _group.getControllers();
if (_tunnel >= controllers.size()) return "Invalid tunnel";
TunnelController controller = (TunnelController)controllers.get(_tunnel);
TunnelController controller = controllers.get(_tunnel);
controller.startTunnelBackground();
// give the messages a chance to make it to the window
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
@ -237,9 +256,9 @@ public class IndexBean {
private String stop() {
if (_tunnel < 0) return "Invalid tunnel";
List controllers = _group.getControllers();
List<TunnelController> controllers = _group.getControllers();
if (_tunnel >= controllers.size()) return "Invalid tunnel";
TunnelController controller = (TunnelController)controllers.get(_tunnel);
TunnelController controller = controllers.get(_tunnel);
controller.stopTunnel();
// give the messages a chance to make it to the window
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
@ -268,10 +287,10 @@ public class IndexBean {
// if the current tunnel is shared, and of supported type
if (Boolean.parseBoolean(cur.getSharedClient()) && isClient(cur.getType())) {
// all clients use the same I2CP session, and as such, use the same I2CP options
List controllers = _group.getControllers();
List<TunnelController> controllers = _group.getControllers();
for (int i = 0; i < controllers.size(); i++) {
TunnelController c = (TunnelController)controllers.get(i);
TunnelController c = controllers.get(i);
// Current tunnel modified by user, skip
if (c == cur) continue;
@ -355,10 +374,13 @@ public class IndexBean {
name = Long.toString(_context.clock().now());
}
}
name = "i2ptunnel-deleted-" + name.replace(' ', '_') + "-privkeys.dat";
File to = new File(_context.getConfigDir(), name);
if (to.exists())
to = new File(_context.getConfigDir(), name + '-' + _context.clock().now());
name = "i2ptunnel-deleted-" + name.replace(' ', '_') + '-' + _context.clock().now() + "-privkeys.dat";
File backupDir = new SecureFile(_context.getConfigDir(), TunnelController.KEY_BACKUP_DIR);
File to;
if (backupDir.isDirectory() || backupDir.mkdir())
to = new File(backupDir, name);
else
to = new File(_context.getConfigDir(), name);
boolean success = FileUtil.rename(pkf, to);
if (success)
msgs.add("Private key file " + pkf.getAbsolutePath() +
@ -375,7 +397,7 @@ public class IndexBean {
*/
public String getMessages() {
if (_group == null)
return "";
return _fatalError;
StringBuilder buf = new StringBuilder(512);
if (_action != null) {
@ -804,21 +826,22 @@ public class IndexBean {
/** all proxy auth @since 0.8.2 */
public void setProxyAuth(String s) {
_booleanOptions.add(I2PTunnelHTTPClientBase.PROP_AUTH);
if (s != null)
_otherOptions.put(I2PTunnelHTTPClientBase.PROP_AUTH, I2PTunnelHTTPClientBase.DIGEST_AUTH);
}
public void setProxyUsername(String s) {
if (s != null)
_otherOptions.put(I2PTunnelHTTPClientBase.PROP_USER, s.trim());
_newProxyUser = s.trim();
}
public void setProxyPassword(String s) {
if (s != null)
_otherOptions.put(I2PTunnelHTTPClientBase.PROP_PW, s.trim());
_newProxyPW = s.trim();
}
public void setOutproxyAuth(String s) {
_booleanOptions.add(I2PTunnelHTTPClientBase.PROP_OUTPROXY_AUTH);
_otherOptions.put(I2PTunnelHTTPClientBase.PROP_OUTPROXY_AUTH, I2PTunnelHTTPClientBase.DIGEST_AUTH);
}
public void setOutproxyUsername(String s) {
@ -1040,6 +1063,45 @@ public class IndexBean {
config.setProperty("proxyList", _proxyList);
}
// Proxy auth including migration to MD5
if ("httpclient".equals(_type) || "connectclient".equals(_type)) {
// Migrate even if auth is disabled
// go get the old from custom options that updateConfigGeneric() put in there
String puser = "option." + I2PTunnelHTTPClientBase.PROP_USER;
String user = config.getProperty(puser);
String ppw = "option." + I2PTunnelHTTPClientBase.PROP_PW;
String pw = config.getProperty(ppw);
if (user != null && pw != null && user.length() > 0 && pw.length() > 0) {
String pmd5 = "option." + I2PTunnelHTTPClientBase.PROP_PROXY_DIGEST_PREFIX +
user + I2PTunnelHTTPClientBase.PROP_PROXY_DIGEST_SUFFIX;
if (config.getProperty(pmd5) == null) {
// not in there, migrate
String realm = _type.equals("httpclient") ? I2PTunnelHTTPClient.AUTH_REALM
: I2PTunnelConnectClient.AUTH_REALM;
String hex = PasswordManager.md5Hex(realm, user, pw);
if (hex != null) {
config.setProperty(pmd5, hex);
config.remove(puser);
config.remove(ppw);
}
}
}
// New user/password
String auth = _otherOptions.get(I2PTunnelHTTPClientBase.PROP_AUTH);
if (auth != null && !auth.equals("false")) {
if (_newProxyUser != null && _newProxyPW != null &&
_newProxyUser.length() > 0 && _newProxyPW.length() > 0) {
String pmd5 = "option." + I2PTunnelHTTPClientBase.PROP_PROXY_DIGEST_PREFIX +
_newProxyUser + I2PTunnelHTTPClientBase.PROP_PROXY_DIGEST_SUFFIX;
String realm = _type.equals("httpclient") ? I2PTunnelHTTPClient.AUTH_REALM
: I2PTunnelConnectClient.AUTH_REALM;
String hex = PasswordManager.md5Hex(realm, _newProxyUser, _newProxyPW);
if (hex != null)
config.setProperty(pmd5, hex);
}
}
}
if ("ircclient".equals(_type) || "client".equals(_type) || "streamrclient".equals(_type)) {
if (_targetDestination != null)
config.setProperty("targetDestination", _targetDestination);
@ -1084,15 +1146,16 @@ public class IndexBean {
"i2cp.reduceOnIdle", "i2cp.closeOnIdle", "i2cp.newDestOnResume", "persistentClientKey", "i2cp.delayOpen"
};
private static final String _booleanProxyOpts[] = {
I2PTunnelHTTPClientBase.PROP_AUTH, I2PTunnelHTTPClientBase.PROP_OUTPROXY_AUTH
I2PTunnelHTTPClientBase.PROP_OUTPROXY_AUTH
};
private static final String _booleanServerOpts[] = {
"i2cp.reduceOnIdle", "i2cp.encryptLeaseSet", PROP_ENABLE_ACCESS_LIST, PROP_ENABLE_BLACKLIST
};
private static final String _otherClientOpts[] = {
"i2cp.reduceIdleTime", "i2cp.reduceQuantity", "i2cp.closeIdleTime",
"proxyUsername", "proxyPassword", "outproxyUsername", "outproxyPassword",
I2PTunnelHTTPClient.PROP_JUMP_SERVERS
"outproxyUsername", "outproxyPassword",
I2PTunnelHTTPClient.PROP_JUMP_SERVERS,
I2PTunnelHTTPClientBase.PROP_AUTH
};
private static final String _otherServerOpts[] = {
"i2cp.reduceIdleTime", "i2cp.reduceQuantity", "i2cp.leaseSetKey", "i2cp.accessList",
@ -1101,7 +1164,17 @@ public class IndexBean {
PROP_MAX_STREAMS
};
/**
* do NOT add these to noShoOpts, we must leave them in for HTTPClient and ConnectCLient
* so they will get migrated to MD5
* TODO migrate socks to MD5
*/
private static final String _otherProxyOpts[] = {
"proxyUsername", "proxyPassword"
};
protected static final Set _noShowSet = new HashSet(64);
protected static final Set _nonProxyNoShowSet = new HashSet(4);
static {
_noShowSet.addAll(Arrays.asList(_noShowOpts));
_noShowSet.addAll(Arrays.asList(_booleanClientOpts));
@ -1109,6 +1182,7 @@ public class IndexBean {
_noShowSet.addAll(Arrays.asList(_booleanServerOpts));
_noShowSet.addAll(Arrays.asList(_otherClientOpts));
_noShowSet.addAll(Arrays.asList(_otherServerOpts));
_nonProxyNoShowSet.addAll(Arrays.asList(_otherProxyOpts));
}
private void updateConfigGeneric(Properties config) {
@ -1139,6 +1213,12 @@ public class IndexBean {
String key = pair.substring(0, eq);
if (_noShowSet.contains(key))
continue;
// leave in for HTTP and Connect so it can get migrated to MD5
// hide for SOCKS until migrated to MD5
if ((!"httpclient".equals(_type)) &&
(! "connectclient".equals(_type)) &&
_nonProxyNoShowSet.contains(key))
continue;
String val = pair.substring(eq+1);
config.setProperty("option." + key, val);
}
@ -1190,9 +1270,9 @@ public class IndexBean {
protected TunnelController getController(int tunnel) {
if (tunnel < 0) return null;
if (_group == null) return null;
List controllers = _group.getControllers();
List<TunnelController> controllers = _group.getControllers();
if (controllers.size() > tunnel)
return (TunnelController)controllers.get(tunnel);
return controllers.get(tunnel);
else
return null;
}

View File

@ -31,7 +31,11 @@
<body id="tunnelEditPage">
<div id="pageHeader">
</div>
<%
if (editBean.isInitialized()) {
%>
<form method="post" action="list">
<div id="tunnelEditPanel" class="panel">
@ -429,19 +433,19 @@
<label>
<%=intl._("Enable")%>:
</label>
<input value="1" type="checkbox" id="proxyAuth" name="proxyAuth" title="Check to require authorization for this service"<%=(editBean.getProxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
<input value="1" type="checkbox" id="startOnLoad" name="proxyAuth" title="Check to require authorization for this service"<%=(editBean.getProxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
</div>
<div id="portField" class="rowItem">
<label>
<%=intl._("Username")%>:
</label>
<input type="text" id="clientPort" name="proxyUsername" title="Set username for this service" value="<%=editBean.getProxyUsername(curTunnel)%>" class="freetext" />
<input type="text" id="clientPort" name="proxyUsername" title="Set username for this service" value="" class="freetext" />
</div>
<div id="portField" class="rowItem">
<label>
<%=intl._("Password")%>:
</label>
<input type="password" id="clientPort" name="proxyPassword" title="Set password for this service" value="<%=editBean.getProxyPassword(curTunnel)%>" class="freetext" />
<input type="password" id="clientPort" name="proxyPassword" title="Set password for this service" value="" class="freetext" />
</div>
<div class="subdivider">
<hr />
@ -453,7 +457,7 @@
<label>
<%=intl._("Enable")%>:
</label>
<input value="1" type="checkbox" id="outproxyAuth" name="outproxyAuth" title="Check if the outproxy requires authorization"<%=(editBean.getOutproxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
<input value="1" type="checkbox" id="startOnLoad" name="outproxyAuth" title="Check if the outproxy requires authorization"<%=(editBean.getOutproxyAuth(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
</div>
<div id="portField" class="rowItem">
<label>
@ -508,5 +512,12 @@
</form>
<div id="pageFooter">
</div>
<%
} else {
%>Tunnels are not initialized yet, please reload in two minutes.<%
} // isInitialized()
%>
</body>
</html>

View File

@ -31,7 +31,11 @@
<body id="tunnelEditPage">
<div id="pageHeader">
</div>
<%
if (editBean.isInitialized()) {
%>
<form method="post" action="list">
<div id="tunnelEditPanel" class="panel">
@ -518,5 +522,12 @@
</form>
<div id="pageFooter">
</div>
<%
} else {
%>Tunnels are not initialized yet, please reload in two minutes.<%
} // isInitialized()
%>
</body>
</html>

View File

@ -55,12 +55,23 @@
</div>
</div>
</div>
<%
if (indexBean.isInitialized()) {
%>
<div id="globalOperationsPanel" class="panel">
<div class="header"></div>
<div class="footer">
<div class="toolbox">
<a class="control" href="wizard"><%=intl._("Tunnel Wizard")%></a> <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Stop%20all"><%=intl._("Stop All")%></a> <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Start%20all"><%=intl._("Start All")%></a> <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Restart%20all"><%=intl._("Restart All")%></a> <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Reload%20configuration"><%=intl._("Reload Config")%></a>
<a class="control" href="wizard"><%=intl._("Tunnel Wizard")%></a>
<a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Stop%20all"><%=intl._("Stop All")%></a>
<a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Start%20all"><%=intl._("Start All")%></a>
<a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Restart%20all"><%=intl._("Restart All")%></a>
<%--
//this is really bad because it stops and restarts all tunnels, which is probably not what you want
<a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Reload%20configuration"><%=intl._("Reload Config")%></a>
--%>
</div>
</div>
</div>
@ -285,7 +296,9 @@
</label>
<div class="text">
<% String cdest = indexBean.getClientDestination(curClient);
if (cdest.length() > 0) {
if (cdest.length() > 70) { // Probably a B64 (a B32 is 60 chars) so truncate
%><%=cdest.substring(0, 45)%>&hellip;<%=cdest.substring(cdest.length() - 15, cdest.length())%><%
} else if (cdest.length() > 0) {
%><%=cdest%><%
} else {
%><i><%=intl._("none")%></i><%
@ -327,6 +340,11 @@
</form>
</div>
</div>
<%
} // isInitialized()
%>
<div id="pageFooter">
</div>
</body>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@
# Translators:
# "blabla", 2011.
# <blabla@trash-mail.com>, 2011, 2012.
# Daniel Mustieles <daniel.mustieles@gmail.com>, 2012.
# ducki2p <ducki2p@gmail.com>, 2011.
# foo <foo@bar>, 2009.
# <punkibastardo@gmail.com>, 2011, 2012.
@ -13,17 +14,16 @@
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-07-26 19:45+0000\n"
"PO-Revision-Date: 2012-07-21 19:52+0000\n"
"Last-Translator: blabla <blabla@trash-mail.com>\n"
"Language-Team: Spanish (http://www.transifex.com/projects/p/I2P/language/"
"es/)\n"
"Language: es\n"
"Report-Msgid-Bugs-To: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2012-10-12 00:38+0000\n"
"PO-Revision-Date: 2012-10-18 08:55+0000\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: Spanish (http://www.transifex.com/projects/p/I2P/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:554
msgid "This seems to be a bad destination:"
@ -36,13 +36,10 @@ msgstr "El ayudante de direcciones no te puede ayudar con un destino así."
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:621
#, java-format
msgid ""
"To visit the destination in your host database, click <a href=\"{0}\">here</"
"a>. To visit the conflicting addresshelper destination, click <a href="
"\"{1}\">here</a>."
msgstr ""
"Para visitar el destino en la base de datos de hosts, ¡pincha <a href="
"\"{0}\">aquí</a>! Para visitar el destino del ayudante de direcciones en "
"conflicto, ¡pincha <a href=\"{1}\">aquí</a>!"
"To visit the destination in your host database, click <a "
"href=\"{0}\">here</a>. To visit the conflicting addresshelper destination, "
"click <a href=\"{1}\">here</a>."
msgstr "Para visitar el destino en la base de datos de hosts, ¡pincha <a href=\"{0}\">aquí</a>! Para visitar el destino del ayudante de direcciones en conflicto, ¡pincha <a href=\"{1}\">aquí</a>!"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1023
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:403
@ -57,7 +54,7 @@ msgid "Base 32"
msgstr "Base 32"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1031
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:380
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:374
msgid "Destination"
msgstr "Destino"
@ -69,21 +66,18 @@ msgstr "Acceder a {0} sin guardar"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1042
#, java-format
msgid "Save {0} to router address book and continue to eepsite"
msgstr ""
"Guardar {0} a la libreta de direcciones del router y acceder al sitio i2p."
msgstr "Guardar {0} a la libreta de direcciones del router y acceder al sitio i2p."
#. only blockfile supports multiple books
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1045
#, java-format
msgid "Save {0} to master address book and continue to eepsite"
msgstr ""
"Guardar {0} a la libreta de direcciones principal y acceder al sitio i2p."
msgstr "Guardar {0} a la libreta de direcciones principal y acceder al sitio i2p."
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1046
#, java-format
msgid "Save {0} to private address book and continue to eepsite"
msgstr ""
"Guardar {0} a la libreta de direcciones privada y acceder al sitio i2p."
msgstr "Guardar {0} a la libreta de direcciones privada y acceder al sitio i2p."
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1211
msgid "HTTP Outproxy"
@ -91,10 +85,9 @@ msgstr "Puerta de salida HTTP"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1216
msgid ""
"Click a link below to look for an address helper by using a \"jump\" service:"
msgstr ""
"Pincha en un enlace de debajo para buscar un ayudante de direcciones "
"mediante el uso de un servicio de \"salto\":"
"Click a link below to look for an address helper by using a \"jump\" "
"service:"
msgstr "Pincha en un enlace de debajo para buscar un ayudante de direcciones mediante el uso de un servicio de \"salto\":"
#. Translators: parameter is a host name
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1252
@ -146,97 +139,109 @@ msgstr "¡Haz click aquí si no estás siendo enviado automáticamente!"
msgid "internal"
msgstr "interno"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:174
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:175
msgid ""
"Invalid form submission, probably because you used the 'back' or 'reload' "
"button on your browser. Please resubmit."
msgstr ""
"El formulario presentado es inválido, probablemente porque has utilizado el "
"botón 'atrás' o 'recargar' de tu navegador. Por favor, ¡vuelve a enviarlo!"
msgstr "El formulario presentado es inválido, probablemente porque has utilizado el botón 'atrás' o 'recargar' de tu navegador. Por favor, ¡vuelve a enviarlo!"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:221
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:222
msgid "Configuration reloaded for all tunnels"
msgstr "Configuración recargada para todos los túneles"
#. and give them something to look at in any case
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:233
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:234
msgid "Starting tunnel"
msgstr "Inicializando el túnel"
#. and give them something to look at in any case
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:246
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:247
msgid "Stopping tunnel"
msgstr "Deteniendo el túnel"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:314
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:315
msgid "Configuration changes saved"
msgstr "Cambios en la configuración guardados"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:317
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:318
msgid "Failed to save configuration"
msgstr "No se pudo guardar la configuración"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:436
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:437
msgid "New Tunnel"
msgstr "Nuevo túnel"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:456
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:460
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:470
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:587
msgid "Port not set"
msgstr "Puerto no establecido"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:463
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:589
msgid "Invalid port"
msgstr "Puerto no válido"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:466
msgid "Warning - ports less than 1024 are not recommended"
msgstr "Advertencia: no se recomienda usar puertos inferiores al 1024"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:482
msgid "Standard client"
msgstr "Cliente estándar"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:457
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:483
msgid "HTTP client"
msgstr "Cliente HTTP"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:458
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:484
msgid "IRC client"
msgstr "Cliente IRC"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:459
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:485
msgid "Standard server"
msgstr "Servidor estándar"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:460
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:486
msgid "HTTP server"
msgstr "Servidor HTTP"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:461
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:487
msgid "SOCKS 4/4a/5 proxy"
msgstr "Proxy SOCKS 4/4a/5"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:462
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:488
msgid "SOCKS IRC proxy"
msgstr "Proxy IRC SOCKS"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:463
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:489
msgid "CONNECT/SSL/HTTPS proxy"
msgstr "Proxy CONNECT/SSL/HTTPS"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:464
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:490
msgid "IRC server"
msgstr "Servidor de IRC"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:465
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:491
msgid "Streamr client"
msgstr "Cliente Streamr"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:466
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:492
msgid "Streamr server"
msgstr "Servidor Streamr"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:467
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:493
msgid "HTTP bidir"
msgstr "HTTP bidir"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:555
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:305
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:581
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:299
msgid "Host not set"
msgstr "Host no establecido"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:559
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:287
msgid "Port not set"
msgstr "Puerto no establecido"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:583
msgid "Invalid address"
msgstr "Dirección no válida"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:82
msgid "I2P Tunnel Manager - Edit Client Tunnel"
@ -263,14 +268,14 @@ msgstr "Nombre"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:127
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:127
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:261
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:294
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:288
msgid "Type"
msgstr "Tipo"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:131
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:131
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:241
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:399
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:393
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:330
msgid "Description"
msgstr "Descripción"
@ -329,9 +334,7 @@ msgstr "Túnel Compartido"
msgid ""
"(Share tunnels with other clients and irc/httpclients? Change requires "
"restart of client proxy)"
msgstr ""
"(¿Compartir túneles con otros clientes y clientes de IRC/http? Cambiar esto "
"requiere reiniciar el proxy de cliente)"
msgstr "(¿Compartir túneles con otros clientes y clientes de IRC/http? Cambiar esto requiere reiniciar el proxy de cliente)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:225
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:135
@ -359,9 +362,7 @@ msgstr "Opciones de red avanzadas"
msgid ""
"(NOTE: when this client proxy is configured to share tunnels, then these "
"options are for all the shared proxy clients!)"
msgstr ""
"(NOTA: Si este proxy de cliente está configurado para compartir túneles, "
"estas opciones se aplicarán a todos los proxys de cliente compartidos.)"
msgstr "(NOTA: Si este proxy de cliente está configurado para compartir túneles, estas opciones se aplicarán a todos los proxys de cliente compartidos.)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:245
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:255
@ -412,23 +413,18 @@ msgstr "Variación de 0 saltos (sin aleatoriedad, rendimiento constante)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:300
msgid ""
"+ 0-1 hop variance (medium additive randomisation, subtractive performance)"
msgstr ""
"Variación de + 0-1 salto (aleatoriedad media aditiva, rendimiento "
"substractivo)"
msgstr "Variación de + 0-1 salto (aleatoriedad media aditiva, rendimiento substractivo)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:294
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:304
msgid ""
"+ 0-2 hop variance (high additive randomisation, subtractive performance)"
msgstr ""
"Variación de + 0-2 saltos (aleatoriedad alta aditiva, rendimiento "
"substractivo)"
msgstr "Variación de + 0-2 saltos (aleatoriedad alta aditiva, rendimiento substractivo)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:298
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:308
msgid "+/- 0-1 hop variance (standard randomisation, standard performance)"
msgstr ""
"Variación de +/- 0-1 salto (aleatoriedad estándar, rendimiento estándar)"
msgstr "Variación de +/- 0-1 salto (aleatoriedad estándar, rendimiento estándar)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:302
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:312
@ -448,25 +444,20 @@ msgstr "Cantidad"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:325
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:335
msgid "1 inbound, 1 outbound tunnel (low bandwidth usage, less reliability)"
msgstr ""
"1 túnel entrante, 1 de salida (bajo uso de ancho de banda, menos fiabilidad)"
msgstr "1 túnel entrante, 1 de salida (bajo uso de ancho de banda, menos fiabilidad)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:329
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:339
msgid ""
"2 inbound, 2 outbound tunnels (standard bandwidth usage, standard "
"reliability)"
msgstr ""
"2 túneles entrantes, 2 de salida (uso de ancho de banda estándar, fiabilidad "
"estándar)"
msgstr "2 túneles entrantes, 2 de salida (uso de ancho de banda estándar, fiabilidad estándar)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:333
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:343
msgid ""
"3 inbound, 3 outbound tunnels (higher bandwidth usage, higher reliability)"
msgstr ""
"3 túneles entrantes, 3 de salida (mayor uso de ancho de banda, mayor "
"fiabilidad)"
msgstr "3 túneles entrantes, 3 de salida (mayor uso de ancho de banda, mayor fiabilidad)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:341
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:351
@ -486,24 +477,18 @@ msgstr "0 túneles de respaldo (redundancia 0, no aumenta el uso de recursos)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:357
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:367
msgid "1 backup tunnel each direction (low redundancy, low resource usage)"
msgstr ""
"1 túnel de respaldo en cada dirección (redundancia baja, uso bajo de "
"recursos)"
msgstr "1 túnel de respaldo en cada dirección (redundancia baja, uso bajo de recursos)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:361
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:371
msgid ""
"2 backup tunnels each direction (medium redundancy, medium resource usage)"
msgstr ""
"2 túneles de respaldo en cada dirección (redundancia media, uso de recursos "
"medio)"
msgstr "2 túneles de respaldo en cada dirección (redundancia media, uso de recursos medio)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:365
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:375
msgid "3 backup tunnels each direction (high redundancy, high resource usage)"
msgstr ""
"3 túneles de respaldo en cada dirección (alta redundancia, uso de recursos "
"alto)"
msgstr "3 túneles de respaldo en cada dirección (alta redundancia, uso de recursos alto)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:373
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:383
@ -835,7 +820,7 @@ msgstr "Vista previa"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:129
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:192
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:265
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:312
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:306
msgid "Status"
msgstr "Estado"
@ -848,30 +833,30 @@ msgid "No Preview"
msgstr "Sin vista previa"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:199
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:319
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:313
msgid "Starting..."
msgstr "Iniciando..."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:206
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:220
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:326
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:340
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:354
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:320
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:334
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:348
msgid "Stop"
msgstr "Detener"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:213
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:347
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:341
msgid "Running"
msgstr "Ejecutándose"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:227
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:361
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:355
msgid "Stopped"
msgstr "Detenido"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:234
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:368
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:362
msgid "Start"
msgstr "Iniciar"
@ -880,7 +865,7 @@ msgid "New server tunnel"
msgstr "Nuevo servidor de túnel"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:251
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:409
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:403
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:223
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:265
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:295
@ -890,7 +875,7 @@ msgid "Standard"
msgstr "Estándar"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:253
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:411
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:405
msgid "Create"
msgstr "Crear"
@ -899,23 +884,23 @@ msgid "I2P Client Tunnels"
msgstr "Túneles de cliente I2P"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:263
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:298
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:292
msgid "Interface"
msgstr "Interfaz"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:333
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:327
msgid "Standby"
msgstr "En espera"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:377
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:371
msgid "Outproxy"
msgstr "Puerta de salida"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:394
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:388
msgid "none"
msgstr "ninguno"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:407
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:401
msgid "New client tunnel"
msgstr "Nuevo túnel cliente"
@ -959,35 +944,27 @@ msgstr "Asistente completado"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:189
msgid ""
"This wizard will take you through the various options available for creating "
"tunnels in I2P."
msgstr ""
"Este asistente le guiará a través de las distintas opciones disponibles para "
"la creación de túneles en I2P."
"This wizard will take you through the various options available for creating"
" tunnels in I2P."
msgstr "Este asistente le guiará a través de las distintas opciones disponibles para la creación de túneles en I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:191
msgid ""
"The first thing to decide is whether you want to create a server or a client "
"tunnel."
msgstr ""
"Lo primero que debe decidir es si se desea crear un túnel de servidor o de "
"cliente."
"The first thing to decide is whether you want to create a server or a client"
" tunnel."
msgstr "Lo primero que debe decidir es si se desea crear un túnel de servidor o de cliente."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:193
msgid ""
"If you need to connect to a remote service, such as an IRC server inside I2P "
"or a code repository, then you will require a CLIENT tunnel."
msgstr ""
"Si necesita conectarse a un servicio remoto, como un servidor de IRC dentro "
"de I2P o un repositorio de código, va a requerir un túnel CLIENTE."
"If you need to connect to a remote service, such as an IRC server inside I2P"
" or a code repository, then you will require a CLIENT tunnel."
msgstr "Si necesita conectarse a un servicio remoto, como un servidor de IRC dentro de I2P o un repositorio de código, va a requerir un túnel CLIENTE."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:195
msgid ""
"On the other hand, if you wish to host a service for others to connect to "
"you'll need to create a SERVER tunnel."
msgstr ""
"Por otro lado, si desea hospedar un servicio para que otros puedan "
"conectarse a usted, necesitará crear un túnel SERVIDOR."
msgstr "Por otro lado, si desea hospedar un servicio para que otros puedan conectarse a usted, necesitará crear un túnel SERVIDOR."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:197
msgid "Server Tunnel"
@ -1010,9 +987,7 @@ msgstr "Túnel básico para la conexión a un servicio dentro de I2P."
msgid ""
"Try this if none of the tunnel types below fit your requirements, or you "
"don't know what type of tunnel you need."
msgstr ""
"Pruebe esto si ninguno de los tipos de túneles a continuación se ajustan a "
"sus requerimientos, o si no sabe qué tipo de túnel necesita."
msgstr "Pruebe esto si ninguno de los tipos de túneles a continuación se ajustan a sus requerimientos, o si no sabe qué tipo de túnel necesita."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:229
msgid "Tunnel that acts as an HTTP proxy for reaching eepsites inside I2P."
@ -1021,20 +996,15 @@ msgstr "Túnel que actúa como un proxy HTTP para llegar a eepsites dentro I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:231
msgid ""
"Set your browser to use this tunnel as an http proxy, or set your "
"\"http_proxy\" environment variable for command-line applications in GNU/"
"Linux."
msgstr ""
"Configure su navegador para usar este túnel como un proxy HTTP, o configure "
"su variable de entorno \"http_proxy\" para aplicaciones de línea de comandos "
"en GNU / Linux."
"\"http_proxy\" environment variable for command-line applications in "
"GNU/Linux."
msgstr "Configure su navegador para usar este túnel como un proxy HTTP, o configure su variable de entorno \"http_proxy\" para aplicaciones de línea de comandos en GNU / Linux."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:233
msgid ""
"Websites outside I2P can also be reached if an HTTP proxy within I2P is "
"known."
msgstr ""
"También es posible llegar a sitios web de fuera de I2P si se conoce algún "
"proxy HTTP dentro de I2P."
msgstr "También es posible llegar a sitios web de fuera de I2P si se conoce algún proxy HTTP dentro de I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:235
msgid "Customised client tunnel specific for IRC connections."
@ -1044,17 +1014,13 @@ msgstr "Túnel de cliente personalizado específicamente para conexiones de IRC.
msgid ""
"With this tunnel type, your IRC client will be able to connect to an IRC "
"network inside I2P."
msgstr ""
"Con este tipo de túnel, su cliente de IRC será capaz de conectarse a una red "
"de IRC dentro de I2P."
msgstr "Con este tipo de túnel, su cliente de IRC será capaz de conectarse a una red de IRC dentro de I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:239
msgid ""
"Each IRC network in I2P that you wish to connect to will require its own "
"tunnel. (See Also, SOCKS IRC)"
msgstr ""
"Cada red IRC en I2P a la que desee conectarse requerirá su propio túnel. "
"(Véase también, SOCKS IRC)"
msgstr "Cada red IRC en I2P a la que desee conectarse requerirá su propio túnel. (Véase también, SOCKS IRC)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:241
msgid "A tunnel that implements the SOCKS protocol."
@ -1064,45 +1030,33 @@ msgstr "Un túnel que implementa el protocolo SOCKS."
msgid ""
"This enables both TCP and UDP connections to be made through a SOCKS "
"outproxy within I2P."
msgstr ""
"Esto permite que las conexiones TCP y UDP se hagan a través de un outproxy "
"SOCKS que esté dentro de I2P."
msgstr "Esto permite que las conexiones TCP y UDP se hagan a través de un outproxy SOCKS que esté dentro de I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:245
msgid ""
"A client tunnel implementing the SOCKS protocol, which is customised for "
"connecting to IRC networks."
msgstr ""
"Un túnel de cliente que implementa el protocolo SOCKS, personalizado para la "
"conexión con redes IRC."
msgstr "Un túnel de cliente que implementa el protocolo SOCKS, personalizado para la conexión con redes IRC."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:247
msgid ""
"With this tunnel type, IRC networks in I2P can be reached by typing the I2P "
"address into your IRC client, and configuring the IRC client to use this "
"SOCKS tunnel."
msgstr ""
"Con este tipo de túnel, las redes IRC de I2P pueden ser alcanzadas "
"escribiendo directamente la dirección I2P en el cliente de IRC, y "
"configurando el cliente de IRC para utilizar este túnel SOCKS."
msgstr "Con este tipo de túnel, las redes IRC de I2P pueden ser alcanzadas escribiendo directamente la dirección I2P en el cliente de IRC, y configurando el cliente de IRC para utilizar este túnel SOCKS."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:249
msgid ""
"This means that only one I2P tunnel is required rather than a separate "
"tunnel per IRC network."
msgstr ""
"Esto significa que sólo es necesario un único túnel I2P en lugar de un túnel "
"distinto por cada red IRC."
msgstr "Esto significa que sólo es necesario un único túnel I2P en lugar de un túnel distinto por cada red IRC."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:251
msgid ""
"IRC networks outside I2P can also be reached if a SOCKS outproxy within I2P "
"is known, though it depends on whether or not the outproxy has been blocked "
"by the IRC network."
msgstr ""
"También se puede llegar a redes IRC de fuera de I2P si se conoce un outproxy "
"SOCKS en I2P, aunque depende de si el outproxy ha sido bloqueado por la red "
"IRC."
msgstr "También se puede llegar a redes IRC de fuera de I2P si se conoce un outproxy SOCKS en I2P, aunque depende de si el outproxy ha sido bloqueado por la red IRC."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:253
msgid "A client tunnel that implements the HTTP CONNECT command."
@ -1112,9 +1066,7 @@ msgstr "Un túnel de cliente que implementa el comando HTTP CONNECT."
msgid ""
"This enables TCP connections to be made through an HTTP outproxy, assuming "
"the proxy supports the CONNECT command."
msgstr ""
"Esto permite hacer conexiones TCP a través de un outproxy HTTP, suponiendo "
"que el servidor proxy admita el comando CONNECT."
msgstr "Esto permite hacer conexiones TCP a través de un outproxy HTTP, suponiendo que el servidor proxy admita el comando CONNECT."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:257
msgid "A customised client tunnel for Streamr."
@ -1122,8 +1074,7 @@ msgstr "Un túnel de cliente personalizado para Streamr."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:267
msgid "A basic server tunnel for hosting a generic service inside I2P."
msgstr ""
"Un túnel básico de servidor para alojar un servicio genérico dentro de I2P."
msgstr "Un túnel básico de servidor para alojar un servicio genérico dentro de I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:271
msgid "A server tunnel that is customised for HTTP connections."
@ -1137,28 +1088,21 @@ msgstr "Utilice este tipo de túnel si desea alojar una eepsite."
msgid ""
"A customised server tunnel that can both serve HTTP data and connect to "
"other server tunnels."
msgstr ""
"Un túnel de servidor personalizado que puede servir tanto datos HTTP como "
"conectar a otros túneles de servidor."
msgstr "Un túnel de servidor personalizado que puede servir tanto datos HTTP como conectar a otros túneles de servidor."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:277
msgid "This tunnel type is predominantly used when running a Seedless server."
msgstr ""
"Este tipo de túnel se utiliza principalmente cuando se ejecuta un servidor "
"sin semillas (Seedless)."
msgstr "Este tipo de túnel se utiliza principalmente cuando se ejecuta un servidor sin semillas (Seedless)."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:279
msgid "A customised server tunnel for hosting IRC networks inside I2P."
msgstr ""
"Un túnel de servidor personalizado para alojar redes IRC dentro de I2P."
msgstr "Un túnel de servidor personalizado para alojar redes IRC dentro de I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:281
msgid ""
"Usually, a separate tunnel needs to be created for each IRC server that is "
"to be accessible inside I2P."
msgstr ""
"Normalmente, se debe crear un túnel por separado para cada servidor IRC, que "
"será accesible dentro de I2P."
msgstr "Normalmente, se debe crear un túnel por separado para cada servidor IRC, que será accesible dentro de I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:283
msgid "A customised server tunnel for Streamr."
@ -1172,17 +1116,13 @@ msgstr "Elegir un nombre y una descripción para su túnel."
msgid ""
"These can be anything you want - they are just for ease of identifying the "
"tunnel in the routerconsole."
msgstr ""
"Estos pueden ser lo que se quiera - son sólo para facilitar la "
"identificación del túnel en la consola del router."
msgstr "Estos pueden ser lo que se quiera - son sólo para facilitar la identificación del túnel en la consola del router."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:354
msgid ""
"If you know of any outproxies for this type of tunnel (either HTTP or "
"SOCKS), fill them in below."
msgstr ""
"Si conoce algún outproxie para este tipo de túnel (HTTP o SOCKS), rellénelo "
"a continuación."
msgstr "Si conoce algún outproxie para este tipo de túnel (HTTP o SOCKS), rellénelo a continuación."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:356
msgid "Separate multiple proxies with commas."
@ -1192,35 +1132,27 @@ msgstr "Separe múltiples servidores proxy con comas."
msgid ""
"Type in the I2P destination of the service that this client tunnel should "
"connect to."
msgstr ""
"Introduzca el destino de I2P del servicio al que este túnel de cliente debe "
"conectarse."
msgstr "Introduzca el destino de I2P del servicio al que este túnel de cliente debe conectarse."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:376
msgid ""
"This could be the full base 64 destination key, or an I2P URL from your "
"address book."
msgstr ""
"Este puede ser la clave de destino en base 64 o una dirección URL I2P de su "
"libreta de direcciones."
msgstr "Este puede ser la clave de destino en base 64 o una dirección URL I2P de su libreta de direcciones."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:406
msgid ""
"This is the IP that your service is running on, this is usually on the same "
"machine so 127.0.0.1 is autofilled."
msgstr ""
"Esta es la IP en la que el servicio se está ejecutando, esto suele ser en la "
"misma máquina, por lo que se ha auto-rellenado con 127.0.0.1 "
msgstr "Esta es la IP en la que el servicio se está ejecutando, esto suele ser en la misma máquina, por lo que se ha auto-rellenado con 127.0.0.1 "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:429
msgid "This is the port that the service is accepting connections on."
msgstr ""
"Este es el puerto por el que el servicio está aceptando conexiones entrantes."
msgstr "Este es el puerto por el que el servicio está aceptando conexiones entrantes."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:450
msgid "This is the port that the client tunnel will be accessed from locally."
msgstr ""
"Este es el puerto por el que se accederá al túnel de cliente localmente."
msgstr "Este es el puerto por el que se accederá al túnel de cliente localmente."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:452
msgid "This is also the client port for the HTTPBidir server tunnel."
@ -1230,9 +1162,7 @@ msgstr "También es el puerto de cliente para el túnel de servidor HTTPBidir."
msgid ""
"How do you want this tunnel to be accessed? By just this machine, your "
"entire subnet, or external internet?"
msgstr ""
"¿Cómo quiere que se acceda a este túnel? ¿Sólo esta máquina, su subred "
"entera, o todo el internet externo?"
msgstr "¿Cómo quiere que se acceda a este túnel? ¿Sólo esta máquina, su subred entera, o todo el internet externo?"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:473
msgid "You will most likely want to just allow 127.0.0.1"
@ -1242,41 +1172,30 @@ msgstr "Lo más probable es que desee permitir sólo 127.0.0.1"
msgid ""
"The I2P router can automatically start this tunnel for you when the router "
"is started."
msgstr ""
"El router I2P puede activar automáticamente este túnel cuando el router se "
"inicie"
msgstr "El router I2P puede activar automáticamente este túnel cuando el router se inicie"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:517
msgid ""
"This can be useful for frequently-used tunnels (especially server tunnels), "
"but for tunnels that are only used occassionally it would mean that the I2P "
"router is creating and maintaining unnecessary tunnels."
msgstr ""
"Esto puede ser útil para los túneles de uso frecuente (especialmente en los "
"túneles de servidor), pero para los túneles que sólo se utilizan "
"ocasionalmente, significaría que el router I2P está creando y manteniendo "
"túneles innecesarios."
msgstr "Esto puede ser útil para los túneles de uso frecuente (especialmente en los túneles de servidor), pero para los túneles que sólo se utilizan ocasionalmente, significaría que el router I2P está creando y manteniendo túneles innecesarios."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:543
msgid "The wizard has now collected enough information to create your tunnel."
msgstr ""
"El asistente ya ha recogido suficiente información para crear el túnel."
msgstr "El asistente ya ha recogido suficiente información para crear el túnel."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:545
msgid ""
"Upon clicking the Save button below, the wizard will set up the tunnel, and "
"take you back to the main I2PTunnel page."
msgstr ""
"Al hacer clic en el botón Guardar a continuación, el asistente creará el "
"túnel, y le llevará de vuelta a la página principal de túneles I2P."
msgstr "Al hacer clic en el botón Guardar a continuación, el asistente creará el túnel, y le llevará de vuelta a la página principal de túneles I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:550
msgid ""
"Because you chose to automatically start the tunnel when the router starts, "
"you don't have to do anything further."
msgstr ""
"Como ha decidido iniciar automáticamente el túnel cuando el router se "
"inicie, no tiene que hacer nada más."
msgstr "Como ha decidido iniciar automáticamente el túnel cuando el router se inicie, no tiene que hacer nada más."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:552
msgid "The router will start the tunnel once it has been set up."
@ -1286,17 +1205,13 @@ msgstr "El router iniciará el túnel una vez haya sido establecido."
msgid ""
"Because you chose not to automatically start the tunnel, you will have to "
"manually start it."
msgstr ""
"Como usted ha decidido no iniciar automáticamente el túnel, tendrá que "
"iniciarlo de forma manual."
msgstr "Como usted ha decidido no iniciar automáticamente el túnel, tendrá que iniciarlo de forma manual."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:558
msgid ""
"You can do this by clicking the Start button on the main page which "
"corresponds to the new tunnel."
msgstr ""
"Esto se puede hacer haciendo clic en el botón Iniciar en la página principal "
"que corresponde al nuevo túnel."
msgstr "Esto se puede hacer haciendo clic en el botón Iniciar en la página principal que corresponde al nuevo túnel."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:562
msgid "Below is a summary of the options you chose:"
@ -1306,19 +1221,14 @@ msgstr "A continuación se muestra un resumen de las opciones que ha elegido:"
msgid ""
"Alongside these basic settings, there are a number of advanced options for "
"tunnel configuration."
msgstr ""
"Junto a estos valores básicos, hay una serie de opciones avanzadas para la "
"configuración de túneles."
msgstr "Junto a estos valores básicos, hay una serie de opciones avanzadas para la configuración de túneles."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:662
msgid ""
"The wizard will set reasonably sensible default values for these, but you "
"can view and/or edit these by clicking on the tunnel's name in the main "
"I2PTunnel page."
msgstr ""
"El asistente establecerá valores razonablemente sensibles para ellos por "
"defecto, pero se pueden ver y/o editar haciendo clic en el nombre del túnel "
"en la página de túneles I2P principal."
msgstr "El asistente establecerá valores razonablemente sensibles para ellos por defecto, pero se pueden ver y/o editar haciendo clic en el nombre del túnel en la página de túneles I2P principal."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:704
msgid "Previous"

View File

@ -12,9 +12,9 @@ msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-12 00:46+0000\n"
"PO-Revision-Date: 2012-10-12 00:40+0000\n"
"Last-Translator: kytv <killyourtv@i2pmail.org>\n"
"POT-Creation-Date: 2012-10-15 17:57+0000\n"
"PO-Revision-Date: 2012-10-12 00:51+0000\n"
"Last-Translator: BadCluster <badcluster@i2pmail.org>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/I2P/language/"
"it/)\n"
"Language: it\n"
@ -185,11 +185,11 @@ msgstr "Porta non impostata"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:463
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:589
msgid "Invalid port"
msgstr ""
msgstr "Porta non valida"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:466
msgid "Warning - ports less than 1024 are not recommended"
msgstr ""
msgstr "Attenzione - E' meglio non utilizzare porte inderiori alla 1024"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:482
msgid "Standard client"
@ -246,7 +246,7 @@ msgstr "Host non impostato"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:583
msgid "Invalid address"
msgstr ""
msgstr "Indirizzo non valido"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:82
msgid "I2P Tunnel Manager - Edit Client Tunnel"

File diff suppressed because it is too large Load Diff

View File

@ -4,21 +4,20 @@
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# Translators:
# Martin Svensson <digitalmannen@gmail.com>, 2011, 2012.
# Martin Svensson <digitalmannen@gmail.com>, 2011-2012.
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-07-26 19:10+0000\n"
"PO-Revision-Date: 2012-07-23 16:31+0000\n"
"Report-Msgid-Bugs-To: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2012-10-12 00:38+0000\n"
"PO-Revision-Date: 2012-10-31 14:26+0000\n"
"Last-Translator: Martin Svensson <digitalmannen@gmail.com>\n"
"Language-Team: Swedish (Sweden) (http://www.transifex.com/projects/p/I2P/"
"language/sv_SE/)\n"
"Language: sv_SE\n"
"Language-Team: Swedish (Sweden) (http://www.transifex.com/projects/p/I2P/language/sv_SE/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Language: sv_SE\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:554
msgid "This seems to be a bad destination:"
@ -31,13 +30,10 @@ msgstr "i2padresshjälp kan inte hjälpa dig med ett sådant mål!"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:621
#, java-format
msgid ""
"To visit the destination in your host database, click <a href=\"{0}\">here</"
"a>. To visit the conflicting addresshelper destination, click <a href="
"\"{1}\">here</a>."
msgstr ""
"För att besöka målet i din värd databas href=\"{0}\"> klicka <a här </ a>. "
"För att besöka de motstridiga hjälpaddresserna,<a href=\"{1}\"> klicka <a "
"här </ a>."
"To visit the destination in your host database, click <a "
"href=\"{0}\">here</a>. To visit the conflicting addresshelper destination, "
"click <a href=\"{1}\">here</a>."
msgstr "För att besöka målet i din värd databas href=\"{0}\"> klicka <a här </ a>. För att besöka de motstridiga hjälpaddresserna,<a href=\"{1}\"> klicka <a här </ a>."
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1023
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:403
@ -52,7 +48,7 @@ msgid "Base 32"
msgstr "Bas 32"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1031
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:380
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:374
msgid "Destination"
msgstr "Mål"
@ -83,10 +79,9 @@ msgstr "HTTP Utproxy"
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1216
msgid ""
"Click a link below to look for an address helper by using a \"jump\" service:"
msgstr ""
"Klicka på en länk nedan för att söka efter en hjälpaddress genom att använda "
"en \"hopp\" tjänst"
"Click a link below to look for an address helper by using a \"jump\" "
"service:"
msgstr "Klicka på en länk nedan för att söka efter en hjälpaddress genom att använda en \"hopp\" tjänst"
#. Translators: parameter is a host name
#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:1252
@ -138,97 +133,109 @@ msgstr "Klicka här om du inte omdirigeras automatiskt "
msgid "internal"
msgstr "Intern "
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:174
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:175
msgid ""
"Invalid form submission, probably because you used the 'back' or 'reload' "
"button on your browser. Please resubmit."
msgstr ""
"Ogiltigt formulärbegäran, beror troligtvis på attt du använde 'tillbaka' "
"eller 'uppdatera' knappen. Försök att skicka igen"
msgstr "Ogiltigt formulärbegäran, beror troligtvis på attt du använde 'tillbaka' eller 'uppdatera' knappen. Försök att skicka igen"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:221
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:222
msgid "Configuration reloaded for all tunnels"
msgstr "Konfigurationen uppdateras för alla tunnlar"
#. and give them something to look at in any case
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:233
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:234
msgid "Starting tunnel"
msgstr "Startar tunnel"
#. and give them something to look at in any case
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:246
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:247
msgid "Stopping tunnel"
msgstr "Stannar tunnel"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:314
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:315
msgid "Configuration changes saved"
msgstr "Konfigurationsändringar sparas"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:317
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:318
msgid "Failed to save configuration"
msgstr "Det gick inte att spara konfigurationen"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:436
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:437
msgid "New Tunnel"
msgstr "Ny tunnel"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:456
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:460
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:470
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:587
msgid "Port not set"
msgstr "Ingen port angiven"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:463
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:589
msgid "Invalid port"
msgstr "Ogiltig port"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:466
msgid "Warning - ports less than 1024 are not recommended"
msgstr "Varning - port-nummer under 1024 är inte lämpligt"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:482
msgid "Standard client"
msgstr "Standard klient"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:457
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:483
msgid "HTTP client"
msgstr "HTTP-klient"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:458
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:484
msgid "IRC client"
msgstr "IRC-klient"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:459
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:485
msgid "Standard server"
msgstr "Standard server"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:460
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:486
msgid "HTTP server"
msgstr "HTTP server"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:461
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:487
msgid "SOCKS 4/4a/5 proxy"
msgstr "SOCKS 4/4a/5 proxy"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:462
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:488
msgid "SOCKS IRC proxy"
msgstr "SOCKS IRC proxy"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:463
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:489
msgid "CONNECT/SSL/HTTPS proxy"
msgstr "CONNECT/SSL/HTTPS proxy"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:464
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:490
msgid "IRC server"
msgstr "IRC-server"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:465
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:491
msgid "Streamr client"
msgstr "Klient för Streamr "
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:466
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:492
msgid "Streamr server"
msgstr "Server för Streamr"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:467
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:493
msgid "HTTP bidir"
msgstr "HTTP bidir"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:555
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:305
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:581
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:299
msgid "Host not set"
msgstr "Ingen värd angiven"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:559
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:287
msgid "Port not set"
msgstr "Ingen port angiven"
#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:583
msgid "Invalid address"
msgstr "Ogiltig adress"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:82
msgid "I2P Tunnel Manager - Edit Client Tunnel"
@ -255,14 +262,14 @@ msgstr "Namn"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:127
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:127
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:261
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:294
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:288
msgid "Type"
msgstr "Typ"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:131
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:131
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:241
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:399
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:393
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:330
msgid "Description"
msgstr "Beskrivning"
@ -321,9 +328,7 @@ msgstr "Delad klient"
msgid ""
"(Share tunnels with other clients and irc/httpclients? Change requires "
"restart of client proxy)"
msgstr ""
"(Dela tunnlarna med andra klienter och irc/HTTP-klienter? Ändring kräver "
"omstart av klientproxyn)"
msgstr "(Dela tunnlarna med andra klienter och irc/HTTP-klienter? Ändring kräver omstart av klientproxyn)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:225
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:135
@ -351,9 +356,7 @@ msgstr "Avancerade nätverks instälningar"
msgid ""
"(NOTE: when this client proxy is configured to share tunnels, then these "
"options are for all the shared proxy clients!)"
msgstr ""
"(OBS: när denna klientproxyn är konfigurerad för att dela tunnlar, då gäller "
"dessa alternativ för alla delade proxyklienter!)"
msgstr "(OBS: när denna klientproxyn är konfigurerad för att dela tunnlar, då gäller dessa alternativ för alla delade proxyklienter!)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:245
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:255
@ -435,26 +438,20 @@ msgstr "Antal"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:325
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:335
msgid "1 inbound, 1 outbound tunnel (low bandwidth usage, less reliability)"
msgstr ""
"1 inkommande, 1 utgående tunnlar (låg bandbreddsanvändning, låg "
"tillförlitlighet)"
msgstr "1 inkommande, 1 utgående tunnlar (låg bandbreddsanvändning, låg tillförlitlighet)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:329
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:339
msgid ""
"2 inbound, 2 outbound tunnels (standard bandwidth usage, standard "
"reliability)"
msgstr ""
"2 inkommande, 2 utgående tunnlar (normal bandbreddsanvändning, normal "
"tillförlitlighet)"
msgstr "2 inkommande, 2 utgående tunnlar (normal bandbreddsanvändning, normal tillförlitlighet)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:333
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:343
msgid ""
"3 inbound, 3 outbound tunnels (higher bandwidth usage, higher reliability)"
msgstr ""
"3 inkommande, 3 utgående tunnlar (Högre bandbreddsanvändning, högre "
"tillförlitlighet)"
msgstr "3 inkommande, 3 utgående tunnlar (Högre bandbreddsanvändning, högre tillförlitlighet)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:341
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:351
@ -469,8 +466,7 @@ msgstr "Antal reserver"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:353
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:363
msgid "0 backup tunnels (0 redundancy, no added resource usage)"
msgstr ""
"0 reserv tunnlar i varje riktning (ingen redundans, ingen resursanvändning)"
msgstr "0 reserv tunnlar i varje riktning (ingen redundans, ingen resursanvändning)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:357
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:367
@ -481,15 +477,12 @@ msgstr "1 reserv tunnel i varje riktning (låg redundans, låg resursanvändning
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:371
msgid ""
"2 backup tunnels each direction (medium redundancy, medium resource usage)"
msgstr ""
"2 reserv tunnlar i varje riktning (medel hög redundans, medel hög "
"resursanvändning)"
msgstr "2 reserv tunnlar i varje riktning (medel hög redundans, medel hög resursanvändning)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:365
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:375
msgid "3 backup tunnels each direction (high redundancy, high resource usage)"
msgstr ""
"3 reserv tunnlar i varje riktning (hög redundans, hög resursanvändning)"
msgstr "3 reserv tunnlar i varje riktning (hög redundans, hög resursanvändning)"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:373
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:383
@ -821,7 +814,7 @@ msgstr "förhandsvisning"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:129
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:192
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:265
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:312
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:306
msgid "Status"
msgstr "Status"
@ -834,30 +827,30 @@ msgid "No Preview"
msgstr "Ingen förhandsvisning"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:199
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:319
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:313
msgid "Starting..."
msgstr "Startar..."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:206
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:220
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:326
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:340
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:354
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:320
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:334
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:348
msgid "Stop"
msgstr "Stopp"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:213
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:347
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:341
msgid "Running"
msgstr "Kör"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:227
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:361
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:355
msgid "Stopped"
msgstr "Stoppad"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:234
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:368
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:362
msgid "Start"
msgstr "Start"
@ -866,7 +859,7 @@ msgid "New server tunnel"
msgstr "Ny severtunnel "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:251
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:409
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:403
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:223
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:265
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:295
@ -876,7 +869,7 @@ msgid "Standard"
msgstr "Standard"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:253
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:411
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:405
msgid "Create"
msgstr "Skapa"
@ -885,23 +878,23 @@ msgid "I2P Client Tunnels"
msgstr "I2P Klienttunnel"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:263
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:298
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:292
msgid "Interface"
msgstr "Gränssnitt "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:333
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:327
msgid "Standby"
msgstr "Standby"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:377
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:371
msgid "Outproxy"
msgstr "Utproxy"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:394
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:388
msgid "none"
msgstr "Ingen"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:407
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:401
msgid "New client tunnel"
msgstr "Ny klienttunnel"
@ -945,33 +938,27 @@ msgstr "Guiden färdig "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:189
msgid ""
"This wizard will take you through the various options available for creating "
"tunnels in I2P."
msgstr ""
"Guiden tar dig igenom de olika inställningsmöjligheterna för att skapa "
"tunnlar."
"This wizard will take you through the various options available for creating"
" tunnels in I2P."
msgstr "Guiden tar dig igenom de olika inställningsmöjligheterna för att skapa tunnlar."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:191
msgid ""
"The first thing to decide is whether you want to create a server or a client "
"tunnel."
msgstr ""
"Det första är att bestämma om det skall vara en server- eller klient-tunnel. "
"The first thing to decide is whether you want to create a server or a client"
" tunnel."
msgstr "Det första är att bestämma om det skall vara en server- eller klient-tunnel. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:193
msgid ""
"If you need to connect to a remote service, such as an IRC server inside I2P "
"or a code repository, then you will require a CLIENT tunnel."
msgstr ""
"Om du ansluter till en fjärrtjänst så som tex en IRC-server inom I2P, behövs "
"en KLIENT-tunnel. "
"If you need to connect to a remote service, such as an IRC server inside I2P"
" or a code repository, then you will require a CLIENT tunnel."
msgstr "Om du ansluter till en fjärrtjänst så som tex en IRC-server inom I2P, behövs en KLIENT-tunnel. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:195
msgid ""
"On the other hand, if you wish to host a service for others to connect to "
"you'll need to create a SERVER tunnel."
msgstr ""
"Men om du vill göra en tjänst tillgänglig för andra behövs en SERVER-tunnel."
msgstr "Men om du vill göra en tjänst tillgänglig för andra behövs en SERVER-tunnel."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:197
msgid "Server Tunnel"
@ -987,32 +974,25 @@ msgstr "Det finns flera typer av tunnlar att välja på:"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:225
msgid "Basic tunnel for connecting to a single service inside I2P."
msgstr ""
"Grundläggande tunnel för anslutning till en snigel tjänst innanför I2P. "
msgstr "Grundläggande tunnel för anslutning till en snigel tjänst innanför I2P. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:227
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:269
msgid ""
"Try this if none of the tunnel types below fit your requirements, or you "
"don't know what type of tunnel you need."
msgstr ""
"Prova detta om ingen av valen passar eller du inte vet vilken typ av tunnel "
"som behövs."
msgstr "Prova detta om ingen av valen passar eller du inte vet vilken typ av tunnel som behövs."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:229
msgid "Tunnel that acts as an HTTP proxy for reaching eepsites inside I2P."
msgstr ""
"Tunneln agerar som en HTTP-proxy för att komma åt eepsites innanför I2P. "
msgstr "Tunneln agerar som en HTTP-proxy för att komma åt eepsites innanför I2P. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:231
msgid ""
"Set your browser to use this tunnel as an http proxy, or set your "
"\"http_proxy\" environment variable for command-line applications in GNU/"
"Linux."
msgstr ""
"Peka din webbläsare på denna tunnel som en http-proxy eller ställ in "
"miljövariabeln \"http_proxy\" för terminal baserade applikationer i GNU/"
"Linux."
"\"http_proxy\" environment variable for command-line applications in "
"GNU/Linux."
msgstr "Peka din webbläsare på denna tunnel som en http-proxy eller ställ in miljövariabeln \"http_proxy\" för terminal baserade applikationer i GNU/Linux."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:233
msgid ""
@ -1034,9 +1014,7 @@ msgstr "Med denna tunneltyp kan IRC-klienter ansluta till IRC-nät inom I2P "
msgid ""
"Each IRC network in I2P that you wish to connect to will require its own "
"tunnel. (See Also, SOCKS IRC)"
msgstr ""
"Varje IRC-nät inom I2P som du vill ansluta till kräver en egen tunnel (Se "
"även: SOCKS IRC) "
msgstr "Varje IRC-nät inom I2P som du vill ansluta till kräver en egen tunnel (Se även: SOCKS IRC) "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:241
msgid "A tunnel that implements the SOCKS protocol."
@ -1046,9 +1024,7 @@ msgstr "En tunnel som implementerar SOCKS protokollet."
msgid ""
"This enables both TCP and UDP connections to be made through a SOCKS "
"outproxy within I2P."
msgstr ""
"Detta möjliggör både TCP och UDP anslutningar genom SOCKS utgående-proxy "
"innanför I2P "
msgstr "Detta möjliggör både TCP och UDP anslutningar genom SOCKS utgående-proxy innanför I2P "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:245
msgid ""
@ -1061,27 +1037,20 @@ msgid ""
"With this tunnel type, IRC networks in I2P can be reached by typing the I2P "
"address into your IRC client, and configuring the IRC client to use this "
"SOCKS tunnel."
msgstr ""
"Med denna tunnel typen kan IRC-nät inom I2P nås genom att skriva in I2P "
"adressen i IRC-klienten och konfigurera IRC-klienten att använda denna SOCKS-"
"tunneln."
msgstr "Med denna tunnel typen kan IRC-nät inom I2P nås genom att skriva in I2P adressen i IRC-klienten och konfigurera IRC-klienten att använda denna SOCKS-tunneln."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:249
msgid ""
"This means that only one I2P tunnel is required rather than a separate "
"tunnel per IRC network."
msgstr ""
"Detta innebär att enbart en I2P-tunnel behövs istället för en tunnel per IRC-"
"nät."
msgstr "Detta innebär att enbart en I2P-tunnel behövs istället för en tunnel per IRC-nät."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:251
msgid ""
"IRC networks outside I2P can also be reached if a SOCKS outproxy within I2P "
"is known, though it depends on whether or not the outproxy has been blocked "
"by the IRC network."
msgstr ""
"IRC-nät utanför I2P kan nås om en SOCKS-proxy innanför I2P är känd, men det "
"bror på om utgående-proxy har blockerats av IRC-nätet."
msgstr "IRC-nät utanför I2P kan nås om en SOCKS-proxy innanför I2P är känd, men det bror på om utgående-proxy har blockerats av IRC-nätet."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:253
msgid "A client tunnel that implements the HTTP CONNECT command."
@ -1091,9 +1060,7 @@ msgstr "En klient-tunnel som implementerar HTTP CONNECT kommandot. "
msgid ""
"This enables TCP connections to be made through an HTTP outproxy, assuming "
"the proxy supports the CONNECT command."
msgstr ""
"Detta möjliggör TCP anslutningar genom en HTTP utgående-proxy om proxyn "
"stödjer CONNECT kommandot"
msgstr "Detta möjliggör TCP anslutningar genom en HTTP utgående-proxy om proxyn stödjer CONNECT kommandot"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:257
msgid "A customised client tunnel for Streamr."
@ -1115,9 +1082,7 @@ msgstr "Använd denna denna typ av tunnel om du vill köra en eepsite."
msgid ""
"A customised server tunnel that can both serve HTTP data and connect to "
"other server tunnels."
msgstr ""
"En anpassad server tunnel som hanterar både HTTP data och anslutningar till "
"andra server-tunnlar."
msgstr "En anpassad server tunnel som hanterar både HTTP data och anslutningar till andra server-tunnlar."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:277
msgid "This tunnel type is predominantly used when running a Seedless server."
@ -1131,9 +1096,7 @@ msgstr "En server-tunnel för IRC-Nät innanför I2P."
msgid ""
"Usually, a separate tunnel needs to be created for each IRC server that is "
"to be accessible inside I2P."
msgstr ""
"Vanligtvis behövs en separat tunnel för varje IRC-server som skall anslutas "
"till innanför I2P."
msgstr "Vanligtvis behövs en separat tunnel för varje IRC-server som skall anslutas till innanför I2P."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:283
msgid "A customised server tunnel for Streamr."
@ -1147,17 +1110,13 @@ msgstr "Välj namn och beskrivning av tunneln."
msgid ""
"These can be anything you want - they are just for ease of identifying the "
"tunnel in the routerconsole."
msgstr ""
"Kan vad som helst, används enbart för att enkelt identifiera tunneln i "
"routerkonsolen "
msgstr "Kan vad som helst, används enbart för att enkelt identifiera tunneln i routerkonsolen "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:354
msgid ""
"If you know of any outproxies for this type of tunnel (either HTTP or "
"SOCKS), fill them in below."
msgstr ""
"Om du känner till några utgående proxies för denna typen av tunnlar (HTTP "
"eller SOCKS), fyll i dem nedan. "
msgstr "Om du känner till några utgående proxies för denna typen av tunnlar (HTTP eller SOCKS), fyll i dem nedan. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:356
msgid "Separate multiple proxies with commas."
@ -1179,9 +1138,7 @@ msgstr "Kan vara hela base 64 målsnyckeln eller en I2P URL från adressboken."
msgid ""
"This is the IP that your service is running on, this is usually on the same "
"machine so 127.0.0.1 is autofilled."
msgstr ""
"Detta är IP-adressen som tjänsten körs på, detta är vanligtvis på samma "
"maskin så 127.0.0.1 fylls i automatiskt. "
msgstr "Detta är IP-adressen som tjänsten körs på, detta är vanligtvis på samma maskin så 127.0.0.1 fylls i automatiskt. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:429
msgid "This is the port that the service is accepting connections on."
@ -1199,9 +1156,7 @@ msgstr "Detta är också en klient-port för HTTPBidir server-tunneln."
msgid ""
"How do you want this tunnel to be accessed? By just this machine, your "
"entire subnet, or external internet?"
msgstr ""
"Hur du vill att tunneln ska nås? Enbart denna maskinen, ditt lokala nät "
"eller hela internet? "
msgstr "Hur du vill att tunneln ska nås? Enbart denna maskinen, ditt lokala nät eller hela internet? "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:473
msgid "You will most likely want to just allow 127.0.0.1"
@ -1218,10 +1173,7 @@ msgid ""
"This can be useful for frequently-used tunnels (especially server tunnels), "
"but for tunnels that are only used occassionally it would mean that the I2P "
"router is creating and maintaining unnecessary tunnels."
msgstr ""
"Detta kan vara användbart för tunnlar som används ofta (tex server-tunnlar) "
"men för tunnlar som används sällan innebär det att onödiga tunnlar "
"upprättas. "
msgstr "Detta kan vara användbart för tunnlar som används ofta (tex server-tunnlar) men för tunnlar som används sällan innebär det att onödiga tunnlar upprättas. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:543
msgid "The wizard has now collected enough information to create your tunnel."
@ -1231,17 +1183,13 @@ msgstr "Guiden hat samlat tillräckligt med information för att skapa tunneln.
msgid ""
"Upon clicking the Save button below, the wizard will set up the tunnel, and "
"take you back to the main I2PTunnel page."
msgstr ""
"När du klickar på \"spara\" kommer guiden att skapa tunneln och sedan ta dig "
"till sidan för tunnlar."
msgstr "När du klickar på \"spara\" kommer guiden att skapa tunneln och sedan ta dig till sidan för tunnlar."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:550
msgid ""
"Because you chose to automatically start the tunnel when the router starts, "
"you don't have to do anything further."
msgstr ""
"Efter som du valt att starta tunneln samtidigt som routern startas behövs "
"inget mer göras. "
msgstr "Efter som du valt att starta tunneln samtidigt som routern startas behövs inget mer göras. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:552
msgid "The router will start the tunnel once it has been set up."
@ -1251,9 +1199,7 @@ msgstr "Routern starta tunneln när den skapats. "
msgid ""
"Because you chose not to automatically start the tunnel, you will have to "
"manually start it."
msgstr ""
"Efter som du valt att inte starta tunneln samtidigt som routern startas, "
"behövs den startas manuellt."
msgstr "Efter som du valt att inte starta tunneln samtidigt som routern startas, behövs den startas manuellt."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:558
msgid ""
@ -1269,18 +1215,14 @@ msgstr "Nedan är en sammanfattning över valen du kan göra:"
msgid ""
"Alongside these basic settings, there are a number of advanced options for "
"tunnel configuration."
msgstr ""
"Vid sidan om dessa grundägande inställningar finns att par avancerade val "
"för tunneln. "
msgstr "Vid sidan om dessa grundägande inställningar finns att par avancerade val för tunneln. "
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:662
msgid ""
"The wizard will set reasonably sensible default values for these, but you "
"can view and/or edit these by clicking on the tunnel's name in the main "
"I2PTunnel page."
msgstr ""
"Guiden väljer lämpliga värden för dessa. Men du kan ändra/se värdena på "
"huvudsidan för I2P-tunnlar."
msgstr "Guiden väljer lämpliga värden för dessa. Men du kan ändra/se värdena på huvudsidan för I2P-tunnlar."
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/wizard_jsp.java:704
msgid "Previous"

View File

@ -0,0 +1,170 @@
package net.i2p.jetty;
// Contains code from org.mortbay.xml.XmlConfiguation:
// ========================================================================
// Copyright 2004-2005 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ========================================================================
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import net.i2p.I2PAppContext;
import net.i2p.app.*;
import static net.i2p.app.ClientAppState.*;
import org.mortbay.component.LifeCycle;
import org.mortbay.resource.Resource;
import org.mortbay.xml.XmlConfiguration;
/**
* Start Jetty where the args are one or more XML files.
* Save a reference to the Server so it can be cleanly stopped later.
*
* This is like XmlConfiguration.main(), which is essentially what
* org.mortbay.start.Main does.
*
* @since 0.9.4
*/
public class JettyStart implements ClientApp {
private final I2PAppContext _context;
private final ClientAppManager _mgr;
private final String[] _args;
private final List<LifeCycle> _jettys;
private volatile ClientAppState _state;
/**
* All args must be XML file names.
* Does not support any of the other argument types from org.mortbay.start.Main.
*/
public JettyStart(I2PAppContext context, ClientAppManager mgr, String[] args) throws Exception {
_state = UNINITIALIZED;
_context = context;
_mgr = mgr;
_args = args;
_jettys = new ArrayList(args.length);
parseArgs(args);
_state = INITIALIZED;
}
/**
* Modified from XmlConfiguration.main()
*/
public void parseArgs(String[] args) throws Exception {
Properties properties=new Properties();
XmlConfiguration last=null;
for (int i = 0; i < args.length; i++) {
if (args[i].toLowerCase().endsWith(".properties")) {
properties.load(Resource.newResource(args[i]).getInputStream());
} else {
XmlConfiguration configuration = new XmlConfiguration(Resource.newResource(args[i]).getURL());
if (last!=null)
configuration.getIdMap().putAll(last.getIdMap());
if (properties.size()>0)
configuration.setProperties(properties);
Object o = configuration.configure();
if (o instanceof LifeCycle)
_jettys.add((LifeCycle)o);
last=configuration;
}
}
}
public void startup() {
if (_state != INITIALIZED)
return;
if (_jettys.isEmpty()) {
changeState(START_FAILED);
} else {
(new Starter()).start();
}
}
private class Starter extends Thread {
public Starter() {
super("JettyStarter");
}
/**
* Modified from XmlConfiguration.main()
*/
public void run() {
changeState(STARTING);
for (LifeCycle lc : _jettys) {
if (!lc.isRunning()) {
try {
lc.start();
} catch (Exception e) {
changeState(START_FAILED, e);
return;
}
}
}
changeState(RUNNING);
}
}
public void shutdown(String[] args) {
if (_state != RUNNING)
return;
if (_jettys.isEmpty()) {
changeState(STOPPED);
} else {
(new Stopper()).start();
}
}
private class Stopper extends Thread {
public Stopper() {
super("JettyStopper");
}
public void run() {
changeState(STOPPING);
for (LifeCycle lc : _jettys) {
if (lc.isRunning()) {
try {
lc.stop();
} catch (Exception e) {
changeState(STOPPING, e);
}
}
}
changeState(STOPPED);
}
}
public ClientAppState getState() {
return _state;
}
public String getName() {
return "Jetty";
}
public String getDisplayName() {
return "Jetty " + Arrays.toString(_args);
}
private void changeState(ClientAppState state) {
changeState(state, null);
}
private synchronized void changeState(ClientAppState state, Exception e) {
_state = state;
_mgr.notify(this, state, null, e);
}
}

View File

@ -558,10 +558,22 @@ public class ConsoleUpdateManager implements UpdateManager {
* Call once for each type/method pair.
*/
public void register(Updater updater, UpdateType type, UpdateMethod method, int priority) {
// DEBUG slow start for snark updates
// For 0.9.4 update, only for dev builds
// For 0.9.5 update, only for dev builds and 1% more
// Remove this in 0.9.6 or 0.9.7
if (method == TORRENT && RouterVersion.BUILD == 0 && _context.random().nextInt(100) != 0) {
if (_log.shouldLog(Log.WARN))
_log.warn("Ignoring torrent registration");
return;
}
RegisteredUpdater ru = new RegisteredUpdater(updater, type, method, priority);
if (_log.shouldLog(Log.INFO))
_log.info("Registering " + ru);
_registeredUpdaters.add(ru);
if (!_registeredUpdaters.add(ru)) {
if (_log.shouldLog(Log.WARN))
_log.warn("Duplicate registration " + ru);
}
}
public void unregister(Updater updater, UpdateType type, UpdateMethod method) {
@ -575,7 +587,10 @@ public class ConsoleUpdateManager implements UpdateManager {
RegisteredChecker rc = new RegisteredChecker(updater, type, method, priority);
if (_log.shouldLog(Log.INFO))
_log.info("Registering " + rc);
_registeredCheckers.add(rc);
if (!_registeredCheckers.add(rc)) {
if (_log.shouldLog(Log.WARN))
_log.warn("Duplicate registration " + rc);
}
}
public void unregister(Checker updater, UpdateType type, UpdateMethod method) {

View File

@ -18,15 +18,15 @@ import java.util.TreeMap;
import net.i2p.data.DataHelper;
import net.i2p.data.Hash;
import net.i2p.router.RouterContext;
import net.i2p.router.Shitlist;
import net.i2p.router.Banlist;
/**
* Moved from Shitlist.java
* Moved from Banlist.java
*/
public class ShitlistRenderer {
public class BanlistRenderer {
private final RouterContext _context;
public ShitlistRenderer(RouterContext context) {
public BanlistRenderer(RouterContext context) {
_context = context;
}
@ -40,9 +40,9 @@ public class ShitlistRenderer {
StringBuilder buf = new StringBuilder(1024);
// move to the jsp
//buf.append("<h2>Banned Peers</h2>");
Map<Hash, Shitlist.Entry> entries = new TreeMap(new HashComparator());
Map<Hash, Banlist.Entry> entries = new TreeMap(new HashComparator());
entries.putAll(_context.shitlist().getEntries());
entries.putAll(_context.banlist().getEntries());
if (entries.isEmpty()) {
buf.append("<i>").append(_("none")).append("</i>");
out.write(buf.toString());
@ -51,9 +51,9 @@ public class ShitlistRenderer {
buf.append("<ul>");
for (Map.Entry<Hash, Shitlist.Entry> e : entries.entrySet()) {
for (Map.Entry<Hash, Banlist.Entry> e : entries.entrySet()) {
Hash key = e.getKey();
Shitlist.Entry entry = e.getValue();
Banlist.Entry entry = e.getValue();
long expires = entry.expireOn-_context.clock().now();
if (expires <= 0)
continue;

View File

@ -23,7 +23,6 @@ import org.mortbay.jetty.handler.ContextHandlerCollection;
* Saves changes to clients.config or webapps.config
*/
public class ConfigClientsHandler extends FormHandler {
private Map _settings;
@Override
protected void processForm() {
@ -171,8 +170,6 @@ public class ConfigClientsHandler extends FormHandler {
}
public void setSettings(Map settings) { _settings = new HashMap(settings); }
private void saveClientChanges() {
List<ClientAppConfig> clients = ClientAppConfig.getClientApps(_context);
for (int cur = 0; cur < clients.size(); cur++) {
@ -216,15 +213,8 @@ public class ConfigClientsHandler extends FormHandler {
}
ClientAppConfig.writeClientAppConfig(_context, clients);
addFormNotice(_("Client configuration saved successfully - restart required to take effect."));
}
/** curses Jetty for returning arrays */
private String getJettyString(String key) {
String[] arr = (String[]) _settings.get(key);
if (arr == null)
return null;
return arr[0].trim();
addFormNotice(_("Client configuration saved successfully"));
addFormNotice(_("Restart required to take effect"));
}
// STUB for stopClient, not completed yet.
@ -248,7 +238,7 @@ public class ConfigClientsHandler extends FormHandler {
return;
}
ClientAppConfig ca = clients.get(i);
LoadClientAppsJob.runClient(ca.className, ca.clientName, LoadClientAppsJob.parseArgs(ca.args), _log);
LoadClientAppsJob.runClient(ca.className, ca.clientName, LoadClientAppsJob.parseArgs(ca.args), _context, _log);
addFormNotice(_("Client") + ' ' + _(ca.clientName) + ' ' + _("started") + '.');
}
@ -264,7 +254,7 @@ public class ConfigClientsHandler extends FormHandler {
}
private void saveWebAppChanges() {
Properties props = RouterConsoleRunner.webAppProperties();
Properties props = RouterConsoleRunner.webAppProperties(_context);
Set keys = props.keySet();
for (Iterator iter = keys.iterator(); iter.hasNext(); ) {
String name = (String)iter.next();
@ -275,7 +265,7 @@ public class ConfigClientsHandler extends FormHandler {
if (! RouterConsoleRunner.ROUTERCONSOLE.equals(app))
props.setProperty(name, "" + (val != null));
}
RouterConsoleRunner.storeWebAppProperties(props);
RouterConsoleRunner.storeWebAppProperties(_context, props);
addFormNotice(_("WebApp configuration saved."));
}
@ -416,11 +406,12 @@ public class ConfigClientsHandler extends FormHandler {
if (intfc != null)
changes.put(ClientManagerFacadeImpl.PROP_CLIENT_HOST, intfc);
String user = getJettyString("user");
if (user != null)
changes.put(ConfigClientsHelper.PROP_USER, user);
String pw = getJettyString("pw");
if (pw != null)
changes.put(ConfigClientsHelper.PROP_PW, pw);
if (user != null && pw != null && user.length() > 0 && pw.length() > 0) {
ConsolePasswordManager mgr = new ConsolePasswordManager(_context);
mgr.saveHash(ConfigClientsHelper.PROP_AUTH, user, pw);
addFormNotice(_("Added user {0}", user));
}
String mode = getJettyString("mode");
boolean disabled = "0".equals(mode);
boolean ssl = "2".equals(mode);
@ -433,9 +424,10 @@ public class ConfigClientsHandler extends FormHandler {
boolean all = "0.0.0.0".equals(intfc) || "0:0:0:0:0:0:0:0".equals(intfc) ||
"::".equals(intfc);
changes.put(ConfigClientsHelper.BIND_ALL_INTERFACES, Boolean.toString(all));
if (_context.router().saveConfig(changes, null))
addFormNotice(_("Interface configuration saved successfully - restart required to take effect."));
else
if (_context.router().saveConfig(changes, null)) {
addFormNotice(_("Interface configuration saved"));
addFormNotice(_("Restart required to take effect"));
} else
addFormError(_("Error saving the configuration (applied but not saved) - please see the error logs"));
}
}

View File

@ -24,8 +24,6 @@ public class ConfigClientsHelper extends HelperBase {
public static final String PROP_ENABLE_SSL = "i2cp.SSL";
/** from ClientMessageEventListener */
public static final String PROP_AUTH = "i2cp.auth";
public static final String PROP_USER = "i2cp.username";
public static final String PROP_PW = "i2cp.password";
public ConfigClientsHelper() {}
@ -35,16 +33,6 @@ public class ConfigClientsHelper extends HelperBase {
Integer.toString(ClientManagerFacadeImpl.DEFAULT_PORT));
}
/** @since 0.8.3 */
public String getUser() {
return _context.getProperty(PROP_USER, "");
}
/** @since 0.8.3 */
public String getPw() {
return _context.getProperty(PROP_PW, "");
}
/** @since 0.8.3 */
public String i2cpModeChecked(int mode) {
boolean disabled = _context.getBooleanProperty(PROP_DISABLE_EXTERNAL);
@ -128,7 +116,7 @@ public class ConfigClientsHelper extends HelperBase {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table>\n");
buf.append("<tr><th align=\"right\">" + _("WebApp") + "</th><th>" + _("Run at Startup?") + "</th><th>" + _("Control") + "</th><th align=\"left\">" + _("Description") + "</th></tr>\n");
Properties props = RouterConsoleRunner.webAppProperties();
Properties props = RouterConsoleRunner.webAppProperties(_context);
Set<String> keys = new TreeSet(props.keySet());
for (Iterator<String> iter = keys.iterator(); iter.hasNext(); ) {
String name = iter.next();

View File

@ -1,11 +1,9 @@
package net.i2p.router.web;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.Map;
import net.i2p.data.DataHelper;
@ -16,8 +14,6 @@ import net.i2p.data.DataHelper;
*/
public class ConfigHomeHandler extends FormHandler {
private Map _settings;
@Override
protected void processForm() {
if (_action == null) return;
@ -106,14 +102,4 @@ public class ConfigHomeHandler extends FormHandler {
addFormError(_("Unsupported"));
}
}
public void setSettings(Map settings) { _settings = new HashMap(settings); }
/** curses Jetty for returning arrays */
private String getJettyString(String key) {
String[] arr = (String[]) _settings.get(key);
if (arr == null)
return null;
return arr[0].trim();
}
}

View File

@ -280,9 +280,10 @@ public class ConfigNetHandler extends FormHandler {
_upnp) {
// This is minor, don't set restartRequired
if (_upnp)
addFormNotice(_("Enabling UPnP, restart required to take effect"));
addFormNotice(_("Enabling UPnP"));
else
addFormNotice(_("Disabling UPnP, restart required to take effect"));
addFormNotice(_("Disabling UPnP"));
addFormNotice(_("Restart required to take effect"));
}
changes.put(TransportManager.PROP_ENABLE_UPNP, "" + _upnp);

View File

@ -20,7 +20,7 @@ public class ConfigPeerHandler extends FormHandler {
} else if (_action.equals(_("Ban peer until restart"))) {
Hash h = getHash();
if (h != null) {
_context.shitlist().shitlistRouterForever(h, _("Manually banned via {0}"), "<a href=\"configpeer\">configpeer</a>");
_context.banlist().banlistRouterForever(h, _("Manually banned via {0}"), "<a href=\"configpeer\">configpeer</a>");
addFormNotice(_("Peer") + " " + _peer + " " + _("banned until restart") );
return;
}
@ -28,8 +28,8 @@ public class ConfigPeerHandler extends FormHandler {
} else if (_action.equals(_("Unban peer"))) {
Hash h = getHash();
if (h != null) {
if (_context.shitlist().isShitlisted(h)) {
_context.shitlist().unshitlistRouter(h);
if (_context.banlist().isBanlisted(h)) {
_context.banlist().unbanlistRouter(h);
addFormNotice(_("Peer") + " " + _peer + " " + _("unbanned") );
} else
addFormNotice(_("Peer") + " " + _peer + " " + _("is not currently banned") );

View File

@ -11,7 +11,6 @@ import net.i2p.router.networkdb.reseed.Reseeder;
* @since 0.8.3
*/
public class ConfigReseedHandler extends FormHandler {
private Map _settings;
private final Map<String, String> changes = new HashMap();
private final List<String> removes = new ArrayList();
@ -35,16 +34,6 @@ public class ConfigReseedHandler extends FormHandler {
addFormError(_("Unsupported") + ' ' + _action + '.');
}
public void setSettings(Map settings) { _settings = new HashMap(settings); }
/** curses Jetty for returning arrays */
private String getJettyString(String key) {
String[] arr = (String[]) _settings.get(key);
if (arr == null)
return null;
return arr[0].trim();
}
/** @since 0.8.9 */
private void saveString(String config, String param) {
String val = getJettyString(param);

View File

@ -8,6 +8,7 @@ import net.i2p.apps.systray.UrlLauncher;
import net.i2p.router.Router;
import net.i2p.router.RouterContext;
import net.i2p.router.startup.ClientAppConfig;
import net.i2p.util.PortMapper;
import net.i2p.util.SystemVersion;
import net.i2p.util.VersionComparator;
@ -257,7 +258,9 @@ public class ConfigServiceHandler extends FormHandler {
}
// releases <= 0.6.5 deleted the entry completely
if (shouldLaunchBrowser && !found) {
ClientAppConfig ca = new ClientAppConfig(UrlLauncher.class.getName(), "consoleBrowser", "http://127.0.0.1:7657", 5, false);
int port = _context.portMapper().getPort(PortMapper.SVC_CONSOLE, RouterConsoleRunner.DEFAULT_LISTEN_PORT);
ClientAppConfig ca = new ClientAppConfig(UrlLauncher.class.getName(), "consoleBrowser",
"http://127.0.0.1:" + port + '/', 5, false);
clients.add(ca);
}
ClientAppConfig.writeClientAppConfig(_context, clients);

View File

@ -116,9 +116,10 @@ public class ConfigStatsHandler extends FormHandler {
addFormNotice(_("Stat filter and location updated successfully to") + ": " + stats.toString());
if (fullChanged) {
if (_isFull)
addFormNotice(_("Full statistics enabled - restart required to take effect"));
addFormNotice(_("Full statistics enabled"));
else
addFormNotice(_("Full statistics disabled - restart required to take effect"));
addFormNotice(_("Full statistics disabled"));
addFormNotice(_("Restart required to take effect"));
}
if (graphsChanged)
addFormNotice(_("Graph list updated, may take up to 60s to be reflected here and on the <a href=\"graphs.jsp\">Graphs Page</a>"));

View File

@ -1,12 +1,16 @@
package net.i2p.router.web;
import java.util.ArrayList;
import java.text.Collator;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import net.i2p.stat.FrequencyStat;
import net.i2p.stat.Rate;
@ -17,9 +21,9 @@ import net.i2p.util.Log;
public class ConfigStatsHelper extends HelperBase {
private Log _log;
private String _filter;
private Set _filters;
private Set<String> _filters;
/** list of names of stats which are remaining, ordered by nested groups */
private List _stats;
private List<String> _stats;
private String _currentStatName;
private String _currentGraphName;
private String _currentStatDescription;
@ -43,11 +47,11 @@ public class ConfigStatsHelper extends HelperBase {
_log = _context.logManager().getLog(ConfigStatsHelper.class);
_stats = new ArrayList();
Map groups = _context.statManager().getStatsByGroup();
for (Iterator iter = groups.values().iterator(); iter.hasNext(); ) {
Set stats = (Set)iter.next();
for (Iterator statIter = stats.iterator(); statIter.hasNext(); )
_stats.add(statIter.next());
Map<String, SortedSet<String>> unsorted = _context.statManager().getStatsByGroup();
Map<String, Set<String>> groups = new TreeMap(new AlphaComparator());
groups.putAll(unsorted);
for (Set<String> stats : groups.values()) {
_stats.addAll(stats);
}
_filter = _context.statManager().getStatFilter();
if (_filter == null)
@ -149,4 +153,16 @@ public class ConfigStatsHelper extends HelperBase {
public boolean getIsFull() {
return _context.getBooleanProperty(StatManager.PROP_STAT_FULL);
}
/**
* Translated sort
* @since 0.9.4
*/
private class AlphaComparator implements Comparator<String> {
public int compare(String lhs, String rhs) {
String lname = _(lhs);
String rname = _(rhs);
return Collator.getInstance().compare(lname, rname);
}
}
}

View File

@ -1,7 +1,6 @@
package net.i2p.router.web;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
@ -17,8 +16,6 @@ import net.i2p.data.DataHelper;
*/
public class ConfigSummaryHandler extends FormHandler {
private Map _settings;
@Override
protected void processForm() {
if (_action == null) return;
@ -144,16 +141,6 @@ public class ConfigSummaryHandler extends FormHandler {
}
}
public void setSettings(Map settings) { _settings = new HashMap(settings); }
/** curses Jetty for returning arrays */
private String getJettyString(String key) {
String[] arr = (String[]) _settings.get(key);
if (arr == null)
return null;
return arr[0].trim();
}
public void setMovingAction() {
for (Object o : _settings.keySet()) {
if (!(o instanceof String))

View File

@ -13,8 +13,13 @@ public class ConfigUIHandler extends FormHandler {
@Override
protected void processForm() {
if (_shouldSave)
if (_shouldSave) {
saveChanges();
} else if (_action.equals(_("Delete selected"))) {
delUser();
} else if (_action.equals(_("Add user"))) {
addUser();
}
}
public void setShouldsave(String moo) { _shouldSave = true; }
@ -51,4 +56,48 @@ public class ConfigUIHandler extends FormHandler {
addFormError(_("Error saving the configuration (applied but not saved) - please see the error logs."));
}
}
private void addUser() {
String name = getJettyString("name");
if (name == null || name.length() <= 0) {
addFormError(_("No user name entered"));
return;
}
String pw = getJettyString("pw");
if (pw == null || pw.length() <= 0) {
addFormError(_("No password entered"));
return;
}
ConsolePasswordManager mgr = new ConsolePasswordManager(_context);
// rfc 2617
if (mgr.saveMD5(RouterConsoleRunner.PROP_CONSOLE_PW, RouterConsoleRunner.JETTY_REALM, name, pw)) {
if (!_context.getBooleanProperty(RouterConsoleRunner.PROP_PW_ENABLE))
_context.router().saveConfig(RouterConsoleRunner.PROP_PW_ENABLE, "true");
addFormNotice(_("Added user {0}", name));
addFormNotice(_("Restart required to take effect"));
} else {
addFormError(_("Error saving the configuration (applied but not saved) - please see the error logs."));
}
}
private void delUser() {
ConsolePasswordManager mgr = new ConsolePasswordManager(_context);
boolean success = false;
for (Object o : _settings.keySet()) {
if (!(o instanceof String))
continue;
String k = (String) o;
if (!k.startsWith("delete_"))
continue;
k = k.substring(7);
if (mgr.remove(RouterConsoleRunner.PROP_CONSOLE_PW, k)) {
addFormNotice(_("Removed user {0}", k));
success = true;
} else {
addFormError(_("Error saving the configuration (applied but not saved) - please see the error logs."));
}
}
if (success)
addFormNotice(_("Restart required to take effect"));
}
}

View File

@ -2,8 +2,9 @@ package net.i2p.router.web;
import java.io.File;
import java.util.Iterator;
import java.util.TreeSet;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
public class ConfigUIHelper extends HelperBase {
@ -87,4 +88,38 @@ public class ConfigUIHelper extends HelperBase {
}
return buf.toString();
}
/** @since 0.9.4 */
public String getPasswordForm() {
StringBuilder buf = new StringBuilder(512);
ConsolePasswordManager mgr = new ConsolePasswordManager(_context);
Map<String, String> userpw = mgr.getMD5(RouterConsoleRunner.PROP_CONSOLE_PW);
buf.append("<table>");
if (userpw.isEmpty()) {
buf.append("<tr><td colspan=\"3\">");
buf.append(_("Add a user and password to enable."));
buf.append("</td></tr>");
} else {
buf.append("<tr><th>")
.append(_("Remove"))
.append("</th><th>")
.append(_("User Name"))
.append("</th><th>&nbsp;</th></tr>\n");
for (String name : userpw.keySet()) {
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
.append(name)
.append("\"></td><td colspan=\"2\">")
.append(name)
.append("</td></tr>\n");
}
}
buf.append("<tr><td align=\"center\"><b>")
.append(_("Add")).append(":</b>" +
"</td><td align=\"left\"><input type=\"text\" name=\"name\">" +
"</td><td align=\"left\"><b>");
buf.append(_("Password")).append(":</b> " +
"<input type=\"password\" size=\"40\" name=\"pw\"></td></tr>" +
"</table>\n");
return buf.toString();
}
}

View File

@ -0,0 +1,213 @@
package net.i2p.router.web;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.i2p.data.Base64;
import net.i2p.data.DataHelper;
import net.i2p.router.Router;
import net.i2p.router.RouterContext;
import net.i2p.router.util.RouterPasswordManager;
//import org.mortbay.jetty.security.UnixCrypt;
/**
* Manage both plaintext and salted/hashed password storage in
* router.config.
*
* @since 0.9.4
*/
public class ConsolePasswordManager extends RouterPasswordManager {
private static final String PROP_MIGRATED = "routerconsole.passwordManager.migrated";
// migrate these to hash
private static final String PROP_CONSOLE_OLD = "consolePassword";
private static final String CONSOLE_USER = "admin";
public ConsolePasswordManager(RouterContext ctx) {
super(ctx);
migrateConsole();
}
/**
* The username is the salt
*
* @param realm e.g. i2cp, routerconsole, etc.
* @param user null or "" for no user, already trimmed
* @param pw plain text, already trimmed
* @return if pw verified
*/
/****
public boolean checkCrypt(String realm, String user, String pw) {
String pfx = realm;
if (user != null && user.length() > 0)
pfx += '.' + user;
String cr = _context.getProperty(pfx + PROP_CRYPT);
if (cr == null)
return false;
return cr.equals(UnixCrypt.crypt(pw, cr));
}
****/
/**
* Straight MD5. Compatible with Jetty.
*
* @param realm e.g. i2cp, routerconsole, etc.
* @param user null or "" for no user, already trimmed
* @param pw plain text, already trimmed
* @return if pw verified
*/
public boolean checkMD5(String realm, String subrealm, String user, String pw) {
String pfx = realm;
if (user != null && user.length() > 0)
pfx += '.' + user;
String hex = _context.getProperty(pfx + PROP_MD5);
if (hex == null)
return false;
return hex.equals(md5Hex(subrealm, user, pw));
}
/**
* Get all MD5 usernames and passwords. Compatible with Jetty.
* Any "null" user is NOT included..
*
* @param realm e.g. i2cp, routerconsole, etc.
* @return Map of usernames to passwords (hex with leading zeros, 32 characters)
*/
public Map<String, String> getMD5(String realm) {
String pfx = realm + '.';
Map<String, String> rv = new HashMap(4);
for (Map.Entry<String, String> e : _context.router().getConfigMap().entrySet()) {
String prop = e.getKey();
if (prop.startsWith(pfx) && prop.endsWith(PROP_MD5)) {
String user = prop.substring(0, prop.length() - PROP_MD5.length()).substring(pfx.length());
String hex = e.getValue();
if (user.length() > 0 && hex.length() == 32)
rv.put(user, hex);
}
}
return rv;
}
/**
* Migrate from plaintext to MD5 hash
* Ref: RFC 2617
*
* @return success or nothing to migrate
*/
private boolean migrateConsole() {
synchronized(ConsolePasswordManager.class) {
if (_context.getBooleanProperty(PROP_MIGRATED))
return true;
// consolePassword
String pw = _context.getProperty(PROP_CONSOLE_OLD);
if (pw != null) {
Map toAdd = new HashMap(2);
if (pw.length() > 0) {
saveMD5(RouterConsoleRunner.PROP_CONSOLE_PW, RouterConsoleRunner.JETTY_REALM,
CONSOLE_USER, pw);
toAdd.put(RouterConsoleRunner.PROP_PW_ENABLE, "true");
}
toAdd.put(PROP_MIGRATED, "true");
List toDel = Collections.singletonList(PROP_CONSOLE_OLD);
return _context.router().saveConfig(toAdd, toDel);
}
return true;
}
}
/**
* This will fail if
* user contains '#' or '=' or starts with '!'
* The user is the salt.
*
* @param realm e.g. i2cp, routerconsole, etc.
* @param user null or "" for no user, already trimmed
* @param pw plain text, already trimmed
* @return success
*/
/****
public boolean saveCrypt(String realm, String user, String pw) {
String pfx = realm;
if (user != null && user.length() > 0)
pfx += '.' + user;
String salt = user != null ? user : "";
String crypt = UnixCrypt.crypt(pw, salt);
Map<String, String> toAdd = Collections.singletonMap(pfx + PROP_CRYPT, crypt);
List<String> toDel = new ArrayList(4);
toDel.add(pfx + PROP_PW);
toDel.add(pfx + PROP_B64);
toDel.add(pfx + PROP_MD5);
toDel.add(pfx + PROP_SHASH);
return _context.router().saveConfig(toAdd, toDel);
}
****/
/**
* Straight MD5, no salt
* Compatible with Jetty and RFC 2617.
*
* @param realm The full realm, e.g. routerconsole.auth.i2prouter, etc.
* @param subrealm to be used in creating the checksum
* @param user non-null, non-empty, already trimmed
* @param pw plain text
* @return if pw verified
*/
public boolean saveMD5(String realm, String subrealm, String user, String pw) {
String pfx = realm;
if (user != null && user.length() > 0)
pfx += '.' + user;
String hex = md5Hex(subrealm, user, pw);
if (hex == null)
return false;
Map<String, String> toAdd = Collections.singletonMap(pfx + PROP_MD5, hex);
List<String> toDel = new ArrayList(4);
toDel.add(pfx + PROP_PW);
toDel.add(pfx + PROP_B64);
toDel.add(pfx + PROP_CRYPT);
toDel.add(pfx + PROP_SHASH);
return _context.router().saveConfig(toAdd, toDel);
}
public static void main(String args[]) {
RouterContext ctx = (new Router()).getContext();
ConsolePasswordManager pm = new ConsolePasswordManager(ctx);
if (!pm.migrate())
System.out.println("Fail 1");
if (!pm.migrateConsole())
System.out.println("Fail 1a");
System.out.println("Test plain");
if (!pm.savePlain("type1", "user1", "pw1"))
System.out.println("Fail 2");
if (!pm.checkPlain("type1", "user1", "pw1"))
System.out.println("Fail 3");
System.out.println("Test B64");
if (!pm.saveB64("type2", "user2", "pw2"))
System.out.println("Fail 4");
if (!pm.checkB64("type2", "user2", "pw2"))
System.out.println("Fail 5");
System.out.println("Test MD5");
if (!pm.saveMD5("type3", "realm", "user3", "pw3"))
System.out.println("Fail 6");
if (!pm.checkMD5("type3", "realm", "user3", "pw3"))
System.out.println("Fail 7");
//System.out.println("Test crypt");
//if (!pm.saveCrypt("type4", "user4", "pw4"))
// System.out.println("Fail 8");
//if (!pm.checkCrypt("type4", "user4", "pw4"))
// System.out.println("Fail 9");
System.out.println("Test hash");
if (!pm.saveHash("type5", "user5", "pw5"))
System.out.println("Fail 10");
if (!pm.checkHash("type5", "user5", "pw5"))
System.out.println("Fail 11");
}
}

View File

@ -1,7 +1,9 @@
package net.i2p.router.web;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.i2p.router.RouterContext;
import net.i2p.util.Log;
@ -18,16 +20,14 @@ import net.i2p.util.Log;
public class FormHandler {
protected RouterContext _context;
protected Log _log;
private String _nonce;
protected Map _settings;
private String _nonce, _nonce1, _nonce2;
protected String _action;
protected String _method;
protected String _passphrase;
private final List<String> _errors;
private final List<String> _notices;
private boolean _processed;
private boolean _valid;
private static final String NONCE_SUFFIX = ".nonce";
private static final String PREV_SUFFIX = "Prev";
public FormHandler() {
_errors = new ArrayList();
@ -52,7 +52,28 @@ public class FormHandler {
public void setNonce(String val) { _nonce = val; }
public void setAction(String val) { _action = val; }
public void setPassphrase(String val) { _passphrase = val; }
/**
* For many forms, it's easiest just to put all the parameters here.
*
* @since 0.9.4 consolidated from numerous FormHandlers
*/
public void setSettings(Map settings) { _settings = new HashMap(settings); }
/**
* setSettings() must have been called previously
* Curses Jetty for returning arrays.
*
* @since 0.9.4 consolidated from numerous FormHandlers
*/
protected String getJettyString(String key) {
if (_settings == null)
return null;
String[] arr = (String[]) _settings.get(key);
if (arr == null)
return null;
return arr[0].trim();
}
/**
* Call this to prevent changes using GET
@ -62,6 +83,15 @@ public class FormHandler {
*/
public void storeMethod(String val) { _method = val; }
/**
* The old nonces from the session
* @since 0.9.4
*/
public void storeNonces(String n1, String n2) {
_nonce1 = n1;
_nonce2 = n2;
}
/**
* Override this to perform the final processing (in turn, adding formNotice
* and formError messages, etc)
@ -147,35 +177,33 @@ public class FormHandler {
_valid = false;
return;
}
if (_nonce == null) {
//addFormError("You trying to mess with me? Huh? Are you?");
_valid = false;
return;
}
// To prevent actions with GET, jsps must call storeMethod()
if (_method != null && !"POST".equals(_method)) {
addFormError("Invalid form submission, requires POST not " + _method);
_valid = false;
return;
}
// If passwords are turned on, all is assumed good
if (_context.getBooleanProperty(RouterConsoleRunner.PROP_PW_ENABLE)) {
_valid = true;
return;
}
if (_nonce == null) {
//addFormError("You trying to mess with me? Huh? Are you?");
_valid = false;
return;
}
String sharedNonce = System.getProperty("router.consoleNonce");
if ( (sharedNonce != null) && (sharedNonce.equals(_nonce) ) ) {
return;
}
String nonce = System.getProperty(getClass().getName() + NONCE_SUFFIX);
String noncePrev = nonce + PREV_SUFFIX;
if ( ( (nonce == null) || (!_nonce.equals(nonce)) ) &&
( (noncePrev == null) || (!_nonce.equals(noncePrev)) ) ) {
String expected = _context.getProperty("consolePassword");
if ( (expected != null) && (expected.trim().length() > 0) && (expected.equals(_passphrase)) ) {
// ok
} else {
addFormError(_("Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit."));
if (!_nonce.equals(_nonce1) && !_nonce.equals(_nonce2)) {
addFormError(_("Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.")
+ ' ' +
_("If the problem persists, verify that you have cookies enabled in your browser."));
_valid = false;
}
}
}
@ -204,18 +232,13 @@ public class FormHandler {
}
/**
* Generate a new nonce, store old and new in the system properties.
* Generate a new nonce.
* Only call once per page!
* @return a new random long as a String
* @since 0.8.5
*/
public String getNewNonce() {
String prop = getClass().getName() + NONCE_SUFFIX;
String prev = System.getProperty(prop);
if (prev != null)
System.setProperty(prop + PREV_SUFFIX, prev);
String rv = Long.toString(_context.random().nextLong());
System.setProperty(prop, rv);
return rv;
}

View File

@ -29,7 +29,7 @@ public class LogsHelper extends HelperBase {
*/
public String getLogs() {
String str = formatMessages(_context.logManager().getBuffer().getMostRecentMessages());
return _("File location") + ": <b><code>" + _context.logManager().currentFile() + "</code></b><br><br>" + str;
return "<p>" + _("File location") + ": <b><code>" + _context.logManager().currentFile() + "</code></b></p>" + str;
}
/**
@ -73,10 +73,10 @@ public class LogsHelper extends HelperBase {
File f = wrapperLogFile(_context);
String str = FileUtil.readTextFile(f.getAbsolutePath(), 250, false);
if (str == null)
return _("File not found") + ": <b><code>" + f.getAbsolutePath() + "</code></b>";
return "<p>" + _("File not found") + ": <b><code>" + f.getAbsolutePath() + "</code></b></p>";
else {
str = str.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
return _("File location") + ": <b><code>" + f.getAbsolutePath() + "</code></b> <pre>" + str + "</pre>";
return "<p>" + _("File location") + ": <b><code>" + f.getAbsolutePath() + "</code></b></p><pre>" + str + "</pre>";
}
}
@ -97,6 +97,9 @@ public class LogsHelper extends HelperBase {
buf.append("<ul>");
for (int i = msgs.size() - 1; i >= 0; i--) {
String msg = msgs.get(i);
// don't display the dup message if it is last
if (i == 0 && msg.contains("&darr;"))
break;
msg = msg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
msg = msg.replace("&amp;darr;", "&darr;"); // hack - undo the damage (LogWriter)
// remove last \n that LogRecordFormatter added

View File

@ -662,7 +662,7 @@ public class PluginStarter implements Runnable {
// quick check, will throw ClassNotFoundException on error
LoadClientAppsJob.testClient(app.className, cl);
// run this guy now
LoadClientAppsJob.runClient(app.className, app.clientName, argVal, log, pluginThreadGroup, cl);
LoadClientAppsJob.runClient(app.className, app.clientName, argVal, ctx, log, pluginThreadGroup, cl);
} else {
// If there is some delay, there may be a really good reason for it.
// Loading a class would be one of them!

View File

@ -168,7 +168,7 @@ class ProfileOrganizerRenderer {
}
buf.append("</td><td align=\"right\">").append(num(prof.getIntegrationValue()));
buf.append("</td><td align=\"center\">");
if (_context.shitlist().isShitlisted(peer)) buf.append(_("Banned"));
if (_context.banlist().isBanlisted(peer)) buf.append(_("Banned"));
if (prof.getIsFailing()) buf.append(' ').append(_("Failing"));
if (_context.commSystem().wasUnreachable(peer)) buf.append(' ').append(_("Unreachable"));
Rate failed = prof.getTunnelHistory().getFailedRate().getRate(30*60*1000);

View File

@ -46,7 +46,7 @@ public class ProfilesHelper extends HelperBase {
renderNavBar();
} catch (IOException ioe) {}
if (_full == 3)
getShitlistSummary();
getBanlistSummary();
else
getProfileSummary();
return "";
@ -64,9 +64,9 @@ public class ProfilesHelper extends HelperBase {
}
/** @return empty string, writes directly to _out */
public String getShitlistSummary() {
public String getBanlistSummary() {
try {
ShitlistRenderer rend = new ShitlistRenderer(_context);
BanlistRenderer rend = new BanlistRenderer(_context);
rend.renderStatusHTML(_out);
} catch (IOException ioe) {
ioe.printStackTrace();

View File

@ -23,11 +23,15 @@ import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import net.i2p.I2PAppContext;
import net.i2p.app.ClientAppManager;
import net.i2p.app.ClientAppState;
import static net.i2p.app.ClientAppState.*;
import net.i2p.apps.systray.SysTray;
import net.i2p.data.Base32;
import net.i2p.data.DataHelper;
import net.i2p.router.RouterContext;
import net.i2p.router.update.ConsoleUpdateManager;
import net.i2p.router.app.RouterApp;
import net.i2p.util.Addresses;
import net.i2p.util.FileUtil;
import net.i2p.util.I2PAppThread;
@ -48,6 +52,7 @@ import org.mortbay.jetty.handler.DefaultHandler;
import org.mortbay.jetty.handler.HandlerCollection;
import org.mortbay.jetty.handler.RequestLogHandler;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.security.Credential.MD5;
import org.mortbay.jetty.security.DigestAuthenticator;
import org.mortbay.jetty.security.HashUserRealm;
import org.mortbay.jetty.security.Constraint;
@ -65,7 +70,10 @@ import org.mortbay.thread.concurrent.ThreadPool;
/**
* Start the router console.
*/
public class RouterConsoleRunner {
public class RouterConsoleRunner implements RouterApp {
private final RouterContext _context;
private final ClientAppManager _mgr;
private volatile ClientAppState _state = UNINITIALIZED;
private static Server _server;
private String _listenPort;
private String _listenHost;
@ -74,14 +82,21 @@ public class RouterConsoleRunner {
private String _webAppsDir;
private static final String DEFAULT_WEBAPP_CONFIG_FILENAME = "webapps.config";
// Jetty Auth
private static final DigestAuthenticator authenticator = new DigestAuthenticator();
public static final String JETTY_REALM = "i2prouter";
private static final String JETTY_ROLE = "routerAdmin";
public static final String PROP_CONSOLE_PW = "routerconsole.auth." + JETTY_REALM;
public static final String PROP_PW_ENABLE = "routerconsole.auth.enable";
public static final String ROUTERCONSOLE = "routerconsole";
public static final String PREFIX = "webapps.";
public static final String ENABLED = ".startOnLoad";
private static final String PROP_KEYSTORE_PASSWORD = "routerconsole.keystorePassword";
private static final String DEFAULT_KEYSTORE_PASSWORD = "changeit";
private static final String PROP_KEY_PASSWORD = "routerconsole.keyPassword";
private static final String DEFAULT_LISTEN_PORT = "7657";
public static final int DEFAULT_LISTEN_PORT = 7657;
private static final String DEFAULT_LISTEN_HOST = "127.0.0.1";
private static final String DEFAULT_WEBAPPS_DIR = "./webapps/";
private static final String USAGE = "Bad RouterConsoleRunner arguments, check clientApp.0.args in your clients.config file! " +
@ -125,10 +140,12 @@ public class RouterConsoleRunner {
* to both, we can't connect to [::1]:7657 for some reason.
* So the wise choice is ::1,127.0.0.1
*/
public RouterConsoleRunner(String args[]) {
public RouterConsoleRunner(RouterContext ctx, ClientAppManager mgr, String args[]) {
_context = ctx;
_mgr = mgr;
if (args.length == 0) {
// _listenHost and _webAppsDir are defaulted below
_listenPort = DEFAULT_LISTEN_PORT;
_listenPort = Integer.toString(DEFAULT_LISTEN_PORT);
} else {
boolean ssl = false;
for (int i = 0; i < args.length; i++) {
@ -161,12 +178,59 @@ public class RouterConsoleRunner {
System.err.println(USAGE);
throw new IllegalArgumentException(USAGE);
}
_state = INITIALIZED;
}
public static void main(String args[]) {
startTrayApp();
RouterConsoleRunner runner = new RouterConsoleRunner(args);
runner.startConsole();
List<RouterContext> contexts = RouterContext.listContexts();
if (contexts == null || contexts.isEmpty())
throw new IllegalStateException("no router context");
RouterConsoleRunner runner = new RouterConsoleRunner(contexts.get(0), null, args);
runner.startup();
}
/////// ClientApp methods
/** @since 0.9.4 */
public void startup() {
changeState(STARTING);
startTrayApp(_context);
startConsole();
}
/** @since 0.9.4 */
public void shutdown(String[] args) {
changeState(STOPPING);
try {
_server.stop();
} catch (Exception ie) {}
PortMapper portMapper = _context.portMapper();
portMapper.unregister(PortMapper.SVC_CONSOLE);
portMapper.unregister(PortMapper.SVC_HTTPS_CONSOLE);
changeState(STOPPED);
}
/** @since 0.9.4 */
public ClientAppState getState() {
return _state;
}
/** @since 0.9.4 */
public String getName() {
return "console";
}
/** @since 0.9.4 */
public String getDisplayName() {
return "Router Console";
}
/////// end ClientApp methods
private synchronized void changeState(ClientAppState state) {
_state = state;
if (_mgr != null)
_mgr.notify(this, state, null, null);
}
/**
@ -178,13 +242,13 @@ public class RouterConsoleRunner {
return _server;
}
private static void startTrayApp() {
private static void startTrayApp(I2PAppContext ctx) {
try {
//TODO: move away from routerconsole into a separate application.
//ApplicationManager?
boolean recentJava = SystemVersion.isJava6();
// default false for now
boolean desktopguiEnabled = I2PAppContext.getGlobalContext().getBooleanProperty("desktopgui.enabled");
boolean desktopguiEnabled = ctx.getBooleanProperty("desktopgui.enabled");
if (recentJava && desktopguiEnabled) {
//Check if we are in a headless environment, set properties accordingly
System.setProperty("java.awt.headless", Boolean.toString(GraphicsEnvironment.isHeadless()));
@ -219,7 +283,7 @@ public class RouterConsoleRunner {
*</pre>
*/
public void startConsole() {
File workDir = new SecureDirectory(I2PAppContext.getGlobalContext().getTempDir(), "jetty-work");
File workDir = new SecureDirectory(_context.getTempDir(), "jetty-work");
boolean workDirRemoved = FileUtil.rmdir(workDir, false);
if (!workDirRemoved)
System.err.println("ERROR: Unable to remove Jetty temporary work directory");
@ -228,7 +292,7 @@ public class RouterConsoleRunner {
System.err.println("ERROR: Unable to create Jetty temporary work directory");
//try {
// Log.setLog(new I2PLogger(I2PAppContext.getGlobalContext()));
// Log.setLog(new I2PLogger(_context));
//} catch (Throwable t) {
// System.err.println("INFO: I2P Jetty logging class not found, logging to wrapper log");
//}
@ -236,7 +300,7 @@ public class RouterConsoleRunner {
System.setProperty("org.mortbay.log.class", "net.i2p.jetty.I2PLogger");
// so Jetty can find WebAppConfiguration
System.setProperty("jetty.class.path", I2PAppContext.getGlobalContext().getBaseDir() + "/lib/routerconsole.jar");
System.setProperty("jetty.class.path", _context.getBaseDir() + "/lib/routerconsole.jar");
_server = new Server();
_server.setGracefulShutdown(1000);
@ -259,11 +323,11 @@ public class RouterConsoleRunner {
hColl.addHandler(chColl);
hColl.addHandler(new DefaultHandler());
String log = I2PAppContext.getGlobalContext().getProperty("routerconsole.log");
String log = _context.getProperty("routerconsole.log");
if (log != null) {
File logFile = new File(log);
if (!logFile.isAbsolute())
logFile = new File(I2PAppContext.getGlobalContext().getLogDir(), "logs/" + log);
logFile = new File(_context.getLogDir(), "logs/" + log);
try {
RequestLogHandler rhl = new RequestLogHandler();
rhl.setRequestLog(new NCSARequestLog(logFile.getAbsolutePath()));
@ -283,7 +347,7 @@ public class RouterConsoleRunner {
// We assume relative to the base install dir for backward compatibility
File app = new File(_webAppsDir);
if (!app.isAbsolute()) {
app = new File(I2PAppContext.getGlobalContext().getBaseDir(), _webAppsDir);
app = new File(_context.getBaseDir(), _webAppsDir);
try {
_webAppsDir = app.getCanonicalPath();
} catch (IOException ioe) {}
@ -363,7 +427,7 @@ public class RouterConsoleRunner {
}
}
// XXX: what if listenhosts do not include 127.0.0.1? (Should that ever even happen?)
I2PAppContext.getGlobalContext().portMapper().register(PortMapper.SVC_CONSOLE,lport);
_context.portMapper().register(PortMapper.SVC_CONSOLE,lport);
}
// add SSL listeners
@ -376,8 +440,7 @@ public class RouterConsoleRunner {
System.err.println("Bad routerconsole SSL port " + _sslListenPort);
}
if (sslPort > 0) {
I2PAppContext ctx = I2PAppContext.getGlobalContext();
File keyStore = new File(ctx.getConfigDir(), "keystore/console.ks");
File keyStore = new File(_context.getConfigDir(), "keystore/console.ks");
if (verifyKeyStore(keyStore)) {
StringTokenizer tok = new StringTokenizer(_sslListenHost, " ,");
while (tok.hasMoreTokens()) {
@ -408,9 +471,9 @@ public class RouterConsoleRunner {
SslSelectChannelConnector sssll = new SslSelectChannelConnector();
// the keystore path and password
sssll.setKeystore(keyStore.getAbsolutePath());
sssll.setPassword(ctx.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD));
sssll.setPassword(_context.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD));
// the X.509 cert password (if not present, verifyKeyStore() returned false)
sssll.setKeyPassword(ctx.getProperty(PROP_KEY_PASSWORD, "thisWontWork"));
sssll.setKeyPassword(_context.getProperty(PROP_KEY_PASSWORD, "thisWontWork"));
sssll.setUseDirectBuffers(false); // default true seems to be leaky
ssll = sssll;
} else {
@ -418,9 +481,9 @@ public class RouterConsoleRunner {
SslSocketConnector sssll = new SslSocketConnector();
// the keystore path and password
sssll.setKeystore(keyStore.getAbsolutePath());
sssll.setPassword(ctx.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD));
sssll.setPassword(_context.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD));
// the X.509 cert password (if not present, verifyKeyStore() returned false)
sssll.setKeyPassword(ctx.getProperty(PROP_KEY_PASSWORD, "thisWontWork"));
sssll.setKeyPassword(_context.getProperty(PROP_KEY_PASSWORD, "thisWontWork"));
ssll = sssll;
}
ssll.setHost(host);
@ -437,7 +500,7 @@ public class RouterConsoleRunner {
System.err.println("You may ignore this warning if the console is still available at https://localhost:" + sslPort);
}
}
I2PAppContext.getGlobalContext().portMapper().register(PortMapper.SVC_HTTPS_CONSOLE,sslPort);
_context.portMapper().register(PortMapper.SVC_HTTPS_CONSOLE,sslPort);
} else {
System.err.println("Unable to create or access keystore for SSL: " + keyStore.getAbsolutePath());
}
@ -448,7 +511,7 @@ public class RouterConsoleRunner {
return;
}
rootWebApp = new LocaleWebAppHandler(I2PAppContext.getGlobalContext(),
rootWebApp = new LocaleWebAppHandler(_context,
"/", _webAppsDir + ROUTERCONSOLE + ".war");
File tmpdir = new SecureDirectory(workDir, ROUTERCONSOLE + "-" +
(_listenPort != null ? _listenPort : _sslListenPort));
@ -458,7 +521,7 @@ public class RouterConsoleRunner {
rootWebApp.setSessionHandler(new SessionHandler());
rootServletHandler = new ServletHandler();
rootWebApp.setServletHandler(rootServletHandler);
initialize(rootWebApp);
initialize(_context, rootWebApp);
chColl.addHandler(rootWebApp);
} catch (Exception ioe) {
@ -495,7 +558,7 @@ public class RouterConsoleRunner {
}
if (error) {
System.err.println("WARNING: Error starting one or more listeners of the Router Console server.\n" +
"If your console is still accessible at http://127.0.0.1:7657/,\n" +
"If your console is still accessible at http://127.0.0.1:" + _listenPort + "/,\n" +
"this may be a problem only with binding to the IPV6 address ::1.\n" +
"If so, you may ignore this error, or remove the\n" +
"\"::1,\" in the \"clientApp.0.args\" line of the clients.config file.");
@ -517,7 +580,7 @@ public class RouterConsoleRunner {
if (! "false".equals(enabled)) {
try {
String path = new File(dir, fileNames[i]).getCanonicalPath();
WebAppStarter.startWebApp(I2PAppContext.getGlobalContext(), chColl, appName, path);
WebAppStarter.startWebApp(_context, chColl, appName, path);
if (enabled == null) {
// do this so configclients.jsp knows about all apps from reading the config
props.setProperty(PREFIX + appName + ENABLED, "true");
@ -532,13 +595,15 @@ public class RouterConsoleRunner {
notStarted.add(appName);
}
}
changeState(RUNNING);
}
} else {
System.err.println("ERROR: Router console did not start, not starting webapps");
changeState(START_FAILED);
}
if (rewrite)
storeWebAppProperties(props);
storeWebAppProperties(_context, props);
if (rootServletHandler != null && notStarted.size() > 0) {
// map each not-started webapp to the error page
@ -565,35 +630,29 @@ public class RouterConsoleRunner {
t.setPriority(Thread.NORM_PRIORITY - 1);
t.start();
List<RouterContext> contexts = RouterContext.listContexts();
if (contexts != null) {
RouterContext ctx = contexts.get(0);
ConsoleUpdateManager um = new ConsoleUpdateManager(ctx);
ConsoleUpdateManager um = new ConsoleUpdateManager(_context);
um.start();
if (PluginStarter.pluginsEnabled(ctx)) {
t = new I2PAppThread(new PluginStarter(ctx), "PluginStarter", true);
if (PluginStarter.pluginsEnabled(_context)) {
t = new I2PAppThread(new PluginStarter(_context), "PluginStarter", true);
t.setPriority(Thread.NORM_PRIORITY - 1);
t.start();
ctx.addShutdownTask(new PluginStopper(ctx));
_context.addShutdownTask(new PluginStopper(_context));
}
// stat summarizer registers its own hook
ctx.addShutdownTask(new ServerShutdown());
ConfigServiceHandler.registerSignalHandler(ctx);
} // else log CRIT ?
_context.addShutdownTask(new ServerShutdown());
ConfigServiceHandler.registerSignalHandler(_context);
}
/**
* @return success if it exists and we have a password, or it was created successfully.
* @since 0.8.3
*/
private static boolean verifyKeyStore(File ks) {
private boolean verifyKeyStore(File ks) {
if (ks.exists()) {
I2PAppContext ctx = I2PAppContext.getGlobalContext();
boolean rv = ctx.getProperty(PROP_KEY_PASSWORD) != null;
boolean rv = _context.getProperty(PROP_KEY_PASSWORD) != null;
if (!rv)
System.err.println("Console SSL error, must set " + PROP_KEY_PASSWORD + " in " + (new File(ctx.getConfigDir(), "router.config")).getAbsolutePath());
System.err.println("Console SSL error, must set " + PROP_KEY_PASSWORD + " in " + (new File(_context.getConfigDir(), "router.config")).getAbsolutePath());
return rv;
}
File dir = ks.getParentFile();
@ -614,14 +673,13 @@ public class RouterConsoleRunner {
* @return success
* @since 0.8.3
*/
private static boolean createKeyStore(File ks) {
I2PAppContext ctx = I2PAppContext.getGlobalContext();
private boolean createKeyStore(File ks) {
// make a random 48 character password (30 * 8 / 5)
byte[] rand = new byte[30];
ctx.random().nextBytes(rand);
_context.random().nextBytes(rand);
String keyPassword = Base32.encode(rand);
// and one for the cname
ctx.random().nextBytes(rand);
_context.random().nextBytes(rand);
String cname = Base32.encode(rand) + ".console.i2p.net";
String keytool = (new File(System.getProperty("java.home"), "bin/keytool")).getAbsolutePath();
@ -643,11 +701,10 @@ public class RouterConsoleRunner {
if (success) {
SecureFileOutputStream.setPerms(ks);
try {
RouterContext rctx = (RouterContext) ctx;
Map<String, String> changes = new HashMap();
changes.put(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD);
changes.put(PROP_KEY_PASSWORD, keyPassword);
rctx.router().saveConfig(changes, null);
_context.router().saveConfig(changes, null);
} catch (Exception e) {} // class cast exception
}
}
@ -664,27 +721,42 @@ public class RouterConsoleRunner {
System.err.println(buf.toString());
System.err.println("This is for the Sun/Oracle keytool, others may be incompatible.\n" +
"If you create the keystore manually, you must add " + PROP_KEYSTORE_PASSWORD + " and " + PROP_KEY_PASSWORD +
" to " + (new File(ctx.getConfigDir(), "router.config")).getAbsolutePath());
" to " + (new File(_context.getConfigDir(), "router.config")).getAbsolutePath());
}
return success;
}
static void initialize(WebAppContext context) {
/**
* Set up basic security constraints for the webapp.
* Add all users and passwords.
*/
static void initialize(RouterContext ctx, WebAppContext context) {
SecurityHandler sec = new SecurityHandler();
List<ConstraintMapping> constraints = new ArrayList(4);
String password = getPassword();
if (password != null) {
HashUserRealm realm = new HashUserRealm("i2prouter");
realm.put("admin", password);
realm.addUserToRole("admin", "routerAdmin");
sec.setUserRealm(realm);
sec.setAuthenticator(authenticator);
Constraint constraint = new Constraint("admin", "routerAdmin");
constraint.setAuthenticate(true);
ConstraintMapping cm = new ConstraintMapping();
cm.setConstraint(constraint);
cm.setPathSpec("/");
constraints.add(cm);
ConsolePasswordManager mgr = new ConsolePasswordManager(ctx);
boolean enable = ctx.getBooleanProperty(PROP_PW_ENABLE);
if (enable) {
Map<String, String> userpw = mgr.getMD5(PROP_CONSOLE_PW);
if (userpw.isEmpty()) {
enable = false;
ctx.router().saveConfig(PROP_CONSOLE_PW, "false");
} else {
HashUserRealm realm = new HashUserRealm(JETTY_REALM);
sec.setUserRealm(realm);
sec.setAuthenticator(authenticator);
for (Map.Entry<String, String> e : userpw.entrySet()) {
String user = e.getKey();
String pw = e.getValue();
realm.put(user, MD5.__TYPE + pw);
realm.addUserToRole(user, JETTY_ROLE);
Constraint constraint = new Constraint(user, JETTY_ROLE);
constraint.setAuthenticate(true);
ConstraintMapping cm = new ConstraintMapping();
cm.setConstraint(constraint);
cm.setPathSpec("/");
constraints.add(cm);
}
}
}
// This forces a '403 Forbidden' response for TRACE and OPTIONS unless the
@ -719,43 +791,25 @@ public class RouterConsoleRunner {
context.setSecurityHandler(sec);
}
static String getPassword() {
List<RouterContext> contexts = RouterContext.listContexts();
if (contexts != null) {
for (int i = 0; i < contexts.size(); i++) {
RouterContext ctx = contexts.get(i);
String password = ctx.getProperty("consolePassword");
if (password != null) {
password = password.trim();
if (password.length() > 0) {
return password;
}
}
}
// no password in any context
return null;
} else {
// no contexts?!
return null;
}
}
/** @since 0.8.8 */
private static class ServerShutdown implements Runnable {
private class ServerShutdown implements Runnable {
public void run() {
try {
_server.stop();
} catch (Exception ie) {}
shutdown(null);
}
}
public static Properties webAppProperties() {
return webAppProperties(I2PAppContext.getGlobalContext().getConfigDir().getAbsolutePath());
private Properties webAppProperties() {
return webAppProperties(_context.getConfigDir().getAbsolutePath());
}
/** @since 0.9.4 */
public static Properties webAppProperties(I2PAppContext ctx) {
return webAppProperties(ctx.getConfigDir().getAbsolutePath());
}
public static Properties webAppProperties(String dir) {
Properties rv = new Properties();
// String webappConfigFile = ctx.getProperty(PROP_WEBAPP_CONFIG_FILENAME, DEFAULT_WEBAPP_CONFIG_FILENAME);
// String webappConfigFile = _context.getProperty(PROP_WEBAPP_CONFIG_FILENAME, DEFAULT_WEBAPP_CONFIG_FILENAME);
String webappConfigFile = DEFAULT_WEBAPP_CONFIG_FILENAME;
File cfgFile = new File(dir, webappConfigFile);
@ -768,10 +822,10 @@ public class RouterConsoleRunner {
return rv;
}
public static void storeWebAppProperties(Properties props) {
// String webappConfigFile = ctx.getProperty(PROP_WEBAPP_CONFIG_FILENAME, DEFAULT_WEBAPP_CONFIG_FILENAME);
public static void storeWebAppProperties(RouterContext ctx, Properties props) {
// String webappConfigFile = _context.getProperty(PROP_WEBAPP_CONFIG_FILENAME, DEFAULT_WEBAPP_CONFIG_FILENAME);
String webappConfigFile = DEFAULT_WEBAPP_CONFIG_FILENAME;
File cfgFile = new File(I2PAppContext.getGlobalContext().getConfigDir(), webappConfigFile);
File cfgFile = new File(ctx.getConfigDir(), webappConfigFile);
try {
DataHelper.storeProps(props, cfgFile);

View File

@ -172,6 +172,8 @@ public class SummaryHelper extends HelperBase {
//if (_context.router().getRouterInfo().getCapabilities().indexOf('O') >= 0)
// return _("WARN-Firewalled and Fast");
return _("Firewalled");
case CommSystemFacade.STATUS_DISCONNECTED:
return _("Disconnected - check network cable");
case CommSystemFacade.STATUS_HOSED:
return _("ERR-UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart");
case CommSystemFacade.STATUS_UNKNOWN: // fallthrough
@ -283,11 +285,11 @@ public class SummaryHelper extends HelperBase {
*
*/
/********
public int getShitlistedPeers() {
public int getBanlistedPeers() {
if (_context == null)
return 0;
else
return _context.shitlist().getRouterCount();
return _context.banlist().getRouterCount();
}
********/

View File

@ -74,7 +74,7 @@ public class WebAppConfiguration implements Configuration {
cp = props.getProperty(RouterConsoleRunner.PREFIX + appName + CLASSPATH);
dir = pluginDir;
} else {
Properties props = RouterConsoleRunner.webAppProperties();
Properties props = RouterConsoleRunner.webAppProperties(i2pContext);
cp = props.getProperty(RouterConsoleRunner.PREFIX + appName + CLASSPATH);
}
if (cp == null)

View File

@ -6,7 +6,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.i2p.I2PAppContext;
import net.i2p.router.RouterContext;
import net.i2p.util.FileUtil;
import net.i2p.util.SecureDirectory;
@ -51,7 +51,7 @@ public class WebAppStarter {
* adds and starts
* @throws just about anything, caller would be wise to catch Throwable
*/
static void startWebApp(I2PAppContext ctx, ContextHandlerCollection server,
static void startWebApp(RouterContext ctx, ContextHandlerCollection server,
String appName, String warPath) throws Exception {
File tmpdir = new SecureDirectory(ctx.getTempDir(), "jetty-work-" + appName + ctx.random().nextInt());
WebAppContext wac = addWebApp(ctx, server, appName, warPath, tmpdir);
@ -65,7 +65,7 @@ public class WebAppStarter {
* This is used only by RouterConsoleRunner, which adds all the webapps first
* and then starts all at once.
*/
static WebAppContext addWebApp(I2PAppContext ctx, ContextHandlerCollection server,
static WebAppContext addWebApp(RouterContext ctx, ContextHandlerCollection server,
String appName, String warPath, File tmpdir) throws IOException {
// Jetty will happily load one context on top of another without stopping
@ -103,7 +103,7 @@ public class WebAppStarter {
wac.setExtractWAR(false);
// this does the passwords...
RouterConsoleRunner.initialize(wac);
RouterConsoleRunner.initialize(ctx, wac);
// see WebAppConfiguration for info
String[] classNames = wac.getConfigurationClasses();

View File

@ -19,13 +19,10 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigNetHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>">
<input type="hidden" name="action" value="blah" >
<input type="hidden" name="ratesOnly" value="1" >
<h3><%=intl._("Bandwidth limiter")%></h3><p>

View File

@ -21,14 +21,11 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigAdvancedHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<div class="wideload">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<h3><%=intl._("Advanced I2P Configuration")%></h3>
<textarea rows="32" cols="60" name="config" wrap="off" spellcheck="false"><jsp:getProperty name="advancedhelper" property="settings" /></textarea><br><hr>

View File

@ -25,16 +25,8 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter(\"action\")%>" />
<jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter(\"nonce\")%>" />
<jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<%
String pageNonce = formhandler.getNewNonce();
%>
<h3><%=intl._("Client Configuration")%></h3><p>
<%=intl._("The Java clients listed below are started by the router and run in the same JVM.")%>
</p><div class="wideload">
@ -85,9 +77,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<input type="checkbox" class="optbox" name="auth" value="true" <jsp:getProperty name="clientshelper" property="auth" /> >
<%=intl._("Require username and password")%><br>
<%=intl._("Username")%>:
<input name="user" type="text" value="<jsp:getProperty name="clientshelper" property="user" />" ><br>
<input name="user" type="text" value="" /><br>
<%=intl._("Password")%>:
<input name="pw" type="password" value="<jsp:getProperty name="clientshelper" property="pw" />" ><br>
<input name="pw" type="password" value="" /><br>
</p><p><b><%=intl._("The default settings will work for most people.")%></b>
<%=intl._("Any changes made here must also be configured in the external client.")%>
<%=intl._("Many clients do not support SSL or authorization.")%>

View File

@ -22,14 +22,7 @@ input.default {
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigHomeHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%
String pageNonce = formhandler.getNewNonce();
%>
<%@include file="formhandler.jsi" %>
<jsp:useBean class="net.i2p.router.web.HomeHelper" id="homehelper" scope="request" />
<jsp:setProperty name="homehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />

View File

@ -15,10 +15,7 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigKeyringHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigKeyringHelper" id="keyringhelper" scope="request" />
<jsp:setProperty name="keyringhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<div class="configure"><h2><%=intl._("Keyring")%></h2><p>
@ -29,7 +26,7 @@
</div>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._("Manual Keyring Addition")%></h3><p>
<%=intl._("Enter keys for encrypted remote destinations here.")%>
<%=intl._("Keys for local destinations must be entered on the")%> <a href="i2ptunnel/"><%=intl._("I2PTunnel page")%></a>.

View File

@ -18,13 +18,10 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigLoggingHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<h3><%=intl._("Configure I2P Logging Options")%></h3>
<div class="wideload">

View File

@ -18,13 +18,10 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigNetHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<h3><%=intl._("IP and Transport Configuration")%></h3><p>
<img src="/themes/console/images/itoopie_xsm.png" alt="">
@ -207,7 +204,7 @@
<p>
This setting causes your router identity to be regenerated every time your IP address
changes. If you have a dynamic IP this option can speed up your reintegration into
the network (since people will have shitlisted your old router identity), and, for
the network (since people will have banned your old router identity), and, for
very weak adversaries, help frustrate trivial
<a href="http://www.i2p.net/how_threatmodel#intersection">intersection
attacks</a> against the NetDB. Your different router identities would only be

View File

@ -15,13 +15,7 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigPeerHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigPeerHelper" id="peerhelper" scope="request" />
<jsp:setProperty name="peerhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
@ -31,7 +25,7 @@
%>
<div class="configure">
<form action="configpeer" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<a name="sh"> </a>
<a name="unsh"> </a>
<a name="bonus"> </a>
@ -61,11 +55,11 @@
<input type="text" size="8" name="capacity" value="<%=capacity%>" />
<input type="submit" name="action" class="add" value="<%=intl._("Adjust peer bonuses")%>" /></p></div>
</form>
<a name="shitlist"> </a><h2><%=intl._("Banned Peers")%></h2>
<a name="banlist"> </a><h2><%=intl._("Banned Peers")%></h2>
<jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
<jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% profilesHelper.storeWriter(out); %>
<jsp:getProperty name="profilesHelper" property="shitlistSummary" />
<jsp:getProperty name="profilesHelper" property="banlistSummary" />
<div class="wideload"><h2><%=intl._("Banned IPs")%></h2>
<jsp:getProperty name="peerhelper" property="blocklistSummary" />

View File

@ -18,14 +18,9 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigReseedHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter(\"action\")%>" />
<jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter(\"nonce\")%>" />
<jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure"><form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._("Reseeding Configuration")%></h3>
<p><%=intl._("Reseeding is the bootstrapping process used to find other routers when you first install I2P, or when your router has too few router references remaining.")%>
<%=intl._("If reseeding has failed, you should first check your network connection.")%>

View File

@ -15,13 +15,10 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigServiceHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._("Shutdown the router")%></h3>
<p><%=intl._("Graceful shutdown lets the router satisfy the agreements it has already made before shutting down, but may take a few minutes.")%>
<%=intl._("If you need to kill the router immediately, that option is available as well.")%></p>

View File

@ -22,17 +22,10 @@ input.default {
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigSummaryHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" />
<%@include file="formhandler.jsi" %>
<%
formhandler.setMovingAction();
%>
<jsp:getProperty name="formhandler" property="allMessages" />
<%
String pageNonce = formhandler.getNewNonce();
%>
<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="summaryhelper" scope="request" />
<jsp:setProperty name="summaryhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />

View File

@ -66,17 +66,13 @@ function toggleAll(category)
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigStatsHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigStatsHelper" id="statshelper" scope="request" />
<jsp:setProperty name="statshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<div class="configure">
<form id="statsForm" name="statsForm" action="" method="POST">
<input type="hidden" name="action" value="foo" >
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._("Configure I2P Stat Collection")%></h3>
<p><%=intl._("Enable full stats?")%>
<input type="checkbox" class="optbox" name="isFull" value="true" <%
@ -101,7 +97,7 @@ Warning - Log with care, stat file grows without limit.<br>
while (statshelper.groupRequired()) { %>
<tr class="tablefooter">
<td align="left" colspan="3" id=<%=statshelper.getCurrentGroupName()%>>
<b><%=statshelper.getCurrentGroupName()%></b>
<b><%=intl._(statshelper.getCurrentGroupName())%></b>
(<a href="javascript:void(null);" onclick="toggleAll('<%=statshelper.getCurrentGroupName()%>')"><%=intl._("toggle all")%></a>)
</td></tr>
<tr class="tablefooter">

View File

@ -17,13 +17,7 @@
<div class="main" id="main">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigTunnelsHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="formhandler" property="shouldsave" value="<%=request.getParameter(\"shouldsave\")%>" />
<jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter(\"action\")%>" />
<jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter(\"nonce\")%>" />
<jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure"><p>
<%=intl._("NOTE")%>:
<%=intl._("The default settings work for most people.")%>
@ -33,7 +27,7 @@
<%=intl._("Change these settings with care, and adjust them if you have problems.")%>
<div class="wideload">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<jsp:getProperty name="tunnelshelper" property="form" />
<%=intl._("Note")%>: <%=intl._("Exploratory tunnel setting changes are stored in the router.config file.")%>

View File

@ -6,6 +6,13 @@
<html><head>
<%@include file="css.jsi" %>
<%=intl.title("config UI")%>
<style type='text/css'>
input.default {
width: 1px;
height: 1px;
visibility: hidden;
}
</style>
<script src="/js/ajax.js" type="text/javascript"></script>
<%@include file="summaryajax.jsi" %>
</head><body onload="initAjax()">
@ -21,10 +28,7 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigUIHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<div class="configure"><div class="topshimten"><h3><%=uihelper._("Router Console Theme")%></h3></div>
<form action="" method="POST">
<%
@ -36,7 +40,7 @@
}
%>
<input type="hidden" name="consoleNonce" value="<%=consoleNonce%>" >
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<%
String userAgent = request.getHeader("User-Agent");
@ -54,5 +58,17 @@
</p><hr><div class="formaction">
<input type="reset" class="cancel" value="<%=intl._("Cancel")%>" >
<input type="submit" name="shouldsave" class="accept" value="<%=intl._("Apply")%>" >
</div></form></div>
</div></form>
<h3><%=uihelper._("Router Console Password")%></h3>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<jsp:getProperty name="uihelper" property="passwordForm" />
<div class="formaction">
<input type="submit" name="action" class="default" value="<%=intl._("Add user")%>" >
<input type="submit" name="action" class="delete" value="<%=intl._("Delete selected")%>" >
<input type="reset" class="cancel" value="<%=intl._("Cancel")%>" >
<input type="submit" name="action" class="add" value="<%=intl._("Add user")%>" >
</div>
</form></div>
</div></body></html>

View File

@ -16,17 +16,14 @@
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHandler" id="formhandler" scope="request" />
<% formhandler.storeMethod(request.getMethod()); %>
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%@include file="formhandler.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<div class="messages">
<jsp:getProperty name="updatehelper" property="newsStatus" /></div>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<jsp:getProperty name="formhandler" property="newNonce" />" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<% /* set hidden default */ %>
<input type="submit" name="action" value="" style="display:none" >
<% if (updatehelper.canInstall()) { %>

View File

@ -0,0 +1,43 @@
<%
/*
* Does the standard setup for all form handlers, then
* displays the message box (which drives the form processing).
*
* Included ~15 times, keep whitespace to a minimum
*
* Include this directly after the line:
* <jsp:useBean class="net.i2p.router.web.xxxHandler" id="formhandler" scope="request" />
*/
// This initializes the RouterContext - must be the first thing
formhandler.setContextId((String)session.getAttribute("i2p.contextId"));
// Prevents any saves via GET
formhandler.storeMethod(request.getMethod());
// Store the nonces for verification
String klass = formhandler.getClass().getName();
String nonceAttr1 = klass + ".nonce";
String nonceAttr2 = nonceAttr1 + "Prev";
String nonce1 = (String) session.getAttribute(nonceAttr1);
String nonce2 = (String) session.getAttribute(nonceAttr2);
formhandler.storeNonces(nonce1, nonce2);
// Put all the params in the map, some handlers use this instead of individual setters
// We also call all of the setters below.
formhandler.setSettings(request.getParameterMap());
%>
<jsp:setProperty name="formhandler" property="*" />
<jsp:getProperty name="formhandler" property="allMessages" />
<%
// Only call this once per page, do not getProperty("newNonce") elsewhere,
// use the variable instead.
// This shuffles down the nonces, so it must be after getAllMessages() above,
// since it does the form validation.
String pageNonce = formhandler.getNewNonce();
session.setAttribute(nonceAttr2, nonce1);
session.setAttribute(nonceAttr1, pageNonce);
%>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,8 @@ msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-12 00:46+0000\n"
"PO-Revision-Date: 2012-10-12 00:44+0000\n"
"POT-Creation-Date: 2012-10-15 17:57+0000\n"
"PO-Revision-Date: 2012-10-12 00:50+0000\n"
"Last-Translator: BadCluster <badcluster@i2pmail.org>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/I2P/language/"
"it/)\n"
@ -361,7 +361,7 @@ msgstr "Quanto è passato dall'inizio di questa connessione"
#: ../../../router/java/src/net/i2p/router/transport/TransportManager.java:540
#: ../../../router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java:756
#: ../../../router/java/src/net/i2p/router/transport/udp/UDPTransport.java:2188
#: ../java/src/net/i2p/router/web/SummaryHelper.java:835
#: ../java/src/net/i2p/router/web/SummaryHelper.java:836
msgid "Up"
msgstr "Su"
@ -722,7 +722,7 @@ msgstr "Bannato"
#: ../../../router/java/src/net/i2p/router/transport/udp/UDPTransport.java:2310
msgid "backlogged"
msgstr ""
msgstr "ritardi"
#. buf.append("<tr><td colspan=\"16\"><hr></td></tr>\n");
#: ../../../router/java/src/net/i2p/router/transport/udp/UDPTransport.java:2390
@ -2134,7 +2134,7 @@ msgstr "Cancella"
#: ../java/src/net/i2p/router/web/ConfigHomeHandler.java:25
#: ../java/src/net/i2p/router/web/ConfigSummaryHandler.java:26
#: ../java/src/net/i2p/router/web/SummaryHelper.java:855
#: ../java/src/net/i2p/router/web/SummaryHelper.java:856
#: ../jsp/WEB-INF/classes/net/i2p/router/web/jsp/confighome_jsp.java:419
#: ../jsp/WEB-INF/classes/net/i2p/router/web/jsp/confighome_jsp.java:439
#: ../jsp/WEB-INF/classes/net/i2p/router/web/jsp/confighome_jsp.java:455
@ -2143,7 +2143,7 @@ msgstr "Elimina selezionati"
#: ../java/src/net/i2p/router/web/ConfigHomeHandler.java:26
#: ../java/src/net/i2p/router/web/ConfigSummaryHandler.java:27
#: ../java/src/net/i2p/router/web/SummaryHelper.java:874
#: ../java/src/net/i2p/router/web/SummaryHelper.java:875
#: ../jsp/WEB-INF/classes/net/i2p/router/web/jsp/confighome_jsp.java:417
#: ../jsp/WEB-INF/classes/net/i2p/router/web/jsp/confighome_jsp.java:425
#: ../jsp/WEB-INF/classes/net/i2p/router/web/jsp/confighome_jsp.java:437
@ -2294,7 +2294,7 @@ msgstr "WARN"
#: ../java/src/net/i2p/router/web/ConfigLoggingHelper.java:88
#: ../java/src/net/i2p/router/web/HomeHelper.java:192
#: ../java/src/net/i2p/router/web/SummaryHelper.java:809
#: ../java/src/net/i2p/router/web/SummaryHelper.java:810
msgid "Remove"
msgstr "Rimuovi"
@ -2448,12 +2448,12 @@ msgstr "Aggiornamento porta TCP a {0}"
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:224
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:249
msgid "Warning - ports less than 1024 are not recommended"
msgstr ""
msgstr "Attenzione - è meglio non utilizzare le porte da 0 a 1024!"
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:228
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:255
msgid "Invalid port"
msgstr ""
msgstr "Porta non valida"
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:233
msgid "Updating inbound TCP port to auto"
@ -2462,7 +2462,7 @@ msgstr "Aggiornando le porte TCP entranti a automatiche"
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:247
#, java-format
msgid "Updating UDP port to {0}"
msgstr ""
msgstr "Aggiornamento porta UDP a {0}"
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:272
msgid "Gracefully restarting into Hidden Router Mode"
@ -2502,7 +2502,7 @@ msgstr "Introduttori SSU richiesti"
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:369
msgid "Invalid address"
msgstr ""
msgstr "Indirizzo non valido"
#: ../java/src/net/i2p/router/web/ConfigNetHandler.java:374
#, java-format
@ -2745,11 +2745,11 @@ msgstr "La console non verrà mostrata all'avvio"
#: ../java/src/net/i2p/router/web/ConfigServiceHandler.java:221
#: ../jsp/WEB-INF/classes/net/i2p/router/web/jsp/configservice_jsp.java:457
msgid "Force GC"
msgstr ""
msgstr "Forza GC"
#: ../java/src/net/i2p/router/web/ConfigServiceHandler.java:223
msgid "Full garbage collection requested"
msgstr ""
msgstr "Richieste totali"
#: ../java/src/net/i2p/router/web/ConfigServiceHandler.java:232
msgid "Service installed"
@ -3468,7 +3468,7 @@ msgstr ""
"Il tuo browser non è configurato correttamente per usare il proxy HTTP al {0}"
#: ../java/src/net/i2p/router/web/HomeHelper.java:194
#: ../java/src/net/i2p/router/web/SummaryHelper.java:811
#: ../java/src/net/i2p/router/web/SummaryHelper.java:812
msgid "Name"
msgstr "Nome"
@ -3477,7 +3477,7 @@ msgid "URL"
msgstr "URL"
#: ../java/src/net/i2p/router/web/HomeHelper.java:214
#: ../java/src/net/i2p/router/web/SummaryHelper.java:857
#: ../java/src/net/i2p/router/web/SummaryHelper.java:858
msgid "Add"
msgstr "Aggiungi"
@ -4135,37 +4135,37 @@ msgstr "Bannato fino al riavvio o in {0}"
msgid "unban now"
msgstr "riammissione istantanea"
#: ../java/src/net/i2p/router/web/StatSummarizer.java:314
#: ../java/src/net/i2p/router/web/StatSummarizer.java:312
msgid "Bandwidth usage"
msgstr "Utilizzo di larghezza di banda"
#: ../java/src/net/i2p/router/web/StatSummarizer.java:324
#: ../java/src/net/i2p/router/web/StatSummarizer.java:322
msgid "Outbound Bytes/sec"
msgstr "Bytes/s In Uscita"
#. def.line(sendName, Color.BLUE, "Outbound bytes/sec", 3);
#: ../java/src/net/i2p/router/web/StatSummarizer.java:326
#: ../java/src/net/i2p/router/web/StatSummarizer.java:324
msgid "Inbound Bytes/sec"
msgstr "Bytes/s In Entrata"
#: ../java/src/net/i2p/router/web/StatSummarizer.java:327
#: ../java/src/net/i2p/router/web/StatSummarizer.java:328
#: ../java/src/net/i2p/router/web/StatSummarizer.java:329
#: ../java/src/net/i2p/router/web/StatSummarizer.java:330
#: ../java/src/net/i2p/router/web/StatSummarizer.java:331
#: ../java/src/net/i2p/router/web/StatSummarizer.java:332
msgid "Bps"
msgstr "Bps"
#: ../java/src/net/i2p/router/web/StatSummarizer.java:329
#: ../java/src/net/i2p/router/web/StatSummarizer.java:327
msgid "Out average"
msgstr "Media In Uscita"
#: ../java/src/net/i2p/router/web/StatSummarizer.java:328
#: ../java/src/net/i2p/router/web/StatSummarizer.java:330
#: ../java/src/net/i2p/router/web/StatSummarizer.java:332
#: ../java/src/net/i2p/router/web/SummaryRenderer.java:155
msgid "max"
msgstr "massimo"
#: ../java/src/net/i2p/router/web/StatSummarizer.java:331
#: ../java/src/net/i2p/router/web/StatSummarizer.java:329
msgid "In average"
msgstr "Media In Entrata"
@ -4678,13 +4678,13 @@ msgstr "Costruendo i tunnel"
#. nicely under 'local destinations' in the summary bar
#. note that if the wording changes in i2ptunnel.config, we have to
#. keep the old string here as well for existing installs
#: ../java/src/net/i2p/router/web/SummaryHelper.java:462
#: ../java/src/net/i2p/router/web/SummaryHelper.java:459
#: ../java/strings/Strings.java:36
msgid "shared clients"
msgstr "client condivisi"
#. Note to translators: parameter is a version, e.g. "0.8.4"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:676
#: ../java/src/net/i2p/router/web/SummaryHelper.java:677
#, java-format
msgid "Download {0} Update"
msgstr "Scaricamento {0} Aggiornamento"
@ -4692,40 +4692,40 @@ msgstr "Scaricamento {0} Aggiornamento"
#. Note to translators: parameter is a date and time, e.g. "02-Mar 20:34 UTC"
#. <br> is optional, to help the browser make the lines even in the button
#. If the translation is shorter than the English, you should probably not include <br>
#: ../java/src/net/i2p/router/web/SummaryHelper.java:684
#: ../java/src/net/i2p/router/web/SummaryHelper.java:685
#, java-format
msgid "Download Unsigned<br>Update {0}"
msgstr "Scaricamento Aggiornamento {0} Non Firmato<br>"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:709
#: ../java/src/net/i2p/router/web/SummaryHelper.java:710
msgid "Help with firewall configuration"
msgstr "Aiuto con la configurazione del firewall"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:711
#: ../java/src/net/i2p/router/web/SummaryHelper.java:712
msgid "Check network connection and NAT/firewall"
msgstr "Controlla la connessione di rete e il NAT/firewall"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:730
#: ../java/src/net/i2p/router/web/SummaryHelper.java:731
msgid "Reseed"
msgstr "Reseed"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:813
#: ../java/src/net/i2p/router/web/SummaryHelper.java:814
msgid "Order"
msgstr "Ordine"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:830
#: ../java/src/net/i2p/router/web/SummaryHelper.java:831
msgid "Top"
msgstr "Sopra"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:843
#: ../java/src/net/i2p/router/web/SummaryHelper.java:844
msgid "Down"
msgstr "Sotto"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:848
#: ../java/src/net/i2p/router/web/SummaryHelper.java:849
msgid "Bottom"
msgstr "Basso"
#: ../java/src/net/i2p/router/web/SummaryHelper.java:860
#: ../java/src/net/i2p/router/web/SummaryHelper.java:861
msgid "Select a section to add"
msgstr "Seleziona una sezione da aggiungere"

Some files were not shown because too many files have changed in this diff Show More