org.rx.net.support.SocksSupport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxlib Show documentation
Show all versions of rxlib Show documentation
A set of utilities for Java
package org.rx.net.support;
import org.rx.core.Arrays;
import org.rx.core.Cache;
import org.rx.core.cache.DiskCache;
import org.rx.net.dns.DnsServer;
import java.math.BigInteger;
import java.net.InetAddress;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public interface SocksSupport extends AutoCloseable, DnsServer.ResolveInterceptor {
String FAKE_HOST_SUFFIX = "x.f-li.cn";
int[] FAKE_PORT_OBFS = new int[]{443, 3306};
int FAKE_EXPIRE_SECONDS = 60 * 5;
List FAKE_IPS = new CopyOnWriteArrayList<>(); //There is no need to set up '8.8.8.8'
List FAKE_PORTS = new CopyOnWriteArrayList<>(Arrays.toList(80));
int DNS_PORT = 53;
long ASYNC_TIMEOUT = 4 * 1000;
EndpointTracer ENDPOINT_TRACER = new EndpointTracer();
static Cache fakeDict() {
return Cache.getInstance(DiskCache.class);
}
void fakeEndpoint(BigInteger hash, String realEndpoint);
List resolveHost(String host);
void addWhiteList(InetAddress endpoint);
@Override
default void close() {
//rpc close
}
}