remove http proxy feature

Cause apache.http package does not provide socks proxy feature
This commit is contained in:
AzZu 2018-05-06 11:19:53 +03:00
parent 28a9cf1fdb
commit 95dd4e3a3f
2 changed files with 0 additions and 31 deletions

View File

@ -23,9 +23,6 @@ public class DefaultBotOptions implements BotOptions {
private String baseUrl;
private List<String> allowedUpdates;
private CredentialsProvider credentialsProvider;
private HttpHost httpProxy;
public DefaultBotOptions() {
maxThreads = 1;
baseUrl = ApiConstants.BASE_URL;
@ -88,19 +85,4 @@ public class DefaultBotOptions implements BotOptions {
this.exponentialBackOff = exponentialBackOff;
}
public CredentialsProvider getCredentialsProvider() {
return credentialsProvider;
}
public void setCredentialsProvider(CredentialsProvider credentialsProvider) {
this.credentialsProvider = credentialsProvider;
}
public HttpHost getHttpProxy() {
return httpProxy;
}
public void setHttpProxy(HttpHost httpProxy) {
this.httpProxy = httpProxy;
}
}

View File

@ -18,19 +18,6 @@ public class TelegramHttpClientBuilder {
.setSSLHostnameVerifier(new NoopHostnameVerifier())
.setConnectionTimeToLive(70, TimeUnit.SECONDS)
.setMaxConnTotal(100);
if (options.getHttpProxy() != null) {
httpClientBuilder.setProxy(options.getHttpProxy());
if (options.getCredentialsProvider() != null) {
httpClientBuilder
.setProxyAuthenticationStrategy(new ProxyAuthenticationStrategy())
.setDefaultCredentialsProvider(options.getCredentialsProvider());
}
}
return httpClientBuilder.build();
}