diff --git a/LICENSE.txt b/LICENSE.txt index 1ce8412e6cad1e925d5376e923a156b197635579..c8667b006f9e9b2e55706bdb069f783f9a0dc7d6 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -177,7 +177,11 @@ Applications: Router console: Public domain. - Flag icons public domain, courtesy mjames@gmail.com http://www.famfamfam.com/ + Flag icons: public domain, courtesy mjames@gmail.com http://www.famfamfam.com/ + + GeoIP Data: + Copyright (c) 2003 Direct Information Pvt. Ltd. All Rights Reserved. + See licenses/LICENSE-GeoIP.txt SAM: Public domain. diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index 71f5f2b3e370e565776d96b258e253df88d6f18d..8fbba7ff313a6fbfbe8688f4db72abb13755da1f 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -830,12 +830,13 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable int space = targetRequest.indexOf(' '); String filename = null; try { - filename = targetRequest.substring(10, space); + filename = targetRequest.substring(17, space); // "proxy.i2p/themes/".length } catch (IndexOutOfBoundsException ioobe) {} // theme hack - if (filename.startsWith("themes/console/default/")) + if (filename.startsWith("console/default/")) filename = filename.replaceFirst("default", I2PAppContext.getGlobalContext().getProperty("routerconsole.theme", "light")); - File file = new File(_errorDir, filename); + File themesDir = new File(_errorDir, "themes"); + File file = new File(themesDir, filename); if (file.exists() && !file.isDirectory()) { String type; if (filename.endsWith(".css")) @@ -849,7 +850,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable out.write("HTTP/1.1 200 OK\r\nContent-Type: ".getBytes()); out.write(type.getBytes()); out.write("\r\nCache-Control: max-age=86400\r\n\r\n".getBytes()); - FileUtil.readFile(filename, _errorDir.getAbsolutePath(), out); + FileUtil.readFile(filename, themesDir.getAbsolutePath(), out); return; } catch (IOException ioe) {} } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java index da79249ed87eca3985ebcf682ba40e92c0b381ee..5fc3679e0c06468f3a05086c740ec297dd54b6cf 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java @@ -116,7 +116,7 @@ public class ConfigClientsHandler extends FormHandler { path = new File(path, app + ".war"); s.addWebApplication("/"+ app, path.getAbsolutePath()).start(); // no passwords... initialize(wac); - addFormNotice("WebApp <a href=\"/" + app + "/\">" + app + "<a> started"); + addFormNotice("WebApp <a href=\"/" + app + "/\">" + app + "</a> started"); } catch (Exception ioe) { addFormError("Failed to start " + app + " " + ioe); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ServiceManager.java b/apps/routerconsole/java/src/net/i2p/router/web/ServiceManager.java deleted file mode 100644 index 55f104f027eee15a0696820523b4a49acd66c98d..0000000000000000000000000000000000000000 --- a/apps/routerconsole/java/src/net/i2p/router/web/ServiceManager.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * I2P - An anonymous, secure, and fully-distributed communication network. - * - * ServiceManager.java - * 2004 The I2P Project - * http://www.i2p.net - * This code is public domain. - */ - -package net.i2p.router.web; - -//import java.io.InputStream; - -import net.i2p.util.ShellCommand; - -/** - * Handles installation and uninstallation of I2P as a service. - * - * @author hypercubus - */ -public class ServiceManager { - - private static final boolean IS_WINDOWS = System.getProperty("os.name").startsWith("Windows") ? true : false; - - private ShellCommand _shellCommand = new ShellCommand(); - - /** - * Invokes the service wrapper installation script via a shell process. - * - * @return <code>null</code> if the installation was successful, otherwise - * a <code>String</code> containing the shell output including error - * messages is returned. - */ - public String installService() { - return exec("install_i2p_service_" + (IS_WINDOWS ? "winnt.bat" : "unix")); - } - - /** - * Invokes the service wrapper uninstallation script via a shell process. - * - * @return <code>null</code> if the uninstallation was successful, otherwise - * a <code>String</code> containing the shell output including error - * messages is returned. - */ - public String uninstallService() { - return exec("uninstall_i2p_service_" + (IS_WINDOWS ? "winnt.bat" : "unix")); - } - - private String exec(String command) { - -// InputStream StdoutStream = _shellCommand.getInputStream(); -// InputStream StderrStream = _shellCommand.getErrorStream(); - StringBuilder result = null; - - if (_shellCommand.executeAndWait(command)) - return null; - - else - if (result.toString().equals("")) - return null; - - else - return result.toString(); - } -} diff --git a/licenses/LICENSE-GeoIP.txt b/licenses/LICENSE-GeoIP.txt new file mode 100644 index 0000000000000000000000000000000000000000..20670107efdd4a8423f82885632dcc7512b52b46 --- /dev/null +++ b/licenses/LICENSE-GeoIP.txt @@ -0,0 +1,18 @@ +Copyright (c) 2003 Direct Information Pvt. Ltd. All Rights Reserved. + +This application uses the IP-to-Country Database +provided by WebHosting.Info (http://www.webhosting.info), +available from http://ip-to-country.webhosting.info. + +BECAUSE THE DATABASE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE DATABASE, +TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE +COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE DATABASE "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR ANY WARRANTIES +REGARDING THE CONTENTS OR ACCURACY OF THE WORK. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT +HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE DATABASE AS PERMITTED +ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE DATABASE, EVEN +IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.