- <%=indexBean.getClientInterface(curClient)%>
+
+ <%
+ /* should only happen for streamr client */
+ String cHost= indexBean.getClientInterface(curClient);
+ if ("".equals(cHost)) {
+ out.write("");
+ out.write(intl._("Hort not set"));
+ out.write("");
+ } else {
+ out.write(cHost);
+ }
+ %>
+
diff --git a/apps/i2ptunnel/locale/messages_de.po b/apps/i2ptunnel/locale/messages_de.po
index 324dcab89..d253333ae 100644
--- a/apps/i2ptunnel/locale/messages_de.po
+++ b/apps/i2ptunnel/locale/messages_de.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: I2P i2ptunnel\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-04 17:23+0000\n"
-"PO-Revision-Date: 2010-12-04 18:31+0100\n"
+"PO-Revision-Date: 2010-12-19 04:36+0100\n"
"Last-Translator: mixxy \n"
"Language-Team: foo \n"
"MIME-Version: 1.0\n"
diff --git a/apps/i2ptunnel/locale/messages_nl.po b/apps/i2ptunnel/locale/messages_nl.po
index 39c31def2..90e5be16b 100644
--- a/apps/i2ptunnel/locale/messages_nl.po
+++ b/apps/i2ptunnel/locale/messages_nl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: I2P i2ptunnel\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-04 16:39+0000\n"
+"POT-Creation-Date: 2010-12-17 15:04+0000\n"
"PO-Revision-Date: 2010-06-15 14:09+0100\n"
"Last-Translator: duck \n"
"Language-Team: duck , monkeybrains \n"
@@ -17,68 +17,95 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Dutch\n"
-#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:492
+#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:475
#, java-format
msgid ""
"To visit the destination in your host database, click here"
"a>. To visit the conflicting addresshelper destination, click here."
-msgstr "Om de destination in je host database te bezoeken, klik here. Om de conflicterende adreshelper destination te bezoeken, klik here."
+msgstr ""
+"Om de destination in je host database te bezoeken, klik hier. Om de conflicterende adreshelper destination te bezoeken, klik "
+"hier."
-#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:909
+#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:932
msgid ""
"Click a link below to look for an address helper by using a \"jump\" service:"
-msgstr "Klik op een onderstaande link om te zoeken naar een adreshelper via een \"jump\" service:"
+msgstr ""
+"Klik op een onderstaande link om te zoeken naar een adreshelper via een "
+"\"jump\" service:"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:372
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:170
+msgid ""
+"Invalid form submission, probably because you used the 'back' or 'reload' "
+"button on your browser. Please resubmit."
+msgstr ""
+"Ongeldige formulier verzonden, waarschijnlijk doordat je de 'back' of "
+"'reload' button van je browser hebt gebruikt. Verzend opnieuw."
+
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:217
+msgid "Configuration reloaded for all tunnels"
+msgstr "Configuratie van alle tunnels opnieuw geladen"
+
+#. and give them something to look at in any case
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:229
+msgid "Starting tunnel"
+msgstr "Opstarten van tunnel"
+
+#. and give them something to look at in any case
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:242
+msgid "Stopping tunnel"
+msgstr "Stoppen van tunnel"
+
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:389
msgid "New Tunnel"
msgstr "Nieuwe Tunnel"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:392
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:409
msgid "Standard client"
msgstr "Standaard client"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:393
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:410
msgid "HTTP client"
msgstr "HTTP client"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:394
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:411
msgid "IRC client"
msgstr "IRC client"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:395
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:412
msgid "Standard server"
msgstr "Standaard server"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:396
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:413
msgid "HTTP server"
msgstr "HTTP server"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:397
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:414
msgid "SOCKS 4/4a/5 proxy"
msgstr "SOCKS 4/4a/5 proxy"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:398
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:415
msgid "SOCKS IRC proxy"
msgstr "SOCKS IRC proxy"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:399
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:416
msgid "CONNECT/SSL/HTTPS proxy"
msgstr "CONNECT/SSL/HTTPS proxy"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:400
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:417
msgid "IRC server"
msgstr "IRC server"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:401
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:418
msgid "Streamr client"
msgstr "Streamr client"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:402
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:419
msgid "Streamr server"
msgstr "Streamr server"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:403
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:420
msgid "HTTP bidir"
msgstr "HTTP bidir"
@@ -113,7 +140,7 @@ msgstr "Type"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:120
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:120
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:226
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:358
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:367
msgid "Description"
msgstr "Omschrijving"
@@ -175,294 +202,337 @@ msgstr "Tunnel Destinations"
msgid "name or destination"
msgstr "naam of destination"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:220
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:217
+msgid "b32 not recommended"
+msgstr "b32 niet aanbevolen"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:223
msgid "Shared Client"
msgstr "Gedeelde Client"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:224
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:227
msgid ""
"(Share tunnels with other clients and irc/httpclients? Change requires "
"restart of client proxy)"
-msgstr "(Deel tunnels met andere clients en irc/httpclients? Wijziging vereist herstart van de client proxy)"
+msgstr ""
+"(Deel tunnels met andere clients en irc/httpclients? Wijziging vereist "
+"herstart van de client proxy)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:228
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:231
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:124
msgid "Auto Start"
msgstr "Auto Start"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:232
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:235
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:128
msgid "(Check the Box for 'YES')"
msgstr "(Markeer de Box voor 'JA')"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:234
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:249
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:237
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:258
msgid "Advanced networking options"
msgstr "Geavanceerde netwerk opties"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:236
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:239
msgid ""
"(NOTE: when this client proxy is configured to share tunnels, then these "
"options are for all the shared proxy clients!)"
-msgstr "(OPMERKING: wanneer deze client proxy is geconfigureerd om tunnels te delen, dan zijn deze opties van toepassing voor alle gedeelde proxy clients!)"
+msgstr ""
+"(OPMERKING: wanneer deze client proxy is geconfigureerd om tunnels te delen, "
+"dan zijn deze opties van toepassing voor alle gedeelde proxy clients!)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:238
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:251
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:241
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:260
msgid "Tunnel Options"
msgstr "Tunnel Opties"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:240
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:253
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:243
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:262
msgid "Length"
msgstr "Lengte"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:247
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:260
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:250
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:269
msgid "0 hop tunnel (low anonymity, low latency)"
msgstr "0 hop tunnel (lage anonimiteit, weinig vertraging)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:251
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:264
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:254
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:273
msgid "1 hop tunnel (medium anonymity, medium latency)"
msgstr "1 hop tunnel (gemiddelde anonimiteit, gemiddelde vertraging)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:255
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:268
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:258
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:277
msgid "2 hop tunnel (high anonymity, high latency)"
msgstr "2 hop tunnel (hoge anonimiteit, hoge vertraging)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:259
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:272
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:262
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:281
msgid "3 hop tunnel (very high anonymity, poor performance)"
msgstr "3 hop tunnel (zeer hoge anonimiteit, slechte prestatie)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:268
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:281
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:271
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:290
msgid "hop tunnel (very poor performance)"
msgstr "hop tunnel (zeer slechte prestatie)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:273
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:286
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:276
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:295
msgid "Variance"
msgstr "Variantie"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:280
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:293
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:283
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:302
msgid "0 hop variance (no randomisation, consistant performance)"
msgstr "0 hop variantie (geen randomisatie, consistente prestatie)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:284
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:297
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:287
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:306
msgid ""
"+ 0-1 hop variance (medium additive randomisation, subtractive performance)"
-msgstr "+ 0-1 hop variantie (gemiddeld toegevoegde randomisatie, minder prestatie)"
+msgstr ""
+"+ 0-1 hop variantie (gemiddeld toegevoegde randomisatie, minder prestatie)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:288
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:301
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:291
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:310
msgid ""
"+ 0-2 hop variance (high additive randomisation, subtractive performance)"
msgstr "+ 0-2 hop variantie (hoge toegevoegde randomisatie, minder prestatie)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:292
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:305
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:295
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:314
msgid "+/- 0-1 hop variance (standard randomisation, standard performance)"
msgstr "+/- 0-1 hop variantie (standaard randomisatie, standaard prestatie)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:296
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:309
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:299
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:318
msgid "+/- 0-2 hop variance (not recommended)"
msgstr "+/- 0-2 hop variantie (niet aanbevolen)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:308
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:321
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:311
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:330
msgid "hop variance"
msgstr "hop variantie"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:313
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:326
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:316
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:335
msgid "Count"
msgstr "Aantal"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:320
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:333
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:323
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:342
msgid "1 inbound, 1 outbound tunnel (low bandwidth usage, less reliability)"
-msgstr "1 inkomende, 1 uitgaande tunnel (laag bandbreedte gebruik, minder betrouwbaar)"
+msgstr ""
+"1 inkomende, 1 uitgaande tunnel (laag bandbreedte gebruik, minder "
+"betrouwbaar)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:324
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:337
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:327
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:346
msgid ""
"2 inbound, 2 outbound tunnels (standard bandwidth usage, standard "
"reliability)"
-msgstr "2 inkomende, 2 uitgaande tunnels (standaard bandbreedte gebruik, standaard betrouwbaarheid)"
+msgstr ""
+"2 inkomende, 2 uitgaande tunnels (standaard bandbreedte gebruik, standaard "
+"betrouwbaarheid)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:328
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:341
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:331
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:350
msgid ""
"3 inbound, 3 outbound tunnels (higher bandwidth usage, higher reliability)"
-msgstr "3 inkomende, 3 uitgaande tunnels (hoge bandbreedte gebruik, hogere betrouwbaarheid)"
+msgstr ""
+"3 inkomende, 3 uitgaande tunnels (hoge bandbreedte gebruik, hogere "
+"betrouwbaarheid)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:337
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:350
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:340
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:359
msgid "tunnels"
msgstr "tunnels"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:342
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:355
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:345
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:364
msgid "Backup Count"
msgstr "Backup Aantal"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:349
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:362
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:352
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:371
msgid "0 backup tunnels (0 redundancy, no added resource usage)"
msgstr "0 backup tunnels (0 redundantie, geen additionele bronnen gebruikt)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:353
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:366
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:356
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:375
msgid "1 backup tunnel each direction (low redundancy, low resource usage)"
-msgstr "1 backup tunnel in beide richting (lage redundantie, lage aantal bronnen gebruikt)"
+msgstr ""
+"1 backup tunnel in beide richting (lage redundantie, lage aantal bronnen "
+"gebruikt)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:357
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:370
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:360
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:379
msgid ""
"2 backup tunnels each direction (medium redundancy, medium resource usage)"
-msgstr "2 backup tunnels in beide richting (gemiddelde redundantie, gemiddeld aantal bronnen gebruikt)"
+msgstr ""
+"2 backup tunnels in beide richting (gemiddelde redundantie, gemiddeld aantal "
+"bronnen gebruikt)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:361
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:374
-msgid "3 backup tunnels each direction (high redundancy, high resource usage)"
-msgstr "3 backup tunnels in beide richting (hoge redundantie, hoog aantal bronnen gebruikt)"
-
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:370
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:364
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:383
+msgid "3 backup tunnels each direction (high redundancy, high resource usage)"
+msgstr ""
+"3 backup tunnels in beide richting (hoge redundantie, hoog aantal bronnen "
+"gebruikt)"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:373
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:392
msgid "backup tunnels"
msgstr "backup tunnels"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:377
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:390
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:380
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:399
msgid "Profile"
msgstr "Profiel"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:384
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:397
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:387
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:406
msgid "interactive connection"
msgstr "interactieve connectie"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:388
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:401
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:391
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:410
msgid "bulk connection (downloads/websites/BT)"
msgstr "bulk connection (downloads/websites/BT)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:390
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:393
msgid "Delay Connect"
msgstr "Vertraagde Connectie"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:394
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:397
msgid "for request/response connections"
msgstr "voor request/response connecties"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:398
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:405
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:401
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:414
msgid "I2CP Options"
msgstr "I2CP Opties"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:400
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:403
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:146
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:407
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:416
msgid "Host"
msgstr "Host"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:404
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:407
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:152
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:411
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:420
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:244
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:266
msgid "Port"
msgstr "Poort"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:410
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:443
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:413
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:452
msgid "Reduce tunnel quantity when idle"
msgstr "Verminder tunnel aantal wanneer in rust"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:412
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:426
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:434
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:446
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:456
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:417
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:433
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:445
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:415
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:429
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:437
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:449
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:459
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:479
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:493
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:426
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:442
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:454
msgid "Enable"
msgstr "Ingeschakeld"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:416
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:449
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:419
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:458
msgid "Reduced tunnel count"
msgstr "Verminder tunnel aantal"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:420
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:440
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:453
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:423
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:443
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:462
msgid "Idle minutes"
msgstr "Rust minuten"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:424
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:427
msgid "Close tunnels when idle"
msgstr "Sluit tunnels wanneer in rust"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:430
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:433
msgid "New Keys on Reopen"
msgstr "Nieuwe Sleutels bij Heropenen"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:438
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:441
msgid "Disable"
msgstr "Uitgeschakeld"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:444
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:447
msgid "Delay tunnel open until required"
msgstr "Vertraag tunnel opening totdat het nodig is"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:454
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:457
msgid "Persistent private key"
msgstr "Persistente private sleutel"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:460
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:463
msgid "File"
msgstr "Bestand"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:464
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:467
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:235
msgid "Local destination"
msgstr "Lokale destination"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:468
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:471
msgid "(if known)"
msgstr "(indien bekend)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:472
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:489
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:477
+msgid "Local Authorization"
+msgstr "Lokale Autorisatie"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:483
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:497
+msgid "Username"
+msgstr "Gebruikersnaam"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:487
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:501
+msgid "Password"
+msgstr "Wachtwoord"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:491
+msgid "Outproxy Authorization"
+msgstr "Uitgaande Proxy Autorisatie"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:507
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:498
msgid "Custom options"
msgstr "Aangepaste opties"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:476
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:493
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:511
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:502
msgid ""
"NOTE: If tunnel is currently running, most changes will not take effect "
"until tunnel is stopped and restarted."
-msgstr "OPMERKING: Indien de tunnel op dit moment draait, zullen de meeste wijzigingen pas effect hebben na het stoppen en herstarten van de tunnel."
+msgstr ""
+"OPMERKING: Indien de tunnel op dit moment draait, zullen de meeste "
+"wijzigingen pas effect hebben na het stoppen en herstarten van de tunnel."
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:478
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:495
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:513
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:504
msgid "Cancel"
msgstr "Annuleer"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:482
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:499
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:517
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:508
msgid "Delete"
msgstr "Verwijder"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:484
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:501
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:519
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:510
msgid "Save"
msgstr "Opslaan"
@@ -494,72 +564,76 @@ msgstr "Private sleutel bestand"
msgid "Add to local addressbook"
msgstr "Toevoegen aan lokaal adresboek"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:415
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:252
+msgid "Hostname Signature"
+msgstr "Hostnaam Handtekening"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:424
msgid "Encrypt Leaseset"
msgstr "Versleutel Leaseset"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:421
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:430
msgid "Encryption Key"
msgstr "Encryptie Sleutel"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:425
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:434
msgid "Generate New Key"
msgstr "Genereer Nieuwe Sleutel"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:427
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:436
msgid "Generate"
msgstr "Genereer"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:429
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:487
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:438
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:496
msgid "(Tunnel must be stopped first)"
msgstr "(Tunnel moet eerst gestopt worden)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:431
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:440
msgid "Restricted Access List"
msgstr "Beperkte Toegangs Lijst"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:437
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:446
msgid "Access List"
msgstr "Toegangs Lijst"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:441
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:450
msgid "(Restrict to these clients only)"
msgstr "(Beperkt tot slechts deze clients)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:457
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:466
msgid "New Certificate type"
msgstr "Nieuw Certificaat type"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:459
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:468
msgid "None"
msgstr "Geen"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:463
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:472
msgid "Hashcash (effort)"
msgstr "Hashcash (effort)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:469
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:478
msgid "Hashcash Calc Time"
msgstr "Hashcash Reken Tijd"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:471
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:480
msgid "Estimate"
msgstr "Inschatten"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:473
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:482
msgid "Hidden"
msgstr "Verborgen"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:477
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:486
msgid "Signed (signed by)"
msgstr "Ondertekend (ondertekend door)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:483
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:492
msgid "Modify Certificate"
msgstr "Wijzig Certificaat"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:485
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:494
msgid "Modify"
msgstr "Wijzig"
@@ -654,12 +728,12 @@ msgid "New server tunnel"
msgstr "Nieuwe server tunnel"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:236
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:368
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:377
msgid "Standard"
msgstr "Standaard"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:238
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:370
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:379
msgid "Create"
msgstr "Creëer"
@@ -676,14 +750,18 @@ msgstr "Interface"
msgid "Standby"
msgstr "Stand-by"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:346
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:344
msgid "Outproxy"
msgstr "Uitgaande proxy"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:350
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:348
msgid "Destination"
msgstr "Destination"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:366
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:362
+msgid "none"
+msgstr "geen"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:375
msgid "New client tunnel"
msgstr "Nieuwe client tunnel"
diff --git a/apps/i2ptunnel/locale/messages_ru.po b/apps/i2ptunnel/locale/messages_ru.po
index aa5296772..718e82e9f 100644
--- a/apps/i2ptunnel/locale/messages_ru.po
+++ b/apps/i2ptunnel/locale/messages_ru.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: I2P i2ptunnel\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-11-13 22:04+0000\n"
-"PO-Revision-Date: 2010-11-14 19:56+0500\n"
+"POT-Creation-Date: 2010-12-13 19:43+0000\n"
+"PO-Revision-Date: 2010-12-14 00:54+0500\n"
"Last-Translator: Hidden Z \n"
"Language-Team: foo \n"
"Language: \n"
@@ -18,64 +18,82 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Russian\n"
-#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:492
+#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:475
#, java-format
msgid "To visit the destination in your host database, click here. To visit the conflicting addresshelper destination, click here."
msgstr "Для перехода по ссылке из локальной адресной книги, нажмите здесь. Для перехода по новой addresshelper-ссылке, нажмите здесь."
-#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:917
+#: ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java:932
msgid "Click a link below to look for an address helper by using a \"jump\" service:"
msgstr "Jump-сервисы, которые, возможно, знают нужную Вам addresshelper-ссылку:"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:382
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:170
+msgid "Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit."
+msgstr "Неправильно переданная форма, возможно вы использовали действие браузера \"назад\" или \"обновить\". Пожалуйста повторите попытку."
+
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:217
+msgid "Configuration reloaded for all tunnels"
+msgstr "Конфигурация для всех туннелей перечитана"
+
+#. and give them something to look at in any case
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:229
+msgid "Starting tunnel"
+msgstr "Запуск туннеля"
+
+#. and give them something to look at in any case
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:242
+msgid "Stopping tunnel"
+msgstr "Остановка туннеля"
+
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:389
msgid "New Tunnel"
msgstr "Новый туннель"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:402
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:409
msgid "Standard client"
msgstr "Обычный клиент"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:403
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:410
msgid "HTTP client"
msgstr "HTTP-клиент"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:404
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:411
msgid "IRC client"
msgstr "IRC-клиент"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:405
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:412
msgid "Standard server"
msgstr "Обычный сервер"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:406
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:413
msgid "HTTP server"
msgstr "HTTP-сервер"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:407
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:414
msgid "SOCKS 4/4a/5 proxy"
msgstr "SOCKS 4/4a/5 прокси"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:408
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:415
msgid "SOCKS IRC proxy"
msgstr "SOCKS IRC прокси"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:409
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:416
msgid "CONNECT/SSL/HTTPS proxy"
msgstr "CONNECT/SSL/HTTPS прокси"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:410
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:417
msgid "IRC server"
msgstr "IRC-сервер"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:411
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:418
msgid "Streamr client"
msgstr "Streamr-клиент"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:412
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:419
msgid "Streamr server"
msgstr "Streamr-сервер"
-#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:413
+#: ../java/src/net/i2p/i2ptunnel/web/IndexBean.java:420
msgid "HTTP bidir"
msgstr "HTTP bidir (экспериментальный двунаправленный режим, инструкцию спрашивайте у sponge)"
@@ -110,7 +128,7 @@ msgstr "Тип"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:120
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:120
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:226
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:358
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:367
msgid "Description"
msgstr "Описание"
@@ -380,6 +398,8 @@ msgstr "Снижать количество туннелей при просто
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:437
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:449
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:459
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:479
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:493
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:426
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:442
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:454
@@ -430,27 +450,45 @@ msgstr "Локальный адрес назначения"
msgid "(if known)"
msgstr "(если известен)"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:475
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:477
+msgid "Local Authorization"
+msgstr "Локальная авторизация"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:483
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:497
+msgid "Username"
+msgstr "Имя пользователя"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:487
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:501
+msgid "Password"
+msgstr "Пароль"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:491
+msgid "Outproxy Authorization"
+msgstr "Авторизация outproxy"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:507
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:498
msgid "Custom options"
msgstr "Дополнительные параметры"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:479
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:511
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:502
msgid "NOTE: If tunnel is currently running, most changes will not take effect until tunnel is stopped and restarted."
msgstr "ПРИМЕЧАНИЕ: для вступления в силу измененных настроек потребуется остановка и перезапуск туннеля"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:481
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:513
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:504
msgid "Cancel"
msgstr "Отмена"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:485
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:517
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:508
msgid "Delete"
msgstr "Удалить"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:487
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editClient_jsp.java:519
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/editServer_jsp.java:510
msgid "Save"
msgstr "Сохранить"
@@ -647,12 +685,12 @@ msgid "New server tunnel"
msgstr "Новый серверный туннель"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:236
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:368
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:377
msgid "Standard"
msgstr "Стандартный"
#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:238
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:370
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:379
msgid "Create"
msgstr "Создать"
@@ -670,15 +708,19 @@ msgid "Standby"
msgstr "Режим ожидания"
# This term intentionally left in English
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:346
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:344
msgid "Outproxy"
msgstr "Outproxy"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:350
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:348
msgid "Destination"
msgstr "Адрес назначения"
-#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:366
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:362
+msgid "none"
+msgstr "нет"
+
+#: ../jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/index_jsp.java:375
msgid "New client tunnel"
msgstr "Новый клиентский туннель"
diff --git a/apps/jetty/java/src/org/mortbay/http/handler/ResourceHandler.java b/apps/jetty/java/src/org/mortbay/http/handler/ResourceHandler.java
new file mode 100644
index 000000000..5515df226
--- /dev/null
+++ b/apps/jetty/java/src/org/mortbay/http/handler/ResourceHandler.java
@@ -0,0 +1,809 @@
+// ========================================================================
+// $Id: ResourceHandler.java,v 1.66 2005/08/24 08:18:17 gregwilkins Exp $
+// Copyright 199-2004 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.
+// ========================================================================
+
+package org.mortbay.http.handler;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Enumeration;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.mortbay.log.LogFactory;
+import org.mortbay.http.HttpException;
+import org.mortbay.http.HttpFields;
+import org.mortbay.http.HttpRequest;
+import org.mortbay.http.HttpResponse;
+import org.mortbay.http.InclusiveByteRange;
+import org.mortbay.http.MultiPartResponse;
+import org.mortbay.http.ResourceCache;
+import org.mortbay.util.CachedResource;
+import org.mortbay.util.IO;
+import org.mortbay.util.LogSupport;
+import org.mortbay.util.Resource;
+import org.mortbay.util.StringMap;
+import org.mortbay.util.TypeUtil;
+import org.mortbay.util.URI;
+
+/* ------------------------------------------------------------ */
+/** Handler to serve files and resources.
+ * Serves files from a given resource URL base and implements
+ * the GET, HEAD, DELETE, OPTIONS, PUT, MOVE methods and the
+ * IfModifiedSince and IfUnmodifiedSince header fields.
+ * A simple memory cache is also provided to reduce file I/O.
+ * HTTP/1.1 ranges are supported.
+ *
+ * @version $Id: ResourceHandler.java,v 1.66 2005/08/24 08:18:17 gregwilkins Exp $
+ * @author Nuno Preguia
+ * @author Greg Wilkins
+ */
+public class ResourceHandler extends AbstractHttpHandler
+{
+ private static Log log = LogFactory.getLog(ResourceHandler.class);
+
+ /* ----------------------------------------------------------------- */
+ private boolean _acceptRanges=true;
+ private boolean _redirectWelcomeFiles ;
+ private String[] _methods=null;
+ private String _allowed;
+ private boolean _dirAllowed=true;
+ private int _minGzipLength =-1;
+ private StringMap _methodMap = new StringMap();
+ {
+ setAllowedMethods(new String[]
+ {
+ HttpRequest.__GET,
+ HttpRequest.__POST,
+ HttpRequest.__HEAD,
+ HttpRequest.__OPTIONS,
+ HttpRequest.__TRACE
+ });
+ }
+
+ /* ----------------------------------------------------------------- */
+ /** Construct a ResourceHandler.
+ */
+ public ResourceHandler()
+ {}
+
+
+ /* ----------------------------------------------------------------- */
+ public synchronized void start()
+ throws Exception
+ {
+ super.start();
+ }
+
+ /* ----------------------------------------------------------------- */
+ public void stop()
+ throws InterruptedException
+ {
+ super.stop();
+ }
+
+ /* ------------------------------------------------------------ */
+ public String[] getAllowedMethods()
+ {
+ return _methods;
+ }
+
+ /* ------------------------------------------------------------ */
+ public void setAllowedMethods(String[] methods)
+ {
+ StringBuffer b = new StringBuffer();
+ _methods=methods;
+ _methodMap.clear();
+ for (int i=0;i0)
+ b.append(',');
+ b.append(methods[i]);
+ }
+ _allowed=b.toString();
+ }
+
+ /* ------------------------------------------------------------ */
+ public boolean isMethodAllowed(String method)
+ {
+ return _methodMap.get(method)!=null;
+ }
+
+ /* ------------------------------------------------------------ */
+ public String getAllowedString()
+ {
+ return _allowed;
+ }
+
+ /* ------------------------------------------------------------ */
+ public boolean isDirAllowed()
+ {
+ return _dirAllowed;
+ }
+
+ /* ------------------------------------------------------------ */
+ public void setDirAllowed(boolean dirAllowed)
+ {
+ _dirAllowed = dirAllowed;
+ }
+
+ /* ------------------------------------------------------------ */
+ public boolean isAcceptRanges()
+ {
+ return _acceptRanges;
+ }
+
+ /* ------------------------------------------------------------ */
+ /**
+ * @return True if welcome files are redirected to. False if forward is used.
+ */
+ public boolean getRedirectWelcome()
+ {
+ return _redirectWelcomeFiles;
+ }
+
+ /* ------------------------------------------------------------ */
+ /**
+ * @param redirectWelcome True if welcome files are redirected to. False
+ * if forward is used.
+ */
+ public void setRedirectWelcome(boolean redirectWelcome)
+ {
+ _redirectWelcomeFiles = redirectWelcome;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Set if the handler accepts range requests.
+ * Default is false;
+ * @param ar True if the handler should accept ranges
+ */
+ public void setAcceptRanges(boolean ar)
+ {
+ _acceptRanges=ar;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get minimum content length for GZIP encoding.
+ * @return Minimum length of content for gzip encoding or -1 if disabled.
+ */
+ public int getMinGzipLength()
+ {
+ return _minGzipLength;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Set minimum content length for GZIP encoding.
+ * @param minGzipLength If set to a positive integer, then static content
+ * larger than this will be served as gzip content encoded
+ * if a matching resource is found ending with ".gz"
+ */
+ public void setMinGzipLength(int minGzipLength)
+ {
+ _minGzipLength = minGzipLength;
+ }
+
+
+ /* ------------------------------------------------------------ */
+ /** get Resource to serve.
+ * Map a path to a resource. The default implementation calls
+ * HttpContext.getResource but derived handers may provide
+ * their own mapping.
+ * @param pathInContext The path to find a resource for.
+ * @return The resource to serve.
+ */
+ protected Resource getResource(String pathInContext)
+ throws IOException
+ {
+ return getHttpContext().getResource(pathInContext);
+ }
+
+ /* ------------------------------------------------------------ */
+ public void handle(String pathInContext,
+ String pathParams,
+ HttpRequest request,
+ HttpResponse response)
+ throws HttpException, IOException
+ {
+ Resource resource = getResource(pathInContext);
+ if (resource==null)
+ return;
+
+ // Is the method allowed?
+ if (!isMethodAllowed(request.getMethod()))
+ {
+ if(log.isDebugEnabled())log.debug("Method not allowed: "+request.getMethod());
+ if (resource.exists())
+ {
+ setAllowHeader(response);
+ response.sendError(HttpResponse.__405_Method_Not_Allowed);
+ }
+ return;
+ }
+
+ // Handle the request
+ try
+ {
+ if(log.isDebugEnabled())log.debug("PATH="+pathInContext+" RESOURCE="+resource);
+
+ // check filename
+ String method=request.getMethod();
+ if (method.equals(HttpRequest.__GET) ||
+ method.equals(HttpRequest.__POST) ||
+ method.equals(HttpRequest.__HEAD))
+ handleGet(request, response, pathInContext, pathParams, resource);
+ else if (method.equals(HttpRequest.__PUT))
+ handlePut(request, response, pathInContext, resource);
+ else if (method.equals(HttpRequest.__DELETE))
+ handleDelete(request, response, pathInContext, resource);
+ else if (method.equals(HttpRequest.__OPTIONS))
+ handleOptions(response, pathInContext);
+ else if (method.equals(HttpRequest.__MOVE))
+ handleMove(request, response, pathInContext, resource);
+ else if (method.equals(HttpRequest.__TRACE))
+ handleTrace(request, response);
+ else
+ {
+ if(log.isDebugEnabled())log.debug("Unknown action:"+method);
+ // anything else...
+ try{
+ if (resource.exists())
+ response.sendError(HttpResponse.__501_Not_Implemented);
+ }
+ catch(Exception e) {LogSupport.ignore(log,e);}
+ }
+ }
+ catch(IllegalArgumentException e)
+ {
+ LogSupport.ignore(log,e);
+ }
+ finally
+ {
+ if (resource!=null && !(resource instanceof CachedResource))
+ resource.release();
+ }
+ }
+
+ /* ------------------------------------------------------------------- */
+ public void handleGet(HttpRequest request,
+ HttpResponse response,
+ String pathInContext,
+ String pathParams,
+ Resource resource)
+ throws IOException
+ {
+ if(log.isDebugEnabled())log.debug("Looking for "+resource);
+
+ if (resource!=null && resource.exists())
+ {
+ // check if directory
+ if (resource.isDirectory())
+ {
+ if (!pathInContext.endsWith("/") && !pathInContext.equals("/"))
+ {
+ log.debug("Redirect to directory/");
+
+ String q=request.getQuery();
+
+ // Properly fix URI
+ URI urifix = new URI(request.getRequestURL().toString());
+ urifix.setPath(urifix.getPath());
+ StringBuffer buf = new StringBuffer(urifix.toString());
+ urifix = null;
+
+ if (q!=null&&q.length()!=0)
+ {
+ buf.append('?');
+ buf.append(q);
+ }
+ response.setField(HttpFields.__Location, URI.addPaths(buf.toString(),"/"));
+ response.setStatus(302);
+ request.setHandled(true);
+ return;
+ }
+
+ // See if index file exists
+ String welcome=getHttpContext().getWelcomeFile(resource);
+ if (welcome!=null)
+ {
+ // Forward to the index
+ String ipath=URI.addPaths(pathInContext,welcome);
+ if (_redirectWelcomeFiles)
+ {
+ // Redirect to the index
+ ipath=URI.addPaths(getHttpContext().getContextPath(),ipath);
+ response.setContentLength(0);
+ response.sendRedirect(ipath);
+ }
+ else
+ {
+ URI uri=request.getURI();
+ uri.setPath(URI.addPaths(uri.getPath(),welcome));
+ getHttpContext().handle(ipath,pathParams,request,response);
+ }
+ return;
+ }
+
+ // Check modified dates
+ if (!passConditionalHeaders(request,response,resource))
+ return;
+ // If we got here, no forward to index took place
+ sendDirectory(request,response,resource,pathInContext.length()>1);
+ }
+ // check if it is a file
+ else if (resource.exists())
+ {
+ // Check modified dates
+ if (!passConditionalHeaders(request,response,resource))
+ return;
+ sendData(request,response,pathInContext,resource,true);
+ }
+ else
+ // don't know what it is
+ log.warn("Unknown file type");
+ }
+ }
+
+
+ /* ------------------------------------------------------------ */
+ /* Check modification date headers.
+ */
+ private boolean passConditionalHeaders(HttpRequest request,
+ HttpResponse response,
+ Resource resource)
+ throws IOException
+ {
+ if (!request.getMethod().equals(HttpRequest.__HEAD))
+ {
+ // If we have meta data for the file
+ // Try a direct match for most common requests. Avoids
+ // parsing the date.
+ ResourceCache.ResourceMetaData metaData =
+ (ResourceCache.ResourceMetaData)resource.getAssociate();
+ if (metaData!=null)
+ {
+ String ifms=request.getField(HttpFields.__IfModifiedSince);
+ String mdlm=metaData.getLastModified();
+ if (ifms!=null && mdlm!=null && ifms.equals(mdlm))
+ {
+ response.setStatus(HttpResponse.__304_Not_Modified);
+ request.setHandled(true);
+ return false;
+ }
+ }
+
+
+ long date=0;
+ // Parse the if[un]modified dates and compare to resource
+
+ if ((date=request.getDateField(HttpFields.__IfUnmodifiedSince))>0)
+ {
+ if (resource.lastModified()/1000 > date/1000)
+ {
+ response.sendError(HttpResponse.__412_Precondition_Failed);
+ return false;
+ }
+ }
+
+ if ((date=request.getDateField(HttpFields.__IfModifiedSince))>0)
+ {
+
+ if (resource.lastModified()/1000 <= date/1000)
+ {
+ response.setStatus(HttpResponse.__304_Not_Modified);
+ request.setHandled(true);
+ return false;
+ }
+ }
+
+ }
+ return true;
+ }
+
+
+ /* ------------------------------------------------------------ */
+ void handlePut(HttpRequest request,
+ HttpResponse response,
+ String pathInContext,
+ Resource resource)
+ throws IOException
+ {
+ if(log.isDebugEnabled())log.debug("PUT "+pathInContext+" in "+resource);
+
+ boolean exists=resource!=null && resource.exists();
+ if (exists &&
+ !passConditionalHeaders(request,response,resource))
+ return;
+
+ if (pathInContext.endsWith("/"))
+ {
+ if (!exists)
+ {
+ if (!resource.getFile().mkdirs())
+ response.sendError(HttpResponse.__403_Forbidden, "Directories could not be created");
+ else
+ {
+ request.setHandled(true);
+ response.setStatus(HttpResponse.__201_Created);
+ response.commit();
+ }
+ }
+ else
+ {
+ request.setHandled(true);
+ response.setStatus(HttpResponse.__200_OK);
+ response.commit();
+ }
+ }
+ else
+ {
+ try
+ {
+ int toRead = request.getContentLength();
+ InputStream in = request.getInputStream();
+ OutputStream out = resource.getOutputStream();
+ if (toRead>=0)
+ IO.copy(in,out,toRead);
+ else
+ IO.copy(in,out);
+ out.close();
+ request.setHandled(true);
+ response.setStatus(exists
+ ?HttpResponse.__200_OK
+ :HttpResponse.__201_Created);
+ response.commit();
+ }
+ catch (Exception ex)
+ {
+ log.warn(LogSupport.EXCEPTION,ex);
+ response.sendError(HttpResponse.__403_Forbidden,
+ ex.getMessage());
+ }
+ }
+ }
+
+ /* ------------------------------------------------------------ */
+ void handleDelete(HttpRequest request,
+ HttpResponse response,
+ String pathInContext,
+ Resource resource)
+ throws IOException
+ {
+ if(log.isDebugEnabled())log.debug("DELETE "+pathInContext+" from "+resource);
+
+ if (!resource.exists() ||
+ !passConditionalHeaders(request,response,resource))
+ return;
+
+ try
+ {
+ // delete the file
+ if (resource.delete())
+ response.setStatus(HttpResponse.__204_No_Content);
+ else
+ response.sendError(HttpResponse.__403_Forbidden);
+
+ // Send response
+ request.setHandled(true);
+ }
+ catch (SecurityException sex)
+ {
+ log.warn(LogSupport.EXCEPTION,sex);
+ response.sendError(HttpResponse.__403_Forbidden, sex.getMessage());
+ }
+ }
+
+
+ /* ------------------------------------------------------------ */
+ void handleMove(HttpRequest request,
+ HttpResponse response,
+ String pathInContext,
+ Resource resource)
+ throws IOException
+ {
+ if (!resource.exists() || !passConditionalHeaders(request,response,resource))
+ return;
+
+
+ String newPath = URI.canonicalPath(request.getField("New-uri"));
+ if (newPath==null)
+ {
+ response.sendError(HttpResponse.__405_Method_Not_Allowed,
+ "Bad new uri");
+ return;
+ }
+
+ String contextPath = getHttpContext().getContextPath();
+ if (contextPath!=null && !newPath.startsWith(contextPath))
+ {
+ response.sendError(HttpResponse.__405_Method_Not_Allowed,
+ "Not in context");
+ return;
+ }
+
+
+ // Find path
+ try
+ {
+ // TODO - Check this
+ String newInfo=newPath;
+ if (contextPath!=null)
+ newInfo=newInfo.substring(contextPath.length());
+ Resource newFile = getHttpContext().getBaseResource().addPath(newInfo);
+
+ if(log.isDebugEnabled())log.debug("Moving "+resource+" to "+newFile);
+ resource.renameTo(newFile);
+
+ response.setStatus(HttpResponse.__204_No_Content);
+ request.setHandled(true);
+ }
+ catch (Exception ex)
+ {
+ log.warn(LogSupport.EXCEPTION,ex);
+ setAllowHeader(response);
+ response.sendError(HttpResponse.__405_Method_Not_Allowed,
+ "Error:"+ex);
+ return;
+ }
+ }
+
+ /* ------------------------------------------------------------ */
+ void handleOptions(HttpResponse response, String pathInContext)
+ throws IOException
+ {
+ if ("*".equals(pathInContext))
+ return;
+ setAllowHeader(response);
+ response.commit();
+ }
+
+ /* ------------------------------------------------------------ */
+ void setAllowHeader(HttpResponse response)
+ {
+ response.setField(HttpFields.__Allow, getAllowedString());
+ }
+
+ /* ------------------------------------------------------------ */
+ public void writeHeaders(HttpResponse response,Resource resource, long count)
+ throws IOException
+ {
+ ResourceCache.ResourceMetaData metaData =
+ (ResourceCache.ResourceMetaData)resource.getAssociate();
+
+ response.setContentType(metaData.getMimeType());
+ if (count != -1)
+ {
+ if (count==resource.length())
+ response.setField(HttpFields.__ContentLength,metaData.getLength());
+ else
+ response.setContentLength((int)count);
+ }
+
+ response.setField(HttpFields.__LastModified,metaData.getLastModified());
+
+ if (_acceptRanges && response.getHttpRequest().getDotVersion()>0)
+ response.setField(HttpFields.__AcceptRanges,"bytes");
+ }
+
+ /* ------------------------------------------------------------ */
+ public void sendData(HttpRequest request,
+ HttpResponse response,
+ String pathInContext,
+ Resource resource,
+ boolean writeHeaders)
+ throws IOException
+ {
+ long resLength=resource.length();
+
+ // see if there are any range headers
+ Enumeration reqRanges =
+ request.getDotVersion()>0
+ ?request.getFieldValues(HttpFields.__Range)
+ :null;
+
+ if (!writeHeaders || reqRanges == null || !reqRanges.hasMoreElements())
+ {
+ // look for a gziped content.
+ Resource data=resource;
+ if (_minGzipLength>0)
+ {
+ String accept=request.getField(HttpFields.__AcceptEncoding);
+ if (accept!=null && resLength>_minGzipLength &&
+ !pathInContext.endsWith(".gz"))
+ {
+ Resource gz = getHttpContext().getResource(pathInContext+".gz");
+ if (gz.exists() && accept.indexOf("gzip")>=0)
+ {
+ if(log.isDebugEnabled())log.debug("gzip="+gz);
+ response.setField(HttpFields.__ContentEncoding,"gzip");
+ data=gz;
+ resLength=data.length();
+ }
+ }
+ }
+ writeHeaders(response,resource,resLength);
+
+ request.setHandled(true);
+ OutputStream out = response.getOutputStream();
+ data.writeTo(out,0,resLength);
+ return;
+ }
+
+ // Parse the satisfiable ranges
+ List ranges =InclusiveByteRange.satisfiableRanges(reqRanges,resLength);
+ if(log.isDebugEnabled())log.debug("ranges: " + reqRanges + " == " + ranges);
+
+ // if there are no satisfiable ranges, send 416 response
+ if (ranges==null || ranges.size()==0)
+ {
+ log.debug("no satisfiable ranges");
+ writeHeaders(response, resource, resLength);
+ response.setStatus(HttpResponse.__416_Requested_Range_Not_Satisfiable);
+ response.setReason((String)HttpResponse.__statusMsg
+ .get(TypeUtil.newInteger(HttpResponse.__416_Requested_Range_Not_Satisfiable)));
+
+ response.setField(HttpFields.__ContentRange,
+ InclusiveByteRange.to416HeaderRangeString(resLength));
+
+ OutputStream out = response.getOutputStream();
+ resource.writeTo(out,0,resLength);
+ request.setHandled(true);
+ return;
+ }
+
+
+ // if there is only a single valid range (must be satisfiable
+ // since were here now), send that range with a 216 response
+ if ( ranges.size()== 1)
+ {
+ InclusiveByteRange singleSatisfiableRange =
+ (InclusiveByteRange)ranges.get(0);
+ if(log.isDebugEnabled())log.debug("single satisfiable range: " + singleSatisfiableRange);
+ long singleLength = singleSatisfiableRange.getSize(resLength);
+ writeHeaders(response,resource,singleLength);
+ response.setStatus(HttpResponse.__206_Partial_Content);
+ response.setReason((String)HttpResponse.__statusMsg
+ .get(TypeUtil.newInteger(HttpResponse.__206_Partial_Content)));
+ response.setField(HttpFields.__ContentRange,
+ singleSatisfiableRange.toHeaderRangeString(resLength));
+ OutputStream out = response.getOutputStream();
+ resource.writeTo(out,
+ singleSatisfiableRange.getFirst(resLength),
+ singleLength);
+ request.setHandled(true);
+ return;
+ }
+
+
+ // multiple non-overlapping valid ranges cause a multipart
+ // 216 response which does not require an overall
+ // content-length header
+ //
+ ResourceCache.ResourceMetaData metaData =
+ (ResourceCache.ResourceMetaData)resource.getAssociate();
+ String encoding = metaData.getMimeType();
+ MultiPartResponse multi = new MultiPartResponse(response);
+ response.setStatus(HttpResponse.__206_Partial_Content);
+ response.setReason((String)HttpResponse.__statusMsg
+ .get(TypeUtil.newInteger(HttpResponse.__206_Partial_Content)));
+
+ // If the request has a "Request-Range" header then we need to
+ // send an old style multipart/x-byteranges Content-Type. This
+ // keeps Netscape and acrobat happy. This is what Apache does.
+ String ctp;
+ if (request.containsField(HttpFields.__RequestRange))
+ ctp = "multipart/x-byteranges; boundary=";
+ else
+ ctp = "multipart/byteranges; boundary=";
+ response.setContentType(ctp+multi.getBoundary());
+
+ InputStream in=(resource instanceof CachedResource)
+ ?null:resource.getInputStream();
+ OutputStream out = response.getOutputStream();
+ long pos=0;
+
+ for (int i=0;i");
buf.append(StringUtil.replace(StringUtil.replace(ls[i],"<","<"),">",">"));
- buf.append(" ");
+ buf.append(" ");
buf.append("
");
buf.append(item.length());
buf.append(" bytes
");
diff --git a/apps/jetty/java/src/org/mortbay/util/URI.java b/apps/jetty/java/src/org/mortbay/util/URI.java
new file mode 100644
index 000000000..867ef19f4
--- /dev/null
+++ b/apps/jetty/java/src/org/mortbay/util/URI.java
@@ -0,0 +1,1010 @@
+// ========================================================================
+// $Id: URI.java,v 1.40 2009/05/16 02:02:00 gregwilkins Exp $
+// Copyright 199-2004 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.
+// ========================================================================
+package org.mortbay.util;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.mortbay.log.LogFactory;
+
+/* ------------------------------------------------------------ */
+/** URI Holder.
+ * This class assists with the decoding and encoding or HTTP URI's.
+ * It differs from the java.net.URL class as it does not provide
+ * communications ability, but it does assist with query string
+ * formatting.
+ *
ISO_8859_1 encoding is used by default for % encoded characters. This
+ * may be overridden with the org.mortbay.util.URI.charset system property.
+ * @see UrlEncoded
+ * @version $Id: URI.java,v 1.40 2009/05/16 02:02:00 gregwilkins Exp $
+ * @author Greg Wilkins (gregw)
+ */
+public class URI
+ implements Cloneable
+{
+ private static Log log = LogFactory.getLog(URI.class);
+
+ public static final String __CHARSET=System.getProperty("org.mortbay.util.URI.charset",StringUtil.__UTF_8);
+ public static final boolean __CHARSET_IS_DEFAULT=__CHARSET.equals(StringUtil.__UTF_8);
+
+ /* ------------------------------------------------------------ */
+ private String _uri;
+ private String _scheme;
+ private String _host;
+ private int _port;
+ private String _path;
+ private String _encodedPath;
+ private String _query;
+ private UrlEncoded _parameters;
+ private boolean _dirty;
+ private static String unreserved = "/0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.~";
+ private static String reserved = "!*'();:@&=+$,?%#[]";
+ private static String hexchars = "0123456789ABCDEF";
+
+ /* ------------------------------------------------------------ */
+ /** Copy Constructor .
+ * @param uri
+ */
+ public URI(URI uri)
+ throws IllegalArgumentException
+ {
+ _uri=uri.toString();
+ _scheme=uri._scheme;
+ _host=uri._host;
+ _port=uri._port;
+ _path=uri._path;
+ _encodedPath=uri._encodedPath;
+ _query=uri._query;
+ if (uri._parameters!=null)
+ _parameters=(UrlEncoded)uri._parameters.clone();
+ _dirty=false;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Construct from a String.
+ * The string must contain a URI path, but optionaly may contain a
+ * scheme, host, port and query string.
+ *
+ * @param uri [scheme://host[:port]]/path[?query]
+ */
+ public URI(String uri)
+ throws IllegalArgumentException
+ {
+ setURI(uri);
+ }
+
+ /* ------------------------------------------------------------ */
+ public void setURI(String uri)
+ throws IllegalArgumentException
+ {
+ try
+ {
+ _uri=uri;
+ _scheme=null;
+ _host=null;
+ _port=0;
+ _path=null;
+ _encodedPath=null;
+ _query=null;
+ if (_parameters!=null)
+ _parameters.clear();
+
+ // Scan _uri for host, port, path & query
+ int maxi=uri.length()-1;
+ int mark=0;
+ int state=0;
+ int i=0;
+
+ if (maxi==0 || uri.charAt(0)=='/' && uri.charAt(1)!='/')
+ {
+ state=3;
+ _scheme=null;
+ _host=null;
+ _port=0;
+ }
+ else
+ {
+ for (i=0;state<3 && i<=maxi;i++)
+ {
+ char c=uri.charAt(i);
+ switch(state)
+ {
+ case 0: // looking for scheme or path
+ if (c==':' &&
+ uri.charAt(i+1)=='/' &&
+ uri.charAt(i+2)=='/')
+ {
+ // found end of scheme & start of host
+ _scheme=uri.substring(mark,i);
+ i+=2;
+ mark=i+1;
+ state=1;
+ }
+ else if (i==0 && c=='/')
+ {
+ // Found path
+ state=3;
+ }
+ else if (i==0 && c=='*')
+ {
+ state=5;
+ _path="*";
+ _encodedPath="*";
+ }
+ continue;
+
+ case 1: // Get host & look for port or path
+ if (c==':')
+ {
+ // found port
+ _host=uri.substring(mark,i);
+ mark=i+1;
+ state=2;
+ }
+ else if (c=='/')
+ {
+ // found path
+ _host=uri.substring(mark,i);
+ mark=i;
+ state=3;
+ }
+ continue;
+
+ case 2: // Get port & look for path
+ if (c=='/')
+ {
+ _port=TypeUtil.parseInt(uri,mark,i-mark,10);
+ mark=i;
+ state=3;
+ }
+ continue;
+ }
+ }
+ }
+
+ // State 3 - Get path & look for query
+ _query=null;
+ for (i++;i<=maxi;i++)
+ {
+ char c=uri.charAt(i);
+ if (c=='?')
+ {
+ // Found query
+ _encodedPath=uri.substring(mark,i);
+ _path=decodePath(_encodedPath);
+
+ mark=i+1;
+ state=4;
+ break;
+ }
+ }
+
+ // complete last state
+ switch(state)
+ {
+ case 0:
+ _dirty=false;
+ _encodedPath=_uri;
+ _path=decodePath(_encodedPath);
+ break;
+
+ case 1:
+ _dirty=true;
+ _encodedPath="/";
+ _path=_encodedPath;
+ _host=uri.substring(mark);
+ break;
+
+ case 2:
+ _dirty=true;
+ _encodedPath="/";
+ _path=_encodedPath;
+ _port=TypeUtil.parseInt(uri,mark,-1,10);
+ break;
+ case 3:
+ _dirty=(mark==maxi);
+ _encodedPath=uri.substring(mark);
+ _path=decodePath(_encodedPath);
+ break;
+
+ case 4:
+ _dirty=false;
+ if (mark<=maxi)
+ _query=uri.substring(mark);
+ break;
+
+ case 5:
+ _dirty=false;
+ }
+
+ if (_query!=null && _query.length()>0)
+ {
+ if (_parameters==null)
+ _parameters= new UrlEncoded();
+ else
+ _parameters.clear();
+ _parameters.decode(_query,__CHARSET);
+
+ }
+ else
+ _query=null;
+ }
+ catch (Exception e)
+ {
+ LogSupport.ignore(log,e);
+ throw new IllegalArgumentException("Malformed URI '"+uri+
+ "' : "+e.toString());
+ }
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Is the URI an absolute URL?
+ * @return True if the URI has a scheme or host
+ */
+ public boolean isAbsolute()
+ {
+ return _scheme!=null || _host!=null;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get the uri scheme.
+ * @return the URI scheme
+ */
+ public String getScheme()
+ {
+ return _scheme;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Set the uri scheme.
+ * @param scheme the uri scheme
+ */
+ public void setScheme(String scheme)
+ {
+ _scheme=scheme;
+ _dirty=true;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get the uri host.
+ * @return the URI host
+ */
+ public String getHost()
+ {
+ return _host;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Set the uri host.
+ * @param host the uri host
+ */
+ public void setHost(String host)
+ {
+ _host=host;
+ _dirty=true;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get the uri port.
+ * @return the URI port
+ */
+ public int getPort()
+ {
+ return _port;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Set the uri port.
+ * A port of 0 implies use the default port.
+ * @param port the uri port
+ */
+ public void setPort(int port)
+ {
+ _port=port;
+ _dirty=true;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get the uri path.
+ * @return the URI path
+ */
+ public String getPath()
+ {
+ return _path;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get the encoded uri path.
+ * @return the URI path
+ */
+ public String getEncodedPath()
+ {
+ return _encodedPath;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Set the uri path.
+ * @param path the URI path
+ */
+ public void setPath(String path)
+ {
+ _path=path;
+ _encodedPath=encodePath(_path);
+ _dirty=true;
+ }
+
+
+ /* ------------------------------------------------------------ */
+ /** Get the uri query String.
+ * @return the URI query string
+ */
+ public String getQuery()
+ {
+ if (_dirty && _parameters!=null)
+ {
+ _query = _parameters.encode(__CHARSET);
+ if (_query!=null && _query.length()==0)
+ _query=null;
+ }
+ return _query;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Set the uri query String.
+ * @param query the URI query string
+ */
+ public void setQuery(String query)
+ {
+ _query=query;
+
+ if (_parameters!=null)
+ _parameters.clear();
+ else if (query!=null)
+ _parameters=new UrlEncoded();
+
+ if (query!=null)
+ _parameters.decode(query,__CHARSET);
+
+ cleanURI();
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get the uri query _parameters names.
+ * @return Unmodifiable set of URI query _parameters names
+ */
+ public Set getParameterNames()
+ {
+ if (_parameters==null)
+ return Collections.EMPTY_SET;
+ return _parameters.keySet();
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get the uri query _parameters.
+ * @return the URI query _parameters
+ */
+ public MultiMap getParameters()
+ {
+ if (_parameters==null)
+ _parameters=new UrlEncoded();
+ _dirty=true;
+ return _parameters;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get the uri query _parameters.
+ * @return the URI query _parameters in an unmodifiable map.
+ */
+ public Map getUnmodifiableParameters()
+ {
+ if (_parameters==null)
+ return Collections.EMPTY_MAP;
+ return Collections.unmodifiableMap(_parameters);
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Add the uri query _parameters to a MultiMap
+ */
+ public void putParametersTo(MultiMap map)
+ {
+ if (_parameters!=null && _parameters.size()>0)
+ map.putAll(_parameters);
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Clear the URI _parameters.
+ */
+ public void clearParameters()
+ {
+ if (_parameters!=null)
+ {
+ _dirty=true;
+ _parameters.clear();
+ }
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Add encoded _parameters.
+ * @param encoded A HTTP encoded string of _parameters: e.g.. "a=1&b=2"
+ */
+ public void put(String encoded)
+ {
+ UrlEncoded params = new UrlEncoded(encoded);
+ put(params);
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Add name value pair to the uri query _parameters.
+ * @param name name of value
+ * @param value The value, which may be a multi valued list or
+ * String array.
+ */
+ public Object put(Object name, Object value)
+ {
+ return getParameters().put(name,value);
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Add dictionary to the uri query _parameters.
+ */
+ public void put(Map values)
+ {
+ getParameters().putAll(values);
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get named value
+ */
+ public String get(String name)
+ {
+ if (_parameters==null)
+ return null;
+ return (String)_parameters.get(name);
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Get named multiple values.
+ * @param name The parameter name
+ * @return Umodifiable list of values or null
+ */
+ public List getValues(String name)
+ {
+ if (_parameters==null)
+ return null;
+ return _parameters.getValues(name);
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Remove named value
+ */
+ public void remove(String name)
+ {
+ if (_parameters!=null)
+ {
+ _dirty=
+ _parameters.remove(name)!=null;
+ }
+ }
+
+ /* ------------------------------------------------------------ */
+ /** @return the URI string encoded.
+ */
+ public String toString()
+ {
+ if (_dirty)
+ {
+ getQuery();
+ cleanURI();
+ }
+ return _uri;
+ }
+
+ /* ------------------------------------------------------------ */
+ private void cleanURI()
+ {
+ StringBuffer buf = new StringBuffer(_uri.length()*2);
+ synchronized(buf)
+ {
+ if (_scheme!=null)
+ {
+ buf.append(_scheme);
+ buf.append("://");
+ buf.append(_host);
+ if (_port>0)
+ {
+ buf.append(':');
+ buf.append(_port);
+ }
+ }
+
+ buf.append(_encodedPath);
+
+ if (_query!=null && _query.length()>0)
+ {
+ buf.append('?');
+ buf.append(_query);
+ }
+ _uri=buf.toString();
+ _dirty=false;
+ }
+ }
+
+
+ /* ------------------------------------------------------------ */
+ /** Encode a URI path.
+ * This is the same encoding offered by URLEncoder, except that
+ * the '/' character is not encoded.
+ * @param path The path the encode
+ * @return The encoded path
+ */
+ public static String encodePath(String path)
+ {
+ if (path==null || path.length()==0)
+ return path;
+
+ StringBuffer buf = encodePath(null,path);
+ return buf==null?path:buf.toString();
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Encode a URI path.
+ * @param path The path the encode
+ * @param buf StringBuffer to encode path into (or null)
+ * @return The StringBuffer or null if no substitutions required.
+ */
+ public static StringBuffer encodePath(StringBuffer buf, String path)
+ {
+ /* Convert path to native character set not __CHARSET.
+ * This is important to do this way because the path
+ * contains *OS specific characters* and __CHARSET could
+ * be wrong and not encode/decode the path correctly.
+ */
+ byte[] b = null;
+ /*
+ Keep commented out unless you can prove that this does the right thing.
+ try {
+ b = path.getBytes(__CHARSET);
+ } catch(UnsupportedEncodingException ex) {
+ return null; // Shouldn't be possible.
+ }
+ */
+ b = path.getBytes();
+ StringBuffer x = new StringBuffer(b.length);
+ for(int i=0; i> 8) & 0xff));
+ buf.append(gethex(c & 0xff));
+ }
+ */
+ buf.append(gethex(c & 0xff));
+ } else {
+ buf.append(c);
+ }
+ }
+ }
+
+ return buf;
+ }
+
+ /**
+ *
+ * @param decimal value not greater than 255.
+ * @return a percent sign followed by two hexadecimal digits.
+ */
+ private static String gethex(int decimal) {
+ return new String("%" + hexchars.charAt(decimal >> 4) + hexchars.charAt(decimal & 0xF));
+ }
+ /* ------------------------------------------------------------ */
+ /** Encode a URI path.
+ * @param path The path the encode
+ * @param buf StringBuffer to encode path into (or null)
+ * @param encode String of characters to encode. % is always encoded.
+ * @return The StringBuffer or null if no substitutions required.
+ */
+ public static StringBuffer encodeString(StringBuffer buf,
+ String path,
+ String encode)
+ {
+ if (buf==null)
+ {
+ loop:
+ for (int i=0;i=0)
+ {
+ buf=new StringBuffer(path.length()<<1);
+ break loop;
+ }
+ }
+ if (buf==null)
+ return null;
+ }
+
+ synchronized(buf)
+ {
+ for (int i=0;i=0)
+ {
+ buf.append('%');
+ StringUtil.append(buf,(byte)(0xff&c),16);
+ }
+ else
+ buf.append(c);
+ }
+ }
+
+ return buf;
+ }
+
+ /* ------------------------------------------------------------ */
+ /* Decode a URI path.
+ * @param path The path the encode
+ * @param buf StringBuffer to encode path into
+ */
+ public static String decodePath(String path)
+ {
+ int len=path.length();
+ byte[] bytes=null;
+ int n=0;
+ boolean noDecode=true;
+
+ for (int i=0;i=0)
+ return p.substring(0,slash+1);
+ return null;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Strip parameters from a path.
+ * Return path upto any semicolon parameters.
+ */
+ public static String stripPath(String path)
+ {
+ if (path==null)
+ return null;
+ int semi=path.indexOf(';');
+ if (semi<0)
+ return path;
+ return path.substring(0,semi);
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Convert a path to a cananonical form.
+ * All instances of "." and ".." are factored out. Null is returned
+ * if the path tries to .. above it's root.
+ * @param path
+ * @return path or null.
+ */
+ public static String canonicalPath(String path)
+ {
+ if (path==null || path.length()==0)
+ return path;
+
+ int end=path.length();
+ int start = path.lastIndexOf('/', end);
+
+ search:
+ while (end>0)
+ {
+ switch(end-start)
+ {
+ case 2: // possible single dot
+ if (path.charAt(start+1)!='.')
+ break;
+ break search;
+ case 3: // possible double dot
+ if (path.charAt(start+1)!='.' || path.charAt(start+2)!='.')
+ break;
+ break search;
+ }
+
+ end=start;
+ start=path.lastIndexOf('/',end-1);
+ }
+
+ // If we have checked the entire string
+ if (start>=end)
+ return path;
+
+ StringBuffer buf = new StringBuffer(path);
+ int delStart=-1;
+ int delEnd=-1;
+ int skip=0;
+
+ while (end>0)
+ {
+ switch(end-start)
+ {
+ case 2: // possible single dot
+ if (buf.charAt(start+1)!='.')
+ {
+ if (skip>0 && --skip==0)
+ {
+ delStart=start>=0?start:0;
+ if(delStart>0 && delEnd==buf.length() && buf.charAt(delEnd-1)=='.')
+ delStart++;
+ }
+ break;
+ }
+
+ if(start<0 && buf.length()>2 && buf.charAt(1)=='/' && buf.charAt(2)=='/')
+ break;
+
+ if(delEnd<0)
+ delEnd=end;
+ delStart=start;
+ if (delStart<0 || delStart==0&&buf.charAt(delStart)=='/')
+ {
+ delStart++;
+ if (delEnd=0 && buf.charAt(start)!='/')
+ start--;
+ continue;
+
+ case 3: // possible double dot
+ if (buf.charAt(start+1)!='.' || buf.charAt(start+2)!='.')
+ {
+ if (skip>0 && --skip==0)
+ { delStart=start>=0?start:0;
+ if(delStart>0 && delEnd==buf.length() && buf.charAt(delEnd-1)=='.')
+ delStart++;
+ }
+ break;
+ }
+
+ delStart=start;
+ if (delEnd<0)
+ delEnd=end;
+
+ skip++;
+ end=start--;
+ while (start>=0 && buf.charAt(start)!='/')
+ start--;
+ continue;
+
+ default:
+ if (skip>0 && --skip==0)
+ {
+ delStart=start>=0?start:0;
+ if(delEnd==buf.length() && buf.charAt(delEnd-1)=='.')
+ delStart++;
+ }
+ }
+
+ // Do the delete
+ if (skip<=0 && delStart>=0 && delStart>=0)
+ {
+ buf.delete(delStart,delEnd);
+ delStart=delEnd=-1;
+ if (skip>0)
+ delEnd=end;
+ }
+
+ end=start--;
+ while (start>=0 && buf.charAt(start)!='/')
+ start--;
+ }
+
+ // Too many ..
+ if (skip>0)
+ return null;
+
+ // Do the delete
+ if (delEnd>=0)
+ buf.delete(delStart,delEnd);
+
+ return buf.toString();
+ }
+
+ /* ------------------------------------------------------------ */
+ /**
+ * @param uri URI
+ * @return True if the uri has a scheme
+ */
+ public static boolean hasScheme(String uri)
+ {
+ for (int i=0;i='a'&&c<='z' ||
+ c>='A'&&c<='Z' ||
+ (i>0 &&(c>='0'&&c<='9' ||
+ c=='.' ||
+ c=='+' ||
+ c=='-'))
+ ))
+ break;
+ }
+ return false;
+ }
+
+}
+
+
+
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigNavHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigNavHelper.java
index c97647fc9..cdc7caeb7 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigNavHelper.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigNavHelper.java
@@ -12,12 +12,12 @@ public class ConfigNavHelper extends HelperBase {
private static final String pages[] =
{"", "ui", "service", "update", "tunnels",
"clients", "peer", "keyring", "logging", "stats",
- "advanced" };
+ "reseed", "advanced" };
private static final String titles[] =
{_x("Network"), _x("UI"), _x("Service"), _x("Update"), _x("Tunnels"),
_x("Clients"), _x("Peers"), _x("Keyring"), _x("Logging"), _x("Stats"),
- _x("Advanced") };
+ _x("Reseeding"), _x("Advanced") };
public void renderNavBar(String requestURI) throws IOException {
StringBuilder buf = new StringBuilder(1024);
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigReseedHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigReseedHandler.java
new file mode 100644
index 000000000..1e07d9d24
--- /dev/null
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigReseedHandler.java
@@ -0,0 +1,68 @@
+package net.i2p.router.web;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import net.i2p.router.networkdb.reseed.Reseeder;
+
+/**
+ * @since 0.8.3
+ */
+public class ConfigReseedHandler extends FormHandler {
+ private Map _settings;
+
+ @Override
+ protected void processForm() {
+
+ if (_action.equals(_("Save Configuration and Reseed Now"))) {
+ saveChanges();
+ boolean reseedInProgress = Boolean.valueOf(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress")).booleanValue();
+ if (reseedInProgress) {
+ addFormError(_("Reseeding is already in progress"));
+ } else {
+ // skip the nonce checking in ReseedHandler
+ addFormNotice(_("Starting reseed process"));
+ (new ReseedHandler(_context)).requestReseed();
+ }
+ return;
+ }
+ if (_action.equals(_("Save Configuration"))) {
+ saveChanges();
+ return;
+ }
+ 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();
+ }
+
+ private void saveChanges() {
+ String port = getJettyString("port");
+ if (port != null)
+ _context.router().setConfigSetting(Reseeder.PROP_PROXY_PORT, port);
+ String host = getJettyString("host");
+ if (host != null)
+ _context.router().setConfigSetting(Reseeder.PROP_PROXY_HOST, host);
+ String url = getJettyString("reseedURL");
+ if (url != null)
+ _context.router().setConfigSetting(Reseeder.PROP_RESEED_URL, url.trim().replace("\r\n", ",").replace("\n", ","));
+ String mode = getJettyString("mode");
+ boolean req = "1".equals(mode);
+ boolean disabled = "2".equals(mode);
+ _context.router().setConfigSetting(Reseeder.PROP_SSL_REQUIRED,
+ Boolean.toString(req));
+ _context.router().setConfigSetting(Reseeder.PROP_SSL_DISABLE,
+ Boolean.toString(disabled));
+ boolean proxy = getJettyString("enable") != null;
+ _context.router().setConfigSetting(Reseeder.PROP_PROXY_ENABLE, Boolean.toString(proxy));
+ _context.router().saveConfig();
+ addFormNotice(_("Configuration saved successfully."));
+ }
+}
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigReseedHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigReseedHelper.java
new file mode 100644
index 000000000..ec5337cc5
--- /dev/null
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigReseedHelper.java
@@ -0,0 +1,58 @@
+package net.i2p.router.web;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import net.i2p.router.networkdb.reseed.Reseeder;
+
+/**
+ * @since 0.8.3
+ */
+public class ConfigReseedHelper extends HelperBase {
+
+ public String getPort() {
+ return _context.getProperty(Reseeder.PROP_PROXY_PORT, "");
+ }
+
+ public String getHost() {
+ return _context.getProperty(Reseeder.PROP_PROXY_HOST, "");
+ }
+
+ public String modeChecked(int mode) {
+ boolean required = _context.getBooleanProperty(Reseeder.PROP_SSL_REQUIRED);
+ boolean disabled = _context.getBooleanProperty(Reseeder.PROP_SSL_DISABLE);
+ if ((mode == 0 && (!disabled) && (!required)) ||
+ (mode == 1 && (!disabled) && required) ||
+ (mode == 2 && disabled))
+ return "checked=\"true\"";
+ return "";
+ }
+
+ public String getEnable() {
+ boolean enabled = _context.getBooleanProperty(Reseeder.PROP_PROXY_ENABLE);
+ if (enabled)
+ return "checked=\"true\"";
+ return "";
+ }
+
+ public String getReseedURL() {
+ String urls = _context.getProperty(Reseeder.PROP_RESEED_URL, Reseeder.DEFAULT_SEED_URL + ',' + Reseeder.DEFAULT_SSL_SEED_URL);
+ StringTokenizer tok = new StringTokenizer(urls, " ,\r\n");
+ List URLList = new ArrayList(16);
+ while (tok.hasMoreTokens()) {
+ String s = tok.nextToken().trim();
+ if (s.length() > 0)
+ URLList.add(s);
+ }
+ Collections.sort(URLList);
+ StringBuilder buf = new StringBuilder();
+ for (String s : URLList) {
+ if (buf.length() > 0)
+ buf.append('\n');
+ buf.append(s);
+ }
+ return buf.toString();
+ }
+}
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java
index 870f162d4..f2acafdff 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java
@@ -210,7 +210,7 @@ public class RouterConsoleRunner {
_server.addListener(ssll);
boundAddresses++;
} catch (Exception e) { // probably no exceptions at this point
- System.err.println("Unable to bind routerconsole to " + host + " port " + _listenPort + " for SSL: " + e);
+ System.err.println("Unable to bind routerconsole to " + host + " port " + sslPort + " for SSL: " + e);
}
}
} else {
@@ -224,7 +224,8 @@ public class RouterConsoleRunner {
}
_server.setRootWebApp(ROUTERCONSOLE);
WebApplicationContext wac = _server.addWebApplication("/", _webAppsDir + ROUTERCONSOLE + ".war");
- File tmpdir = new SecureDirectory(workDir, ROUTERCONSOLE + "-" + _listenPort);
+ File tmpdir = new SecureDirectory(workDir, ROUTERCONSOLE + "-" +
+ (_listenPort != null ? _listenPort : _sslListenPort));
tmpdir.mkdir();
wac.setTempDirectory(tmpdir);
baseHandler = new LocaleWebAppHandler(I2PAppContext.getGlobalContext());
@@ -239,7 +240,8 @@ public class RouterConsoleRunner {
String enabled = props.getProperty(PREFIX + appName + ENABLED);
if (! "false".equals(enabled)) {
String path = new File(dir, fileNames[i]).getCanonicalPath();
- tmpdir = new SecureDirectory(workDir, appName + "-" + _listenPort);
+ tmpdir = new SecureDirectory(workDir, appName + "-" +
+ (_listenPort != null ? _listenPort : _sslListenPort));
WebAppStarter.addWebApp(I2PAppContext.getGlobalContext(), _server, appName, path, tmpdir);
if (enabled == null) {
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java
index 1ed18e5b4..55c7b009c 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java
@@ -267,7 +267,7 @@ public class SummaryBarRenderer {
.append(":
");
int active = _helper.getActivePeers();
buf.append(active)
- .append(" / ")
+ .append(SummaryHelper.THINSP)
.append(Math.max(active, _helper.getActiveProfiles()))
.append("
\n" +
@@ -351,7 +351,7 @@ public class SummaryBarRenderer {
"
\n" +
"
")
- .append(_("1 sec")) // formatDuration2() would say 1000 ms
+ .append(DataHelper.formatDuration2(3 * 1000)) // lie and say 3 sec since 1 sec would appear as 1000 ms
.append(":
")
.append(_helper.getSecondKBps())
.append("Bps
\n");
@@ -376,7 +376,7 @@ public class SummaryBarRenderer {
.append(_("Used"))
.append(":
+<%=intl._("Sorry! There has been an internal error.")%>
+
+
+<% /* note to translators - both parameters are URLs */
+%><%=intl._("Please report bugs on {0} or {1}.",
+ "trac.i2p2.i2p",
+ "trac.i2p2.de")%>
+<%=intl._("You may use the username \"guest\" and password \"guest\" if you do not wish to register.")%>
+
<%=intl._("Please include this information in bug reports")%>:
+
<%=intl._("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%>