From fde3f1ce7d9ca3df3cd09812b39b52607ff17c8b Mon Sep 17 00:00:00 2001 From: jrandom <jrandom> Date: Thu, 16 Feb 2006 09:40:12 +0000 Subject: [PATCH] not used --- installer/java/build.xml | 96 ---- installer/java/src/CliInstall.java | 71 --- installer/java/src/FetchSeeds.java | 100 ---- installer/java/src/GUIInstall.java | 355 ------------ installer/java/src/Install.java | 596 -------------------- installer/java/src/harvester.config | 263 --------- installer/java/src/heartbeat.config | 28 - installer/java/src/i2ptunnel.config | 22 - installer/java/src/install.config | 117 ---- installer/java/src/logger.config.template | 66 --- installer/java/src/reseed.bat.template | 3 - installer/java/src/reseed.sh.template | 4 - installer/java/src/router.config.template | 175 ------ installer/java/src/startFoo.bat.template | 5 - installer/java/src/startFoo.sh.template | 6 - installer/java/src/startRouter.bat.template | 7 - installer/java/src/startRouter.sh.template | 8 - installer/java/src/stopRouter.sh.template | 3 - 18 files changed, 1925 deletions(-) delete mode 100644 installer/java/build.xml delete mode 100644 installer/java/src/CliInstall.java delete mode 100644 installer/java/src/FetchSeeds.java delete mode 100644 installer/java/src/GUIInstall.java delete mode 100644 installer/java/src/Install.java delete mode 100644 installer/java/src/harvester.config delete mode 100644 installer/java/src/heartbeat.config delete mode 100644 installer/java/src/i2ptunnel.config delete mode 100644 installer/java/src/install.config delete mode 100644 installer/java/src/logger.config.template delete mode 100644 installer/java/src/reseed.bat.template delete mode 100644 installer/java/src/reseed.sh.template delete mode 100644 installer/java/src/router.config.template delete mode 100644 installer/java/src/startFoo.bat.template delete mode 100644 installer/java/src/startFoo.sh.template delete mode 100644 installer/java/src/startRouter.bat.template delete mode 100644 installer/java/src/startRouter.sh.template delete mode 100644 installer/java/src/stopRouter.sh.template diff --git a/installer/java/build.xml b/installer/java/build.xml deleted file mode 100644 index 34e0670bba..0000000000 --- a/installer/java/build.xml +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project basedir="." default="all" name="installer"> - <target name="all" depends="clean, build" /> - <target name="build" depends="builddep, jar" /> - <target name="builddep"> - <ant dir="../../core/java/" target="build" /> - <ant dir="../../router/java/" target="build" /> - <ant dir="../../apps/ministreaming/java/" target="build" /> - <ant dir="../../apps/i2ptunnel/java/" target="build" /> - <ant dir="../../apps/sam/java/" target="build" /> - <ant dir="../../apps/netmonitor/java/" target="build" /> - <ant dir="../../apps/heartbeat/java/" target="build" /> - </target> - <target name="compile"> - <mkdir dir="./build" /> - <mkdir dir="./build/obj" /> - <javac srcdir="./src" debug="true" source="1.3" target="1.3" deprecation="on" destdir="./build/obj" /> - </target> - <target name="jar" depends="installer, guiinstaller" /> - <target name="fetchseeds" depends="compile"> - <jar destfile="./build/fetchseeds.jar" > - <fileset dir="./build/obj" includes="FetchSeeds.class" /> - <fileset file="../doc/COPYING" /> - <manifest> - <attribute name="Main-Class" value="FetchSeeds" /> - </manifest> - </jar> - </target> - <target name="installer" depends="compile, fetchseeds"> - <jar destfile="./build/install.jar" > - <fileset dir="./build/obj" includes="*.class" /> - <fileset dir="./src" includes="*.template" /> - <fileset dir="./src" includes="install.config" /> - <fileset file="./build/fetchseeds.jar" /> - <fileset file="../../core/java/build/i2p.jar" /> - <fileset file="../../router/java/build/router.jar" /> - <fileset file="../../apps/ministreaming/java/build/mstreaming.jar" /> - <fileset file="../../apps/i2ptunnel/java/build/i2ptunnel.jar" /> - <fileset file="../../apps/sam/java/build/sam.jar" /> - <fileset file="../../apps/heartbeat/java/build/heartbeat.jar" /> - <fileset file="../../apps/netmonitor/java/build/netmonitor.jar" /> - <fileset file="../doc/COPYING" /> - <fileset file="../../readme.txt" /> - <fileset file="../../hosts.txt" /> - <fileset file="./src/harvester.config" /> - <fileset file="./src/heartbeat.config" /> - <manifest> - <attribute name="Main-Class" value="Install" /> - </manifest> - </jar> - </target> - <target name="guiinstaller" depends="compile, fetchseeds"> - <jar destfile="./build/guiinstall.jar" > - <fileset dir="./build/obj" includes="*.class" /> - <fileset dir="./src" includes="*.template" /> - <fileset dir="./src" includes="install.config" /> - <fileset file="./build/fetchseeds.jar" /> - <fileset file="../../core/java/build/i2p.jar" /> - <fileset file="../../router/java/build/router.jar" /> - <fileset file="../../apps/ministreaming/java/build/mstreaming.jar" /> - <fileset file="../../apps/i2ptunnel/java/build/i2ptunnel.jar" /> - <fileset file="../../apps/sam/java/build/sam.jar" /> - <fileset file="../../apps/heartbeat/java/build/heartbeat.jar" /> - <fileset file="../../apps/netmonitor/java/build/netmonitor.jar" /> - <fileset file="../doc/COPYING" /> - <fileset file="../../readme.txt" /> - <fileset file="../../hosts.txt" /> - <fileset file="./src/harvester.config" /> - <fileset file="./src/heartbeat.config" /> - <manifest> - <attribute name="Main-Class" value="GUIInstall" /> - </manifest> - </jar> - </target> - <target name="clean"> - <delete dir="./build" /> - </target> - <target name="cleandep" depends="clean"> - <ant dir="../../core/java/" target="cleandep" /> - <ant dir="../../router/java/" target="cleandep" /> - <ant dir="../../apps/ministreaming/java/" target="cleandep" /> - <ant dir="../../apps/i2ptunnel/java/" target="cleandep" /> - <ant dir="../../apps/sam/java/" target="cleandep" /> - <ant dir="../../apps/heartbeat/java" target="cleandep" /> - <ant dir="../../apps/netmonitor/java" target="cleandep" /> - </target> - <target name="distclean" depends="clean"> - <ant dir="../../core/java/" target="distclean" /> - <ant dir="../../router/java/" target="distclean" /> - <ant dir="../../apps/ministreaming/java/" target="distclean" /> - <ant dir="../../apps/i2ptunnel/java/" target="distclean" /> - <ant dir="../../apps/sam/java/" target="distclean" /> - <ant dir="../../apps/heartbeat/java" target="distclean" /> - <ant dir="../../apps/netmonitor/java" target="distclean" /> - </target> -</project> diff --git a/installer/java/src/CliInstall.java b/installer/java/src/CliInstall.java deleted file mode 100644 index 81c8271e3e..0000000000 --- a/installer/java/src/CliInstall.java +++ /dev/null @@ -1,71 +0,0 @@ - - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintStream; - -public class CliInstall extends Install { - - private BufferedReader _in; - private PrintStream _out; - - public CliInstall() { - _out = System.out; - _in = new BufferedReader(new InputStreamReader(System.in)); - } - - public void showStatus(String s) { - _out.println(s); - } - - public void showOptError(String s) { - _out.println(s); - } - - public void handleOptInfo(String s) { - _out.println(s); - } - - public void startOptCategory(String s) { - _out.println("* " + s + "\n"); - } - - public void finishOptions() { - } - - public void handleOption(int number, String question, String def, String type) { - Object value; - while (true) { - String answer; - _out.print(question + (def == null ? "" : (" [" + def + "]")) + ": "); - answer = readLine(); - if ("".equals(answer) && def != null) { - answer = def; - } - if (setOption(number, answer)) break; - } - } - - public boolean confirmOption(String question, boolean defaultYes) { - _out.print(question); - return readBool(defaultYes); - } - - private String readLine() { - try { - return _in.readLine().trim(); - } catch (IOException ex) { - ex.printStackTrace(); - System.exit(1); - return null; - } - } - - private boolean readBool(boolean defaultYes) { - String str = readLine().toLowerCase(); - if ("".equals(str)) return defaultYes; - return "yes".equals(str) || "y".equals(str) || "true".equals(str) || "ok".equals(str) || "sure".equals(str) - || "whatever".equals(str); - } -} \ No newline at end of file diff --git a/installer/java/src/FetchSeeds.java b/installer/java/src/FetchSeeds.java deleted file mode 100644 index e3cbbd7933..0000000000 --- a/installer/java/src/FetchSeeds.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * $Id $ - * Copyright (c) 2003 mihi - * Licensed under the GNU Public License (GPL) as published by the - * Free Software Foundation, using version 2 or later of the GPL. You - * should have recieved the GPL with this source code, otherwise see - * http://www.fsf.org/copyleft/ - */ - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.net.URL; -import java.net.URLConnection; - -public class FetchSeeds { - - /** - * Fetch seednodes. - * - * @param destination the dir to store the seednodes to - * @param sourceURL the URL to fetch the seednode from - must end - * with a slash - * @return whether new seed nodes could be fetched - */ - public static boolean fetchSeeds(File destination, String sourceURL) { - InputStream in = null; - try { - URL source = new URL(sourceURL); - URLConnection con = source.openConnection(); - in = con.getInputStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(in)); - String line; - while ((line = br.readLine()) != null) { - int pos = line.indexOf(" <a href=\"routerInfo-"); - if (pos == -1) continue; - line = line.substring(pos + 10); - pos = line.indexOf("\""); - if (pos == -1) continue; - line = line.substring(0, pos); - fetchFile(new File(destination, line), sourceURL + line); - System.out.println(line); - } - br.close(); - return true; - } catch (IOException ex) { - System.err.println("Unable to fetch seeds from " + sourceURL + ": " + ex.getMessage()); - //ex.printStackTrace(); - return false; - } finally { - if (in != null) try { - in.close(); - } catch (IOException ioe) { - } - } - } - - public static void fetchFile(File destFile, String fileURL) throws IOException { - URL url = new URL(fileURL); - InputStream in = url.openStream(); - OutputStream out = new FileOutputStream(destFile); - byte[] buf = new byte[1024]; - int len; - while ((len = in.read(buf)) != -1) { - out.write(buf, 0, len); - } - in.close(); - out.flush(); - out.close(); - } - - /** - * test main method. - */ - public static void main(String[] args) { - switch (args.length) { - case 1: - fetchSeeds(new File(args[0]), "http://dev.i2p.net/i2pdb/"); - return; - case 2: - fetchSeeds(new File(args[0]), args[1]); - return; - case 3: - while (true) { - fetchSeeds(new File(args[0]), args[1]); - try { Thread.sleep(Integer.parseInt(args[2])*1000); } catch (Throwable t) {} - } - default: - System.out.println("Usage: FetchSeeds <outDir>"); - System.out.println(" or FetchSeeds <outDir> <seedURL>"); - System.out.println(" or FetchSeeds <outDir> <seedURL> <secondsBetweenFetch>"); - System.out.println("The default seedURL is http://dev.i2p.net/i2pdb/"); - return; - } - } -} \ No newline at end of file diff --git a/installer/java/src/GUIInstall.java b/installer/java/src/GUIInstall.java deleted file mode 100644 index 368a049ea7..0000000000 --- a/installer/java/src/GUIInstall.java +++ /dev/null @@ -1,355 +0,0 @@ - - -import java.awt.BorderLayout; -import java.awt.Button; -import java.awt.CardLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dialog; -import java.awt.FlowLayout; -import java.awt.Frame; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.GridLayout; -import java.awt.Insets; -import java.awt.Label; -import java.awt.Panel; -import java.awt.TextArea; -import java.awt.TextField; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.StringTokenizer; - -public class GUIInstall extends Install { - - static final GridBagConstraints gbcLeft = new GridBagConstraints(); - static final GridBagConstraints gbcRight = new GridBagConstraints(); - static final GridBagConstraints gbcBottom = new GridBagConstraints(); - static { - gbcLeft.anchor = GridBagConstraints.EAST; - gbcRight.fill = GridBagConstraints.HORIZONTAL; - gbcRight.gridwidth = GridBagConstraints.REMAINDER; - gbcRight.weightx = 1.0; - gbcBottom.weighty = 1.0; - gbcBottom.gridwidth = GridBagConstraints.REMAINDER; - gbcBottom.fill = GridBagConstraints.BOTH; - gbcBottom.insets = new Insets(4, 4, 4, 4); - } - - public static void main(String[] args) { - new GUIInstall().runInstall(); - } - - private InstallFrame frame; - boolean installing = false; - ArrayList categories = new ArrayList(); - InstallCategory currentCategory = null; - - public String handleSpliceParams(String s) { - // any better ideas? - return s; - } - - public GUIInstall() { - frame = new InstallFrame(); - } - - public void showStatus(String s) { - if (!installing) throw new RuntimeException("Not installing yet!"); - frame.showStatus(s); - } - - public void showOptError(String s) { - frame.showOptError(s); - } - - public void handleOptInfo(String s) { - currentCategory.addInfo(s); - } - - public void startOptCategory(String s) { - currentCategory = new InstallCategory(); - categories.add(currentCategory); - } - - public void finishOptions() { - frame.startInstall(categories); - System.out.println("Starting install..."); - } - - public void handleOption(int number, String question, String def, String type) { - currentCategory.addOption(number, question, def, type); - } - - public boolean confirmOption(String question, boolean defaultYes) { - ConfirmFrame cf = new ConfirmFrame(frame, question, defaultYes); - return cf.getResult(); - } - - private class ConfirmFrame extends Dialog { - private boolean result; - - private ConfirmFrame(Frame parent, String msg, boolean defaultYes) { - super(parent, "Installer question", true); - setBackground(Color.lightGray); - setLayout(new BorderLayout()); - TextArea ta; - Panel p; - Button b1, b2; - add("Center", ta = new TextArea(msg, 3, 80)); - ta.setEditable(false); - add("South", p = new Panel(new FlowLayout())); - p.add(b1 = new Button("Yes")); - p.add(b2 = new Button("No")); - ActionListener al = new ActionListener() { - public void actionPerformed(ActionEvent evt) { - result = evt.getActionCommand().equals("Yes"); - ConfirmFrame.this.dispose(); - } - }; - b1.addActionListener(al); - b2.addActionListener(al); - pack(); - - // java 1.4 - //setLocationRelativeTo(parent); - show(); - (defaultYes ? b1 : b2).requestFocus(); - } - - private boolean getResult() { - return result; - } - } - - private class InstallCategory extends ArrayList { - public void addInfo(String s) { - add(new InfoOption(s)); - } - - public void addOption(int number, String question, String def, String type) { - add(new RealOption(number, question, def, type)); - } - } - - private interface InstallOption { - public Component getComponent1(); - - public Component getComponent2(); - - public boolean setValue(); - - public String getQuestion(); - } - - private class InfoOption extends Panel implements InstallOption { - - public InfoOption(String s) { - super(new GridLayout(0, 1, 0, 0)); - for (StringTokenizer st = new StringTokenizer(s, "\n"); st.hasMoreTokens();) { - add(new Label(st.nextToken())); - } - } - - public Component getComponent1() { - return null; - } - - public Component getComponent2() { - return this; - } - - public boolean setValue() { - return true; - } - - public String getQuestion() { - return "<no question>"; - } - } - - private class RealOption implements InstallOption { - - private int number; - private String def, question; - private Label l; - private TextField t; - - public RealOption(int number, String question, String def, String type) { - this.number = number; - l = new Label(question); - t = new TextField(def); - this.def = def; - this.question = question; - // type is not needed yet - } - - public void reset() { - t.setText(def); - } - - public String getQuestion() { - return question; - } - - public boolean setValue() { - return GUIInstall.this.setOption(number, t.getText()); - } - - public Component getComponent1() { - return l; - } - - public Component getComponent2() { - return t; - } - - } - - private class InstallFrame extends Frame { - - private int current = -1; - private Panel cats; - private CardLayout cl; - private boolean windowOpen = true; - private TextArea log; - - public InstallFrame() { - super("I2P Installer"); - setBackground(Color.lightGray); - Panel p; - Button b; - setLayout(new BorderLayout()); - add("Center", cats = new Panel(cl = new CardLayout())); - cats.add("Start", p = new Panel(new BorderLayout())); - p.add("Center", new Label("Loading installer...")); - cats.add("Install", p = new Panel(new BorderLayout())); - p.add("Center", log = new TextArea("Installing...\n\n")); - log.setEditable(false); - add("South", p = new Panel(new FlowLayout())); - p.add(b = new Button("<< Back")); - b.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - if (current > 0) { - current--; - cl.show(cats, "" + current); - } - } - }); - p.add(b = new Button("Next >>")); - b.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - if (current != -1) { - if (!saveCurrent()) return; - current++; - if (current == categoryPanels.length) { - cl.show(cats, "Install"); - current = -1; - synchronized (InstallFrame.this) { - installing = true; - windowOpen = false; - InstallFrame.this.notify(); - } - } else { - cl.show(cats, "" + current); - } - } - } - }); - p.add(b = new Button("Quit")); - b.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - System.exit(0); - } - }); - addWindowListener(new WindowAdapter() { - public void windowClosing(WindowEvent evt) { - System.exit(0); - } - }); - setSize(600, 450); - - // java 1.4 - //setLocationRelativeTo(null); - show(); - } - - public void showStatus(String s) { - log.append(s + "\n"); - } - - public void showOptError(String s) { - if (current == -1) throw new RuntimeException("No options here!"); - categoryPanels[current].showError(s); - } - - private CategoryPanel[] categoryPanels; - - public void startInstall(ArrayList categories) { - Panel p; - categoryPanels = new CategoryPanel[categories.size()]; - //build a panel for each category - Iterator it = categories.iterator(); - for (int i = 0; it.hasNext(); i++) { - cats.add("" + i, categoryPanels[i] = new CategoryPanel((InstallCategory) it.next())); - } - current = 0; - cl.show(cats, "0"); - // wait till config is complete - synchronized (this) { - while (windowOpen) { - try { - wait(); - } catch (InterruptedException ex) { - ex.printStackTrace(); - } - } - } - } - - private boolean saveCurrent() { - return categoryPanels[current].saveOptions(); - } - } - - private class CategoryPanel extends Panel { - - private TextArea errorBox; - private InstallCategory ic; - - public CategoryPanel(InstallCategory ic) { - super(new GridBagLayout()); - this.ic = ic; - for (Iterator it = ic.iterator(); it.hasNext();) { - InstallOption io = (InstallOption) it.next(); - Component c1 = io.getComponent1(), c2 = io.getComponent2(); - if (c1 != null) add(c1, gbcLeft); - add(c2, gbcRight); - } - add(errorBox = new TextArea(), gbcBottom); - errorBox.setEditable(false); - } - - private InstallOption currentOption; - - public boolean saveOptions() { - errorBox.setText("Saving options...\n\n"); - for (Iterator it = ic.iterator(); it.hasNext();) { - InstallOption io = (InstallOption) it.next(); - currentOption = io; - if (!io.setValue()) return false; - currentOption = null; - } - return true; - } - - public void showError(String s) { - if (currentOption == null) { throw new RuntimeException("No option to test"); } - errorBox.append("While setting \"" + currentOption.getQuestion() + "\":\n" + s + "\n\n"); - } - } -} \ No newline at end of file diff --git a/installer/java/src/Install.java b/installer/java/src/Install.java deleted file mode 100644 index 28de764e79..0000000000 --- a/installer/java/src/Install.java +++ /dev/null @@ -1,596 +0,0 @@ -/* - * free (adj.): unencumbered; not under the control of others - * Written by jrandom in 2003 and released into the public domain - * with no warranty of any kind, either expressed or implied. - * It probably won't make your computer catch on fire, or eat - * your children, but it might. Use at your own risk. - * - */ - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Properties; -import java.util.Set; - -/** - * Please could someone write a real installer? Please. - * I should be shot for doing this. - * - * Note: this has dependencies upon how i2p/build.xml executes the "installer" - * task - namely that this class is in the jar "install.jar", and in that jar - * are the files COPYING, i2p.jar, i2ptunnel.jar, phttprelay.war, readme.txt, - * hosts.txt, and router.jar. - * - * Can you say "fragile code"? - * (oh well, enough caveats. commit) - */ -public abstract class Install { - private File _installDir; - private String _externalAddress; - private boolean _externalAddressIsReachable; - private int _inTCP; - private int _i2cpPort; - private String _phttpRegister; - private String _phttpSend; - private int _inBPS; - private int _outBPS; - private HashMap _answers; - private Properties _p; - - private boolean _isWindows; - - /** - * Show some installation status. - */ - public abstract void showStatus(String s); - - /** - * Show an error when setting an option. - */ - public abstract void showOptError(String s); - - /** - * Show some information about the following/preceding options - */ - public abstract void handleOptInfo(String s); - - /** - * Start a new Option category - */ - public abstract void startOptCategory(String s); - - - /** - * Handle an option. - */ - public abstract void handleOption(int number, String question, - String def, String type); - /** - * Tell the installer that all options have been given. - * Install will not continue until this method has ended. - * When this method has ended, all options must have been set. - */ - public abstract void finishOptions(); - - /** - * Confirm an option. This can occur both while verifying options - * and later in the install process. - */ - public abstract boolean confirmOption(String question, boolean defaultYes); - - public static void main(String args[]) { - Install install = new CliInstall(); - install.runInstall(); - } - - public Install() { - _inTCP = -2; - _i2cpPort = -2; - _phttpRegister = null; - _phttpSend = null; - _inBPS = -2; - _outBPS = -2; - _externalAddressIsReachable = false; - } - - public void runInstall() { - askQuestions(); - detectOS(); - configureAll(); - createConfigFile(); - createLoggerConfig(); - createStartScript(); - createReseedScript(); - //createScripts("startIrcProxy.sh", "startIrcProxy.bat", 6668, "irc.duck.i2p", "log-irc-#.txt", "IRC Proxy", "IRC proxying scripts written to startIrcProxy", "Starting IRC proxy (when you see Ready! you can connect your IRC client to localhost:6668)"); - //createScripts("startI2PCVSProxy.sh", "startI2PCVSProxy.bat", 2401, "i2pcvs.i2p", "log-i2pcvs-#.txt", "CVS Proxy", "Proxying scripts for I2P's CVS server written to startCVSProxy"); - // only pulling them temporarily, duck, until the network is - // reliable enough - //createScripts("startJabber.sh", "startJabber.bat", 5222, "jabber.duck.i2p", "log-jabber-#.txt", "Jabber Proxy", "Squid proxying scripts written to startSquid"); - //createScripts("startNntpProxy.sh", "startNntpProxy.bat", 1119, "nntp.duck.i2p", "log-nntp-#.txt", "NNTP Proxy","NNTP proxying scripts written to startNntpProxy"); - createSeedNodes(); - copyLibraries(); - if (_isWindows) { - showStatus("To run the router, please run startRouter.bat in " + _installDir.getAbsolutePath()); - } else { - showStatus("To run the router, please run startRouter.sh in " + _installDir.getAbsolutePath()); - } - showStatus(""); - } - - private String numberTo4Digits(int number) { - String res = "0000"+number; // use four digit indices - return res.substring(res.length()-4); - } - - private void askQuestions() { - try { - InputStream in = Install.class.getResourceAsStream("/install.config"); - _p = new Properties(); - _p.load(in); - in.close(); - } catch (IOException ex) { - ex.printStackTrace(); - System.exit(1); - } - int count = Integer.parseInt(_p.getProperty("qs.count")); - _answers = new HashMap(count+count); // load factor is 0.75, so - // there is some room left - for (int i=1;i<=count;i++) { - String ii = numberTo4Digits(i); - String question = _p.getProperty("qs."+ii+".question"), - param = _p.getProperty("qs."+ii+".param"), - type = _p.getProperty("qs."+ii+".type"), - def = _p.getProperty("qs."+ii+".default"); - if (question == null) continue; - if (type == null || "info".equals(type)) { - // just print some text - handleOptInfo(question); - } else if ("info_spliced".equals(type)) { - // splice in some params already queried - handleOptInfo(handleSpliceParams(question)); - } else if ("category".equals(type)) { - startOptCategory(question); - } else if ("skip".equals(type)) { - i = Integer.parseInt(question)-1; - } else { // a real question - if ("<none>".equals(question)) { - if (!setOption(i, def)) - throw new RuntimeException("Fixed and invalid value"); - } else { - handleOption(i,question,def,type); - } - } - } - finishOptions(); - } - - public /* overridable */ String handleSpliceParams(String s) { - return spliceParams(s); - } - - public boolean setOption(int number, String answer) { - String ii = numberTo4Digits(number); - String param = _p.getProperty("qs."+ii+".param"), - type = _p.getProperty("qs."+ii+".type"); - Object value = getOptionValue(answer, type); - if (value == null) { - return false; - } else { - if (param == null || value == null) - throw new NullPointerException(); - _answers.put(param,value); - return true; - } - } - - private Object getOptionValue(String answer, String type) { - if ("string".equals(type)) { - // everything's okay till the very end - return answer; - } else if ("string>0".equals(type)) { - if (answer.length() > 0) { - return answer; - } else { - showOptError("Empty answers are not allowed."); - } - } else if ("directory".equals(type)) { - File f = new File(answer); - if (f.exists()) { - if (f.isDirectory()) { - showOptError("Using existing target directory " + f.getAbsolutePath()); - return f; - } else { - showOptError("Location " + f.getAbsolutePath()+ - " is not a directory. "+ - "Lets try again"); - } - } else { - boolean create = confirmOption("Target directory " + f.getAbsolutePath() + - " does not exist - create? ", false); - if (!create) { - showOptError("Lets try that again"); - } else { - boolean created = f.mkdirs(); - if (created) { - showOptError("Target directory " + f.getAbsolutePath() + - " created"); - return f; - } else { - showOptError("Failed to create the "+ - "directory. Lets choose another."); - } - } - } - } else if ("boolean".equals(type)) { - answer=answer.toLowerCase(); - if ("yes".equals(answer) || "y".equals(answer)) - answer="true"; - if ("no".equals(answer) || "n".equals(answer)) - answer="false"; - if ("true".equals(answer) || "false".equals(answer)) { - return new Boolean("true".equals(answer)); - } - showOptError("Incorrect boolean value, try `yes' òr `no'"); - } else if ("numeric".equals(type) || "port".equals(type)) { - try { - int num = Integer.parseInt(answer); - if ("numeric".equals(type) || - (num >0 && num < 65536)) { - return new Integer(num); - } - showOptError("Port number must be from 1 to 65535"); - } catch (NumberFormatException ex) { - showOptError("Incorrect value: "+ex.getMessage()); - } - } else if ("bandwidth".equals(type)) { - try { - answer = answer.toLowerCase(); - int factor = 1; - // first check to see if it ends with m, k, or g - if (answer.endsWith("g")) - factor = 1024*1024*1024; - if (answer.endsWith("m")) - factor = 1024*1024; - if (answer.endsWith("k")) - factor = 1024; - if (factor > 1) - answer = answer.substring(0, answer.length()-1); - int val = factor * Integer.parseInt(answer); - if (val == -1 || val >0 ) { - return new Integer(val); - } - showOptError("Value must be -1 or positive."); - } catch (NumberFormatException ex) { - showOptError("Invalid number [" + answer + "]. Valid numbers are of the form -1, 42, 68k, 7m, 9g"); - } - } else { - throw new RuntimeException ("cannot read installer option: " + type); - } - return null; - } - - private String spliceParams(String s) { - StringBuffer txt = new StringBuffer(s.length()+100); - int ind; - while((ind = s.indexOf("##")) != -1) { - txt.append(s.substring(0,ind)); - String temp = s.substring(ind+2); - ind = temp.indexOf("##"); - if (ind == -1) throw new RuntimeException("Incorrect info_spliced param"); - s=temp.substring(ind+2); - Object value = _answers.get(temp.substring(0,ind)); - if (value == null) { - System.err.println("ERROR: Could not insert parameter "+temp.substring(0,ind)); - System.exit(1); - } else { - txt.append(value.toString()); - } - } - txt.append(s); - return txt.toString(); - } - - private void detectOS() { - String os = System.getProperty("os.name"); - if (os.toLowerCase().indexOf("win") != -1) - _isWindows = true; - else - _isWindows = false; - // yes, this treats pre-os-x macs as unix, and perhaps some - // windows-esque OSes don't have "win" in their name, or some - // unix-esque OS does. fix when it occurs. - } - - private void configureAll() { - _installDir = (File) _answers.get("installDir"); - _externalAddress = _answers.get("externalAddress").toString(); - _externalAddressIsReachable = ((Boolean)_answers.get("externalAddressIsReachable")).booleanValue(); - - _inTCP=((Integer)_answers.get("inTCP")).intValue(); - _phttpRegister = _answers.get("phttpRegister").toString(); - _phttpSend = _answers.get("phttpSend").toString(); - _i2cpPort = ((Integer)_answers.get("i2cpPort")).intValue(); - _inBPS = ((Integer)_answers.get("inBPS")).intValue(); - _outBPS = ((Integer)_answers.get("outBPS")).intValue(); - } - - private void useTemplate(String templateName, File destFile) { - try { - BufferedWriter bw = new BufferedWriter(new FileWriter(destFile)); - BufferedReader br = new BufferedReader(new InputStreamReader(Install.class.getResourceAsStream(templateName))); - String line; - while ((line = br.readLine()) != null) { - if (!line.startsWith("####")) { - bw.write(spliceParams(line)); - bw.newLine(); - } - } - br.close(); - bw.close(); - } catch (IOException ioe) { - ioe.printStackTrace(); - System.exit(0); - } - } - - private void createLoggerConfig() { - boolean verbose = ((Boolean)_answers.get("verboseLogs")).booleanValue(); - createLogConfigOptions(verbose); - File logCfgFile = new File(_installDir, "logger.config"); - useTemplate("logger.config.template",logCfgFile); - } - - private void createSeedNodes() { - showStatus("To connect to I2P, you will need a reference to at least one other I2P router"); - showStatus("Rather than bundle some (soon to be out of date) references with the software, "); - showStatus("you can either run the included reseed script or get get your own references "); - showStatus("from some out of band location. "); - showStatus(""); - showStatus("The reseed script simply connects to http://i2p.net/i2pdb/ and downloads all"); - showStatus("of the routerInfo-*.dat files and save them into " + (new File(_installDir, "i2pdb")).getAbsolutePath()); - showStatus("That ../i2pdb/ directory is simply a mirror of one router's netDb directory, so those files"); - showStatus("can come from anyone else too"); - showStatus(""); - showStatus("You can run the reseed script or download references (from your friends, etc) as often"); - showStatus("as you like without restarting your router. If you find your netDb directory to have "); - showStatus("only one file in it (thats your router info), you will need more peers to get anything done."); - showStatus(""); - boolean reseed = confirmOption("Do you want to run the reseed script now? ", true); - if (reseed) { - reseed(); - } else { - showStatus("Ok ok, not reseeding - but please reseed before running the router"); - } - } - - private void reseed() { - try { - URL dir = new URL("http://i2p.net/i2pdb/"); - String content = new String(readURL(dir)); - Set urls = new HashSet(); - int cur = 0; - while (true) { - int start = content.indexOf("href=\"routerInfo-", cur); - if (start < 0) - break; - - int end = content.indexOf(".dat\">", start); - String name = content.substring(start+"href=\"routerInfo-".length(), end); - urls.add(name); - cur = end + 1; - } - - for (Iterator iter = urls.iterator(); iter.hasNext(); ) { - fetchSeed((String)iter.next()); - } - } catch (Throwable t) { - t.printStackTrace(); - showStatus("Error reseeding - " + t.getMessage()); - } - } - - private void fetchSeed(String peer) throws Exception { - URL url = new URL("http://i2p.net/i2pdb/routerInfo-" + peer + ".dat"); - showStatus("Fetching seed from " + url.toExternalForm()); - - byte data[] = readURL(url); - writeSeed(peer, data); - } - - private byte[] readURL(URL url) throws Exception { - ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); - URLConnection con = url.openConnection(); - InputStream in = con.getInputStream(); - byte buf[] = new byte[1024]; - while (true) { - int read = in.read(buf); - if (read < 0) - break; - baos.write(buf, 0, read); - } - in.close(); - return baos.toByteArray(); - } - - private void writeSeed(String name, byte data[]) throws Exception { - File netDbDir = new File(_installDir, "netDb"); - if (!netDbDir.exists()) - netDbDir.mkdirs(); - FileOutputStream fos = new FileOutputStream(new File(netDbDir, "routerInfo-" + name + ".dat")); - fos.write(data); - fos.close(); - } - - private void copyLibraries() { - File libDir = new File(_installDir, "lib"); - if (!libDir.exists()) { - boolean libCreated = libDir.mkdirs(); - if (!libCreated) { - showStatus("Error creating library directory " + libDir.getAbsolutePath()); - return; - } - } - showStatus("Installing the libraries into " + libDir.getAbsolutePath()); - int cnt = Integer.parseInt(_p.getProperty("libs.count")); - try { - for (int i=1;i<=cnt;i++) { - String ii = numberTo4Digits(i), - file = _p.getProperty("libs."+ii+".name"); - boolean isLib = "true".equals(_p.getProperty("libs."+ii+".islib")); - InputStream is = Install.class.getResourceAsStream("/"+file); - if (is == null) throw new IOException("Resource /"+file+" not found"); - copyFile(is, file, isLib?libDir:_installDir); - } - } catch (IOException ioe) { - showStatus("Error extracting the libraries: " + ioe.getMessage()); - } - File dbDir = new File(_installDir, "netDb"); - dbDir.mkdirs(); - File logDir = new File(_installDir, "logs"); - logDir.mkdirs(); - } - - private void copyFile(InputStream in, String name, File destDir) { - File destFile = new File(destDir, name); - try { - byte buf[] = new byte[16*1024]; - FileOutputStream out = new FileOutputStream(destFile); - while (true) { - int read = in.read(buf); - if (read == -1) - break; - out.write(buf, 0, read); - } - in.close(); - out.close(); - showStatus("Installed file " + destFile.getName() + " in " + destFile.getParent()); - } catch (IOException ioe) { - showStatus("Error saving " + name + " to " + destFile.getAbsolutePath() - + ": " + ioe.getMessage()); - } - } - - private void createLogConfigOptions(boolean verbose) { - _answers.put("_logger_level", verbose?"DEBUG":"INFO"); - _answers.put("_logger_level2", verbose?"WARN":"ERROR"); - StringBuffer buf = new StringBuffer(); - if (!verbose) { - // overrides for particularly chatty classes - _answers.put("_logger_notverbose", "logger.record.net.i2p.router.transport.Triv=ERROR"+NL+ - "logger.record.net.i2p.router.transport.Band=ERROR"+NL+ - "logger.record.net.i2p.crypto=ERROR" +NL+ - "logger.record.net.i2p.crypto.DH=ERROR"); - } else { - _answers.put("_logger_notverbose",""); - } - } - - private void createScripts(String unixName, String windowsName, int listenPort, - String targetDest, String logfilePattern, String windowTitle, - String message, String scriptMessage) { - createScripts(unixName, windowsName, "client "+listenPort+" "+targetDest, - logfilePattern, windowTitle, message, scriptMessage); - } - - private void createScripts(String unixName, String windowsName, String command, - String logfilePattern, String windowTitle, String message, - String scriptMessage) { - _answers.put("_scripts_port", ""+_i2cpPort); - _answers.put("_scripts_cmd", command); - _answers.put("_scripts_logname", logfilePattern); - _answers.put("_scripts_winttl", windowTitle); - _answers.put("_scripts_message", scriptMessage); - if (_isWindows) { - File windowsFile = new File(_installDir, windowsName); - useTemplate("startFoo.bat.template", windowsFile); - } else { - File unixFile = new File(_installDir, unixName); - useTemplate("startFoo.sh.template", unixFile); - chmodaplusx(unixFile); - } - showStatus(message); - } - - private void createReseedScript() { - if (_isWindows) { - File windowsFile = new File(_installDir, "reseed.bat"); - useTemplate("reseed.bat.template", windowsFile); - } else { - File unixFile = new File(_installDir, "reseed.sh"); - useTemplate("reseed.sh.template", unixFile); - chmodaplusx(unixFile); - } - } - - private void chmodaplusx(File f) { - try { - Runtime.getRuntime().exec("chmod a+x " + f.getAbsolutePath()); - } catch (IOException ioe) { - showStatus("Error setting "+f.getName()+" as executable"); - } - } - - private void createStartScript() { - _answers.put("_scripts_installdir", _installDir.getAbsolutePath()); - if (_isWindows) { - File windowsFile = new File(_installDir, "startRouter.bat"); - useTemplate("startRouter.bat.template", windowsFile); - } else { - File unixFile = new File(_installDir, "startRouter.sh"); - useTemplate("startRouter.sh.template", unixFile); - File unixStopFile = new File(_installDir, "stopRouter.sh"); - useTemplate("stopRouter.sh.template", unixStopFile); - chmodaplusx(unixFile); - chmodaplusx(unixStopFile); - } - } - - private void createConfigFile() { - File configFile = new File(_installDir, "router.config"); - setConfigFileOptions(); - useTemplate("router.config.template", configFile); - showStatus("Router configuration file written to " + configFile.getAbsolutePath()); - showStatus(""); - } - - private final static String NL = System.getProperty("line.separator"); - - private void setConfigFileOptions() { - // set fields needed for the config template - _answers.put("NOW", new Date().toString()); - if (_inTCP <= 0) { - _answers.put("_router_hn", "#i2np.tcp.hostname=[externally reachable hostname or IP address goes here]"); - _answers.put("_router_port", "#i2np.tcp.port=[TCP/IP port number]"); - _answers.put("_router_lavalid","#i2np.tcp.listenAddressIsValid=[true/false for whether your external address is locally reachable]"); - _answers.put("_router_tcpdisable","#i2np.tcp.disable=[true/false for whether you want absolutely no tcp connections to be established (forcing phttp, etc)])"); - } else { - _answers.put("_router_hn","i2np.tcp.hostname="+_externalAddress); - _answers.put("_router_port","i2np.tcp.port="+_inTCP); - _answers.put("_router_lavalid","i2np.tcp.listenAddressIsValid="+_externalAddressIsReachable); - _answers.put("_router_tcpdisable","i2np.tcp.disable=false"); - } - if ( (_phttpRegister == null) || (_phttpSend == null) ) { - _answers.put("_router_phttpreg","#i2np.phttp.registerURL=[full URL to a PHTTP registration server, e.g. http://someHost:8080/phttprelay/phttpRegister]"); - _answers.put("_router_phttpsend","#i2np.phttp.sendURL=[full URL to a PHTTP relay server, e.g. http://someHost:8080/phttprelay/phttpSend]"); - } else { - _answers.put("_router_phttpreg","i2np.phttp.registerURL="+_phttpRegister); - _answers.put("_router_phttpsend","i2np.phttp.sendURL="+_phttpSend); - } - _answers.put("_router_i2cp_port",""+_i2cpPort); - _answers.put("_router_inbps",""+(_inBPS*60)); - _answers.put("_router_outbps",""+(_outBPS*60)); - } -} diff --git a/installer/java/src/harvester.config b/installer/java/src/harvester.config deleted file mode 100644 index 2f8da1d237..0000000000 --- a/installer/java/src/harvester.config +++ /dev/null @@ -1,263 +0,0 @@ -# Configure what data points the netmonitor app will harvest from -# the network database. -# -# You probably don't want to edit this. -# -harvestDelaySeconds=600 -# -statGroup.0.name=dropped -statGroup.0.detail.0.name=num dropped jobs (hour) -statGroup.0.detail.0.option=stat_jobQueue.droppedJobs.60m -statGroup.0.detail.0.field=3 -statGroup.0.detail.1.name=num dropped jobs (day) -statGroup.0.detail.1.option=stat_jobQueue.droppedJobs.24h -statGroup.0.detail.1.field=3 -statGroup.0.detail.2.name=num dropped messages (hour) -statGroup.0.detail.2.option=stat_inNetPool.dropped.60m -statGroup.0.detail.2.field=3 -statGroup.0.detail.3.name=num dropped messages (day) -statGroup.0.detail.3.option=stat_inNetPool.dropped.24h -statGroup.0.detail.3.field=3 -# -statGroup.1.name=encryptTime -statGroup.1.detail.0.name=encryption time avg ms (minute) -statGroup.1.detail.0.option=stat_crypto.elGamal.encrypt.60s -statGroup.1.detail.0.field=0 -statGroup.1.detail.1.name=num encryptions (minute) -statGroup.1.detail.1.option=stat_crypto.elGamal.encrypt.60s -statGroup.1.detail.1.field=7 -statGroup.1.detail.2.name=encryption time avg ms (hour) -statGroup.1.detail.2.option=stat_crypto.elGamal.encrypt.60m -statGroup.1.detail.2.field=0 -statGroup.1.detail.3.name=num encryptions (hour) -statGroup.1.detail.3.option=stat_crypto.elGamal.encrypt.60m -statGroup.1.detail.3.field=7 -statGroup.1.detail.4.name=garlic fail (hour) -statGroup.1.detail.4.option=stat_crypto.garlic.decryptFail.60m -statGroup.1.detail.4.field=3 -# -statGroup.2.name=processingTime -statGroup.2.detail.0.name=process time avg ms (minute) -statGroup.2.detail.0.option=stat_transport.sendProcessingTime.60s -statGroup.2.detail.0.field=0 -statGroup.2.detail.1.name=process events (minute) -statGroup.2.detail.1.option=stat_transport.sendProcessingTime.60s -statGroup.2.detail.1.field=7 -statGroup.2.detail.2.name=process time avg ms (hour) -statGroup.2.detail.2.option=stat_transport.sendProcessingTime.60m -statGroup.2.detail.2.field=0 -statGroup.2.detail.3.name=process events(hour) -statGroup.2.detail.3.option=stat_transport.sendProcessingTime.60m -statGroup.2.detail.3.field=7 -# -statGroup.3.name=jobInfo -statGroup.3.detail.0.name=job run avg ms (minute) -statGroup.3.detail.0.option=stat_jobQueue.jobRun.60s -statGroup.3.detail.0.field=0 -statGroup.3.detail.1.name=job lag avg ms (minute) -statGroup.3.detail.1.option=stat_jobQueue.jobLag.60s -statGroup.3.detail.1.field=0 -statGroup.3.detail.2.name=job count (minute) -statGroup.3.detail.2.option=stat_jobQueue.jobRun.60s -statGroup.3.detail.2.field=7 -statGroup.3.detail.3.name=job run avg ms (hour) -statGroup.3.detail.3.option=stat_jobQueue.jobRun.60m -statGroup.3.detail.3.field=0 -statGroup.3.detail.4.name=job lag avg ms (hour) -statGroup.3.detail.4.option=stat_jobQueue.jobLag.60m -statGroup.3.detail.4.field=0 -statGroup.3.detail.5.name=job count (hour) -statGroup.3.detail.5.option=stat_jobQueue.jobRun.60m -statGroup.3.detail.5.field=7 -# -statGroup.4.name=tunnels -statGroup.4.detail.0.name=participating tunnels count (5 minutes) -statGroup.4.detail.0.option=stat_tunnel.participatingTunnels.5m -statGroup.4.detail.0.field=0 -statGroup.4.detail.1.name=participating tunnels joined (5 minutes) -statGroup.4.detail.1.option=stat_tunnel.participatingTunnels.5m -statGroup.4.detail.1.field=3 -statGroup.4.detail.2.name=participating tunnels count (hour) -statGroup.4.detail.2.option=stat_tunnel.participatingTunnels.60m -statGroup.4.detail.2.field=0 -statGroup.4.detail.3.name=participating tunnels joined (hour) -statGroup.4.detail.3.option=stat_tunnel.participatingTunnels.60m -statGroup.4.detail.3.field=3 -statGroup.4.detail.4.name=unknown tunnels (hour) -statGroup.4.detail.4.option=stat_tunnel.unknownTunnelTimeLeft.60m -statGroup.4.detail.4.field=3 -statGroup.4.detail.5.name=unknown tunnel time remaining (hour) -statGroup.4.detail.5.option=stat_tunnel.unknownTunnelTimeLeft.60m -statGroup.4.detail.5.field=0 -statGroup.4.detail.6.name=unknown tunnels (day) -statGroup.4.detail.6.option=stat_tunnel.unknownTunnelTimeLeft.24h -statGroup.4.detail.6.field=3 -statGroup.4.detail.7.name=unknown tunnel time remaining (day) -statGroup.4.detail.7.option=stat_tunnel.unknownTunnelTimeLeft.24h -statGroup.4.detail.7.field=0 -statGroup.4.detail.8.name=tunnel test time (hour) -statGroup.4.detail.8.option=stat_tunnel.testSuccessTime.60m -statGroup.4.detail.8.field=0 -statGroup.4.detail.9.name=tunnel test time (day) -statGroup.4.detail.9.option=stat_tunnel.testSuccessTime.24h -statGroup.4.detail.9.field=0 -statGroup.4.detail.10.name=avg messages per inbound tunnel (10 minutes) -statGroup.4.detail.10.option=stat_tunnel.inboundMessagesProcessed.10m -statGroup.4.detail.10.field=0 -statGroup.4.detail.11.name=avg messages per inbound tunnel (60 minutes) -statGroup.4.detail.11.option=stat_tunnel.inboundMessagesProcessed.60m -statGroup.4.detail.11.field=0 -statGroup.4.detail.12.name=avg messages per outbound tunnel (10 minutes) -statGroup.4.detail.12.option=stat_tunnel.outboundMessagesProcessed.10m -statGroup.4.detail.12.field=0 -statGroup.4.detail.13.name=avg messages per outbound tunnel (60 minutes) -statGroup.4.detail.13.option=stat_tunnel.outboundMessagesProcessed.60m -statGroup.4.detail.13.field=0 -statGroup.4.detail.14.name=avg messages per participating tunnel (10 minutes) -statGroup.4.detail.14.option=stat_tunnel.participatingMessagesProcessed.10m -statGroup.4.detail.14.field=0 -statGroup.4.detail.15.name=avg messages per participating tunnel (60 minutes) -statGroup.4.detail.15.option=stat_tunnel.participatingMessagesProcessed.60m -statGroup.4.detail.15.field=0 -# -statGroup.5.name=transfer -statGroup.5.detail.0.name=messages sent (5 minutes) -statGroup.5.detail.0.option=stat_transport.sendMessageSize.5m -statGroup.5.detail.0.field=7 -statGroup.5.detail.1.name=send message size avg (5 minutes) -statGroup.5.detail.1.option=stat_transport.sendMessageSize.5m -statGroup.5.detail.1.field=0 -statGroup.5.detail.2.name=messages sent (hour) -statGroup.5.detail.2.option=stat_transport.sendMessageSize.60m -statGroup.5.detail.2.field=7 -statGroup.5.detail.3.name=send message size avg (hour) -statGroup.5.detail.3.option=stat_transport.sendMessageSize.60m -statGroup.5.detail.3.field=0 -statGroup.5.detail.4.name=messages received (5 minutes) -statGroup.5.detail.4.option=stat_transport.receiveMessageSize.5m -statGroup.5.detail.4.field=7 -statGroup.5.detail.5.name=receive message size avg (5 minutes) -statGroup.5.detail.5.option=stat_transport.receiveMessageSize.5m -statGroup.5.detail.5.field=0 -statGroup.5.detail.6.name=messages received (hour) -statGroup.5.detail.6.option=stat_transport.receiveMessageSize.60m -statGroup.5.detail.6.field=7 -statGroup.5.detail.7.name=receive message size avg (hour) -statGroup.5.detail.7.option=stat_transport.receiveMessageSize.60m -statGroup.5.detail.7.field=0 -# -statGroup.6.name=transferSmall -statGroup.6.detail.0.name=small messages sent (5 minutes) -statGroup.6.detail.0.option=stat_transport.sendMessageSmall.5m -statGroup.6.detail.0.field=7 -statGroup.6.detail.1.name=small messages sent (hour) -statGroup.6.detail.1.option=stat_transport.sendMessageSmall.60m -statGroup.6.detail.1.field=7 -statGroup.6.detail.2.name=small messages received (5 minutes) -statGroup.6.detail.2.option=stat_transport.receiveMessageSmall.5m -statGroup.6.detail.2.field=7 -statGroup.6.detail.3.name=small messages received (hour) -statGroup.6.detail.3.option=stat_transport.receiveMessageSmall.60m -statGroup.6.detail.3.field=7 -# -statGroup.7.name=transferMedium -statGroup.7.detail.0.name=medium messages sent (5 minutes) -statGroup.7.detail.0.option=stat_transport.sendMessageMedium.5m -statGroup.7.detail.0.field=7 -statGroup.7.detail.1.name=medium messages sent (hour) -statGroup.7.detail.1.option=stat_transport.sendMessageMedium.60m -statGroup.7.detail.1.field=7 -statGroup.7.detail.2.name=medium messages received (5 minutes) -statGroup.7.detail.2.option=stat_transport.receiveMessageMedium.5m -statGroup.7.detail.2.field=7 -statGroup.7.detail.3.name=medium messages received (hour) -statGroup.7.detail.3.option=stat_transport.receiveMessageMedium.60m -statGroup.7.detail.3.field=7 -# -statGroup.8.name=transferLarge -statGroup.8.detail.0.name=large messages sent (5 minutes) -statGroup.8.detail.0.option=stat_transport.sendMessageLarge.5m -statGroup.8.detail.0.field=7 -statGroup.8.detail.1.name=large messages sent (hour) -statGroup.8.detail.1.option=stat_transport.sendMessageLarge.60m -statGroup.8.detail.1.field=7 -statGroup.8.detail.2.name=large messages received (5 minutes) -statGroup.8.detail.2.option=stat_transport.receiveMessageLarge.5m -statGroup.8.detail.2.field=7 -statGroup.8.detail.3.name=large messages received (hour) -statGroup.8.detail.3.option=stat_transport.receiveMessageLarge.60m -statGroup.8.detail.3.field=7 -# -statGroup.9.name=networkDbHandling -statGroup.9.detail.0.name=lookups received (5 minutes) -statGroup.9.detail.0.option=stat_netDb.lookupsReceived.5m -statGroup.9.detail.0.field=3 -statGroup.9.detail.1.name=lookups handled (5 minutes) -statGroup.9.detail.1.option=stat_netDb.lookupsHandled.5m -statGroup.9.detail.1.field=3 -statGroup.9.detail.2.name=lookups matched (5 minutes) -statGroup.9.detail.2.option=stat_netDb.lookupsMatched.5m -statGroup.9.detail.2.field=3 -statGroup.9.detail.3.name=lookups received (hour) -statGroup.9.detail.3.option=stat_netDb.lookupsReceived.60m -statGroup.9.detail.3.field=3 -statGroup.9.detail.4.name=lookups handled (hour) -statGroup.9.detail.4.option=stat_netDb.lookupsHandled.60m -statGroup.9.detail.4.field=3 -statGroup.9.detail.5.name=lookups matched (hour) -statGroup.9.detail.5.option=stat_netDb.lookupsMatched.60m -statGroup.9.detail.5.field=3 -# -statGroup.10.name=networkDbActivity -statGroup.10.detail.0.name=lookups sent (hour) -statGroup.10.detail.0.option=stat_netDb.successPeers.60m -statGroup.10.detail.0.field=7 -statGroup.10.detail.1.name=lookup peers (hour) -statGroup.10.detail.1.option=stat_netDb.successPeers.60m -statGroup.10.detail.1.field=0 -statGroup.10.detail.2.name=db store sent (5 minutes) -statGroup.10.detail.2.option=stat_netDb.storeSent.5m -statGroup.10.detail.2.field=3 -statGroup.10.detail.3.name=db store sent (hour) -statGroup.10.detail.3.option=stat_netDb.storeSent.60m -statGroup.10.detail.3.field=3 -statGroup.10.detail.4.name=failed db lookups (hour) -statGroup.10.detail.4.option=stat_netDb.failedPeers.60m -statGroup.10.detail.4.field=3 -statGroup.10.detail.5.name=lookups sent (5m) -statGroup.10.detail.5.option=stat_netDb.searchMessageCount.5m -statGroup.10.detail.5.field=0 -statGroup.10.detail.6.name=lookups sent (10m) -statGroup.10.detail.6.option=stat_netDb.searchMessageCount.10m -statGroup.10.detail.6.field=0 -statGroup.10.detail.7.name=lookups sent (60m) -statGroup.10.detail.7.option=stat_netDb.searchMessageCount.60m -statGroup.10.detail.7.field=0 -# -statGroup.11.name=bandwidth -statGroup.11.detail.0.name=send rate (5 minutes) -statGroup.11.detail.0.option=stat_bandwidthSendBps.5m -statGroup.11.detail.0.field=0 -statGroup.11.detail.1.name=send rate (60 minutes) -statGroup.11.detail.1.option=stat_bandwidthSendBps.60m -statGroup.11.detail.1.field=0 -statGroup.11.detail.2.name=receive rate (5 minutes) -statGroup.11.detail.2.option=stat_bandwidthReceiveBps.5m -statGroup.11.detail.2.field=0 -statGroup.11.detail.3.name=receive rate (60 minutes) -statGroup.11.detail.3.option=stat_bandwidthReceiveBps.60m -statGroup.11.detail.3.field=0 -# -statGroup.12.name=queueing -statGroup.12.detail.0.name=time to process inbound (5 minutes) -statGroup.12.detail.0.option=stat_inNetMessage.timeToDiscard.5m -statGroup.12.detail.0.field=0 -statGroup.12.detail.1.name=time to process inbound (60 minutes) -statGroup.12.detail.1.option=stat_inNetMessage.timeToDiscard.60m -statGroup.12.detail.1.field=0 -statGroup.12.detail.2.name=time to process outbound (5 minutes) -statGroup.12.detail.2.option=stat_outNetMessage.timeToDiscard.5m -statGroup.12.detail.2.field=0 -statGroup.12.detail.3.name=time to process outbound (60 minutes) -statGroup.12.detail.3.option=stat_outNetMessage.timeToDiscard.60m -statGroup.12.detail.3.field=0 diff --git a/installer/java/src/heartbeat.config b/installer/java/src/heartbeat.config deleted file mode 100644 index a88c986a51..0000000000 --- a/installer/java/src/heartbeat.config +++ /dev/null @@ -1,28 +0,0 @@ -# where the router is located (default is localhost) -i2cpHost=localhost -# I2CP port for the router (default is 7654) -i2cpPort=7654 -# How many hops we want the router to put in our tunnels (default is 2) -numHops=2 -# where our private destination keys are located - if this doesn't exist, -# a new one will be created and saved there (by default, heartbeat.keys) -privateDestinationFile=heartbeat.keys -# where do we want to export the plain base64 of our destination? -publicDestinationFile=heartbeat.txt - -# full destination to the peer -#peer.0.peer=[base64 of the destination] -# where we'll write out the stat data -#peer.0.statFile=heartbeatStat_30s_1kb.txt -# how many minutes of data we'll keep (3 hours) -#peer.0.statDuration=180 -# how often we'll write out the state (every 30 seconds) -#peer.0.statFrequency=30 -# how often we'll send the peer a ping (every 30 seconds) -#peer.0.sendFrequency=30 -# how large the pings and pongs will be (1KB) -#peer.0.sendSize=1024 -# what moving averages should we keep (1, 5, 30, and 120 minutes) -#peer.0.averagePeriods=1 5 30 120 -# moo -#peer.0.comment=Test with localhost sending 1KB every 30 seconds diff --git a/installer/java/src/i2ptunnel.config b/installer/java/src/i2ptunnel.config deleted file mode 100644 index aec56c630d..0000000000 --- a/installer/java/src/i2ptunnel.config +++ /dev/null @@ -1,22 +0,0 @@ -tunnel.0.description=HTTP proxy for browsing eepsites and the web -tunnel.0.i2cpHost=localhost -tunnel.0.i2cpPort=7654 -tunnel.0.interface=127.0.0.1 -tunnel.0.listenPort=4444 -tunnel.0.name=eepProxy -tunnel.0.option.tunnels.depthInbound=2 -tunnel.0.option.tunnels.numInbound=2 -tunnel.0.proxyList=squid.i2p -tunnel.0.startOnLoad=true -tunnel.0.type=httpclient -tunnel.1.description=IRC proxy to access the anonymous irc net -tunnel.1.i2cpHost=localhost -tunnel.1.i2cpPort=7654 -tunnel.1.interface=127.0.0.1 -tunnel.1.listenPort=6668 -tunnel.1.name=ircProxy -tunnel.1.option.tunnels.depthInbound=2 -tunnel.1.option.tunnels.numInbound=2 -tunnel.1.startOnLoad=true -tunnel.1.targetDestination=irc.duck.i2p -tunnel.1.type=client diff --git a/installer/java/src/install.config b/installer/java/src/install.config deleted file mode 100644 index 95c44f2e01..0000000000 --- a/installer/java/src/install.config +++ /dev/null @@ -1,117 +0,0 @@ -# config file for the installer - -# intention for this file is that a gui installer can use the same -# settings as the cli installer - -qs.count=50 - -qs.0001.question=General settings - qs.0001.type=category -qs.0002.question=Installation directory - qs.0002.param=installDir - qs.0002.type=directory - qs.0002.default=. -qs.0003.question= - - -qs.0006.question=Network settings - qs.0006.type=category -qs.0007.question=Currently, to use I2P you must have a publicly reachable TCP/IP address \nthat you can receive new connections on. This means that if you're\nbehind a firewall or NAT, you will have to poke a hole in it for the \ninbound TCP port (which you'll specify in a moment), and if you have DHCP,\nyou must use a service like dyndns.org and specify that hostname as your\nexternal address. - qs.0007.type=info -qs.0008.question=External address - qs.0008.param=externalAddress - qs.0008.type=string>0 -qs.0009.question=Note to advanced users: the default settings bind any TCP listeners to \nall local IP addresses, but you can have it bind to a specific one if necessary\nPlease see the router.config for the options i2np.tcp.listenAddressIsValid - qs.0009.type=info -qs.0010.question=<none> - qs.0010.param=externalAddressIsReachable - qs.0010.type=boolean - qs.0010.default=false -qs.0011.question=Inbound TCP port? (any unused port will do, just pick a number) - qs.0011.param=inTCP - qs.0011.type=port - qs.0011.default=8887 -qs.0012.question=If you have a NAT or firewall, please be sure port ##inTCP## is open and can receive inbound connections! - qs.0012.type=info_spliced -qs.0015.question=<none> - qs.0015.param=phttpRegister - qs.0015.type=string>0 - qs.0015.default=http://i2p.net:8080/phttprelay/phttpRegister -qs.0016.question=<none> - qs.0016.param=phttpSend - qs.0016.type=string>0 - qs.0016.default=http://i2p.net:8080/phttprelay/phttpSend -qs.0017.question=<none> - qs.0017.param=i2cpPort - qs.0017.type=port - qs.0017.default=7654 -qs.0018.question= -qs.0019.question=40 - qs.0019.type=skip -## leave some numbers free, for future additions - -## bandwidth questions, skipped over -qs.0030.question=Bandwidth limits - qs.0030.type=category -qs.0031.question=These bandwidth limits are fairly hard and unforgiving.\nWe do our best to not let any data beyond these limits be transferred at all, ever.\nSo keep that in mind, and set the limits to the upper bounds of what you can handle.\n\nPlease take note that these bandwidth limits are currently very, very strict, and the network itself does not consume\nmuch bandwidth. Everything will stop transferring data without warning if the limits are met - you really should set\nthis to -1 for now, at least until the new classed bandwidth limiter is implemented (currently planned for the 0.3.2 release) - qs.0031.type=info -qs.0032.question= -qs.0033.question=Inbound bytes per second: (e.g. 16K, 16384, or -1 for unlimited) - qs.0033.param=inBPS - qs.0033.type=bandwidth - qs.0033.default=-1 -qs.0034.question=Outbound bytes per second: (e.g. 16K, 16384, or -1 for unlimited) - qs.0034.param=outBPS - qs.0034.type=bandwidth - qs.0034.default=-1 -qs.0035.question= -qs.0036.question=45 - qs.0036.type=skip - -qs.0040.question=<none> - qs.0040.param=inBPS - qs.0040.default=-1 - qs.0040.type=numeric -qs.0041.question=<none> - qs.0041.param=outBPS - qs.0041.default=-1 - qs.0041.type=numeric -qs.0042.question=45 - qs.0042.type=skip - -qs.0045.question=<none> -#qs.0045.question=Do you want very verbose debug logs when running the router by default (y/n) - qs.0045.param=verboseLogs - qs.0045.default=no - qs.0045.type=boolean - -qs.0050.question=End of configuration. - - -libs.count=13 -libs.0001.name=i2p.jar - libs.0001.islib=true -libs.0002.name=i2ptunnel.jar - libs.0002.islib=true -libs.0003.name=router.jar - libs.0003.islib=true -libs.0004.name=fetchseeds.jar - libs.0004.islib=true -libs.0005.name=COPYING - libs.0005.islib=false -libs.0006.name=readme.txt - libs.0006.islib=false -libs.0007.name=hosts.txt - libs.0007.islib=false -libs.0008.name=mstreaming.jar - libs.0008.islib=true -libs.0009.name=sam.jar - libs.0009.islib=true -libs.0010.name=heartbeat.jar - libs.0010.islib=true -libs.0011.name=netmonitor.jar - libs.0011.islib=true -libs.0012.name=harvester.config - libs.0012.islib=false -libs.0013.name=heartbeat.config - libs.0013.islib=false diff --git a/installer/java/src/logger.config.template b/installer/java/src/logger.config.template deleted file mode 100644 index ccf7740c86..0000000000 --- a/installer/java/src/logger.config.template +++ /dev/null @@ -1,66 +0,0 @@ -# I2P Log Configuration File -# Format: -# d = date -# c = class or log name -# t = thread name -# p = priority level of the log record -# m = message -logger.format=d p [t] c: m - -# Date format: -# uses the java.text.SimpleDateFormat -logger.dateFormat=HH:mm:ss.SSS - -# Log file name: -# This is the log file name before being rotated -# '#' is replaced with the current log number for that day -# If # is not specified, logs are not rotated -logger.logFileName=logs/log-#.txt - -# Log file size: -# Maximum size of each log file: -# 32g <-- 32 gigabytes (32*1024*1024*1024 bytes) -# 10m <-- 10 megabytes (10*1024*1024 bytes) -# 66k <-- 66 kilobytes (66*1024 bytes) -# 42 <-- 42 bytes -logger.logFileSize=3m - -# Log rotation limit: -# Maximum number of logs to keep per day - lower log numbers -# are reused once the limit is reached. Ignored if there is no -# '#' in the logFileName. -logger.logRotationLimit=3 - -# Display on screen: -# In addition to the logging, send filtered log messages to the -# standard output -# true or false -logger.displayOnScreen=true - -# Default level: -# Define the minimum log level to be displayed unless -# specified otherwise. -# -# Log levels, from least severe to most, are: -# DEBUG : verbose debugging info -# INFO : component status messages -# WARN : bad situation but recoverable -# ERROR : component error -# CRIT : your hard drive is on fire -# -# Less severe levels always include more severe ones (e.g. -# if you're listening to debug messages, you'll get info messages -# too) -logger.defaultLevel=##_logger_level## - -# Minimum log level for a record to be displayed on the screen -# This check occurs after other filters occur, and only affects what is -# show on console, and only does anything if displayOnScreen=true -logger.minimumOnScreenLevel=DEBUG - -# Records: -# Override the defaultLevel for all classes under the given package -# or class -logger.record.net.i2p=##_logger_level2## -##_logger_notverbose## - diff --git a/installer/java/src/reseed.bat.template b/installer/java/src/reseed.bat.template deleted file mode 100644 index fe0374b745..0000000000 --- a/installer/java/src/reseed.bat.template +++ /dev/null @@ -1,3 +0,0 @@ -cd ##_scripts_installdir## -java -jar lib\fetchseeds.jar netDb http://dev.i2p.net/i2pdb/ -pause \ No newline at end of file diff --git a/installer/java/src/reseed.sh.template b/installer/java/src/reseed.sh.template deleted file mode 100644 index 8382c7b0e6..0000000000 --- a/installer/java/src/reseed.sh.template +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cd ##_scripts_installdir## -java -jar lib/fetchseeds.jar netDb http://dev.i2p.net/i2pdb/ -echo Router network database reseeded \ No newline at end of file diff --git a/installer/java/src/router.config.template b/installer/java/src/router.config.template deleted file mode 100644 index 67d6701b1d..0000000000 --- a/installer/java/src/router.config.template +++ /dev/null @@ -1,175 +0,0 @@ -# I2P router configuration -# Created on ##NOW## - -# TCP configuration, for inbound TCP/IP connections -##_router_hn## -##_router_port## -##_router_lavalid## - -# maximum number of TCP connections we will want to -# attempt to establish at once (each of which -# requires a 2048bit DH exchange) -i2np.tcp.concurrentEstablishers=5 - -# I2CP client port, for client connections -i2cp.port=##_router_i2cp_port## - -# I2P router administrative web port (currently only responds to /routerConsole.html) -router.adminPort=7655 - -# Bandwidth limits -# These limits are for all i2np connections - tcp or whatever to all peers. -# They are hard enforced with no smoothing. If they are <= 0, no limits are enforced. -# Do not set this lower than 6KBps -i2np.bandwidth.inboundKBytesPerSecond=-1 -i2np.bandwidth.outboundKBytesPerSecond=-1 -# How many bytes will we let accumulate due to inactivity (allowing bursts)? -# Do not set this lower than the rate above - doing so will not achieve what you want, really. -# (the bandwidth limiter uses a token bucket algorithm and this burst defines the size of the -# bucket) -i2np.bandwidth.inboundBurstKBytes=-1 -i2np.bandwidth.outboundBurstKBytes=-1 - -# Publish peer rankings -# If true, include the current liveliness and reliability rankings in one's published RouterInfo data -# Setting this to true will help debug the network and is especially useful while we'return still testing -# However, traffic analysis may be easier with this data published (though there's no reason to think people -# can't just fake the info in this). -# Since we're still very much < 1.0, this will be true for the current release by default. As we get some -# network helth information and tune the ranking algorithms, this will become false by default. -# You, of course, can change this to either true or false whenever you'd like. This is only read -# on router startup though, so you need to restart the router if you change it. -router.publishPeerRankings=true - -# Keep message history -# This series of options can help out in debugging the network by keeping a -# seperate log of all messages sent over the network (but without any personally identifiable information) -# This is entirely optional, but would be greatly appreciated during the -# development phase of the network since it would allow the developers to detect -# errors much more easily -router.keepHistory=false - -# Submit message history -# This option works only if router.keepHistory is true and periodically sends -# in the router history logs to the developers (specifically, it submits the file -# via HTTP POST to http://i2p.net/cgi-bin/submitMessageHistory - you can see a sample of what -# one of those files looks like at http://i2p.net/~jrandom/sampleHist.txt) -# After submitting this file, it deletes the local copy (otherwise the file will grow -# without bound - tens of MB per day) -# Again, this is entirely optional, but would be greatly appreciated as it should help -# out the development process -router.submitHistory=false - -# Target clients -# How many concurrent clients the router should prepare for -# This, factored in with the tunnel settings, determines the size of the pools - -# too many, and your machine consumes excessive CPU and bandwidth, too few and your -# clients take too long to startup. -# e.g. If you are running an eepsite, an eepProxy, an irc proxy, and a squid proxy, set this to 4 -router.targetClients=2 - -# Number of inbound tunnels per client -# This determines how many inbound tunnels will be allocated per client at a time. -# This is a key factor in the reliability of a client receiving messages -# As above, too many and your machine gets hosed, too few and the pool is slow. -# 2 should be sufficient - prior to 0.2.5, we have all had only 1 -tunnels.numInbound=2 - -# Number of outbound tunnels per client -# This determines how many outbound tunnels must exist when a client is in operation. -# XXX Not currently enforced - ignore this setting -tunnels.numOutbound=2 - -# Depth of inbound tunnels -# This determines the length of inbound tunnels created - how many remote routers to -# include (0 means no remote routers, 3 means a total of four routers, including -# the local one, etc). This is a key factor in the reliability and anonymity -# provided by I2P -# Users should simply leave this as 2 for now -tunnels.depthInbound=2 - -# Depth of outbound tunnels -# This determines the length of outbound tunnels created - how many remote routers to -# include (0 means no remote routers, 3 means a total of four routers, including -# the local one, etc). This is a key factor in the reliability and anonymity -# provided by I2P -# Users should simply leave this as 2 for now, at least until the tunnels are more reliable (post 0.3) -tunnels.depthOutbound=2 - -# Tunnel duration -# This determines how long tunnels we create should last for (in milliseconds). Too -# long and they are more prone to failure, too short and people need to do more network -# database lookups. The default of 10 minutes (600000 ms) should be used -# You should not change this setting unless you really know what you're doing -tunnels.tunnelDuration=600000 - -# shutdown password -# uncomment the following (after changing the value) to allow shutting down the -# router through the web interface (using the form provided, or directly via -# http://localhost:7655/shutdown?password=thisIsASecret) -#router.shutdownPassword=thisIsASecret - -# Comma delimited list of SNTP servers to query. pool.ntp.org is a DNS trick to -# This defaults to the DNS round-robin ntp pool - see http://www.pool.ntp.org/ -# Please change the NTP server specified to include ones closer to you - see -# http://www.eecis.udel.edu/~mills/ntp/clock2a.html for a list (you can specify as -# many as you want on the args= line - they'll be tried in order until one answers). -# Some example servers you may want to try: -# US: dewey.lib.ci.phoenix.az.us -# US: clock.fmt.he.net -# BR: ntp1.pucpr.br -# BE: ntp2.belbone.be -# AU: ntp.saard.net -time.sntpServerList=pool.ntp.org,pool.ntp.org,pool.ntp.org - -# Query an SNTP server every 5 minutes -# time.queryFrequencyMs=300000 - -# If you really really know that your computer's clock is ALWAYS correct, set this property -# time.disabled=true - -# -# the remaining lines describe how you can get your router to fire up client -# applications it is up and running, all within the router's JVM. Uncomment the -# ones you want (revising the numbers and ports accordingly) - -# SAM bridge (a simplified socket based protocol for using I2P - listens on port 7656. see -# the specs at http://www.i2p.net/node/view/144 for more info) -clientApp.0.main=net.i2p.sam.SAMBridge -clientApp.0.name=SAMBridge -clientApp.0.args=sam.keys 0.0.0.0 7656 i2cp.tcp.host=localhost i2cp.tcp.port=##_router_i2cp_port## - -# The eepProxy (HTTP proxy that lets you browse both eepsites and the normal web via squid.i2p) and -# the ircProxy (which connects to the anonymously hosted ircd at irc.duck.i2p) -clientApp.1.main=net.i2p.i2ptunnel.I2PTunnel -clientApp.1.name=Tunnels -clientApp.1.args=-nocli -e "config localhost ##_router_i2cp_port##" -e "httpclient 4444" -e "client 6668 irc.duck.i2p" -# note: if you want the proxies to be reachable from other machines, add: -# -e "listen_on 0.0.0.0" -# before the -e "httpclient 4444". otherwise, both of these proxies will only listen for connections on 127.0.0.1 - -# The following three lines replace the clientApp.1.* lines above, for use with the new router console. -# It loads up all of the tunnels (2 minutes later, giving the router time to boot), and starts any defined with -# startOnLoad. It can be further controlled at http://localhost:7657/i2ptunnel/ -# -#clientApp.1.main=net.i2p.i2ptunnel.TunnelControllerGroup -#clientApp.1.name=Tunnels -#clientApp.1.args=i2ptunnel.config - -# New router console webapp, driven by Jetty -# to use, you must mkdir ./webapps/ and place the routerconsole.war file in there, -# and add jetty-all.jar and routerconsole.jar in the router's classpath in the startRouter -# script -# (don't bother trying to figure this out prior to the 0.4 release) -#clientApp.2.main=net.i2p.router.web.RouterConsoleRunner -#clientApp.2.name=webConsole -#clientApp.2.args=7657 127.0.0.1 ./webapps/ -#clientApp.2.onBoot=true - -# To require simple HTTP authentication for accessing any of the pages underneath the web console -# (including any other webapps deployed), uncomment the following line and set the password -# accordingly (the username is 'admin'). If the following is commented out, or is blank, then -# no password will be required, and anyone will be able to access your router console (and change -# settings, etc). This is only used for the new jetty console (started in clientApp.3.* above) -# -#consolePassword=fooBarBaz diff --git a/installer/java/src/startFoo.bat.template b/installer/java/src/startFoo.bat.template deleted file mode 100644 index c3d6fc61aa..0000000000 --- a/installer/java/src/startFoo.bat.template +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title ##_scripts_winttl## -cd ##_scripts_installdir## -echo ##_scripts_message## -javaw -DloggerFilenameOverride=logs\##_scripts_logname## -Djava.library.path=. -Dcrypto.dh.precalc.min=0 -cp lib\mstreaming.jar;lib\i2p.jar -jar lib\i2ptunnel.jar -nocli -e "config localhost ##_scripts_port##" -e "##_scripts_cmd##" diff --git a/installer/java/src/startFoo.sh.template b/installer/java/src/startFoo.sh.template deleted file mode 100644 index 33d812a7a6..0000000000 --- a/installer/java/src/startFoo.sh.template +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -cd ##_scripts_installdir## -export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH -nohup nice java -DloggerFilenameOverride=logs/##_scripts_logname## -Djava.library.path=. -Dcrypto.dh.precalc.min=0 -cp lib/mstreaming.jar:lib/i2p.jar -jar lib/i2ptunnel.jar -nocli -e "config localhost ##_scripts_port##" -e "##_scripts_cmd##" > /dev/null & - -echo '##_scripts_message##' diff --git a/installer/java/src/startRouter.bat.template b/installer/java/src/startRouter.bat.template deleted file mode 100644 index 621fe4eec6..0000000000 --- a/installer/java/src/startRouter.bat.template +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -title I2P Router -cd ##_scripts_installdir## - -REM the -XX args are workarounds for bugs in java 1.4.2's garbage collector - -java -cp lib\i2p.jar;lib\router.jar;lib\mstreaming.jar;lib\heartbeat.jar;lib\i2ptunnel.jar;lib\netmonitor.jar;lib\sam.jar -Djava.library.path=. -DloggerFilenameOverride=logs\log-router-#.txt -XX:NewSize=4M -XX:MaxNewSize=8M -XX:PermSize=8M -XX:MaxPermSize=32M net.i2p.router.Router diff --git a/installer/java/src/startRouter.sh.template b/installer/java/src/startRouter.sh.template deleted file mode 100644 index ecf6d02a13..0000000000 --- a/installer/java/src/startRouter.sh.template +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -cd ##_scripts_installdir## -export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH -# the -XX args are workarounds for bugs in java 1.4.2's garbage collector -nohup nice java -cp lib/i2p.jar:lib/router.jar:lib/mstreaming.jar:lib/heartbeat.jar:lib/i2ptunnel.jar:lib/netmonitor.jar:lib/sam.jar -Djava.library.path=. -DloggerFilenameOverride=logs/log-router-#.txt -XX:NewSize=4M -XX:MaxNewSize=8M -XX:PermSize=8M -XX:MaxPermSize=32M net.i2p.router.Router --quiet > /dev/null & -# Save the pid just in case we ever want to stop the router -echo $! > router.pid -echo I2P Router started diff --git a/installer/java/src/stopRouter.sh.template b/installer/java/src/stopRouter.sh.template deleted file mode 100644 index 0259fc2096..0000000000 --- a/installer/java/src/stopRouter.sh.template +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd ##_scripts_installdir## -kill `cat router.pid` \ No newline at end of file -- GitLab