|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected Integer getProxyPort() { |
|
|
protected Integer getProxyPort() { |
|
|
if (proxyPort == null) { |
|
|
if (proxyPort == null) { |
|
|
// Assumes we can use any port >= 2000 |
|
|
|
|
|
|
|
|
// Assumes we can use any port >= 2000, |
|
|
|
|
|
// except for 2049 in Firefox... |
|
|
proxyPort = availablePort.addAndGet(1); |
|
|
proxyPort = availablePort.addAndGet(1); |
|
|
|
|
|
if (proxyPort == 2049) { |
|
|
|
|
|
// Restricted in Firefox, see |
|
|
|
|
|
// http://www-archive.mozilla.org/projects/netlib/PortBanning.html#portlist |
|
|
|
|
|
proxyPort = availablePort.addAndGet(1); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
return proxyPort; |
|
|
return proxyPort; |
|
|
} |
|
|
} |