RootDnsService.kt 24.3 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
package com.frostnerd.smokescreen.service

import android.app.PendingIntent
import android.app.Service
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import android.os.IBinder
import android.os.StrictMode
import android.util.Base64
import androidx.core.app.NotificationCompat
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import com.frostnerd.dnstunnelproxy.*
import com.frostnerd.encrypteddnstunnelproxy.HttpsDnsServerInformation
import com.frostnerd.encrypteddnstunnelproxy.tls.TLSUpstreamAddress
import com.frostnerd.smokescreen.*
import com.frostnerd.smokescreen.BuildConfig
import com.frostnerd.smokescreen.R
import com.frostnerd.smokescreen.activity.BackgroundVpnConfigureActivity
import com.frostnerd.smokescreen.activity.PinActivity
import com.frostnerd.smokescreen.database.entities.CachedResponse
import com.frostnerd.smokescreen.database.getDatabase
import com.frostnerd.smokescreen.util.Notifications
import com.frostnerd.smokescreen.util.proxy.ProxyBypassHandler
import com.frostnerd.smokescreen.util.proxy.ProxyHttpsHandler
import com.frostnerd.smokescreen.util.proxy.ProxyTlsHandler
import com.frostnerd.smokescreen.util.proxy.SmokeProxy
import com.frostnerd.vpntunnelproxy.IpWrappingUdpTunnel
import com.frostnerd.vpntunnelproxy.Proxy
import com.frostnerd.vpntunnelproxy.UdpTunnel
import com.frostnerd.vpntunnelproxy.VPNTunnelProxy
import kotlinx.coroutines.*
import org.minidns.dnsmessage.DnsMessage
import org.minidns.dnsmessage.Question
import org.minidns.dnsname.DnsName
import org.minidns.record.A
import org.minidns.record.AAAA
import org.minidns.record.Record
import java.io.ByteArrayInputStream
import java.io.DataInputStream
import java.net.*
import java.util.concurrent.TimeoutException
import java.util.logging.Level

/*
 * Copyright (C) 2019 Daniel Wolf (Ch4t4r)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * You can contact the developer at daniel.wolf@frostnerd.com.
 */
class RootDnsService:Service() {
    private lateinit var notificationBuilder: NotificationCompat.Builder
    private var pauseNotificationAction:NotificationCompat.Action? = null
    private lateinit var serverConfig:DnsServerConfiguration
    private var queryCountOffset: Long = 0
    private var packageBypassAmount = 0
    private var dnsProxy: SmokeProxy? = null
    private var vpnProxy: VPNTunnelProxy? = null

    /*
    URLs passed to the Service, which haven't been retrieved from the settings.
    Null if the current servers are from the settings
 */
    private var userServerConfig:DnsServerInformation<*>? = null

    override fun onBind(intent: Intent?): IBinder? {
        return null
    }

