Index: src/org/openstreetmap/josm/gui/preferences/FilePreferences.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/FilePreferences.java	(Revision 922)
+++ src/org/openstreetmap/josm/gui/preferences/FilePreferences.java	(Arbeitskopie)
@@ -5,6 +5,8 @@
 
 import javax.swing.Box;
 import javax.swing.JCheckBox;
+import javax.swing.JSeparator;
+import javax.swing.SwingConstants;
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.tools.GBC;
@@ -20,10 +22,10 @@
 	private JCheckBox keepBackup = new JCheckBox(tr("Keep backup files"));
 	
 	public void addGui(PreferenceDialog gui) {
+		gui.connection.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
 		keepBackup.setSelected(Main.pref.getBoolean("save.keepbackup"));
 		keepBackup.setToolTipText(tr("When saving, keep backup files ending with a ~"));
 		gui.connection.add(keepBackup, GBC.eol().insets(20,0,0,0));
-		gui.connection.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL));
     }
 
 	public void ok() {
Index: src/org/openstreetmap/josm/gui/preferences/ProxyPreferences.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/ProxyPreferences.java	(Revision 0)
+++ src/org/openstreetmap/josm/gui/preferences/ProxyPreferences.java	(Revision 0)
@@ -0,0 +1,90 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.preferences;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.Box;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPasswordField;
+import javax.swing.JSeparator;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.GBC;
+
+public class ProxyPreferences implements PreferenceSetting {
+
+	public static final String PROXY_ENABLE = "proxy.enable";
+	public static final String PROXY_HOST = "proxy.host";
+	public static final String PROXY_PORT = "proxy.port";
+	public static final String PROXY_ANONYMOUS = "proxy.anonymous";
+	public static final String PROXY_USER = "proxy.user";
+	public static final String PROXY_PASS = "proxy.pass";
+
+	private JCheckBox proxyEnable = new JCheckBox(tr("Enable proxy server"));
+	private JTextField proxyHost = new JTextField(50);
+	private JTextField proxyPort = new JTextField(5);
+	private JCheckBox proxyAnonymous = new JCheckBox(tr("Anonymous"));
+	private JTextField proxyUser = new JTextField(50);
+	private JPasswordField proxyPass = new JPasswordField(50);
+
+	@Override
+	public void addGui(PreferenceDialog gui) {
+		proxyEnable.setSelected(Main.pref.getBoolean(PROXY_ENABLE));
+		proxyEnable.addActionListener(new ActionListener(){
+			public void actionPerformed(ActionEvent e) {
+				proxyHost.setEnabled(proxyEnable.isSelected());
+				proxyPort.setEnabled(proxyEnable.isSelected());
+				proxyAnonymous.setEnabled(proxyEnable.isSelected());
+				proxyUser.setEnabled(proxyEnable.isSelected() && proxyAnonymous.isSelected());
+				proxyPass.setEnabled(proxyEnable.isSelected() && proxyAnonymous.isSelected());
+			}
+		});
+		proxyHost.setEnabled(Main.pref.getBoolean(PROXY_ENABLE));
+		proxyHost.setText(Main.pref.get(PROXY_HOST));
+		proxyPort.setEnabled(Main.pref.getBoolean(PROXY_ENABLE));
+		proxyPort.setText(Main.pref.get(PROXY_PORT));
+		proxyAnonymous.setSelected(Main.pref.getBoolean(PROXY_ANONYMOUS));
+		proxyAnonymous.addActionListener(new ActionListener(){
+			public void actionPerformed(ActionEvent e) {
+				proxyUser.setEnabled(proxyEnable.isSelected() && proxyAnonymous.isSelected());
+				proxyPass.setEnabled(proxyEnable.isSelected() && proxyAnonymous.isSelected());
+			}
+		});
+		proxyUser.setEnabled(Main.pref.getBoolean(PROXY_ENABLE) && (Main.pref.getBoolean(PROXY_ANONYMOUS)));
+		proxyUser.setText(Main.pref.get(PROXY_USER));
+		proxyPass.setEnabled(Main.pref.getBoolean(PROXY_ENABLE) && (Main.pref.getBoolean(PROXY_ANONYMOUS)));
+		proxyPass.setText(Main.pref.get(PROXY_USER));
+		
+		gui.connection.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
+		gui.connection.add(new JLabel(tr("Proxy Settings")), GBC.eol());
+		gui.connection.add(proxyEnable, GBC.eol().insets(20, 0, 0, 0));
+		gui.connection.add(new JLabel(tr("Proxy server host")), GBC.std());
+		gui.connection.add(proxyHost, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+		gui.connection.add(new JLabel(tr("Proxy server port")), GBC.std());
+		gui.connection.add(proxyPort, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+		gui.connection.add(proxyAnonymous, GBC.eop().insets(40, 0, 0, 0));
+		gui.connection.add(new JLabel(tr("Proxy server username")), GBC.std());
+		gui.connection.add(proxyUser, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+		gui.connection.add(new JLabel(tr("Proxy server password")), GBC.std());
+		gui.connection.add(proxyPass, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+
+		gui.connection.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL));
+	}
+
+	@Override
+	public void ok() {
+		Main.pref.put(PROXY_ENABLE, proxyEnable.isSelected());
+		Main.pref.put(PROXY_HOST, proxyHost.getText());
+		Main.pref.put(PROXY_PORT, proxyPort.getText());
+		Main.pref.put(PROXY_ANONYMOUS, proxyAnonymous.isSelected());
+		Main.pref.put(PROXY_USER, proxyUser.getText());
+		Main.pref.put(PROXY_PASS, new String(proxyPass.getPassword()));
+	}
+
+}
Index: src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(Revision 922)
+++ src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(Arbeitskopie)
@@ -104,6 +104,7 @@
 		settings.add(new MapPaintPreference());
 		settings.add(new ServerAccessPreference());
 		settings.add(new FilePreferences());
+		settings.add(new ProxyPreferences());
 		settings.add(new ProjectionPreference());
 		settings.add(new TaggingPresetPreference());
 		settings.add(new PluginPreference());
Index: src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- src/org/openstreetmap/josm/data/Preferences.java	(Revision 922)
+++ src/org/openstreetmap/josm/data/Preferences.java	(Arbeitskopie)
@@ -12,12 +12,14 @@
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.Map;
+import java.util.Properties;
 import java.util.SortedMap;
 import java.util.StringTokenizer;
 import java.util.TreeMap;
 import java.util.Map.Entry;
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.preferences.ProxyPreferences;
 import org.openstreetmap.josm.tools.ColorHelper;
 
 /**
@@ -207,6 +209,7 @@
 	 */
 	public void save() {
 		try {
+			setSystemProperties();
 			final PrintWriter out = new PrintWriter(new FileWriter(getPreferencesDir() + "preferences"), false);
 			for (final Entry<String, String> e : properties.entrySet()) {
 				if (!e.getValue().equals(""))
@@ -236,6 +239,7 @@
 		if (!errLines.isEmpty()) {
 			throw new IOException("Malformed config file at lines " + errLines);
 		}
+		setSystemProperties();
 	}
 
 	public final void resetToDefault() {
@@ -372,4 +376,18 @@
 		}
 		return def;
 	}
+
+	private void setSystemProperties() {
+		Properties sysProp = System.getProperties();
+		if (getBoolean(ProxyPreferences.PROXY_ENABLE)) {
+			sysProp.put("proxySet", "true");
+			sysProp.put("http.proxyHost", get(ProxyPreferences.PROXY_HOST));
+			sysProp.put("proxyPort", get(ProxyPreferences.PROXY_PORT));
+			if (!getBoolean(ProxyPreferences.PROXY_ANONYMOUS)) {
+				sysProp.put("proxyUser", get(ProxyPreferences.PROXY_USER));
+				sysProp.put("proxyPassword", get(ProxyPreferences.PROXY_PASS));
+			}
+			System.setProperties(sysProp);
+		}
+	}
 }
