Skip to content

Commit

Permalink
LocalDnsService object removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Nov 22, 2024
1 parent f7e05ea commit b11f73c
Show file tree
Hide file tree
Showing 22 changed files with 5 additions and 448 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ GPLv3
<li>kotlin: <a href="https://github.com/JetBrains/kotlin/blob/master/license/LICENSE.txt">APL 2.0</a></li>
<li>material: <a href="https://github.com/material-components/material-components-android/blob/master/LICENSE">APL 2.0</a></li>
<li>gson: <a href="https://github.com/google/gson/blob/master/LICENSE">APL 2.0</a></li>
<li>dnsjava: <a href="https://github.com/dnsjava/dnsjava/blob/master/LICENSE">BSD</a></li>
<li>jsocks: <a href="https://android.googlesource.com/platform/external/pcre/+/master/dist2/LICENCE">LGPL 2.1</a></li>
<li>preferencex-simplemenu: <a href="https://github.com/takisoft/preferencex-android/blob/master/LICENSE">APL 2.0</a></li>
<li>android-plugin-api-for-locale: <a href="https://github.com/twofortyfouram/android-plugin-api-for-locale/blob/master/LICENSE.txt">APL 2.0</a></li>
<li>qrgen: <a href="https://github.com/kenglxn/QRGen">APL 2.0</a></li>
Expand Down
2 changes: 0 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ dependencies {
api "androidx.work:work-runtime-ktx:2.7.1"
api "androidx.work:work-multiprocess:2.7.1"
api 'com.google.code.gson:gson:2.9.0'
api 'dnsjava:dnsjava:3.5.0'
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1"
implementation 'com.github.ssrlive:jsocks:v1.0.1'
implementation 'androidx.core:core-ktx:1.7.0'
kapt "androidx.room:room-compiler:2.4.2"
}
Expand Down
66 changes: 0 additions & 66 deletions core/src/main/java/com/github/shadowsocks/bg/LocalDnsService.kt

This file was deleted.

8 changes: 5 additions & 3 deletions core/src/main/java/com/github/shadowsocks/bg/SsrVpnService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import java.io.File
import java.io.FileDescriptor
import java.io.IOException

class SsrVpnService : VpnService(), LocalDnsService.Interface {
class SsrVpnService : VpnService(), BaseService.Interface {
companion object {
private const val VPN_MTU = 1500
private const val PRIVATE_VLAN4_CLIENT = "172.19.0.1"
Expand Down Expand Up @@ -84,7 +84,7 @@ class SsrVpnService : VpnService(), LocalDnsService.Interface {

override fun onBind(intent: Intent) = when (intent.action) {
SERVICE_INTERFACE -> super<VpnService>.onBind(intent)
else -> super<LocalDnsService.Interface>.onBind(intent)
else -> super<BaseService.Interface>.onBind(intent)
}

override fun onRevoke() = stopRunner()
Expand All @@ -105,7 +105,9 @@ class SsrVpnService : VpnService(), LocalDnsService.Interface {
if (DataStore.serviceMode == Key.modeVpn) {
if (prepare(this) != null) {
startActivity(Intent(this, VpnRequestActivity::class.java).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
} else return super<LocalDnsService.Interface>.onStartCommand(intent, flags, startId)
} else {
return super<BaseService.Interface>.onStartCommand(intent, flags, startId)
}
}
stopRunner()
return Service.START_NOT_STICKY
Expand Down
213 changes: 0 additions & 213 deletions core/src/main/java/com/github/shadowsocks/net/LocalDnsServer.kt

This file was deleted.

Loading

0 comments on commit b11f73c

Please sign in to comment.