fix #1181 replace with http.proxy.port
This commit is contained in:
parent
6d5f5fe77a
commit
6c962aabad
1 changed files with 3 additions and 3 deletions
|
@ -1709,7 +1709,7 @@ public interface FessProp {
|
|||
|
||||
String getHttpProxyHost();
|
||||
|
||||
Integer getHttpProxyHostAsInteger();
|
||||
Integer getHttpProxyPortAsInteger();
|
||||
|
||||
String getHttpProxyUsername();
|
||||
|
||||
|
@ -1718,8 +1718,8 @@ public interface FessProp {
|
|||
public default Proxy getHttpProxy() {
|
||||
Proxy proxy = (Proxy) propMap.get(HTML_PROXY);
|
||||
if (proxy == null) {
|
||||
if (StringUtil.isNotBlank(getHttpProxyHost()) && getHttpProxyHostAsInteger() != null) {
|
||||
final SocketAddress addr = new InetSocketAddress(getHttpProxyHost(), getHttpProxyHostAsInteger());
|
||||
if (StringUtil.isNotBlank(getHttpProxyHost()) && getHttpProxyPortAsInteger() != null) {
|
||||
final SocketAddress addr = new InetSocketAddress(getHttpProxyHost(), getHttpProxyPortAsInteger());
|
||||
proxy = new Proxy(Type.HTTP, addr);
|
||||
if (StringUtil.isNotBlank(getHttpProxyUsername())) {
|
||||
Authenticator.setDefault(new Authenticator() {
|
||||
|
|
Loading…
Add table
Reference in a new issue