Changeset 0cfbe9c


Ignore:
Timestamp:
Apr 8, 2009 1:34:12 AM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
429280e, bb7884c
Parents:
f5614c8
Message:
  • IPV6/localhost:
    • Enable IPv6 stack in the JVM, hopefully won't break anything
    • Patch Jetty to support binding to IPv6 addresses
    • Allow multiple bind addresses for the router console in the clients.config file; for new installs the default is now "127.0.0.1,::1"
    • Change most instances of "localhost" to "127.0.0.1" throughout the code
  • Router:
    • Move some classes to private static inner
Files:
1 added
23 edited

Legend:

Unmodified
Added
Removed
  • apps/addressbook/java/src/addressbook/Daemon.java

    rf5614c8 r0cfbe9c  
    134134       
    135135        Map defaultSettings = new HashMap();
    136         defaultSettings.put("proxy_host", "localhost");
     136        defaultSettings.put("proxy_host", "127.0.0.1");
    137137        defaultSettings.put("proxy_port", "4444");
    138138        defaultSettings.put("master_addressbook", "../userhosts.txt");
  • apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java

    rf5614c8 r0cfbe9c  
    136136        // now add sane defaults
    137137        if (!_config.containsKey(PROP_I2CP_HOST))
    138             _config.setProperty(PROP_I2CP_HOST, "localhost");
     138            _config.setProperty(PROP_I2CP_HOST, "127.0.0.1");
    139139        if (!_config.containsKey(PROP_I2CP_PORT))
    140140            _config.setProperty(PROP_I2CP_PORT, "7654");
     
    142142            _config.setProperty(PROP_I2CP_OPTS, "inbound.length=2 inbound.lengthVariance=0 outbound.length=2 outbound.lengthVariance=0 inbound.quantity=3 outbound.quantity=3");
    143143        if (!_config.containsKey(PROP_EEP_HOST))
    144             _config.setProperty(PROP_EEP_HOST, "localhost");
     144            _config.setProperty(PROP_EEP_HOST, "127.0.0.1");
    145145        if (!_config.containsKey(PROP_EEP_PORT))
    146146            _config.setProperty(PROP_EEP_PORT, "4444");
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java

    rf5614c8 r0cfbe9c  
    207207            return tun.getI2CPHost();
    208208        else
    209             return "localhost";
     209            return "127.0.0.1";
    210210    }
    211211   
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java

    rf5614c8 r0cfbe9c  
    197197
    198198    private static String getHost() {
    199         return System.getProperty(I2PClient.PROP_TCP_HOST, "localhost");
     199        return System.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");
    200200    }
    201201    private static int getPort() {
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java

    rf5614c8 r0cfbe9c  
    156156        // releases <= 0.6.5 deleted the entry completely
    157157        if (shouldLaunchBrowser && !found) {
    158             ClientAppConfig ca = new ClientAppConfig(UrlLauncher.class.getName(), "consoleBrowser", "http://localhost:7657", 5, false);
     158            ClientAppConfig ca = new ClientAppConfig(UrlLauncher.class.getName(), "consoleBrowser", "http://127.0.0.1:7657", 5, false);
    159159            clients.add(ca);
    160160        }
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java

    rf5614c8 r0cfbe9c  
    2828    public static final String DEFAULT_SHOULD_PROXY = Boolean.TRUE.toString();
    2929    public static final String PROP_PROXY_HOST = "router.updateProxyHost";
    30     public static final String DEFAULT_PROXY_HOST = "localhost";
     30    public static final String DEFAULT_PROXY_HOST = "127.0.0.1";
    3131    public static final String PROP_PROXY_PORT = "router.updateProxyPort";
    3232    public static final String DEFAULT_PROXY_PORT = "4444";
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    rf5614c8 r0cfbe9c  
    66import java.util.List;
    77import java.util.Properties;
     8import java.util.StringTokenizer;
    89
    910import net.i2p.I2PAppContext;
     
    3738    }
    3839   
     40    /**
     41     *  @param args second arg may be a comma-separated list of bind addresses,
     42     *              for example ::1,127.0.0.1
     43     *              On XP, the other order (127.0.0.1,::1) fails the IPV6 bind,
     44     *              because 127.0.0.1 will bind ::1 also. But even though it's bound
     45     *              to both, we can't connect to [::1]:7657 for some reason.
     46     *              So the wise choice is ::1,127.0.0.1
     47     */
    3948    public RouterConsoleRunner(String args[]) {
    4049        if (args.length == 3) {
     
    6776        }
    6877        try {
    69             _server.addListener(_listenHost + ':' + _listenPort);
     78            StringTokenizer tok = new StringTokenizer(_listenHost, " ,");
     79            int boundAddresses = 0;
     80            while (tok.hasMoreTokens()) {
     81                String host = tok.nextToken().trim();
     82                try {
     83                    if (host.indexOf(":") >= 0) // IPV6 - requires patched Jetty 5
     84                        _server.addListener('[' + host + "]:" + _listenPort);
     85                    else
     86                        _server.addListener(host + ':' + _listenPort);
     87                    boundAddresses++;
     88                } catch (IOException ioe) { // this doesn't seem to work, exceptions don't happen until start() below
     89                    System.err.println("Unable to bind routerconsole to " + host + " port " + _listenPort + ' ' + ioe);
     90                }
     91            }
     92            if (boundAddresses <= 0) {
     93                System.err.println("Unable to bind routerconsole to any address on port " + _listenPort);
     94                return;
     95            }
    7096            _server.setRootWebApp(ROUTERCONSOLE);
    7197            WebApplicationContext wac = _server.addWebApplication("/", _webAppsDir + ROUTERCONSOLE + ".war");
     
    101127            _server.start();
    102128        } catch (Exception me) {
    103             me.printStackTrace();
     129            System.err.println("WARNING: Error starting one or more listeners of the Router Console server.\n" +
     130                               "If your console is still accessible at http://127.0.0.1:7657/,\n" +
     131                               "this may be a problem only with binding to the IPV6 address ::1.\n" +
     132                               "If so, you may ignore this error, or remove the\n" +
     133                               "\"::1,\" in the \"clientApp.0.args\" line of the clients.config file.\n" +
     134                               "Exception: " + me);
    104135        }
    105136        try {
  • apps/routerconsole/jsp/configservice.jsp

    rf5614c8 r0cfbe9c  
    7272 <p>I2P's main configuration interface is this web console, so for your convenience
    7373 I2P can launch a web browser pointing at
    74  <a href="http://localhost:7657/index.jsp">http://localhost:7657/index.jsp</a> whenever
     74 <a href="http://127.0.0.1:7657/index.jsp">http://127.0.0.1:7657/index.jsp</a> whenever
    7575 the router starts up.</p>
    7676 <input type="submit" name="action" value="View console on startup" />
  • apps/routerconsole/jsp/nav.jsp

    rf5614c8 r0cfbe9c  
    2626 <!-- <a href="syndie/">Syndie</a> | -->
    2727 <a href="i2psnark/">I2PSnark</a> |
    28  <a href="http://localhost:7658/">My Eepsite</a> <br>
     28 <a href="http://127.0.0.1:7658/">My Eepsite</a> <br>
    2929 <a href="i2ptunnel/index.jsp">I2PTunnel</a> |
    3030 <a href="tunnels.jsp">Tunnels</a> |
  • apps/susimail/src/src/i2p/susi/webmail/WebMail.java

    rf5614c8 r0cfbe9c  
    7777        private static final int BUFSIZE = 4096;
    7878
    79         private static final String DEFAULT_HOST = "localhost";
     79        private static final String DEFAULT_HOST = "127.0.0.1";
    8080        private static final int DEFAULT_POP3PORT = 7660;
    8181        private static final int DEFAULT_SMTPPORT = 7659;
  • apps/systray/java/src/net/i2p/apps/systray/SysTray.java

    rf5614c8 r0cfbe9c  
    133133
    134134    public void iconLeftDoubleClicked(SysTrayMenuEvent e) {
    135         openRouterConsole("http://localhost:" + _portString + "/index.jsp");
     135        openRouterConsole("http://127.0.0.1:" + _portString + "/index.jsp");
    136136    }
    137137
     
    154154                setBrowser(browser);
    155155        } else if (e.getActionCommand().equals("openconsole")) {
    156             openRouterConsole("http://localhost:" + _portString + "/index.jsp");
     156            openRouterConsole("http://127.0.0.1:" + _portString + "/index.jsp");
    157157        }
    158158    }
  • apps/systray/java/src/net/i2p/apps/systray/UrlLauncher.java

    rf5614c8 r0cfbe9c  
    164164                launcher.openUrl(args[0]);
    165165            else
    166                 launcher.openUrl("http://localhost:7657/index.jsp");
     166                launcher.openUrl("http://127.0.0.1:7657/index.jsp");
    167167         } catch (Exception e) {}
    168168    }
  • core/java/src/net/i2p/client/I2PSessionImpl.java

    rf5614c8 r0cfbe9c  
    163163        _options = new Properties();
    164164        _options.putAll(filter(options));
    165         _hostname = _options.getProperty(I2PClient.PROP_TCP_HOST, "localhost");
     165        _hostname = _options.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");
    166166        String portNum = _options.getProperty(I2PClient.PROP_TCP_PORT, LISTEN_PORT + "");
    167167        try {
  • core/java/src/net/i2p/util/EepGet.java

    rf5614c8 r0cfbe9c  
    1919
    2020/**
    21  * EepGet [-p localhost:4444]
     21 * EepGet [-p 127.0.0.1:4444]
    2222 *        [-n #retries]
    2323 *        [-o outputFile]
     
    124124   
    125125    /**
    126      * EepGet [-p localhost:4444] [-n #retries] [-e etag] [-o outputFile] [-m markSize lineLen] url
     126     * EepGet [-p 127.0.0.1:4444] [-n #retries] [-e etag] [-o outputFile] [-m markSize lineLen] url
    127127     *
    128128     */
    129129    public static void main(String args[]) {
    130         String proxyHost = "localhost";
     130        String proxyHost = "127.0.0.1";
    131131        int proxyPort = 4444;
    132132        int numRetries = 5;
     
    213213   
    214214    private static void usage() {
    215         System.err.println("EepGet [-p localhost:4444] [-n #retries] [-o outputFile] [-m markSize lineLen] [-t timeout] url");
     215        System.err.println("EepGet [-p 127.0.0.1:4444] [-n #retries] [-o outputFile] [-m markSize lineLen] [-t timeout] url");
    216216    }
    217217   
  • installer/resources/ahelper-conflict-header.ht

    rf5614c8 r0cfbe9c  
    77<html><head>
    88<title>Destination key conflict</title>
    9 <link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
     9<link rel="shortcut icon" href="http://127.0.0.1:7657/favicon.ico" />
    1010<style type='text/css'>
    1111div.warning {
     
    3333<body>
    3434<div class=logo>
    35  <a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
    36  [<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
     35 <a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://127.0.0.1:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
     36 [<a href="http://127.0.0.1:7657/config.jsp">configuration</a> | <a href="http://127.0.0.1:7657/help.jsp">help</a>]
    3737</div>
    3838<div class=warning id=warning>
  • installer/resources/clients.config

    rf5614c8 r0cfbe9c  
    11# fire up the web console
    2 clientApp.0.args=7657 127.0.0.1 ./webapps/
     2clientApp.0.args=7657 ::1,127.0.0.1 ./webapps/
    33clientApp.0.main=net.i2p.router.web.RouterConsoleRunner
    44clientApp.0.name=webConsole
     
    99clientApp.1.main=net.i2p.sam.SAMBridge
    1010clientApp.1.name=SAMBridge
    11 clientApp.1.args=sam.keys 127.0.0.1 7656 i2cp.tcp.host=localhost i2cp.tcp.port=7654
     11clientApp.1.args=sam.keys 127.0.0.1 7656 i2cp.tcp.host=127.0.0.1 i2cp.tcp.port=7654
    1212clientApp.1.startOnLoad=false
    1313
     
    2828clientApp.4.main=net.i2p.apps.systray.UrlLauncher
    2929clientApp.4.name=consoleBrowser
    30 clientApp.4.args=http://localhost:7657/index.jsp
     30clientApp.4.args=http://127.0.0.1:7657/index.jsp
    3131clientApp.4.delay=5
    3232clientApp.4.startOnLoad=true
  • installer/resources/dnf-header.ht

    rf5614c8 r0cfbe9c  
    77<html><head>
    88<title>Eepsite not reachable</title>
    9 <link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
     9<link rel="shortcut icon" href="http://127.0.0.1:7657/favicon.ico" />
    1010<style type='text/css'>
    1111div.warning {
     
    3333<body>
    3434<div class=logo>
    35  <a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
    36  [<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
     35 <a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://127.0.0.1:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
     36 [<a href="http://127.0.0.1:7657/config.jsp">configuration</a> | <a href="http://127.0.0.1:7657/help.jsp">help</a>]
    3737</div>
    3838<div class=warning id=warning>
  • installer/resources/dnfb-header.ht

    rf5614c8 r0cfbe9c  
    77<html><head>
    88<title>Invalid eepsite destination</title>
    9 <link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
     9<link rel="shortcut icon" href="http://127.0.0.1:7657/favicon.ico" />
    1010<style type='text/css'>
    1111        div.warning {
     
    3333<body>
    3434<div class=logo>
    35  <a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
    36  [<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
     35 <a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://127.0.0.1:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
     36 [<a href="http://127.0.0.1:7657/config.jsp">configuration</a> | <a href="http://127.0.0.1:7657/help.jsp">help</a>]
    3737</div>
    3838<div class=warning id=warning>
  • installer/resources/dnfh-header.ht

    rf5614c8 r0cfbe9c  
    77<html><head>
    88<title>Eepsite unknown</title>
    9 <link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
     9<link rel="shortcut icon" href="http://127.0.0.1:7657/favicon.ico" />
    1010<style type='text/css'>
    1111div.warning {
     
    3333<body>
    3434<div class=logo>
    35  <a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
    36  [<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
     35 <a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://127.0.0.1:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
     36 [<a href="http://127.0.0.1:7657/config.jsp">configuration</a> | <a href="http://127.0.0.1:7657/help.jsp">help</a>]
    3737</div>
    3838<div class=warning id=warning>
     
    4040Check the link or find a BASE64 address.
    4141If you have the BASE64 address,  paste it into your userhosts.txt using
    42 <a href="http://localhost:7657/susidns/addressbook.jsp?book=master">SusiDNS</a>,
     42<a href="http://127.0.0.1:7657/susidns/addressbook.jsp?book=master">SusiDNS</a>,
    4343use a BASE64 address helper, or use a jump service link below.
    4444Seeing this page often? See <a href="http://www.i2p2.i2p/faq.html#subscriptions">the FAQ</a>
    45 for help in <a href="http://localhost:7657/susidns/config.jsp">adding some subscriptions</a>
     45for help in <a href="http://127.0.0.1:7657/susidns/config.jsp">adding some subscriptions</a>
    4646to your addressbook.
    4747<BR><BR>Could not find the following destination:<BR><BR>
  • installer/resources/dnfp-header.ht

    rf5614c8 r0cfbe9c  
    77<html><head>
    88<title>Outproxy Not Found</title>
    9 <link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
     9<link rel="shortcut icon" href="http://127.0.0.1:7657/favicon.ico" />
    1010<style type='text/css'>
    1111div.warning {
     
    3434<body>
    3535<div class=logo>
    36  <a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
    37  [<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
     36 <a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://127.0.0.1:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
     37 [<a href="http://127.0.0.1:7657/config.jsp">configuration</a> | <a href="http://127.0.0.1:7657/help.jsp">help</a>]
    3838</div>
    3939<div class=warning id=warning>
     
    4444<a href="javascript: parent.window.location.reload()">retry</a>
    4545as this will randomly reselect an outproxy from the pool you have defined
    46 <a href="http://localhost:7657/i2ptunnel/index.jsp">here</a>
     46<a href="http://127.0.0.1:7657/i2ptunnel/index.jsp">here</a>
    4747(if you have more than one configured).
    4848If you continue to have trouble you may want to edit your outproxy list
    49 <a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=0">here</a>.
     49<a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=0">here</a>.
    5050<BR><BR>Could not find the following destination:<BR><BR>
  • installer/resources/eepsite_index.html

    rf5614c8 r0cfbe9c  
    1212 (The 'key' is somewhat analogous to an IP address, and
    1313 is shown on the eepsite's I2PTunnel
    14  <a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=3">configuration page</a>).
     14 <a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=3">configuration page</a>).
    1515 The instructions below detail how to assign a name like "mysite.i2p" to your key and
    1616 start up your eepsite.</p>
    1717 <p>You can reach your eepsite locally through
    18  <a href="http://localhost:7658/">http://localhost:7658/</a>.
     18 <a href="http://127.0.0.1:7658/">http://127.0.0.1:7658/</a>.
    1919</p>
    2020
     
    2828 <li>Pick a name for your eepsite (<i>something</i>.i2p). Use all lower-case.
    2929     You may wish to check first in your own router's address book
    30      <a href="http://localhost:7657/susidns/addressbook.jsp?book=router&filter=none">here</a>,
     30     <a href="http://127.0.0.1:7657/susidns/addressbook.jsp?book=router&filter=none">here</a>,
    3131     or the file i2p/hosts.txt to see if your name is already taken.
    3232     Enter the new name for your eepsite on the
    33      <a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite i2ptunnel configuration page</a>
     33     <a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite i2ptunnel configuration page</a>
    3434     where it says "Website name". This will replace the default "mysite.i2p".
    3535     Also, check the "Auto Start" box. Your eepsite will now start every time you start your router.
    3636     Be sure and click "Save".
    3737 <li>Click the start button for your eepsite on the
    38      <a href="http://localhost:7657/i2ptunnel/index.jsp">main i2ptunnel configuration page</a>.
     38     <a href="http://127.0.0.1:7657/i2ptunnel/index.jsp">main i2ptunnel configuration page</a>.
    3939     You should now see "eepsite" listed under "Local Destinations" on the left side of the
    40      <a href="http://localhost:7657/index.jsp">I2P Router Console</a>.
     40     <a href="http://127.0.0.1:7657/index.jsp">I2P Router Console</a>.
    4141     Your eepsite is now running.
    4242 <li>Highlight the entire "Local destination" key on the
    43      <a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite i2ptunnel configuration page</a>.
     43     <a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite i2ptunnel configuration page</a>.
    4444     and copy it for
    4545     later pasting. Make sure you get the whole thing - it's over 500 characters and it must end in "AAAA".
    4646 <li>Enter the name and paste in the destination key into your
    47      <a href="http://localhost:7657/susidns/addressbook.jsp?book=master">master address book</a>.
     47     <a href="http://127.0.0.1:7657/susidns/addressbook.jsp?book=master">master address book</a>.
    4848     Click "Add" to add the destination to your address book.
    4949 <li>In your browser, enter in your eepsite name (<i>something</i>.i2p) and you should
     
    5858     Here is <a href="http://stats.i2p/i2p/addkey.html">the key entry form at stats.i2p</a>.
    5959     Again, your key is the entire "Local destination" key on the
    60      <a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite i2ptunnel configuration page</a>.
     60     <a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite i2ptunnel configuration page</a>.
    6161     Be sure you get the whole thing, ending with "AAAA".
    6262     Don't forget to click "add a key".
     
    6565     website by simply typing <i>something</i>.i2p into their browser.
    6666 <li>Speaking of address book updates, this would be a good time to add some more addressbooks
    67      to your own subscription list. Go to your <a href="http://localhost:7657/susidns/subscriptions.jsp">subscriptions configuration page</a>
     67     to your own subscription list. Go to your <a href="http://127.0.0.1:7657/susidns/subscriptions.jsp">subscriptions configuration page</a>
    6868     and add a couple of these -
    6969     <a href="http://tino.i2p/hosts.txt">http://tino.i2p/hosts.txt</a>,
  • installer/resources/startconsole.html

    rf5614c8 r0cfbe9c  
    11<html><body>
    2 <meta http-equiv="Refresh" CONTENT="0;URL=http://localhost:7657/index.jsp" />
    3 Continue to your <a href="http://localhost:7657/index.jsp">I2P Router console</a>.
     2<meta http-equiv="Refresh" CONTENT="0;URL=http://127.0.0.1:7657/index.jsp" />
     3Continue to your <a href="http://127.0.0.1:7657/index.jsp">I2P Router console</a>.
    44If that page does not load, please make sure I2P is running, or review the file
    55wrapper.log for critical errors.
  • router/java/src/net/i2p/router/Router.java

    rf5614c8 r0cfbe9c  
    9191        System.setProperty("networkaddress.cache.ttl", DNS_CACHE_TIME);
    9292        System.setProperty("networkaddress.cache.negative.ttl", DNS_CACHE_TIME);
    93         // until we handle restricted routes and/or all peers support v6, try v4 first
    94         System.setProperty("java.net.preferIPv4Stack", "true");
    9593        System.setProperty("http.agent", "I2P");
    9694        // (no need for keepalive)
     
    136134            }
    137135        }
    138            
     136        // This doesn't work, guess it has to be in the static block above?
     137        // if (Boolean.valueOf(envProps.getProperty("router.disableIPv6")).booleanValue())
     138        //    System.setProperty("java.net.preferIPv4Stack", "true");
    139139
    140140        _context = new RouterContext(this, envProps);
     
    12071207    }
    12081208   
    1209 }
     1209/* following classes are now private static inner classes, didn't bother to reindent */
    12101210
    12111211/**
     
    12131213 *
    12141214 */
    1215 class CoalesceStatsEvent implements SimpleTimer.TimedEvent {
     1215private static class CoalesceStatsEvent implements SimpleTimer.TimedEvent {
    12161216    private RouterContext _ctx;
    12171217    public CoalesceStatsEvent(RouterContext ctx) {
     
    12791279 * uses it.
    12801280 */
    1281 class UpdateRoutingKeyModifierJob extends JobImpl {
     1281private static class UpdateRoutingKeyModifierJob extends JobImpl {
    12821282    private Log _log;
    12831283    private Calendar _cal = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
     
    13111311}
    13121312
    1313 class MarkLiveliness implements Runnable {
     1313private static class MarkLiveliness implements Runnable {
    13141314    private RouterContext _context;
    13151315    private Router _router;
     
    13431343}
    13441344
    1345 class ShutdownHook extends Thread {
     1345private static class ShutdownHook extends Thread {
    13461346    private RouterContext _context;
    13471347    private static int __id = 0;
     
    13601360
    13611361/** update the router.info file whenever its, er, updated */
    1362 class PersistRouterInfoJob extends JobImpl {
     1362private static class PersistRouterInfoJob extends JobImpl {
    13631363    private Log _log;
    13641364    public PersistRouterInfoJob(RouterContext ctx) {
     
    13901390    }
    13911391}
     1392
     1393}
Note: See TracChangeset for help on using the changeset viewer.