diff --git a/apps/desktopgui/build.xml b/apps/desktopgui/build.xml
index 795edf046e..8138f14c5e 100644
--- a/apps/desktopgui/build.xml
+++ b/apps/desktopgui/build.xml
@@ -77,11 +77,13 @@
+
+
diff --git a/apps/desktopgui/nbproject/project.properties b/apps/desktopgui/nbproject/project.properties
index fb880932f7..a02ea82072 100644
--- a/apps/desktopgui/nbproject/project.properties
+++ b/apps/desktopgui/nbproject/project.properties
@@ -22,6 +22,7 @@ dist.javadoc.dir=${dist.dir}/javadoc
excludes=
file.reference.appframework.jar=lib/appframework.jar
file.reference.i2p.jar=../../core/java/build/i2p.jar
+file.reference.i2ptunnel.jar=../i2ptunnel/java/build/i2ptunnel.jar
file.reference.router.jar=../../router/java/build/router.jar
file.reference.routerconsole.jar=../routerconsole/java/build/routerconsole.jar
file.reference.swing-worker.jar=lib/swing-worker.jar
@@ -32,7 +33,8 @@ javac.classpath=\
${file.reference.appframework.jar}:\
${file.reference.swing-worker.jar}:\
${file.reference.i2p.jar}:\
- ${file.reference.routerconsole.jar}
+ ${file.reference.routerconsole.jar}:\
+ ${file.reference.i2ptunnel.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/desktopgui/GUIVersion.java b/apps/desktopgui/src/net/i2p/desktopgui/desktopgui/GUIVersion.java
index 10a6e52939..21f0e04cf9 100644
--- a/apps/desktopgui/src/net/i2p/desktopgui/desktopgui/GUIVersion.java
+++ b/apps/desktopgui/src/net/i2p/desktopgui/desktopgui/GUIVersion.java
@@ -10,5 +10,5 @@ package net.i2p.desktopgui.desktopgui;
* @author mathias
*/
public class GUIVersion {
- public static final String VERSION = "0.0.1.3";
+ public static final String VERSION = "0.0.2";
}
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/ClientTunnelWindow.form b/apps/desktopgui/src/net/i2p/desktopgui/gui/ClientTunnelWindow.form
new file mode 100644
index 0000000000..0f07284d5a
--- /dev/null
+++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/ClientTunnelWindow.form
@@ -0,0 +1,396 @@
+
+
+
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/ClientTunnelWindow.java b/apps/desktopgui/src/net/i2p/desktopgui/gui/ClientTunnelWindow.java
new file mode 100644
index 0000000000..b7102b3ce1
--- /dev/null
+++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/ClientTunnelWindow.java
@@ -0,0 +1,434 @@
+/*
+ * ClientTunnelWindow.java
+ *
+ * Created on 10-jun-2009, 16:49:12
+ */
+
+package net.i2p.desktopgui.gui;
+
+import net.i2p.i2ptunnel.web.EditBean;
+import java.awt.event.ActionListener;
+
+/**
+ *
+ * @author mathias
+ */
+public class ClientTunnelWindow extends javax.swing.JFrame {
+
+ /** Creates new form ClientTunnelWindow */
+ public ClientTunnelWindow(int tunnelNumber, ActionListener al) {
+ initComponents();
+ this.tunnelNumber = tunnelNumber;
+ this.al = al;
+ extraInitComponents();
+ this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+ this.setSize(600, 600);
+ this.setLocationRelativeTo(null);
+ this.requestFocus();
+ this.changeTunnelState.setVisible(false); //TODO: implement tunnel state change
+ this.setVisible(true);
+ }
+
+ public void extraInitComponents() {
+ EditBean bean = new EditBean();
+ if(!bean.isClient(tunnelNumber)) {
+ this.dispose();
+ }
+ else {
+ this.tunnelName.setText(bean.getTunnelName(tunnelNumber));
+ this.tunnelType.setText(bean.getTunnelType(tunnelNumber));
+ this.tunnelPort.setText(bean.getClientPort(tunnelNumber));
+ this.tunnelDestination.setText(bean.getClientDestination(tunnelNumber));
+
+ if(bean.getTunnelType(tunnelNumber).equals(TYPE_STREAMR_CLIENT)) {
+ tunnelProfile.setVisible(false);
+ tunnelProfileLabel.setVisible(false);
+ this.delayConnect.setVisible(false);
+ this.sharedClient.setVisible(false);
+ this.autoStart.setVisible(false);
+ }
+ else {
+ if(bean.isInteractive(tunnelNumber)) {
+ tunnelProfile.setSelectedIndex(TUNNEL_INTERACTIVE);
+ }
+ else {
+ tunnelProfile.setSelectedIndex(TUNNEL_BULK);
+ }
+
+ this.delayConnect.setSelected(bean.shouldDelay(tunnelNumber));
+ this.sharedClient.setSelected(bean.isSharedClient(tunnelNumber));
+ this.autoStart.setSelected(bean.startAutomatically(tunnelNumber));
+ }
+
+ this.tunnelDepth.setSelectedIndex(bean.getTunnelDepth(tunnelNumber, 2));
+
+ int variance = bean.getTunnelVariance(tunnelNumber, 0);
+ if(variance == 0) {
+ this.depthVariance.setSelectedIndex(0);
+ }
+ else if(variance == 1) {
+ this.depthVariance.setSelectedIndex(1);
+ }
+ else if(variance == 2) {
+ this.depthVariance.setSelectedIndex(2);
+ }
+ else if(variance == -1) {
+ this.depthVariance.setSelectedIndex(3);
+ }
+ else if(variance == -2) {
+ this.depthVariance.setSelectedIndex(4);
+ }
+
+ int tunnelQuantity = bean.getTunnelQuantity(tunnelNumber, 2) - 1;
+ if(tunnelQuantity >= 0 && tunnelQuantity <= 2) {
+ this.tunnelCount.setSelectedIndex(tunnelQuantity);
+ }
+
+ int backupTunnelQuantity = bean.getTunnelBackupQuantity(tunnelNumber, 0);
+ if(backupTunnelQuantity >= 0 && backupTunnelQuantity <= 3) {
+ this.backupTunnelCount.setSelectedIndex(backupTunnelQuantity);
+ }
+
+
+ if(bean.getTunnelType(tunnelNumber).equals(TYPE_STREAMR_CLIENT)) {
+ this.reduceIdle.setVisible(false);
+ this.closeIdle.setVisible(false);
+ this.delayIdle.setVisible(false);
+ }
+ else {
+ this.reduceIdle.setSelected(bean.getReduce(tunnelNumber));
+ this.closeIdle.setSelected(bean.getClose(tunnelNumber));
+ this.delayIdle.setSelected(bean.getDelayOpen(tunnelNumber));
+ }
+ }
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ tunnelNameLabel = new javax.swing.JLabel();
+ tunnelTypeLabel = new javax.swing.JLabel();
+ tunnelPortLabel = new javax.swing.JLabel();
+ tunnelDestinationLabel = new javax.swing.JLabel();
+ tunnelProfileLabel = new javax.swing.JLabel();
+ delayConnect = new javax.swing.JCheckBox();
+ sharedClient = new javax.swing.JCheckBox();
+ autoStart = new javax.swing.JCheckBox();
+ jSeparator1 = new javax.swing.JSeparator();
+ tunnelDepthLabel = new javax.swing.JLabel();
+ depthVarianceLabel = new javax.swing.JLabel();
+ tunnelCountLabel = new javax.swing.JLabel();
+ backupTunnelCountLabel = new javax.swing.JLabel();
+ jSeparator2 = new javax.swing.JSeparator();
+ reduceIdle = new javax.swing.JCheckBox();
+ closeIdle = new javax.swing.JCheckBox();
+ delayIdle = new javax.swing.JCheckBox();
+ jSeparator3 = new javax.swing.JSeparator();
+ save = new javax.swing.JButton();
+ cancel = new javax.swing.JButton();
+ tunnelName = new javax.swing.JTextField();
+ tunnelType = new javax.swing.JLabel();
+ tunnelPort = new javax.swing.JTextField();
+ tunnelDestination = new javax.swing.JTextField();
+ tunnelProfile = new javax.swing.JComboBox();
+ tunnelDepth = new javax.swing.JComboBox();
+ depthVariance = new javax.swing.JComboBox();
+ tunnelCount = new javax.swing.JComboBox();
+ backupTunnelCount = new javax.swing.JComboBox();
+ changeTunnelState = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.i2p.desktopgui.desktopgui.Main.class).getContext().getResourceMap(ClientTunnelWindow.class);
+ setTitle(resourceMap.getString("Form.title")); // NOI18N
+ setName("Form"); // NOI18N
+ getContentPane().setLayout(null);
+
+ tunnelNameLabel.setText(resourceMap.getString("tunnelNameLabel.text")); // NOI18N
+ tunnelNameLabel.setName("tunnelNameLabel"); // NOI18N
+ getContentPane().add(tunnelNameLabel);
+ tunnelNameLabel.setBounds(20, 20, 120, 17);
+
+ tunnelTypeLabel.setText(resourceMap.getString("tunnelTypeLabel.text")); // NOI18N
+ tunnelTypeLabel.setName("tunnelTypeLabel"); // NOI18N
+ getContentPane().add(tunnelTypeLabel);
+ tunnelTypeLabel.setBounds(20, 50, 120, 17);
+
+ tunnelPortLabel.setText(resourceMap.getString("tunnelPortLabel.text")); // NOI18N
+ tunnelPortLabel.setName("tunnelPortLabel"); // NOI18N
+ getContentPane().add(tunnelPortLabel);
+ tunnelPortLabel.setBounds(20, 80, 110, 17);
+
+ tunnelDestinationLabel.setText(resourceMap.getString("tunnelDestinationLabel.text")); // NOI18N
+ tunnelDestinationLabel.setName("tunnelDestinationLabel"); // NOI18N
+ getContentPane().add(tunnelDestinationLabel);
+ tunnelDestinationLabel.setBounds(20, 110, 110, 17);
+
+ tunnelProfileLabel.setText(resourceMap.getString("tunnelProfileLabel.text")); // NOI18N
+ tunnelProfileLabel.setName("tunnelProfileLabel"); // NOI18N
+ getContentPane().add(tunnelProfileLabel);
+ tunnelProfileLabel.setBounds(20, 140, 110, 17);
+
+ delayConnect.setText(resourceMap.getString("delayConnect.text")); // NOI18N
+ delayConnect.setName("delayConnect"); // NOI18N
+ getContentPane().add(delayConnect);
+ delayConnect.setBounds(20, 170, 160, 22);
+
+ sharedClient.setText(resourceMap.getString("sharedClient.text")); // NOI18N
+ sharedClient.setName("sharedClient"); // NOI18N
+ getContentPane().add(sharedClient);
+ sharedClient.setBounds(20, 200, 160, 22);
+
+ autoStart.setText(resourceMap.getString("autoStart.text")); // NOI18N
+ autoStart.setName("autoStart"); // NOI18N
+ getContentPane().add(autoStart);
+ autoStart.setBounds(20, 230, 160, 22);
+
+ jSeparator1.setName("jSeparator1"); // NOI18N
+ getContentPane().add(jSeparator1);
+ jSeparator1.setBounds(0, 510, 750, 10);
+
+ tunnelDepthLabel.setText(resourceMap.getString("tunnelDepthLabel.text")); // NOI18N
+ tunnelDepthLabel.setName("tunnelDepthLabel"); // NOI18N
+ getContentPane().add(tunnelDepthLabel);
+ tunnelDepthLabel.setBounds(20, 280, 160, 17);
+
+ depthVarianceLabel.setText(resourceMap.getString("depthVarianceLabel.text")); // NOI18N
+ depthVarianceLabel.setName("depthVarianceLabel"); // NOI18N
+ getContentPane().add(depthVarianceLabel);
+ depthVarianceLabel.setBounds(20, 310, 160, 17);
+
+ tunnelCountLabel.setText(resourceMap.getString("tunnelCountLabel.text")); // NOI18N
+ tunnelCountLabel.setName("tunnelCountLabel"); // NOI18N
+ getContentPane().add(tunnelCountLabel);
+ tunnelCountLabel.setBounds(20, 340, 160, 17);
+
+ backupTunnelCountLabel.setText(resourceMap.getString("backupTunnelCountLabel.text")); // NOI18N
+ backupTunnelCountLabel.setName("backupTunnelCountLabel"); // NOI18N
+ getContentPane().add(backupTunnelCountLabel);
+ backupTunnelCountLabel.setBounds(20, 370, 170, 17);
+
+ jSeparator2.setName("jSeparator2"); // NOI18N
+ getContentPane().add(jSeparator2);
+ jSeparator2.setBounds(0, 260, 750, 10);
+
+ reduceIdle.setText(resourceMap.getString("reduceIdle.text")); // NOI18N
+ reduceIdle.setName("reduceIdle"); // NOI18N
+ getContentPane().add(reduceIdle);
+ reduceIdle.setBounds(20, 420, 300, 22);
+
+ closeIdle.setText(resourceMap.getString("closeIdle.text")); // NOI18N
+ closeIdle.setName("closeIdle"); // NOI18N
+ getContentPane().add(closeIdle);
+ closeIdle.setBounds(20, 450, 370, 22);
+
+ delayIdle.setText(resourceMap.getString("delayIdle.text")); // NOI18N
+ delayIdle.setName("delayIdle"); // NOI18N
+ getContentPane().add(delayIdle);
+ delayIdle.setBounds(20, 480, 400, 22);
+
+ jSeparator3.setName("jSeparator3"); // NOI18N
+ getContentPane().add(jSeparator3);
+ jSeparator3.setBounds(0, 400, 760, 10);
+
+ save.setText(resourceMap.getString("save.text")); // NOI18N
+ save.setName("save"); // NOI18N
+ save.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ saveActionPerformed(evt);
+ }
+ });
+ getContentPane().add(save);
+ save.setBounds(10, 520, 44, 29);
+
+ cancel.setText(resourceMap.getString("cancel.text")); // NOI18N
+ cancel.setName("cancel"); // NOI18N
+ cancel.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ cancelActionPerformed(evt);
+ }
+ });
+ getContentPane().add(cancel);
+ cancel.setBounds(60, 520, 55, 29);
+
+ tunnelName.setText(resourceMap.getString("tunnelName.text")); // NOI18N
+ tunnelName.setName("tunnelName"); // NOI18N
+ getContentPane().add(tunnelName);
+ tunnelName.setBounds(200, 20, 340, 27);
+
+ tunnelType.setText(resourceMap.getString("tunnelType.text")); // NOI18N
+ tunnelType.setName("tunnelType"); // NOI18N
+ getContentPane().add(tunnelType);
+ tunnelType.setBounds(200, 50, 340, 20);
+
+ tunnelPort.setText(resourceMap.getString("tunnelPort.text")); // NOI18N
+ tunnelPort.setName("tunnelPort"); // NOI18N
+ getContentPane().add(tunnelPort);
+ tunnelPort.setBounds(200, 70, 340, 27);
+
+ tunnelDestination.setText(resourceMap.getString("tunnelDestination.text")); // NOI18N
+ tunnelDestination.setName("tunnelDestination"); // NOI18N
+ getContentPane().add(tunnelDestination);
+ tunnelDestination.setBounds(200, 100, 340, 27);
+
+ tunnelProfile.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Interactive connection (Instant messaging)", "Bulk connection (Downloads, websites...)" }));
+ tunnelProfile.setName("tunnelProfile"); // NOI18N
+ getContentPane().add(tunnelProfile);
+ tunnelProfile.setBounds(200, 130, 340, 27);
+
+ tunnelDepth.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0 hop tunnel (no anonymity, low latency)", "1 hop tunnel (low anonymity, low latency)", "2 hop tunnel (medium anonymity, medium latency)", "3 hop tunnel (high anonymity, high latency)" }));
+ tunnelDepth.setName("tunnelDepth"); // NOI18N
+ getContentPane().add(tunnelDepth);
+ tunnelDepth.setBounds(200, 280, 350, 27);
+
+ depthVariance.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0 hop variance (no random, good performance)", "+ 0-1 hop variance (slightly random, lower performance)", "+ 0-2 hop variance (very random, lower performance)", "+/- 0-1 hop variance (slightly random, standard performance)", "+/- 0-2 hop variance (not recommended)" }));
+ depthVariance.setName("depthVariance"); // NOI18N
+ getContentPane().add(depthVariance);
+ depthVariance.setBounds(200, 310, 350, 27);
+
+ tunnelCount.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1 tunnel (low bandwidth usage, low reliability)", "2 tunnels (standard bandwidth usage, standard reliability)", "3 tunnels (high bandwidth usage, high reliability)" }));
+ tunnelCount.setName("tunnelCount"); // NOI18N
+ getContentPane().add(tunnelCount);
+ tunnelCount.setBounds(200, 340, 350, 27);
+
+ backupTunnelCount.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0 backup tunnels (no redundancy, no resource usage)", "1 backup tunnel (low redundancy, low resource usage)", "2 backup tunnels (medium redundancy, medium resource usage)", "3 backup tunnels (high redundancy, high resource usage)" }));
+ backupTunnelCount.setName("backupTunnelCount"); // NOI18N
+ getContentPane().add(backupTunnelCount);
+ backupTunnelCount.setBounds(200, 370, 350, 27);
+
+ changeTunnelState.setText(resourceMap.getString("changeTunnelState.text")); // NOI18N
+ changeTunnelState.setName("changeTunnelState"); // NOI18N
+ getContentPane().add(changeTunnelState);
+ changeTunnelState.setBounds(160, 520, 150, 29);
+
+ pack();
+ }// //GEN-END:initComponents
+
+ private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveActionPerformed
+ EditBean bean = new EditBean();
+ if(!bean.isClient(tunnelNumber)) {
+ al.actionPerformed(evt);
+ this.dispose();
+ }
+ else {
+ bean.setTunnel("" + tunnelNumber);
+ bean.setName(tunnelName.getText());
+ bean.setPort(tunnelPort.getText());
+ bean.setTargetDestination(tunnelDestination.getText());
+ if(!bean.getTunnelType(tunnelNumber).equals(TYPE_STREAMR_CLIENT)) {
+ if(tunnelProfile.getSelectedIndex() == TUNNEL_INTERACTIVE) {
+ bean.setProfile("interactive");
+ }
+ else {
+ bean.setProfile("bulk");
+ }
+
+ if(delayConnect.isSelected()) {
+ bean.setConnectDelay("true");
+ }
+ else {
+ bean.setConnectDelay("false");
+ }
+
+ if(sharedClient.isSelected()) {
+ bean.setShared(true);
+ }
+ else {
+ bean.setShared(false);
+ }
+
+ if(autoStart.isSelected()) {
+ bean.setStartOnLoad("true");
+ }
+ else {
+ }
+ }
+ bean.setTunnelDepth("" + tunnelDepth.getSelectedIndex());
+
+ int variance = depthVariance.getSelectedIndex();
+ if(variance >= 0 && variance <= 2) {
+ bean.setTunnelVariance("" + variance);
+ }
+ else if(variance == 3) {
+ bean.setTunnelVariance("-1");
+ }
+ else if(variance == 4) {
+ bean.setTunnelVariance("-2");
+ }
+
+ bean.setTunnelQuantity("" + tunnelCount.getSelectedIndex() + 1);
+
+ bean.setTunnelBackupQuantity("" + backupTunnelCount.getSelectedIndex());
+
+ if(!bean.getTunnelType(tunnelNumber).equals(TYPE_STREAMR_CLIENT)) {
+ if(reduceIdle.isSelected()) {
+ bean.setReduce("true");
+ }
+ else {
+ }
+
+ if(closeIdle.isSelected()) {
+ bean.setClose("true");
+ }
+ else {
+ }
+
+ if(delayIdle.isSelected()) {
+ bean.setDelayOpen("true");
+ }
+ }
+
+ }
+
+ al.actionPerformed(evt);
+ this.dispose();
+}//GEN-LAST:event_saveActionPerformed
+
+ private void cancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelActionPerformed
+ al.actionPerformed(evt);
+ this.dispose();
+ }//GEN-LAST:event_cancelActionPerformed
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JCheckBox autoStart;
+ private javax.swing.JComboBox backupTunnelCount;
+ private javax.swing.JLabel backupTunnelCountLabel;
+ private javax.swing.JButton cancel;
+ private javax.swing.JButton changeTunnelState;
+ private javax.swing.JCheckBox closeIdle;
+ private javax.swing.JCheckBox delayConnect;
+ private javax.swing.JCheckBox delayIdle;
+ private javax.swing.JComboBox depthVariance;
+ private javax.swing.JLabel depthVarianceLabel;
+ private javax.swing.JSeparator jSeparator1;
+ private javax.swing.JSeparator jSeparator2;
+ private javax.swing.JSeparator jSeparator3;
+ private javax.swing.JCheckBox reduceIdle;
+ private javax.swing.JButton save;
+ private javax.swing.JCheckBox sharedClient;
+ private javax.swing.JComboBox tunnelCount;
+ private javax.swing.JLabel tunnelCountLabel;
+ private javax.swing.JComboBox tunnelDepth;
+ private javax.swing.JLabel tunnelDepthLabel;
+ private javax.swing.JTextField tunnelDestination;
+ private javax.swing.JLabel tunnelDestinationLabel;
+ private javax.swing.JTextField tunnelName;
+ private javax.swing.JLabel tunnelNameLabel;
+ private javax.swing.JTextField tunnelPort;
+ private javax.swing.JLabel tunnelPortLabel;
+ private javax.swing.JComboBox tunnelProfile;
+ private javax.swing.JLabel tunnelProfileLabel;
+ private javax.swing.JLabel tunnelType;
+ private javax.swing.JLabel tunnelTypeLabel;
+ // End of variables declaration//GEN-END:variables
+ private int tunnelNumber;
+ private ActionListener al;
+ private static final int TUNNEL_INTERACTIVE = 0;
+ private static final int TUNNEL_BULK = 1;
+ private static final String TYPE_STREAMR_CLIENT = "Streamr client";
+}
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/GeneralConfiguration.form b/apps/desktopgui/src/net/i2p/desktopgui/gui/GeneralConfiguration.form
index 4c7cb5afce..589f5cee2e 100644
--- a/apps/desktopgui/src/net/i2p/desktopgui/gui/GeneralConfiguration.form
+++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/GeneralConfiguration.form
@@ -322,14 +322,14 @@
-
-
-
-
+
+
+
+
-
+
@@ -439,11 +439,11 @@
-
+
-
-
+
+
@@ -463,9 +463,9 @@
-
-
-
+
+
+
@@ -477,6 +477,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -484,6 +529,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/GeneralConfiguration.java b/apps/desktopgui/src/net/i2p/desktopgui/gui/GeneralConfiguration.java
index 474e394731..3e4a17fd21 100644
--- a/apps/desktopgui/src/net/i2p/desktopgui/gui/GeneralConfiguration.java
+++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/GeneralConfiguration.java
@@ -7,6 +7,7 @@
package net.i2p.desktopgui.gui;
import java.awt.Desktop;
+import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -23,6 +24,9 @@ import net.i2p.router.web.NewsFetcher;
import net.i2p.desktopgui.router.configuration.UpdateHandler;
import java.util.Date;
import javax.swing.SwingWorker;
+import net.i2p.i2ptunnel.web.IndexBean;
+import javax.swing.table.DefaultTableModel;
+import java.awt.event.ActionListener;
/**
*
@@ -43,6 +47,7 @@ public class GeneralConfiguration extends javax.swing.JFrame {
private void extraInitComponents() {
initSpeedTab();
initUpdateTab();
+ initTunnelTab();
}
private void initSpeedTab() {
@@ -87,6 +92,48 @@ public class GeneralConfiguration extends javax.swing.JFrame {
}
}
+ private void initTunnelTab() {
+ while(((DefaultTableModel) clientTable.getModel()).getRowCount() > 0) {
+ ((DefaultTableModel) clientTable.getModel()).removeRow(0);
+ }
+ while(((DefaultTableModel) serverTable.getModel()).getRowCount() > 0) {
+ ((DefaultTableModel) serverTable.getModel()).removeRow(0);
+ }
+ IndexBean bean = new IndexBean();
+ for(int i=0; i
+
+
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/ServerTunnelWindow.java b/apps/desktopgui/src/net/i2p/desktopgui/gui/ServerTunnelWindow.java
new file mode 100644
index 0000000000..7652101486
--- /dev/null
+++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/ServerTunnelWindow.java
@@ -0,0 +1,60 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/*
+ * ServerTunnelWindow.java
+ *
+ * Created on 11-jun-2009, 14:55:53
+ */
+
+package net.i2p.desktopgui.gui;
+
+import java.awt.event.ActionListener;
+
+/**
+ *
+ * @author mathias
+ */
+public class ServerTunnelWindow extends javax.swing.JFrame {
+
+ /** Creates new form ServerTunnelWindow */
+ public ServerTunnelWindow(int tunnelNumber, ActionListener al) {
+ initComponents();
+ this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+ this.setSize(600, 600);
+ this.setLocationRelativeTo(null);
+ this.requestFocus();
+ this.setVisible(true);
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jLabel1 = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ setName("Form"); // NOI18N
+ getContentPane().setLayout(null);
+
+ org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.i2p.desktopgui.desktopgui.Main.class).getContext().getResourceMap(ServerTunnelWindow.class);
+ jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
+ jLabel1.setName("jLabel1"); // NOI18N
+ getContentPane().add(jLabel1);
+ jLabel1.setBounds(10, 10, 43, 17);
+
+ pack();
+ }// //GEN-END:initComponents
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JLabel jLabel1;
+ // End of variables declaration//GEN-END:variables
+
+}
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/ClientTunnelWindow.properties b/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/ClientTunnelWindow.properties
new file mode 100644
index 0000000000..ca036e197e
--- /dev/null
+++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/ClientTunnelWindow.properties
@@ -0,0 +1,26 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+Form.title=Client Tunnel Configuration
+tunnelNameLabel.text=Name:
+tunnelTypeLabel.text=Type:
+tunnelType.text=jLabel10
+tunnelName.text=jTextField1
+tunnelPortLabel.text=Port:
+tunnelPort.text=jTextField2
+tunnelDestination.text=jTextField3
+tunnelDestinationLabel.text=Destination:
+tunnelProfileLabel.text=Profile:
+delayConnect.text=Delay connect
+sharedClient.text=Shared client
+autoStart.text=Auto start
+tunnelDepthLabel.text=Tunnel depth:
+depthVarianceLabel.text=Depth variance:
+tunnelCountLabel.text=Tunnel count:
+backupTunnelCountLabel.text=Backup tunnel count:
+reduceIdle.text=Reduce tunnel count when idle
+closeIdle.text=Close tunnels when idle
+delayIdle.text=Delay opening of tunnels when idle
+save.text=Save
+cancel.text=Cancel
+changeTunnelState.text=Start Tunnel
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/GeneralConfiguration.properties b/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/GeneralConfiguration.properties
index c6af27a514..d53ac80d03 100644
--- a/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/GeneralConfiguration.properties
+++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/GeneralConfiguration.properties
@@ -13,7 +13,7 @@ downloadspeed.text=jTextField2
uploadgb.text=jTextField3
downloadgb.text=jTextField4
updateMethod.text=What is your preferred automatic update setting?
-updateInform.text=Only inform about updates
+updateInform.text=Only inform about updates (not advised)
updateDownload.text=Download and verify update file, do not restart
updateDownloadRestart.text=Download, verify and restart
checkUpdates.text=Check for updates now
@@ -21,9 +21,17 @@ updateNow.text=Update available: update now
advancedUpdateConfig.text=Advanced update configuration
clientTunnelLabel.text=Client tunnels:
serverTunnelLabel.text=Server tunnels:
-tunnelsExplanation.text=Tunnel explanation
+tunnelsExplanation.text=Click on a tunnel to view and change its configuration. + Tunnel explanation
uploadUsageLabel.text=Monthly usage:
downloadUsageLabel.text=Monthly usage:
gbUploadLabel.text=GB
gbDownloadLabel.text=GB
uploadDownloadExplanation.text=Explanation ...
+clientTable.columnModel.title3=Status
+clientTable.columnModel.title2=Address
+clientTable.columnModel.title1=Type
+clientTable.columnModel.title0=Name
+serverTable.columnModel.title0=Name
+serverTable.columnModel.title3=Title 4
+serverTable.columnModel.title2=Status
+serverTable.columnModel.title1=Address
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/ServerTunnelWindow.properties b/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/ServerTunnelWindow.properties
new file mode 100644
index 0000000000..683f3caa7f
--- /dev/null
+++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/resources/ServerTunnelWindow.properties
@@ -0,0 +1 @@
+jLabel1.text=Name:
diff --git a/history.txt b/history.txt
index 28b3be69d4..0be304fcb9 100644
--- a/history.txt
+++ b/history.txt
@@ -1,3 +1,8 @@
+2009-06-17 Mathiasdm
+ * desktopgui:
+ - Added client and server tunnel view
+ (saving does not work yet)
+
2009-06-17 zzz
* PeerSelector:
- Limit exploratory tunnels to connected peers when over