<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%><% // note that for the helper we use a session scope, not a request scope, // so that we can access the NDT test results. // The MLabHelper singleton will prevent multiple simultaneous tests, even across sessions. // page ID final int LAST_PAGE = 6; String pg = request.getParameter("page"); int ipg; if (pg == null) { ipg = 1; } else { try { ipg = Integer.parseInt(pg); if (request.getParameter("prev") != null) { // previous button handling if (ipg == 5) ipg = 2; else ipg -= 2; } if (ipg <= 0 || ipg > LAST_PAGE) { ipg = 1; } else if (ipg == 3 && request.getParameter("skipbw") != null) { ipg++; // skip bw test } } catch (NumberFormatException nfe) { ipg = 1; } } // detect completion boolean done = request.getParameter("done") != null || request.getParameter("skip") != null; if (done) { // tell wizard helper we're done String i2pcontextId = request.getParameter("i2p.contextId"); try { if (i2pcontextId != null) { session.setAttribute("i2p.contextId", i2pcontextId); } else { i2pcontextId = (String) session.getAttribute("i2p.contextId"); } } catch (IllegalStateException ise) {} wizhelper.setContextId(i2pcontextId); wizhelper.complete(); // redirect to /home response.setStatus(307); response.setHeader("Cache-Control","no-cache"); String req = request.getRequestURL().toString(); int slash = req.indexOf("/welcome"); if (slash >= 0) req = req.substring(0, slash) + "/home"; else // shouldn't happen req = "http://127.0.0.1:7657/home"; response.setHeader("Location", req); // force commitment response.getOutputStream().close(); return; } %> <%@include file="css.jsi" %> <%=intl.title("New Install Wizard")%> <% wizhelper.setContextId(i2pcontextId); if (ipg == 3) { %> <% } // ipg == 3 %>
<% // Bind the session-scope Helper to the request-scope Handler formhandler.setWizardHelper(wizhelper); %>
<%@include file="formhandler.jsi" %>
<% if (ipg == 1) { // language selection %> <%-- needed for CSS: --%>
<%-- needed for lang setting in css.jsi: --%>

<%=uihelper._t("Select Language")%>

<%=intl._t("This project is supported by volunteer translators on Transifex.")%> <%=intl._t("This helps keep I2P accessible to everyone all over the world.")%> <%=intl._t("Thank you to all of the volunteers all over the world who help make I2P accessible.")%> <%=intl._t("If you would like to get involved, {0}please consider the I2P translation efforts{1}.", "", "")%>

<%=intl._t("Please select your preferred language:")%>

<% } else if (ipg == 2) { // Overview of bandwidth test %>

<%=intl._t("Bandwidth Test")%>

<%=intl._t("Let's check your internet connection!")%>

<%=intl._t("Bandwidth participation not only makes your speed and connection to the I2P network better, but also helps everyone using the network.")%> <%=intl._t("When everyone is sharing as much bandwidth as possible, everyone gets to have better performance and privacy by sharing participating traffic.")%>

<%=intl._t("I2P uses M-Lab, a third party service, to help you test your internet connection and find the optimal speed settings.")%> <%=intl._t("During this time you will be connected directly to M-Lab's service with your real IP address.")%>

<%=intl._t("Please review the M-Lab privacy policies linked below.")%> <%=intl._t("If you do not wish to run the M-Lab bandwidth test, you can skip it and configure your bandwidth later.")%>

<%=intl._t("{0}M-Lab Privacy Policy{1}", "", "")%>
<%=intl._t("{0}M-Lab Name Server Privacy Policy{1}", "", "")%>

<% } else if (ipg == 3) { // Bandwidth test in progress (w/ AJAX) %>

<%=intl._t("Bandwidth Test in Progress")%>

<%=intl._t("Javascript is disabled - wait 60 seconds for the bandwidth test to complete and then click Next")%>

<%=intl._t("While the I2P router software is getting ready to go, it's testing your bandwidth, obtaining an initial set of peers from a reseed server, making its first few connections, and getting integrated with the rest of the network.")%>

<%=intl._t("To learn more about how important I2P Reseed servers are, or explore other topics and what functions they perform for I2P, you can visit the {0}I2P Wiki{1}.", "", "")%> <%=intl._t("If you would like to discuss I2P topics or get help from the community, you can visit the {0}I2P Forums{1}.", "", "")%> <%=intl._t("If you want to know more about the I2P Project itself, or the Invisible Internet in general, you can visit our {0}Project Website{1}.", "", "")%>

<% } else if (ipg == 4) { // Bandwidth test results // and/or manual bw entry? %> <% if (request.getParameter("skipbw") == null) { // don't display this if we skipped the test %>

<%=intl._t("Bandwidth Test Results")%>

<% if (wizhelper.isNDTSuccessful()) { // don't display this if test failed %> <% } // sucessful %>
<%=intl._t("Test server location")%><%=wizhelper.getServerLocation()%>
<%=intl._t("Completion status")%><%=wizhelper.getCompletionStatus()%>
<%=intl._t("Details")%><%=wizhelper.getDetailStatus()%>
<%=intl._t("Downstream Bandwidth")%><%=net.i2p.data.DataHelper.formatSize2Decimal(wizhelper.getDownBandwidth())%>Bps <%=intl._t("Upstream Bandwidth")%><%=net.i2p.data.DataHelper.formatSize2Decimal(wizhelper.getUpBandwidth())%>Bps
<%=intl._t("Share of Bandwidth for I2P")%><%=Math.round(net.i2p.router.web.helpers.WizardHelper.BW_SCALE * 100)%>%
<% } // skipbw %>

<%=intl._t("Bandwidth Configuration")%>

<%-- display burst, set standard, handler will fix up --%>
<%=intl._t("I2P will work best if you configure your rates to match the speed of your internet connection.")%>
" > <%=intl._t("KBps In")%> ()
" > <%=intl._t("KBps Out")%> ()
<%=intl._t("Share")%> ()
<% int share = Math.round(wizhelper.getShareBandwidth() * 1.024f); if (share < 12) { out.print(""); out.print(intl._t("NOTE")); out.print(": "); out.print(intl._t("You have configured I2P to share only {0} KBps.", share)); out.print("
"); out.print(intl._t("I2P requires at least 12KBps to enable sharing. ")); out.print(intl._t("By donating your bandwidth to participating traffic, you not only help others, you improve your own anonymity and performance.")); out.print("
"); out.print(intl._t("We recommend sharing 75% or more for I2P, but you can adjust based on your needs.")); } else { out.print(intl._t("You have configured I2P to share {0} KBps.", share)); out.print("
"); out.print(intl._t("By donating your bandwidth to participating traffic, you not only help others, you improve your own anonymity and performance.")); out.print("
"); out.print(intl._t("We recommend sharing 75% or more for I2P, but you can adjust based on your needs.")); } %>
<% } else if (ipg == 5) { // Browser setup %>

<%=intl._t("Browser and Application Setup")%>

<%=intl._t("Your browser needs to be configured to work with I2P.")%> <%=intl._t("We have instructions for configuring both Firefox and Chromium based browsers with I2P.")%> <%=intl._t("You can find these instructions on our {0}website{1}.", "", "")%> <% if (net.i2p.util.SystemVersion.isWindows()) { %>

<%=intl._t("Otherwise, the recommended way to browse I2P websites is with a separate profile in the Firefox browser.")%>

  1. <%=intl._t("{0}Install Firefox{1}", "", "")%>
  2. <%=intl._t("{0}Install the I2P Firefox profile{1}", "", "")%>
<% } //isWindows() %>

<%=intl._t("The I2P router also comes with its own versions of common, useful internet applications.")%> <%=intl._t("You can download files with {0}bittorrent{1}.", "", "")%> <%=intl._t("You can also send and receive {0}email{1}.", "", "")%> <%=intl._t("Besides that, you can use the built-in {0}web server{1} so you can create, communicate, and share your content.", "", "")%> <%=intl._t("These applications work with I2P automatically and require no additional configuration.")%>

<%=intl._t("To help make I2P addresses easier to read and remember, the I2P router also includes its built-in {0}Address Book{1}.", "", "")%> <%=intl._t("The Address Book is where you keep track of all your I2P \"Contacts\" by giving them human-readable names.")%> <%=intl._t("This can be used for the sites you like to visit, messaging contacts, or potentially any other service on I2P.")%> <%=intl._t("To help you get started, the address book can be used to subscribe to lists of addresses distributed by other I2P users.")%>

<% } else if (ipg == LAST_PAGE) { // Done %>

<%=intl._t("Welcome to the Invisible Internet!")%>

<%=intl._t("It will take some time for your peers to integrate your router into the network, but while that is happening you can still explore I2P applications and get to know your way around the router console.")%> <%=intl._t("There is a quick guide, news about the latest release, an FAQ, and troubleshooting guide available on the {0}console{1} page.", "", "")%>

<%=intl._t("You may notice a message in the sidebar that I2P is rejecting tunnels.")%> <%=intl._t("This is normal behavior as part of the start-up process, to make sure that your router is ready to help others with participating traffic.")%> <%=intl._t("When the connection indicators in the sidebar turn green, you are ready to explore the Invisible Internet.")%>

<% } else { %>
unknown wizard page
<% } %>
<% if (ipg != 1) { %> " > <% } if (ipg != LAST_PAGE) { %> " > <% if (ipg == 2) { %> " > <% } else if (ipg == 3) { %> " > <% } %> " > <% } else { %> " > <% } %>