This commit is contained in:
wentch
2015-12-21 13:03:09 +08:00
parent 65af6e16a9
commit 754974b85f
4 changed files with 5 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
APP_HOME=`dirname "$0"`

View File

@@ -4,7 +4,7 @@ ulimit -c unlimited
ulimit -n 1024000
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
APP_HOME=`dirname "$0"`

View File

@@ -42,6 +42,8 @@ public final class SocksServer extends Server {
@Override
@SuppressWarnings("unchecked")
protected Context createContext() {
if (this.readTimeoutSecond < 1) this.readTimeoutSecond = 6;
if (this.writeTimeoutSecond < 1) this.writeTimeoutSecond = 6;
final int port = this.address.getPort();
AtomicLong createBufferCounter = watch == null ? new AtomicLong() : watch.createWatchNumber("SOCKS_" + port + ".Buffer.creatCounter");
AtomicLong cycleBufferCounter = watch == null ? new AtomicLong() : watch.createWatchNumber("SOCKS_" + port + ".Buffer.cycleCounter");

View File

@@ -348,9 +348,6 @@ public final class ClassFilter<T> {
urlfiles.add(url);
}
}
String selfpkg0 = ClassFilter.class.getPackage().getName();
selfpkg0 = selfpkg0.substring(0, selfpkg0.lastIndexOf('.') + 1);
final String selfpkg = selfpkg0;
List<File> files = new ArrayList<>();
boolean debug = logger.isLoggable(Level.FINEST);
StringBuilder debugstr = new StringBuilder();
@@ -371,7 +368,7 @@ public final class ClassFilter<T> {
String entryname = it.nextElement().getName().replace('/', '.');
if (entryname.endsWith(".class") && entryname.indexOf('$') < 0) {
String classname = entryname.substring(0, entryname.length() - 6);
if (classname.startsWith("javax.") || classname.startsWith("com.sun.") || classname.startsWith(selfpkg) || classname.startsWith("com.mysql.")) continue;
if (classname.startsWith("javax.") || classname.startsWith("com.sun.") || classname.startsWith("com.mysql.")) continue;
classes.add(classname);
if (debug) debugstr.append(classname).append("\r\n");
for (final ClassFilter filter : filters) {