use of com.jcraft.jsch.ProxySOCKS4 in project spring-integration by spring-projects.
the class JschProxyFactoryBean method createInstance.
@Override
protected Proxy createInstance() throws Exception {
switch(this.type) {
case SOCKS5:
ProxySOCKS5 socks5proxy = new ProxySOCKS5(this.host, this.port);
socks5proxy.setUserPasswd(this.user, this.password);
return socks5proxy;
case SOCKS4:
ProxySOCKS4 socks4proxy = new ProxySOCKS4(this.host, this.port);
socks4proxy.setUserPasswd(this.user, this.password);
return socks4proxy;
case HTTP:
ProxyHTTP httpProxy = new ProxyHTTP(this.host, this.port);
httpProxy.setUserPasswd(this.user, this.password);
return httpProxy;
default:
throw new IllegalArgumentException("Invalid type:" + this.type);
}
}
Aggregations