forked from I2P_Developers/i2p.i2p
merge of '435003672b465687f7fa47e037c7f35fb18f84e2'
and 'a61539431697aa07248b384c791007439c38a167'
This commit is contained in:
@@ -89,6 +89,7 @@ trans.es = apps/susimail/locale/messages_es.po
|
||||
trans.fr = apps/susimail/locale/messages_fr.po
|
||||
trans.it = apps/susimail/locale/messages_it.po
|
||||
trans.nl = apps/susimail/locale/messages_nl.po
|
||||
trans.ru = apps/susimail/locale/messages_ru.po
|
||||
trans.sv_SE = apps/susimail/locale/messages_sv.po
|
||||
trans.pl = apps/susimail/locale/messages_pl.po
|
||||
trans.vi = apps/susimail/locale/messages_vi.po
|
||||
|
||||
@@ -1371,7 +1371,7 @@ public class SnarkManager implements Snark.CompleteListener {
|
||||
"Postman", "http://tracker2.postman.i2p/announce.php=http://tracker2.postman.i2p/"
|
||||
,"Welterde", "http://tracker.welterde.i2p/a=http://tracker.welterde.i2p/stats?mode=top5"
|
||||
// , "CRSTRACK", "http://b4G9sCdtfvccMAXh~SaZrPqVQNyGQbhbYMbw6supq2XGzbjU4NcOmjFI0vxQ8w1L05twmkOvg5QERcX6Mi8NQrWnR0stLExu2LucUXg1aYjnggxIR8TIOGygZVIMV3STKH4UQXD--wz0BUrqaLxPhrm2Eh9Hwc8TdB6Na4ShQUq5Xm8D4elzNUVdpM~RtChEyJWuQvoGAHY3ppX-EJJLkiSr1t77neS4Lc-KofMVmgI9a2tSSpNAagBiNI6Ak9L1T0F9uxeDfEG9bBSQPNMOSUbAoEcNxtt7xOW~cNOAyMyGydwPMnrQ5kIYPY8Pd3XudEko970vE0D6gO19yoBMJpKx6Dh50DGgybLQ9CpRaynh2zPULTHxm8rneOGRcQo8D3mE7FQ92m54~SvfjXjD2TwAVGI~ae~n9HDxt8uxOecAAvjjJ3TD4XM63Q9TmB38RmGNzNLDBQMEmJFpqQU8YeuhnS54IVdUoVQFqui5SfDeLXlSkh4vYoMU66pvBfWbAAAA.i2p/tracker/announce.php=http://crstrack.i2p/tracker/"
|
||||
,"Exotrack", "http://blbgywsjubw3d2zih2giokakhe3o2cko7jtte4risb3hohbcoyva.b32.i2p/announce.php=http://exotrack.i2p/"
|
||||
// ,"Exotrack", "http://blbgywsjubw3d2zih2giokakhe3o2cko7jtte4risb3hohbcoyva.b32.i2p/announce.php=http://exotrack.i2p/"
|
||||
};
|
||||
|
||||
/** comma delimited list of name=announceURL=baseURL for the trackers to be displayed */
|
||||
|
||||
@@ -1886,7 +1886,7 @@ public class I2PSnarkServlet extends Default {
|
||||
buf.append("</TR>\n");
|
||||
}
|
||||
if (showSaveButton) {
|
||||
buf.append("<thead><tr><th colspan=\"3\"> </th><th align=\"center\"><input type=\"submit\" value=\"");
|
||||
buf.append("<thead><tr><th colspan=\"3\"> </th><th class=\"headerpriority\"><input type=\"submit\" value=\"");
|
||||
buf.append(_("Save priorities"));
|
||||
buf.append("\" name=\"foo\" ></th></tr></thead>\n");
|
||||
}
|
||||
|
||||
@@ -292,11 +292,9 @@ class HTTPResponseOutputStream extends FilterOutputStream {
|
||||
} finally {
|
||||
if (_log.shouldLog(Log.INFO) && (_in != null))
|
||||
_log.info("After decompression, written=" + written +
|
||||
(_in != null ?
|
||||
" read=" + _in.getTotalRead()
|
||||
+ ", expanded=" + _in.getTotalExpanded() + ", remaining=" + _in.getRemaining()
|
||||
+ ", finished=" + _in.getFinished()
|
||||
: ""));
|
||||
+ ", finished=" + _in.getFinished());
|
||||
if (ba != null)
|
||||
_cache.release(ba);
|
||||
if (_out != null) try {
|
||||
|
||||
@@ -212,10 +212,11 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
|
||||
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
|
||||
}
|
||||
}
|
||||
if (sockMgr == null) {
|
||||
l.log("Invalid I2CP configuration");
|
||||
throw new IllegalArgumentException("Socket manager could not be created");
|
||||
}
|
||||
// can't be null unless we limit the loop above
|
||||
//if (sockMgr == null) {
|
||||
// l.log("Invalid I2CP configuration");
|
||||
// throw new IllegalArgumentException("Socket manager could not be created");
|
||||
//}
|
||||
l.log("Tunnels ready for client: " + handlerName);
|
||||
|
||||
} // else delay creating session until createI2PSocket() is called
|
||||
@@ -556,7 +557,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
|
||||
if (localPort == 0) {
|
||||
localPort = ss.getLocalPort();
|
||||
}
|
||||
notifyEvent("clientLocalPort", new Integer(ss.getLocalPort()));
|
||||
notifyEvent("clientLocalPort", Integer.valueOf(ss.getLocalPort()));
|
||||
// duplicates message in constructor
|
||||
//l.log("Listening for clients on port " + localPort + " of " + getTunnel().listenHost);
|
||||
|
||||
|
||||
@@ -336,7 +336,17 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
|
||||
@Override
|
||||
protected boolean shouldCompress() {
|
||||
return (_dataExpected < 0 || _dataExpected >= MIN_TO_COMPRESS) &&
|
||||
(_contentType == null || !_contentType.startsWith("image/"));
|
||||
(_contentType == null ||
|
||||
((!_contentType.startsWith("audio/")) &&
|
||||
(!_contentType.startsWith("image/")) &&
|
||||
(!_contentType.startsWith("video/")) &&
|
||||
(!_contentType.equals("application/compress")) &&
|
||||
(!_contentType.equals("application/bzip2")) &&
|
||||
(!_contentType.equals("application/gzip")) &&
|
||||
(!_contentType.equals("application/x-bzip")) &&
|
||||
(!_contentType.equals("application/x-bzip2")) &&
|
||||
(!_contentType.equals("application/x-gzip")) &&
|
||||
(!_contentType.equals("application/zip"))));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -402,9 +412,9 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
|
||||
protected static String formatHeaders(Map<String, List<String>> headers, StringBuilder command) {
|
||||
StringBuilder buf = new StringBuilder(command.length() + headers.size() * 64);
|
||||
buf.append(command.toString().trim()).append("\r\n");
|
||||
for (Iterator<String> iter = headers.keySet().iterator(); iter.hasNext(); ) {
|
||||
String name = (String)iter.next();
|
||||
for(String val: headers.get(name)) {
|
||||
for (Map.Entry<String, List<String>> e : headers.entrySet()) {
|
||||
String name = e.getKey();
|
||||
for(String val: e.getValue()) {
|
||||
buf.append(name.trim()).append(": ").append(val.trim()).append("\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,8 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
|
||||
* @param initialSocketData may be null
|
||||
* @param sockList may be null. Caller must add i2ps to the list! It will be removed here on completion.
|
||||
* Will synchronize on slock when removing.
|
||||
* @param onTimeout may be null
|
||||
* @param onTimeout May be null. If non-null and no data (except initial data) was sent or received,
|
||||
it will be run before closing s.
|
||||
*/
|
||||
public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData,
|
||||
byte[] initialSocketData, List<I2PSocket> sockList, Runnable onTimeout) {
|
||||
@@ -384,7 +385,13 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
|
||||
// or else input end gives up and we have data loss.
|
||||
// http://techtavern.wordpress.com/2008/07/16/whats-this-ioexception-write-end-dead/
|
||||
//out.flush();
|
||||
out.close();
|
||||
// DON'T close if we have a timeout job and we haven't received anything,
|
||||
// or else the timeout job can't write the error message to the stream.
|
||||
// close() above will close it after the timeout job is run.
|
||||
if (!(onTimeout != null && (!_toI2P) && totalReceived <= 0))
|
||||
out.close();
|
||||
else if (_log.shouldLog(Log.INFO))
|
||||
_log.info(direction + ": not closing so we can write the error message");
|
||||
} catch (IOException ioe) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn(direction + ": Error flushing to close", ioe);
|
||||
|
||||
@@ -311,7 +311,7 @@ class Connection {
|
||||
int windowSize;
|
||||
int remaining;
|
||||
synchronized (_outboundPackets) {
|
||||
_outboundPackets.put(new Long(packet.getSequenceNum()), packet);
|
||||
_outboundPackets.put(Long.valueOf(packet.getSequenceNum()), packet);
|
||||
windowSize = _options.getWindowSize();
|
||||
remaining = windowSize - _outboundPackets.size() ;
|
||||
_outboundPackets.notifyAll();
|
||||
@@ -441,7 +441,7 @@ class Connection {
|
||||
if (acked != null) {
|
||||
for (int i = 0; i < acked.size(); i++) {
|
||||
PacketLocal p = acked.get(i);
|
||||
_outboundPackets.remove(new Long(p.getSequenceNum()));
|
||||
_outboundPackets.remove(Long.valueOf(p.getSequenceNum()));
|
||||
_ackedPackets++;
|
||||
if (p.getNumSends() > 1) {
|
||||
_activeResends--;
|
||||
@@ -1129,7 +1129,7 @@ class Connection {
|
||||
synchronized (_outboundPackets) {
|
||||
if (_packet.getSequenceNum() == _highestAckedThrough + 1)
|
||||
isLowest = true;
|
||||
if (_outboundPackets.containsKey(new Long(_packet.getSequenceNum())))
|
||||
if (_outboundPackets.containsKey(Long.valueOf(_packet.getSequenceNum())))
|
||||
resend = true;
|
||||
}
|
||||
if ( (resend) && (_packet.getAckTime() <= 0) ) {
|
||||
|
||||
@@ -229,8 +229,8 @@ class MessageInputStream extends InputStream {
|
||||
_highestReadyBlockId = messageId;
|
||||
long cur = _highestReadyBlockId + 1;
|
||||
// now pull in any previously pending blocks
|
||||
while (_notYetReadyBlocks.containsKey(new Long(cur))) {
|
||||
ByteArray ba = _notYetReadyBlocks.remove(new Long(cur));
|
||||
while (_notYetReadyBlocks.containsKey(Long.valueOf(cur))) {
|
||||
ByteArray ba = _notYetReadyBlocks.remove(Long.valueOf(cur));
|
||||
if ( (ba != null) && (ba.getData() != null) && (ba.getValid() > 0) ) {
|
||||
_readyDataBlocks.add(ba);
|
||||
}
|
||||
@@ -245,9 +245,9 @@ class MessageInputStream extends InputStream {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("message is out of order: " + messageId);
|
||||
if (_locallyClosed) // dont need the payload, just the msgId in order
|
||||
_notYetReadyBlocks.put(new Long(messageId), new ByteArray(null));
|
||||
_notYetReadyBlocks.put(Long.valueOf(messageId), new ByteArray(null));
|
||||
else
|
||||
_notYetReadyBlocks.put(new Long(messageId), payload);
|
||||
_notYetReadyBlocks.put(Long.valueOf(messageId), payload);
|
||||
_dataLock.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
444
apps/susimail/locale/messages_ru.po
Normal file
444
apps/susimail/locale/messages_ru.po
Normal file
@@ -0,0 +1,444 @@
|
||||
# I2P
|
||||
# Copyright (C) 2009 The I2P Project
|
||||
# This file is distributed under the same license as the susimail package.
|
||||
# To contribute translations, see http://www.i2p2.de/newdevelopers
|
||||
# foo <foo@bar>, 2009.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: I2P susimail\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-09-26 17:16+0000\n"
|
||||
"PO-Revision-Date: 2011-09-26 23:59+0500\n"
|
||||
"Last-Translator: Hidden Z <hiddenz@mail.i2p>\n"
|
||||
"Language-Team: duck <duck@mail.i2p>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:454
|
||||
msgid "unknown"
|
||||
msgstr "неизвестно"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:473
|
||||
msgid "Warning: no transfer encoding found, fallback to 7bit."
|
||||
msgstr "Предупреждение: кодировка передачи не найдена, откатывамся на использование 7bit."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:478
|
||||
#, java-format
|
||||
msgid "No encoder found for encoding \\''{0}\\''."
|
||||
msgstr "Для кодировки \\''{0}\\'' не найден кодек."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:484
|
||||
msgid "Warning: no charset found, fallback to US-ASCII."
|
||||
msgstr "Предупреждение: кодировка непонятна, переключаемся в US-ASCII."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:498
|
||||
#, java-format
|
||||
msgid "Charset \\''{0}\\'' not supported."
|
||||
msgstr "Кодировка \\''{0}\\'' не поддерживается."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:502
|
||||
#, java-format
|
||||
msgid "Part ({0}) not shown, because of {1}"
|
||||
msgstr "Часть ({0}) не отображена из-за {1}"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:525
|
||||
msgid "Download"
|
||||
msgstr "Скачать"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:525
|
||||
msgid "File is packed into a zipfile for security reasons."
|
||||
msgstr "Файл запакован в zip-архив из соображений безопасности."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:525
|
||||
#, java-format
|
||||
msgid "attachment ({0})."
|
||||
msgstr "вложение ({0})."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:529
|
||||
#, java-format
|
||||
msgid "Attachment ({0})."
|
||||
msgstr "Вложение ({0})."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:579
|
||||
msgid "Need username for authentication."
|
||||
msgstr "Требуется имя пользователя для аутентификации."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:583
|
||||
msgid "Need password for authentication."
|
||||
msgstr "Требуется пароль для аутентификации."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:587
|
||||
msgid "Need hostname for connect."
|
||||
msgstr "Требуется имя хоста для соединений."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:592
|
||||
msgid "Need port number for pop3 connect."
|
||||
msgstr "Требуется номер порта для pop3 соединений."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:599
|
||||
msgid "POP3 port number is not in range 0..65535."
|
||||
msgstr "Номер POP3-порта не в диапазоне 0..65535."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:605
|
||||
msgid "POP3 port number is invalid."
|
||||
msgstr "Номер POP3-порта некорректный."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:611
|
||||
msgid "Need port number for smtp connect."
|
||||
msgstr "Требуется номер порта для smtp соединений."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:618
|
||||
msgid "SMTP port number is not in range 0..65535."
|
||||
msgstr "Номер SMTP-порта не в диапазоне 0..65535."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:624
|
||||
msgid "SMTP port number is invalid."
|
||||
msgstr "Номер SMTP-порта некорректный."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:671
|
||||
msgid "User logged out."
|
||||
msgstr "Пользователь отключился."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:675
|
||||
msgid "Internal error, lost connection."
|
||||
msgstr "Внутренняя ошибка, соединение потеряно."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:771
|
||||
#, java-format
|
||||
msgid "On {0} {1} wrote:"
|
||||
msgstr "В сообщении от {0} {1} написал(a):"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:818
|
||||
msgid "begin forwarded mail"
|
||||
msgstr "начало пересланного сообщения"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:840
|
||||
msgid "end forwarded mail"
|
||||
msgstr "конец пересланного сообщения"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:847
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1708
|
||||
msgid "Could not fetch mail body."
|
||||
msgstr "Не удалось скачать тело сообщения."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:875
|
||||
msgid "Message id not valid."
|
||||
msgstr "Message id некорректен."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:958
|
||||
#, java-format
|
||||
msgid "No Encoding found for {0}"
|
||||
msgstr "Не найдена кодировка для {0}"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:962
|
||||
#, java-format
|
||||
msgid "Could not encode data: {0}"
|
||||
msgstr "Не удаётся закодировать данные: {0}"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:967
|
||||
#, java-format
|
||||
msgid "Error reading uploaded file: {0}"
|
||||
msgstr "Ошибка при чтении загруженного файла: {0}"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1045
|
||||
msgid "Error parsing download parameter."
|
||||
msgstr "Ошибка при разборе параметра скачивания."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1089
|
||||
msgid "Invalid pagesize number, resetting to default value."
|
||||
msgstr "Некорректный размер страницы, устанавливается значение по умолчанию."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1113
|
||||
msgid "No messages marked for deletion."
|
||||
msgstr "Не отмечено сообщений для удаления."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1133
|
||||
#, java-format
|
||||
msgid "Error deleting message: {0}"
|
||||
msgstr "Ошибка при удалении сообщения: {0}"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1144
|
||||
#, java-format
|
||||
msgid "1 message deleted."
|
||||
msgid_plural "{0} messages deleted."
|
||||
msgstr[0] "{0} сообщение удалено."
|
||||
msgstr[1] "{0} сообщения удалено."
|
||||
msgstr[2] "{0} сообщений удалены."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1266
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1594
|
||||
msgid "Login"
|
||||
msgstr "Логин"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1268
|
||||
#, java-format
|
||||
msgid "1 Message"
|
||||
msgid_plural "{0} Messages"
|
||||
msgstr[0] "{0} сообщение"
|
||||
msgstr[1] "{0} сообщения"
|
||||
msgstr[2] "{0} сообщений"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1270
|
||||
msgid "Show Message"
|
||||
msgstr "Покзать сообщение"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1332
|
||||
#, java-format
|
||||
msgid "Error decoding content: {0}"
|
||||
msgstr "Ошибка при декодировании контента: {0}"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1337
|
||||
msgid "Error decoding content: No encoder found."
|
||||
msgstr "Ошибка при декодировании контента: кодек не найден."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1384
|
||||
msgid "no subject"
|
||||
msgstr "без темы"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1401
|
||||
msgid "Found no valid sender address."
|
||||
msgstr "Не найдено корректного адреса отправителя."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1407
|
||||
#, java-format
|
||||
msgid "Found no valid address in \\''{0}\\''."
|
||||
msgstr "Не найдено корректного адреса в \\''{0}\\''."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1426
|
||||
msgid "No recipients found."
|
||||
msgstr "Не найдено получателей."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1433
|
||||
msgid "Quoted printable encoder not available."
|
||||
msgstr "Кодек quoted printable недоступен."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1438
|
||||
msgid "Header line encoder not available."
|
||||
msgstr "Кодек для заголовка недоступен."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1489
|
||||
msgid "Mail sent."
|
||||
msgstr "Сообщение отправлено."
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1526
|
||||
msgid "Send"
|
||||
msgstr "Отправить"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1527
|
||||
msgid "Cancel"
|
||||
msgstr "Отмена"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1528
|
||||
msgid "Delete Attachment"
|
||||
msgstr "Удалить вложение"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1529
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1614
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1695
|
||||
msgid "Reload Config"
|
||||
msgstr "Перечитать конфиг"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1530
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1615
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1696
|
||||
msgid "Logout"
|
||||
msgstr "Выйти"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1553
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1700
|
||||
msgid "From:"
|
||||
msgstr "От:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1554
|
||||
msgid "To:"
|
||||
msgstr "Кому:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1555
|
||||
msgid "Cc:"
|
||||
msgstr "Копия:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1556
|
||||
msgid "Bcc:"
|
||||
msgstr "Скрытая копия:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1557
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1702
|
||||
msgid "Subject:"
|
||||
msgstr "Тема:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1558
|
||||
msgid "Bcc to self"
|
||||
msgstr "Послать скрытую копию самому себе"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1561
|
||||
msgid "New Attachment:"
|
||||
msgstr "Новое вложение:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1561
|
||||
msgid "Upload File"
|
||||
msgstr "Прикрепить"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1567
|
||||
msgid "Attachments:"
|
||||
msgstr "Вложения:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1589
|
||||
msgid "User"
|
||||
msgstr "Пользователь"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1590
|
||||
msgid "Pass"
|
||||
msgstr "Пароль"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1591
|
||||
msgid "Host"
|
||||
msgstr "Хост"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1592
|
||||
msgid "POP3-Port"
|
||||
msgstr "POP3-порт"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1593
|
||||
msgid "SMTP-Port"
|
||||
msgstr "SMTP-порт"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1594
|
||||
msgid "Create Account"
|
||||
msgstr "Создать учётную запись"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1594
|
||||
msgid "Reset"
|
||||
msgstr "Сброс"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1606
|
||||
msgid "Really delete the marked messages?"
|
||||
msgstr "Действительно удалить отмеченые сообщения?"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1606
|
||||
msgid "Yes, really delete them!"
|
||||
msgstr "Да, действительно удалить!"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1608
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1687
|
||||
msgid "New"
|
||||
msgstr "Новое"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1609
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1688
|
||||
msgid "Reply"
|
||||
msgstr "Ответить"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1610
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1689
|
||||
msgid "Reply All"
|
||||
msgstr "Ответить всем"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1611
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1690
|
||||
msgid "Forward"
|
||||
msgstr "Переслать"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1612
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1691
|
||||
msgid "Delete"
|
||||
msgstr "Удалить"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1613
|
||||
msgid "Check Mail"
|
||||
msgstr "Проверить почту"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1617
|
||||
msgid "Sender"
|
||||
msgstr "Отправитель"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1618
|
||||
msgid "Subject"
|
||||
msgstr "Тема"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1619
|
||||
msgid "Date"
|
||||
msgstr "Дата"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1620
|
||||
msgid "Size"
|
||||
msgstr "Размер"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1646
|
||||
#, java-format
|
||||
msgid "1 Byte"
|
||||
msgid_plural "{0} Bytes"
|
||||
msgstr[0] "{0} байт"
|
||||
msgstr[1] "{0} байта"
|
||||
msgstr[2] "{0} байт"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1651
|
||||
msgid "Mark All"
|
||||
msgstr "Отметить всё"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1652
|
||||
msgid "Invert Selection"
|
||||
msgstr "Инвертировать выделение"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1653
|
||||
msgid "Clear"
|
||||
msgstr "Очистить"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1656
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1657
|
||||
msgid "First"
|
||||
msgstr "Первое"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1656
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1657
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1692
|
||||
msgid "Previous"
|
||||
msgstr "Предыдущее"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1658
|
||||
#, java-format
|
||||
msgid "Page {0} of {1}"
|
||||
msgstr "Страница {0} из {1}"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1660
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1661
|
||||
msgid "Last"
|
||||
msgstr "Последнее"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1660
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1661
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1693
|
||||
msgid "Next"
|
||||
msgstr "Следующее"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1664
|
||||
msgid "Pagesize:"
|
||||
msgstr "Сообщений на странице:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1665
|
||||
msgid "Set"
|
||||
msgstr "Установить"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1675
|
||||
msgid "Really delete this message?"
|
||||
msgstr "Действительно удалить это сообщение?"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1675
|
||||
msgid "Yes, really delete it!"
|
||||
msgstr "Да, удалить это!"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1694
|
||||
msgid "Back to Folder"
|
||||
msgstr "Вернуться к папке"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1701
|
||||
msgid "Date:"
|
||||
msgstr "Дата:"
|
||||
|
||||
#: src/src/i2p/susi/webmail/WebMail.java:1712
|
||||
msgid "Could not fetch mail."
|
||||
msgstr "Не удалось скачать почту."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#/bin/sh
|
||||
#!/bin/sh
|
||||
#
|
||||
# Build the jbigi library for i2p
|
||||
#
|
||||
|
||||
@@ -1,61 +1,96 @@
|
||||
#/bin/sh
|
||||
#!/bin/sh
|
||||
|
||||
case `uname -sr` in
|
||||
MINGW*)
|
||||
echo "Building windows .dll's";;
|
||||
SunOS*)
|
||||
echo "Building solaris .so's";;
|
||||
CYGWIN*)
|
||||
echo "Building windows .dll's";;
|
||||
Linux*)
|
||||
echo "Building linux .so's";;
|
||||
FreeBSD*)
|
||||
echo "Building freebsd .so's";;
|
||||
*kFreeBSD*)
|
||||
echo "Building kFreebsd .so's";;
|
||||
*)
|
||||
echo "Unsupported build environment"
|
||||
exit;;
|
||||
cd `dirname $0`
|
||||
|
||||
case `uname -s` in
|
||||
MINGW*|CYGWIN*)
|
||||
echo "Building windows .dlls";;
|
||||
SunOS*)
|
||||
echo "Building solaris .sos";;
|
||||
Darwin*)
|
||||
echo "Building Darwin jnilibs";;
|
||||
Linux*|NetBSD*|OpenBSD*|*FreeBSD*)
|
||||
echo "Building `uname -s |tr [A-Z] [a-z]` .sos";;
|
||||
*)
|
||||
echo "Unsupported build environment"
|
||||
exit;;
|
||||
esac
|
||||
|
||||
rm -rf lib
|
||||
mkdir lib
|
||||
mkdir lib/freenet
|
||||
mkdir lib/freenet/support
|
||||
mkdir lib/freenet/support/CPUInformation
|
||||
mkdir -p lib/freenet/support/CPUInformation
|
||||
|
||||
CC="gcc"
|
||||
|
||||
case `uname -sr` in
|
||||
MINGW*)
|
||||
JAVA_HOME="/c/software/j2sdk1.4.2_05"
|
||||
COMPILEFLAGS="-Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/win32/"
|
||||
LINKFLAGS="-shared -static -static-libgcc -Wl,--kill-at"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/jcpuid-x86-windows.dll";;
|
||||
SunOS*)
|
||||
case `uname -s` in
|
||||
MINGW*|CYGWIN*)
|
||||
JAVA_HOME="/c/software/j2sdk1.4.2_05"
|
||||
COMPILEFLAGS="-Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/solaris/"
|
||||
LINKFLAGS="-shared -static -Wl,-soname,libjcpuid-x86-solaris.so"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-solaris.so";;
|
||||
FreeBSD*)
|
||||
COMPILEFLAGS="-Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/freebsd/"
|
||||
LINKFLAGS="-shared -static -Wl,-soname,libjcpuid-x86-freebsd.so"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-freebsd.so";;
|
||||
*kFreeBSD*|Linux*)
|
||||
COMPILEFLAGS="-fPIC -Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
|
||||
LINKFLAGS="-shared -Wl,-soname,libjcpuid-x86-linux.so"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-linux.so";;
|
||||
INCLUDES="-I. -Iinclude -I${JAVA_HOME}/include/ -I${JAVA_HOME}/include/win32/"
|
||||
LINKFLAGS="-shared -static -static-libgcc -Wl,--kill-at"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/jcpuid-x86-windows.dll";;
|
||||
Darwin*)
|
||||
JAVA_HOME=$(/usr/libexec/java_home)
|
||||
COMPILEFLAGS="-fPIC -Wall -arch x86_64 -arch i386"
|
||||
INCLUDES="-I. -Iinclude -I${JAVA_HOME}/include/"
|
||||
LINKFLAGS="-dynamiclib -framework JavaVM"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-darwin.jnilib";;
|
||||
Linux*|OpenBSD*|NetBSD*|*FreeBSD*|SunOS*)
|
||||
UNIXTYPE="`uname -s | tr [A-Z] [a-z]`"
|
||||
if [ ${UNIXTYPE} = "sunos" ]; then
|
||||
UNIXTYPE="solaris"
|
||||
elif [ ${UNIXTYPE} = "kfreebsd" ]; then
|
||||
UNIXTYPE="linux"
|
||||
fi
|
||||
|
||||
# If JAVA_HOME is set elsewhere, obey it. Otherwise we'll try to
|
||||
# deduce its location ourselves.
|
||||
if [ -z "${JAVA_HOME}" ]; then
|
||||
if [ ${UNIXTYPE} = "freebsd" ]; then
|
||||
if [ -d /usr/local/openjdk6 ]; then
|
||||
JAVA_HOME="/usr/local/openjdk6"
|
||||
elif [ -d /usr/local/openjdk7 ]; then
|
||||
JAVA_HOME="/usr/local/openjdk7"
|
||||
fi
|
||||
elif [ ${UNIXTYPE} = "openbsd" ]; then # The default in 4.9
|
||||
if [ -d /usr/local/jdk-1.7.0 ]; then
|
||||
JAVA_HOME="/usr/local/jdk-1.7.0"
|
||||
fi
|
||||
elif [ ${UNIXTYPE} = "netbsd" ]; then
|
||||
if [ -d /usr/pkg/java/openjdk7 ]; then
|
||||
JAVA_HOME="/usr/pkg/java/openjdk7"
|
||||
fi
|
||||
elif [ ${UNIXTYPE} = "linux" -a -e /etc/debian_version ]; then
|
||||
if [ -d /usr/lib/jvm/default-java ]; then
|
||||
JAVA_HOME="/usr/lib/jvm/default-java"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
case `uname -m` in
|
||||
x86_64*|amd64)
|
||||
ARCH="x86_64";;
|
||||
ia64*)
|
||||
ARCH="ia64";;
|
||||
i?86*)
|
||||
ARCH="x86";;
|
||||
*)
|
||||
echo "Unsupported build environment. jcpuid is only used on x86 systems."
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
# JAVA_HOME being set doesn't guarantee that it's usable
|
||||
if [ ! -r ${JAVA_HOME}/include/jni.h ]; then
|
||||
echo "Please ensure you have a Java SDK installed"
|
||||
echo "and/or set JAVA_HOME then re-run this script."
|
||||
exit 1
|
||||
fi
|
||||
LINKFLAGS="-shared -Wl,-soname,libjcpuid-${ARCH}-${UNIXTYPE}.so"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-${ARCH}-${UNIXTYPE}.so"
|
||||
COMPILEFLAGS="-fPIC -Wall"
|
||||
INCLUDES="-I. -Iinclude -I${JAVA_HOME}/include -I${JAVA_HOME}/include/${UNIXTYPE}";;
|
||||
esac
|
||||
|
||||
echo "Compiling C code..."
|
||||
rm -f $LIBFILE
|
||||
$CC $COMPILEFLAGS $LINKFLAGS $INCLUDES src/*.c -o $LIBFILE
|
||||
strip $LIBFILE
|
||||
echo Built $LIBFILE
|
||||
|
||||
#g++ -shared -static -static-libgcc -Iinclude -I$JAVA_HOME/include \
|
||||
# -I$JAVA_HOME/include/linux src/*.cpp \
|
||||
# -o lib/freenet/support/CPUInformation/libjcpuid-x86-linux.so
|
||||
rm -f ${LIBFILE}
|
||||
${CC} ${COMPILEFLAGS} ${LINKFLAGS} ${INCLUDES} src/*.c -o ${LIBFILE} || (echo "Failed to compile ${LIBFILE}"; exit 1)
|
||||
strip ${LIBFILE} || (echo "Failed to strip ${LIBFILE}" ; exit 1)
|
||||
echo Built `dirname $0`/${LIBFILE}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
#/bin/sh
|
||||
|
||||
case `uname -sr` in
|
||||
MINGW*)
|
||||
echo "Building windows .dlls";;
|
||||
CYGWIN*)
|
||||
echo "Building windows .dlls";;
|
||||
Linux*)
|
||||
echo "Building linux .sos";;
|
||||
NetBSD*|OpenBSD*|FreeBSD*)
|
||||
echo "Building `uname -s |tr [A-Z] [a-z]` .sos";;
|
||||
Darwin*)
|
||||
echo "Building OSX jnilibs";;
|
||||
*)
|
||||
echo "Unsupported build environment"
|
||||
exit;;
|
||||
esac
|
||||
|
||||
rm -rf lib
|
||||
#mkdir lib
|
||||
#mkdir lib/freenet
|
||||
#mkdir lib/freenet/support
|
||||
mkdir -p lib/freenet/support/CPUInformation
|
||||
|
||||
CC="gcc"
|
||||
|
||||
case `uname -sr` in
|
||||
MINGW*)
|
||||
JAVA_HOME="/c/software/j2sdk1.4.2_05"
|
||||
COMPILEFLAGS="-Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/win32/"
|
||||
LINKFLAGS="-shared -static -static-libgcc -Wl,--kill-at"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/jcpuid-x86-windows.dll";;
|
||||
Darwin*)
|
||||
JAVA_HOME=$(/usr/libexec/java_home)
|
||||
COMPILEFLAGS="-fPIC -Wall -arch x86_64 -arch i386"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/"
|
||||
LINKFLAGS="-dynamiclib -framework JavaVM"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-darwin.jnilib";;
|
||||
Linux*|OpenBSD*|NetBSD*|FreeBSD*|SunOS*)
|
||||
UNIXTYPE="`uname -s | tr [A-Z] [a-z]`"
|
||||
if [ $UNIXTYPE = "sunos" ]; then
|
||||
UNIXTYPE="solaris"
|
||||
elif [ $UNIXTYPE = "freebsd" ]; then
|
||||
if [ -d /usr/local/openjdk6 ]; then
|
||||
JAVA_HOME="/usr/local/openjdk6"
|
||||
elif [ -d /usr/local/openjdk7 ]; then
|
||||
JAVA_HOME="/usr/local/openjdk7"
|
||||
fi
|
||||
elif [ $UNIXTYPE = "openbsd" ]; then
|
||||
if [ -d /usr/local/jdk-1.7.0 ]; then
|
||||
JAVA_HOME="/usr/local/jdk-1.7.0"
|
||||
fi
|
||||
elif [ $UNIXTYPE = "netbsd" ]; then
|
||||
if [ -d /usr/pkg/java/openjdk7 ]; then
|
||||
JAVA_HOME="/usr/pkg/java/openjdk7"
|
||||
fi
|
||||
elif [ $UNIXTYPE = "linux" -a -e /etc/debian_version ]; then
|
||||
if [ -d /usr/lib/jvm/default-java ]; then
|
||||
JAVA_HOME="/usr/lib/jvm/default-java"
|
||||
fi
|
||||
fi
|
||||
case `uname -m` in
|
||||
x86_64*|amd64)
|
||||
LINKFLAGS="-shared -Wl,-soname,libjcpuid-x86_64-${UNIXTYPE}.so"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86_64-${UNIXTYPE}.so";;
|
||||
ia64*)
|
||||
LINKFLAGS="-shared -Wl,-soname,libjcpuid-x86-${UNIXTYPE}.so"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-ia64-${UNIXTYPE}.so";;
|
||||
i?86*)
|
||||
LINKFLAGS="-shared -Wl,-soname,libjcpuid-x86-${UNIXTYPE}.so"
|
||||
LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-${UNIXTYPE}.so";;
|
||||
*)
|
||||
echo "Unsupported build environment"
|
||||
exit;;
|
||||
esac
|
||||
COMPILEFLAGS="-fPIC -Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include -I$JAVA_HOME/include/${UNIXTYPE}";;
|
||||
|
||||
esac
|
||||
|
||||
echo "Compiling C code..."
|
||||
rm -f $LIBFILE
|
||||
$CC $COMPILEFLAGS $LINKFLAGS $INCLUDES src/*.c -o $LIBFILE
|
||||
strip $LIBFILE
|
||||
echo Built $LIBFILE
|
||||
|
||||
#g++ -shared -static -static-libgcc -Iinclude -I$JAVA_HOME/include \
|
||||
# -I$JAVA_HOME/include/linux src/*.cpp \
|
||||
# -o lib/freenet/support/CPUInformation/libjcpuid-x86-linux.so
|
||||
@@ -1,7 +1,15 @@
|
||||
#/usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
# Automatic build of so files, ignores failed builds.
|
||||
# Place latest gmp tarball in the jbigi dir, and exec this script.
|
||||
|
||||
if [ -z "$BASH_VERSION" ]; then
|
||||
echo "This script needs to be run with Bash."
|
||||
echo
|
||||
echo "Please install bash and then run this script with"
|
||||
echo "bash $0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#JBIGI=../../../installer/lib/jbigi/jbigi.jar
|
||||
|
||||
#if [ -f jbigi.jarx ] ; then
|
||||
@@ -10,7 +18,7 @@
|
||||
|
||||
rm -f t/* jcpuid/lib/freenet/support/CPUInformation/* jbigi/lib/net/i2p/util/*
|
||||
|
||||
( cd jcpuid ; ./mbuild.sh )
|
||||
( cd jcpuid ; ./build.sh )
|
||||
( cd jbigi ; ./mbuild-all.sh )
|
||||
|
||||
rm -Rf t
|
||||
|
||||
@@ -198,20 +198,6 @@ public class I2PAppContext {
|
||||
_overrideProps = new I2PProperties();
|
||||
if (envProps != null)
|
||||
_overrideProps.putAll(envProps);
|
||||
_statManager = null;
|
||||
_sessionKeyManager = null;
|
||||
_namingService = null;
|
||||
_elGamalEngine = null;
|
||||
_elGamalAESEngine = null;
|
||||
_logManager = null;
|
||||
_keyRing = null;
|
||||
_statManagerInitialized = false;
|
||||
_sessionKeyManagerInitialized = false;
|
||||
_namingServiceInitialized = false;
|
||||
_elGamalEngineInitialized = false;
|
||||
_elGamalAESEngineInitialized = false;
|
||||
_logManagerInitialized = false;
|
||||
_keyRingInitialized = false;
|
||||
_shutdownTasks = new ConcurrentHashSet(32);
|
||||
initializeDirs();
|
||||
}
|
||||
|
||||
@@ -355,10 +355,8 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
|
||||
_socket = new Socket(_hostname, _portNum);
|
||||
// _socket.setSoTimeout(1000000); // Uhmmm we could really-really use a real timeout, and handle it.
|
||||
_out = _socket.getOutputStream();
|
||||
synchronized (_out) {
|
||||
_out.write(I2PClient.PROTOCOL_BYTE);
|
||||
_out.flush();
|
||||
}
|
||||
_out.write(I2PClient.PROTOCOL_BYTE);
|
||||
_out.flush();
|
||||
_writer = new ClientWriterRunner(_out, this);
|
||||
InputStream in = _socket.getInputStream();
|
||||
_reader = new I2CPMessageReader(in, this);
|
||||
|
||||
@@ -78,10 +78,8 @@ class I2PSimpleSession extends I2PSessionImpl2 {
|
||||
else
|
||||
_socket = new Socket(_hostname, _portNum);
|
||||
_out = _socket.getOutputStream();
|
||||
synchronized (_out) {
|
||||
_out.write(I2PClient.PROTOCOL_BYTE);
|
||||
_out.flush();
|
||||
}
|
||||
_out.write(I2PClient.PROTOCOL_BYTE);
|
||||
_out.flush();
|
||||
_writer = new ClientWriterRunner(_out, this);
|
||||
InputStream in = _socket.getInputStream();
|
||||
_reader = new I2CPMessageReader(in, this);
|
||||
|
||||
@@ -432,6 +432,7 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
* @param source may be null
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
/****
|
||||
private void addEntry(SkipList sl, String key, Destination dest, String source) {
|
||||
Properties props = new Properties();
|
||||
props.setProperty(PROP_ADDED, Long.toString(_context.clock().now()));
|
||||
@@ -439,6 +440,7 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
props.setProperty(PROP_SOURCE, source);
|
||||
addEntry(sl, key, dest, props);
|
||||
}
|
||||
****/
|
||||
|
||||
/**
|
||||
* Caller must synchronize
|
||||
@@ -476,9 +478,11 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
* @return null without exception on error (logs only)
|
||||
* @since 0.8.9
|
||||
*/
|
||||
/****
|
||||
private String getReverseEntry(Destination dest) {
|
||||
return getReverseEntry(dest.calculateHash());
|
||||
}
|
||||
****/
|
||||
|
||||
/**
|
||||
* Caller must synchronize.
|
||||
|
||||
@@ -126,6 +126,7 @@ public class SingleFileNamingService extends NamingService {
|
||||
_log.warn("Error loading hosts file " + _file, ioe);
|
||||
return null;
|
||||
} finally {
|
||||
if (in != null) try { in.close(); } catch (IOException ioe) {}
|
||||
releaseReadLock();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,9 +519,11 @@ public final class CryptixRijndael_Algorithm // implicit no-argument constructor
|
||||
}
|
||||
|
||||
/** A basic symmetric encryption/decryption test. */
|
||||
/****
|
||||
public static boolean self_test() {
|
||||
return self_test(_BLOCK_SIZE);
|
||||
}
|
||||
****/
|
||||
|
||||
// Rijndael own methods
|
||||
//...........................................................................
|
||||
@@ -745,6 +747,7 @@ public final class CryptixRijndael_Algorithm // implicit no-argument constructor
|
||||
}
|
||||
|
||||
/** A basic symmetric encryption/decryption test for a given key size. */
|
||||
/****
|
||||
private static boolean self_test(int keysize) {
|
||||
if (_RDEBUG) trace(_IN, "self_test(" + keysize + ")");
|
||||
boolean ok = false;
|
||||
@@ -795,6 +798,7 @@ public final class CryptixRijndael_Algorithm // implicit no-argument constructor
|
||||
if (_RDEBUG) trace(_OUT, "self_test()");
|
||||
return ok;
|
||||
}
|
||||
****/
|
||||
|
||||
/**
|
||||
* Return The number of rounds for a given Rijndael's key and block sizes.
|
||||
@@ -894,9 +898,11 @@ public final class CryptixRijndael_Algorithm // implicit no-argument constructor
|
||||
// main(): use to generate the Intermediate Values KAT
|
||||
//...........................................................................
|
||||
|
||||
/****
|
||||
public static void main(String[] args) {
|
||||
self_test(16);
|
||||
self_test(24);
|
||||
self_test(32);
|
||||
}
|
||||
}
|
||||
****/
|
||||
}
|
||||
|
||||
@@ -298,10 +298,12 @@ public class ElGamalAESEngine {
|
||||
* @param foundKey out parameter. Data must be unset when called; may be filled with a new sessionKey found during decryption
|
||||
* @return decrypted data or null on failure
|
||||
*/
|
||||
/****
|
||||
private byte[] decryptAESBlock(byte encrypted[], SessionKey key, byte iv[],
|
||||
byte sentTag[], Set foundTags, SessionKey foundKey) throws DataFormatException {
|
||||
return decryptAESBlock(encrypted, 0, encrypted.length, key, iv, sentTag, foundTags, foundKey);
|
||||
}
|
||||
****/
|
||||
|
||||
/*
|
||||
* Note: package private for ElGamalTest.testAES()
|
||||
|
||||
@@ -34,7 +34,7 @@ public class HMAC256Generator extends HMACGenerator {
|
||||
return new I2PHMac(new Sha256ForMAC());
|
||||
}
|
||||
|
||||
private class Sha256ForMAC extends Sha256Standalone implements Digest {
|
||||
private static class Sha256ForMAC extends Sha256Standalone implements Digest {
|
||||
public String getAlgorithmName() { return "sha256 for hmac"; }
|
||||
public int getDigestSize() { return 32; }
|
||||
public int doFinal(byte[] out, int outOff) {
|
||||
|
||||
@@ -596,10 +596,10 @@ public class TransientSessionKeyManager extends SessionKeyManager {
|
||||
}
|
||||
int total = 0;
|
||||
long now = _context.clock().now();
|
||||
for (Iterator<SessionKey> iter = inboundSets.keySet().iterator(); iter.hasNext();) {
|
||||
SessionKey skey = iter.next();
|
||||
for (Map.Entry<SessionKey, Set<TagSet>> e : inboundSets.entrySet()) {
|
||||
SessionKey skey = e.getKey();
|
||||
Set<TagSet> sets = new TreeSet(new TagSetComparator());
|
||||
sets.addAll(inboundSets.get(skey));
|
||||
sets.addAll(e.getValue());
|
||||
buf.append("<tr><td><b>Session key</b>: ").append(skey.toBase64()).append("</td>" +
|
||||
"<td><b># Sets:</b> ").append(sets.size()).append("</td></tr>" +
|
||||
"<tr><td colspan=\"2\"><ul>");
|
||||
@@ -653,9 +653,9 @@ public class TransientSessionKeyManager extends SessionKeyManager {
|
||||
* Just for the HTML method above so we can see what's going on easier
|
||||
* Earliest first
|
||||
*/
|
||||
private static class TagSetComparator implements Comparator {
|
||||
public int compare(Object l, Object r) {
|
||||
return (int) (((TagSet)l).getDate() - ((TagSet)r).getDate());
|
||||
private static class TagSetComparator implements Comparator<TagSet> {
|
||||
public int compare(TagSet l, TagSet r) {
|
||||
return (int) (l.getDate() - r.getDate());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,16 +55,8 @@ import net.i2p.util.Translate;
|
||||
* @author jrandom
|
||||
*/
|
||||
public class DataHelper {
|
||||
private static final byte EQUAL_BYTES[];
|
||||
private static final byte SEMICOLON_BYTES[];
|
||||
static {
|
||||
try {
|
||||
EQUAL_BYTES = "=".getBytes("UTF-8");
|
||||
SEMICOLON_BYTES = ";".getBytes("UTF-8");
|
||||
} catch (UnsupportedEncodingException uee) {
|
||||
throw new RuntimeException("no utf8!?");
|
||||
}
|
||||
}
|
||||
private static final byte[] EQUAL_BYTES = getUTF8("=");
|
||||
private static final byte[] SEMICOLON_BYTES = getUTF8(";");
|
||||
|
||||
/** Read a mapping from the stream, as defined by the I2P data structure spec,
|
||||
* and store it into a Properties object.
|
||||
|
||||
@@ -40,13 +40,14 @@ import net.i2p.util.RandomSource;
|
||||
*
|
||||
*/
|
||||
public class RoutingKeyGenerator {
|
||||
private Log _log;
|
||||
private I2PAppContext _context;
|
||||
private final Log _log;
|
||||
private final I2PAppContext _context;
|
||||
|
||||
public RoutingKeyGenerator(I2PAppContext context) {
|
||||
_log = context.logManager().getLog(RoutingKeyGenerator.class);
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public static RoutingKeyGenerator getInstance() {
|
||||
return I2PAppContext.getGlobalContext().routingKeyGenerator();
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import net.i2p.util.RandomSource;
|
||||
|
||||
/**
|
||||
* This class represents a NTP message, as specified in RFC 2030. The message
|
||||
@@ -399,7 +400,7 @@ public class NtpMessage {
|
||||
// low order bits of the timestamp with a random, unbiased
|
||||
// bitstring, both to avoid systematic roundoff errors and as
|
||||
// a means of loop detection and replay detection.
|
||||
array[7+pointer] = (byte) (Math.random()*255.0);
|
||||
array[7+pointer] = (byte) (RandomSource.getInstance().nextInt());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -321,14 +321,16 @@ public class Timestamper implements Runnable {
|
||||
_context.getProperty(PROP_CONCURRING_SERVERS, DEFAULT_CONCURRING_SERVERS)));
|
||||
}
|
||||
|
||||
/****
|
||||
public static void main(String args[]) {
|
||||
System.setProperty(PROP_DISABLED, "false");
|
||||
System.setProperty(PROP_QUERY_FREQUENCY, "30000");
|
||||
I2PAppContext ctx = I2PAppContext.getGlobalContext();
|
||||
I2PAppContext.getGlobalContext();
|
||||
for (int i = 0; i < 5*60*1000; i += 61*1000) {
|
||||
try { Thread.sleep(61*1000); } catch (InterruptedException ie) {}
|
||||
}
|
||||
}
|
||||
****/
|
||||
|
||||
/**
|
||||
* Interface to receive update notifications for when we query the time
|
||||
|
||||
@@ -443,7 +443,7 @@ public class BlockFile {
|
||||
public BSkipList makeIndex(String name, Serializer key, Serializer val) throws IOException {
|
||||
if(metaIndex.get(name) != null) { throw new IOException("Index already exists"); }
|
||||
int page = allocPage();
|
||||
metaIndex.put(name, new Integer(page));
|
||||
metaIndex.put(name, Integer.valueOf(page));
|
||||
BSkipList.init(this, page, spanSize);
|
||||
BSkipList bsl = new BSkipList(spanSize, this, page, key, val, true);
|
||||
openIndices.put(name, bsl);
|
||||
|
||||
4
debian/patches/0002-jbigi-soname.patch
vendored
4
debian/patches/0002-jbigi-soname.patch
vendored
@@ -12,7 +12,7 @@ a soname to shut lintian up.
|
||||
|
||||
--- a/core/c/jbigi/mbuild_jbigi.sh
|
||||
+++ b/core/c/jbigi/mbuild_jbigi.sh
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -48,7 +48,7 @@
|
||||
fi
|
||||
fi
|
||||
COMPILEFLAGS="-fPIC -Wall"
|
||||
@@ -21,7 +21,7 @@ a soname to shut lintian up.
|
||||
LINKFLAGS="-shared -Wl,-soname,libjbigi.so"
|
||||
LIBFILE="libjbigi.so";;
|
||||
*)
|
||||
@@ -66,7 +66,7 @@
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
echo "Compiling C code..."
|
||||
rm -f jbigi.o $LIBFILE
|
||||
|
||||
29
debian/patches/0003-renaming-jcpuid.patch
vendored
29
debian/patches/0003-renaming-jcpuid.patch
vendored
@@ -8,23 +8,14 @@ Subject: rename jcpuid
|
||||
|
||||
--- a/core/c/jcpuid/build.sh
|
||||
+++ b/core/c/jcpuid/build.sh
|
||||
@@ -37,7 +37,7 @@
|
||||
COMPILEFLAGS="-Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/solaris/"
|
||||
LINKFLAGS="-shared -static -Wl,-soname,libjcpuid-x86-solaris.so"
|
||||
- LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-solaris.so";;
|
||||
+ LIBFILE="lib/freenet/support/CPUInformation/libjcpuid.so";;
|
||||
FreeBSD*)
|
||||
COMPILEFLAGS="-Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/freebsd/"
|
||||
@@ -46,8 +46,8 @@
|
||||
*kFreeBSD*|Linux*)
|
||||
COMPILEFLAGS="-fPIC -Wall"
|
||||
INCLUDES="-I. -Iinclude -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
|
||||
- LINKFLAGS="-shared -Wl,-soname,libjcpuid-x86-linux.so"
|
||||
- LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-linux.so";;
|
||||
+ LINKFLAGS="-shared -Wl,-soname,libjcpuid.so"
|
||||
+ LIBFILE="../jbigi/libjcpuid.so";;
|
||||
@@ -83,8 +83,8 @@
|
||||
echo "and/or set JAVA_HOME then re-run this script."
|
||||
exit 1
|
||||
fi
|
||||
- LINKFLAGS="-shared -Wl,-soname,libjcpuid-${ARCH}-${UNIXTYPE}.so"
|
||||
- LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-${ARCH}-${UNIXTYPE}.so"
|
||||
+ LINKFLAGS="-shared -Wl,-soname,libjcpuid.so"
|
||||
+ LIBFILE="../jbigi/libjcpuid.so"
|
||||
COMPILEFLAGS="-fPIC -Wall"
|
||||
INCLUDES="-I. -Iinclude -I${JAVA_HOME}/include -I${JAVA_HOME}/include/${UNIXTYPE}";;
|
||||
esac
|
||||
|
||||
echo "Compiling C code..."
|
||||
|
||||
12
history.txt
12
history.txt
@@ -1,3 +1,15 @@
|
||||
2011-09-29 zzz
|
||||
* Bandwidth refiller: Reinitialize at restart, avoid
|
||||
issues from clock skews
|
||||
|
||||
2011-09-27 kytv
|
||||
* Remove exotrack.i2p from i2psnark
|
||||
|
||||
2011-09-24 zzz
|
||||
* HTTPClient: Fix error page not appearing, broken by
|
||||
StreamForwarder change
|
||||
* HTTPServer: More mime types not to compress
|
||||
|
||||
2011-09-23 kytv
|
||||
* Update Italian, Spanish, and Swedish translations
|
||||
from Transifex
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<h3>Анонимный шифрованный веб-хостинг в I2P</h3>
|
||||
<ul class="links">
|
||||
|
||||
<li class="tidylist"><b>Готовы к действию!</b><br>I2P идёт со встроенным готовым к работе веб-сервром для хостинга вашего собственного анонимного веб-сайта (eepsite) в сети I2P: <a href="http://jetty.mortbay.org/" target="_blank">Jetty</a> развёрнут и слушает на <a href="http://127.0.0.1:7658/" target="_blank">http://127.0.0.1:7658/</a>. Для размещения собственного контента,
|
||||
<li class="tidylist"><b>Готовы к действию!</b><br>I2P идёт со встроенным готовым к работе веб-сервером для хостинга вашего собственного анонимного веб-сайта (eepsite) в сети I2P: <a href="http://jetty.mortbay.org/" target="_blank">Jetty</a> развёрнут и слушает на <a href="http://127.0.0.1:7658/" target="_blank">http://127.0.0.1:7658/</a>. Для размещения собственного контента,
|
||||
просто положите ваши файлы в каталог <code>eepsite/docroot/</code> (или положите любой
|
||||
обычный JSP/Servlet .war файл в <code>eepsite/webapps</code>,
|
||||
или обычный CGI-скрипт внутрь <code>eepsite/cgi-bin</code>) и они будут показы вам.
|
||||
|
||||
@@ -62,6 +62,10 @@ public abstract class JobImpl implements Job {
|
||||
public void madeReady() { _madeReadyOn = _context.clock().now(); }
|
||||
public void dropped() {}
|
||||
|
||||
/**
|
||||
* Warning - only call this from runJob() or if Job is not already queued,
|
||||
* or else it gets the job queue out of order.
|
||||
*/
|
||||
protected void requeue(long delayMs) {
|
||||
getTiming().setStartAfter(_context.clock().now() + delayMs);
|
||||
_context.jobQueue().addJob(this);
|
||||
|
||||
@@ -1311,6 +1311,7 @@ public class Router implements RouterClock.ClockShiftListener {
|
||||
// NOTE: DisconnectMessageHandler keys off "restart"
|
||||
try { _context.clientManager().shutdown("Router restart"); } catch (Throwable t) { _log.log(Log.CRIT, "Error stopping the client manager", t); }
|
||||
_log.logAlways(Log.WARN, "Stopping the comm system");
|
||||
_context.bandwidthLimiter().reinitialize();
|
||||
try { _context.messageRegistry().restart(); } catch (Throwable t) { _log.log(Log.CRIT, "Error restarting the message registry", t); }
|
||||
try { _context.commSystem().restart(); } catch (Throwable t) { _log.log(Log.CRIT, "Error restarting the comm system", t); }
|
||||
_log.logAlways(Log.WARN, "Stopping the tunnel manager");
|
||||
|
||||
@@ -18,10 +18,10 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 20;
|
||||
public final static long BUILD = 22;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String EXTRA = "-rc";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||
|
||||
@@ -34,6 +34,27 @@ public interface TunnelInfo {
|
||||
/** retrieve the peer at the given hop. the gateway is hop 0 */
|
||||
public Hash getPeer(int hop);
|
||||
|
||||
/**
|
||||
* For convenience
|
||||
* @return getPeer(0)
|
||||
* @since 0.8.9
|
||||
*/
|
||||
public Hash getGateway();
|
||||
|
||||
/**
|
||||
* For convenience
|
||||
* @return getPeer(getLength() - 1)
|
||||
* @since 0.8.9
|
||||
*/
|
||||
public Hash getEndpoint();
|
||||
|
||||
/**
|
||||
* For convenience
|
||||
* @return isInbound() ? getGateway() : getEndpoint()
|
||||
* @since 0.8.9
|
||||
*/
|
||||
public Hash getFarEnd();
|
||||
|
||||
/** is this an inbound tunnel? */
|
||||
public boolean isInbound();
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
||||
protected final static long DONT_FAIL_PERIOD = 10*60*1000;
|
||||
|
||||
/** don't probe or broadcast data, just respond and search when explicitly needed */
|
||||
private final boolean QUIET = false;
|
||||
private static final boolean QUIET = false;
|
||||
|
||||
public static final String PROP_ENFORCE_NETID = "router.networkDatabase.enforceNetId";
|
||||
private static final boolean DEFAULT_ENFORCE_NETID = false;
|
||||
|
||||
@@ -10,20 +10,18 @@ import net.i2p.data.Hash;
|
||||
*
|
||||
*/
|
||||
class XORComparator implements Comparator<Hash> {
|
||||
private final Hash _base;
|
||||
private final byte[] _base;
|
||||
|
||||
/**
|
||||
* @param target key to compare distances with
|
||||
*/
|
||||
public XORComparator(Hash target) {
|
||||
_base = target;
|
||||
_base = target.getData();
|
||||
}
|
||||
|
||||
public int compare(Hash lhs, Hash rhs) {
|
||||
if (lhs == null) throw new NullPointerException("LHS is null");
|
||||
if (rhs == null) throw new NullPointerException("RHS is null");
|
||||
byte lhsDelta[] = DataHelper.xor(lhs.getData(), _base.getData());
|
||||
byte rhsDelta[] = DataHelper.xor(rhs.getData(), _base.getData());
|
||||
byte lhsDelta[] = DataHelper.xor(lhs.getData(), _base);
|
||||
byte rhsDelta[] = DataHelper.xor(rhs.getData(), _base);
|
||||
return DataHelper.compareTo(lhsDelta, rhsDelta);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,6 +253,7 @@ public class FIFOBandwidthLimiter {
|
||||
// it changes out from under us
|
||||
// This never had locks before concurrent, anyway
|
||||
|
||||
// FIXME wrap - change to AtomicLong or detect
|
||||
int avi = _availableInbound.addAndGet((int) bytesInbound);
|
||||
if (avi > _maxInbound) {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
|
||||
@@ -110,6 +110,9 @@ public class FIFOBandwidthRefiller implements Runnable {
|
||||
+ " rate in="
|
||||
+ _inboundKBytesPerSecond + ", out="
|
||||
+ _outboundKBytesPerSecond +")");
|
||||
// clock skew
|
||||
if (numMs >= REPLENISH_FREQUENCY * 50 || numMs <= 0)
|
||||
numMs = REPLENISH_FREQUENCY;
|
||||
if (numMs >= REPLENISH_FREQUENCY) {
|
||||
long inboundToAdd = (1024*_inboundKBytesPerSecond * numMs)/1000;
|
||||
long outboundToAdd = (1024*_outboundKBytesPerSecond * numMs)/1000;
|
||||
|
||||
@@ -26,10 +26,12 @@ public class HopConfig {
|
||||
private long _creation;
|
||||
private long _expiration;
|
||||
private Map _options;
|
||||
private long _messagesProcessed;
|
||||
private long _oldMessagesProcessed;
|
||||
private long _messagesSent;
|
||||
private long _oldMessagesSent;
|
||||
// these 4 were longs, let's save some space
|
||||
// 2 billion * 1KB / 10 minutes = 3 GBps in a single tunnel
|
||||
private int _messagesProcessed;
|
||||
private int _oldMessagesProcessed;
|
||||
private int _messagesSent;
|
||||
private int _oldMessagesSent;
|
||||
|
||||
/** IV length for {@link #getReplyIV} */
|
||||
public static final int REPLY_IV_LENGTH = 16;
|
||||
@@ -110,16 +112,21 @@ public class HopConfig {
|
||||
/** take note of a message being pumped through this tunnel */
|
||||
/** "processed" is for incoming and "sent" is for outgoing (could be dropped in between) */
|
||||
public void incrementProcessedMessages() { _messagesProcessed++; }
|
||||
public long getProcessedMessagesCount() { return _messagesProcessed; }
|
||||
public long getRecentMessagesCount() {
|
||||
long rv = _messagesProcessed - _oldMessagesProcessed;
|
||||
|
||||
public int getProcessedMessagesCount() { return _messagesProcessed; }
|
||||
|
||||
public int getRecentMessagesCount() {
|
||||
int rv = _messagesProcessed - _oldMessagesProcessed;
|
||||
_oldMessagesProcessed = _messagesProcessed;
|
||||
return rv;
|
||||
}
|
||||
|
||||
public void incrementSentMessages() { _messagesSent++; }
|
||||
public long getSentMessagesCount() { return _messagesSent; }
|
||||
public long getRecentSentMessagesCount() {
|
||||
long rv = _messagesSent - _oldMessagesSent;
|
||||
|
||||
public int getSentMessagesCount() { return _messagesSent; }
|
||||
|
||||
public int getRecentSentMessagesCount() {
|
||||
int rv = _messagesSent - _oldMessagesSent;
|
||||
_oldMessagesSent = _messagesSent;
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,33 @@ public class TunnelCreatorConfig implements TunnelInfo {
|
||||
public Hash getPeer(int hop) { return _peers[hop]; }
|
||||
public void setPeer(int hop, Hash peer) { _peers[hop] = peer; }
|
||||
|
||||
/**
|
||||
* For convenience
|
||||
* @return getPeer(0)
|
||||
* @since 0.8.9
|
||||
*/
|
||||
public Hash getGateway() {
|
||||
return _peers[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* For convenience
|
||||
* @return getPeer(getLength() - 1)
|
||||
* @since 0.8.9
|
||||
*/
|
||||
public Hash getEndpoint() {
|
||||
return _peers[_peers.length - 1];
|
||||
}
|
||||
|
||||
/**
|
||||
* For convenience
|
||||
* @return isInbound() ? getGateway() : getEndpoint()
|
||||
* @since 0.8.9
|
||||
*/
|
||||
public Hash getFarEnd() {
|
||||
return _peers[_isInbound ? 0 : _peers.length - 1];
|
||||
}
|
||||
|
||||
/** is this an inbound tunnel? */
|
||||
public boolean isInbound() { return _isInbound; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user