Move config files to files directory

It looks nicer.

Other changes btw:

* Removes duplicated logcats from GuardedProcess;
* local_port is moved to command line options since that's not sensitive;
* pdnsd uses cache dir;
* Refinements to Utils.
This commit is contained in:
Mygod
2017-01-20 17:57:28 +08:00
committed by Max Lv
parent 7491a667a5
commit 2e3baa727d
13 changed files with 93 additions and 142 deletions
@@ -25,6 +25,7 @@ import java.io.File
import eu.chainfire.libsuperuser.Shell
import scala.collection.JavaConverters._
import scala.io.Source
/**
* @author Mygod
@@ -45,7 +46,7 @@ object TcpFastOpen {
def sendEnabled: Boolean = {
val file = new File("/proc/sys/net/ipv4/tcp_fastopen")
file.canRead && (Utils.readAllLines(file).toInt & 1) > 0
file.canRead && (Source.fromFile(file).mkString.toInt & 1) > 0
}
def enabled(value: Boolean): String = if (sendEnabled != value) {