systemProxy.setFont(LABEL_FONT);
systemProxy.setHorizontalAlignment(SwingConstants.LEFT);
systemProxy.setText(MessageManager.formatMessage("label.system_proxy",
- displayHostPort(Cache.startupProxyProperties[0],
+ displayUserHostPort(Cache.startupProxyProperties[4],
+ Cache.startupProxyProperties[0],
Cache.startupProxyProperties[1]),
- displayHostPort(Cache.startupProxyProperties[2],
+ displayUserHostPort(Cache.startupProxyProperties[6],
+ Cache.startupProxyProperties[2],
Cache.startupProxyProperties[3])));
customProxy.setFont(LABEL_FONT);
customProxy.setHorizontalAlignment(SwingConstants.LEFT);
});
setCustomProxyEnabled();
- setProxyAuthEnabled();
// Make proxy server panel
JPanel proxyPanel = new JPanel();
return proxyPanel;
}
- private String displayHostPort(String host, String port)
+ private String displayUserHostPort(String user, String host, String port)
{
boolean hostBlank = (host == null || host.isEmpty());
boolean portBlank = (port == null || port.isEmpty());
}
StringBuilder sb = new StringBuilder();
+ if (user != null)
+ {
+ sb.append(user.isEmpty() || user.indexOf(" ") > -1 ? '"' + user + '"'
+ : user);
+ sb.append("@");
+ }
sb.append(hostBlank ? "" : host);
if (!portBlank)
{