* boolean flag, if the address is to be inserted in front of the
* list. If <code>false</code>, address is added at the end of
* the list.
*/
public static void addProxyAddress(String ip, boolean inFront) {
Socks5Proxy proxy = getSocks5ProxySafe();
if (!inFront) {
proxy.addLocalAddress(ip);
return;
}
ArrayList<String> list = new ArrayList<String>(
proxy.getLocalAddresses());
list.remove(ip);
list.add(0, ip);
proxy.replaceLocalAddresses(list);
}