Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ object BaseService {
val context = if (Build.VERSION.SDK_INT < 24 || Core.user.isUserUnlocked) app else Core.deviceStorage
val configRoot = context.noBackupFilesDir
val udpFallback = data.udpFallback
// ss-local can resolve the remote server hostname as soon as it starts, so bind the local DNS socket first.
data.localDns = LocalDnsWorker(this::rawResolver).apply { start() }
data.proxy!!.start(this,
File(Core.deviceStorage.noBackupFilesDir, "stat_main"),
File(configRoot, CONFIG_FILE),
Expand All @@ -254,7 +256,6 @@ object BaseService {
File(Core.deviceStorage.noBackupFilesDir, "stat_udp"),
File(configRoot, CONFIG_FILE_UDP),
"udp_only", false)
data.localDns = LocalDnsWorker(this::rawResolver).apply { start() }
}

fun startRunner() {
Expand Down