    override fun onCreate() {
        super.onCreate()
        createNotification()
    }

    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        println("STARTED")
        setServerConfiguration(intent)
        updateNotification(0)
        run()
        return START_STICKY
    }

    private fun createNotification() {
        log("Creating notification")
        notificationBuilder = NotificationCompat.Builder(this, Notifications.servicePersistentNotificationChannel(this))
        if(getPreferences().hideNotificationIcon)
            notificationBuilder.priority = NotificationCompat.PRIORITY_MIN
        if(!getPreferences().showNotificationOnLockscreen)
            notificationBuilder.setVisibility(NotificationCompat.VISIBILITY_SECRET)
        notificationBuilder.setContentTitle(getString(R.string.app_name))
        notificationBuilder.setSmallIcon(R.drawable.ic_mainnotification)
        notificationBuilder.setOngoing(true)
        notificationBuilder.setAutoCancel(false)
        notificationBuilder.setSound(null)
        notificationBuilder.setOnlyAlertOnce(true)
        notificationBuilder.setUsesChronometer(true)
        notificationBuilder.setContentIntent(
            PendingIntent.getActivity(
                this, 1,
                Intent(this, PinActivity::class.java), PendingIntent.FLAG_UPDATE_CURRENT
            )
        )
        if(getPreferences().allowStopInNotification) {
            val stopPendingIntent =
                PendingIntent.getService(this, 1, DnsVpnService.commandIntent(this, Command.STOP), PendingIntent.FLAG_CANCEL_CURRENT)
            val stopAction = NotificationCompat.Action(R.drawable.ic_stop, getString(R.string.all_stop), stopPendingIntent)
            notificationBuilder.addAction(stopAction)
        }
        if(getPreferences().allowPauseInNotification) {
            val pausePendingIntent =
                PendingIntent.getService(this, 2,
                    DnsVpnService.commandIntent(this, Command.PAUSE_RESUME), PendingIntent.FLAG_CANCEL_CURRENT)
            pauseNotificationAction = NotificationCompat.Action(R.drawable.ic_stat_pause, getString(R.string.all_pause), pausePendingIntent)
            notificationBuilder.addAction(pauseNotificationAction)
        }
        updateNotification(0)
        log("Notification created and posted.")
    }

    private fun updateNotification(queryCount: Int? = null) {
        if (queryCount != null) notificationBuilder.setSubText(
            getString(
                R.string.notification_main_subtext,
                queryCount
            )
        )
        startForeground(1, notificationBuilder.build())
    }

    private fun setServerConfiguration(intent: Intent?) {
        log("Updating server configuration..")
        userServerConfig = BackgroundVpnConfigureActivity.readServerInfoFromIntent(intent)
        serverConfig = getServerConfig()
        serverConfig.forEachAddress { _, address ->
            if(!address.addressCreator.isCurrentlyResolving()) address.addressCreator.resolveOrGetResultOrNull(true)
            address.addressCreator.whenResolveFailed {
                if(it is TimeoutException) {
                    address.addressCreator.resolveOrGetResultOrNull(true)
                    address.addressCreator.whenResolveFinishedSuccessfully {
                    }
                }
            }
            address.addressCreator.whenResolveFinishedSuccessfully {
            }
        }
        log("Server configuration updated to $serverConfig")
    }

    private fun getServerConfig(): DnsServerConfiguration {
        TLSUpstreamAddress
        return if(userServerConfig != null) {
            userServerConfig!!.let {config ->
                return if(config is HttpsDnsServerInformation) DnsServerConfiguration(config.serverConfigurations.values.toList(), null)
                else {
                    DnsServerConfiguration(null, config.servers.map {
                        it.address as TLSUpstreamAddress
                    })
                }
            }
        }
        else {
            val config = getPreferences().dnsServerConfig
            if(config.hasTlsServer()) {
                DnsServerConfiguration(null, config.servers.map {
                    it.address as TLSUpstreamAddress
                })
            } else {
                DnsServerConfiguration((config as HttpsDnsServerInformation).serverConfigurations.map {
                    it.value
                }, null)
            }
        }
    }

    private fun setNotificationText() {
        val primaryServer:String
        val secondaryServer:String?
        if(serverConfig.httpsConfiguration != null) {
            notificationBuilder.setContentTitle(getString(R.string.notification_main_title_https))
            primaryServer = serverConfig.httpsConfiguration!![0].urlCreator.address.getUrl(true)
            secondaryServer = serverConfig.httpsConfiguration!!.getOrNull(1)?.urlCreator?.address?.getUrl(true)
        } else {
            notificationBuilder.setContentTitle(getString(R.string.notification_main_title_tls))
            primaryServer = serverConfig.tlsConfiguration!![0].formatToString()
            secondaryServer = serverConfig.tlsConfiguration!!.getOrNull(1)?.formatToString()
        }
        val text = if (secondaryServer != null) {
            getString(
                if(getPreferences().isBypassBlacklist) R.string.notification_main_text_with_secondary else R.string.notification_main_text_with_secondary_whitelist,
                primaryServer,
                secondaryServer,
                packageBypassAmount,
                dnsProxy?.cache?.livingCachedEntries() ?: 0
            )
        } else {
            getString(
                if(getPreferences().isBypassBlacklist) R.string.notification_main_text else R.string.notification_main_text_whitelist,
                primaryServer,
                packageBypassAmount,
                dnsProxy?.cache?.livingCachedEntries() ?: 0
            )
        }
        notificationBuilder.setStyle(NotificationCompat.BigTextStyle(notificationBuilder).bigText(text))
    }

    private fun Byte.toIntWithUnsigned():Int {
        return toUByte().toInt()
    }

    fun run() {
        log("run() called")
        log("Starting with config: $serverConfig")

        log("Creating handle.")
        val handle: DnsHandle
        if(serverConfig.httpsConfiguration != null) {
            handle = ProxyHttpsHandler(
                serverConfig.httpsConfiguration!!,
                connectTimeout = 5000,
                queryCountCallback = {
                    setNotificationText()
                    updateNotification(it)
                }
            )
        } else {
            handle = ProxyTlsHandler(serverConfig.tlsConfiguration!!,
                connectTimeout = 2000,
                queryCountCallback = {
                    setNotificationText()
                    updateNotification(it)
                })
        }
        log("Handle created, creating DNS proxy")
        handle.ipv6Enabled = getPreferences().enableIpv6 && (getPreferences().forceIpv6 || hasDeviceIpv6Address())
        handle.ipv4Enabled =
            !handle.ipv6Enabled || (getPreferences().enableIpv4 && (getPreferences().forceIpv4 || hasDeviceIpv4Address()))
        StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder().permitAll().build())

        dnsProxy = SmokeProxy(handle, createProxyBypassHandlers(), createDnsCache(), createQueryLogger(), createLocalResolver())
        dnsProxy!!.parseDevicePacketOverride = { arr, orig ->
            val pPacket = orig(arr)

            ParsedPacket(pPacket.sourceAddress, pPacket.destinationAddress, pPacket.sourcePort, pPacket.destinationPort, pPacket.dnsPayload)
        }
        log("DnsProxy created, creating VPN proxy")
        vpnProxy = VPNTunnelProxy(dnsProxy!!, socketProtector = object:Proxy.SocketProtector {
            override fun protectDatagramSocket(socket: DatagramSocket) {
            }

            override fun protectSocket(socket: Socket) {
            }

            override fun protectSocket(socket: Int) {
            }
        }, coroutineScope = CoroutineScope(
            newFixedThreadPoolContext(2, "proxy-pool")
        ), logger = object:com.frostnerd.vpntunnelproxy.Logger() {
            override fun logException(ex: Exception, terminal: Boolean, level: Level) {
                if(terminal) log(ex)
                else log(Logger.stacktraceToString(ex), "VPN-LIBRARY, $level")
            }

            override fun logMessage(message: String, level: Level) {
                if(level >= Level.INFO || (BuildConfig.DEBUG && level >= Level.FINE)) {
                    log(message, "VPN-LIBRARY, $level")
                }
            }
        })

        log("VPN proxy creating, trying to run...")
        val port = 45001
        Runtime.getRuntime().exec("su && iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 127.0.0.1:$port").waitFor()
        GlobalScope.launch {
            IpWrappingUdpTunnel(bindPort = port, socketReadCoroutineContext = newSingleThreadContext(""), tunnelReadCoroutineContext = newSingleThreadContext("")).start(vpnProxy!!)
            log("VPN proxy started.")
            LocalBroadcastManager.getInstance(this@RootDnsService).sendBroadcast(Intent(DnsVpnService.BROADCAST_VPN_ACTIVE))
        }
    }

    private fun createQueryLogger(): QueryListener? {
        return if(getPreferences().loggingEnabled || getPreferences().queryLoggingEnabled) {
            com.frostnerd.smokescreen.util.proxy.QueryListener(this)
        } else null
    }


    /**
     * Creates bypass handlers for each network and its associated search domains
     * Requests for .*SEARCHDOMAIN won't use doh and are sent to the DNS servers of the network they originated from.
     */
    private fun createProxyBypassHandlers(): MutableList<DnsHandle> {
        val bypassHandlers = mutableListOf<DnsHandle>()
        if(getPreferences().bypassSearchdomains) {
            log("Creating bypass handlers for search domains of connected networks.")
            val mgr = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
            for (network in mgr.allNetworks) {
                if(network == null) continue
                val networkInfo = mgr.getNetworkInfo(network) ?: continue
                if (networkInfo.isConnected && !mgr.isVpnNetwork(network)) {
                    val linkProperties = mgr.getLinkProperties(network) ?: continue
                    if (!linkProperties.domains.isNullOrBlank()) {
                        log("Bypassing domains ${linkProperties.domains} for network of type ${networkInfo.typeName}")
                        val domains = linkProperties.domains.split(",").toList()
                        bypassHandlers.add(
                            ProxyBypassHandler(
                                domains,
                                linkProperties.dnsServers[0]!!
                            )
                        )
                    }
                }
            }
            log("${bypassHandlers.size} bypass handlers created.")
        } else log("Not creating bypass handlers for search domains, bypass is disabled.")
        if(getPreferences().pauseOnCaptivePortal) {
            val dhcpServers = getDhcpDnsServers()
            if(!dhcpServers.isEmpty()) bypassHandlers.add(CaptivePortalUdpDnsHandle(targetDnsServer = { dhcpServers.first() }))
        }
        return bypassHandlers
    }

    private fun createDnsCache(): SimpleDnsCache? {
        val dnsCache: SimpleDnsCache?
        dnsCache = if (getPreferences().useDnsCache) {
            log("Creating DNS Cache.")
            val cacheControl: CacheControl = if (!getPreferences().useDefaultDnsCacheTime) {
                val cacheTime = getPreferences().customDnsCacheTime.toLong()
                val nxDomainCacheTime = getPreferences().nxDomainCacheTime.toLong()
                object : CacheControl {
                    override suspend fun getTtl(
                        answerMessage: DnsMessage,
                        dnsName: DnsName,
                        type: Record.TYPE,
                        record: Record<*>
                    ): Long {
                        return if(answerMessage.responseCode == DnsMessage.RESPONSE_CODE.NX_DOMAIN) nxDomainCacheTime else cacheTime
                    }

                    override suspend fun getTtl(question: Question, record: Record<*>): Long = cacheTime


                    override fun shouldCache(question: Question): Boolean = true
                }
            } else DefaultCacheControl(getPreferences().minimumCacheTime.toLong())
            val onClearCache:((currentCache:Map<String, Map<Record.TYPE, Map<Record<*>, Long>>>) -> Unit)? = if(getPreferences().keepDnsCacheAcrossLaunches) {
                { cache ->
                    log("Persisting current cache to Database.")
                    getDatabase().cachedResponseDao().deleteAll()
                    var persisted = 0
                    val entries = mutableListOf<CachedResponse>()
                    for(entry in cache) {
                        for(cachedType in entry.value) {
                            val recordsToPersist:MutableMap<Record<*>, Long> = mutableMapOf()
                            for(cachedRecord in cachedType.value) {
                                if(cachedRecord.value > System.currentTimeMillis()) {
                                    recordsToPersist[cachedRecord.key] = cachedRecord.value
                                    persisted++
                                }
                            }

                            if(!recordsToPersist.isEmpty()) {
                                entries.add(createPersistedCacheEntry(entry.key, cachedType.key, recordsToPersist))
                            }
                        }
                    }
                    GlobalScope.launch {
                        val dao = getDatabase().cachedResponseDao()
                        dao.insertAll(entries)
                    }
                    log("Cache persisted [$persisted records]")
                }
            } else null
            SimpleDnsCache(cacheControl, CacheStrategy(getPreferences().maxCacheSize), onClearCache = onClearCache)
        } else {
            log("Not creating DNS cache, is disabled.")
            null
        }
        if(dnsCache != null) log("Cache created.")

        // Restores persisted cache
        if(dnsCache != null && getPreferences().keepDnsCacheAcrossLaunches) {
            log("Restoring old cache")
            var restored = 0
            var tooOld = 0
            GlobalScope.launch {
                for (cachedResponse in getDatabase().cachedResponseRepository().getAllAsync(GlobalScope)) {
                    val records = mutableMapOf<Record<*>, Long>()
                    for (record in cachedResponse.records) {
                        if(record.value > System.currentTimeMillis()) {
                            val bytes = Base64.decode(record.key, Base64.NO_WRAP)
                            val stream = DataInputStream(ByteArrayInputStream(bytes))
                            records[Record.parse(stream, bytes)] = record.value
                            restored++
                        } else tooOld++
                    }
                    dnsCache.addToCache(DnsName.from(cachedResponse.dnsName), cachedResponse.type, records)
                }
                getDatabase().cachedResponseDao().deleteAll()
            }
            log("$restored old records restored, deleting persisted cache. $tooOld records were too old.")
            log("Persisted cache deleted.")
        }
        return dnsCache
    }

    private fun createLocalResolver(): LocalResolver? {
        if(getPreferences().dnsRulesEnabled) {
            return object: LocalResolver(false) {
                private val dao = getDatabase().dnsRuleDao()
                private val resolveResults = mutableMapOf<Question, String>()
                private val wwwRegex = Regex("^www\\.")
                private val useUserRules = getPreferences().customHostsEnabled

                override suspend fun canResolve(question: Question): Boolean {
                    return if(question.type != Record.TYPE.A && question.type != Record.TYPE.AAAA) {
                        false
                    } else {
                        val uniformQuestion = question.name.toString().replace(wwwRegex, "")
                        val resolveResult = dao.findRuleTarget(uniformQuestion, question.type, useUserRules)?.let {
                            when (it) {
                                "0" -> "0.0.0.0"
                                "1" -> {
                                    if (question.type == Record.TYPE.AAAA) "::1"
                                    else "127.0.0.1"
                                }
                                else -> it
                            }
                        }
                        if (resolveResult != null) {
                            resolveResults[question] = resolveResult
                            true
                        } else false
                    }
                }

                override suspend fun resolve(question: Question): List<Record<*>> {
                    val result = resolveResults.remove(question)
                    return result?.let {
                        val data = if(question.type == Record.TYPE.A) {
                            A(it)
                        } else {
                            AAAA(it)
                        }
                        listOf(Record(question.name.toString(), question.type, question.clazz.value, 9999, data))
                    } ?: throw IllegalStateException()
                }

                override fun cleanup() {}

            }
        } else {
            return null
        }
    }

    private fun createPersistedCacheEntry(
        dnsName: String,
        type: Record.TYPE,
        recordsToPersist: MutableMap<Record<*>, Long>
    ): CachedResponse {
        val entity = CachedResponse(
            dnsName,
            type,
            mutableMapOf()
        )
        for (record in recordsToPersist) {
            entity.records[Base64.encodeToString(record.key.toByteArray(), Base64.NO_WRAP)] = record.value
        }
        return entity
    }

    private fun isPackageInstalled(packageName: String): Boolean {
        return try {
            packageManager.getApplicationInfo(packageName, 0).enabled
        } catch (e: PackageManager.NameNotFoundException) {
            false
        }
    }

    private fun getDhcpDnsServers():List<InetAddress> {
        val mgr = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
        for (network in mgr.allNetworks) {
            if(network == null) continue
            val info = mgr.getNetworkInfo(network) ?: continue
            val capabilities = mgr.getNetworkCapabilities(network) ?: continue
            if (info.isConnected && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
                val linkProperties = mgr.getLinkProperties(network) ?: continue
                return linkProperties.dnsServers
            }
        }
        return emptyList()
    }

    private fun hasDeviceIpv4Address(): Boolean {
        val mgr = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
        for (network in mgr.allNetworks) {
            if(network == null) continue
            val info = mgr.getNetworkInfo(network) ?: continue
            val capabilities = mgr.getNetworkCapabilities(network) ?: continue
            if (info.isConnected && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
                val linkProperties = mgr.getLinkProperties(network) ?: continue
                log("Checking for IPv4 address in connected non-VPN network ${info.typeName}")
                for (linkAddress in linkProperties.linkAddresses) {
                    if (linkAddress.address is Inet4Address && !linkAddress.address.isLoopbackAddress) {
                        log("IPv4 address found.")
                        return true
                    }
                }
            }
        }
        log("No IPv4 addresses found.")
        return false
    }

    private fun hasDeviceIpv6Address(): Boolean {
        val mgr = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
        for (network in mgr.allNetworks) {
            if(network == null) continue
            val info = mgr.getNetworkInfo(network) ?: continue
            val capabilities = mgr.getNetworkCapabilities(network) ?: continue
            if (info.isConnected && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
                val linkProperties = mgr.getLinkProperties(network) ?: continue
                log("Checking for IPv6 address in connected non-VPN network ${info.typeName}")
                for (linkAddress in linkProperties.linkAddresses) {
                    if (linkAddress.address is Inet6Address && !linkAddress.address.isLoopbackAddress) {
                        log("IPv6 address found.")
                        return true
                    }
                }
            }
        }
        log("No IPv6 addresses found.")
        return false
    }
}