Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit a7097a4

Browse files
committed
add new option in TorSettings for enabling torrc config entry DormantClientTimeout
1 parent 4ccfd8e commit a7097a4

File tree

1 file changed

+11
-0
lines changed
  • topl-core-base/src/main/java/io/matthewnelson/topl_core_base

1 file changed

+11
-0
lines changed

topl-core-base/src/main/java/io/matthewnelson/topl_core_base/TorSettings.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ abstract class TorSettings: BaseConsts() {
110110
* things up if you're simply looking to use a Socks5 Proxy to connect to.
111111
* */
112112
companion object {
113+
const val DEFAULT__DORMANT_CLIENT_TIMEOUT = 10
113114
const val DEFAULT__DISABLE_NETWORK = true
114115
const val DEFAULT__ENTRY_NODES = ""
115116
const val DEFAULT__EXCLUDED_NODES = ""
@@ -150,6 +151,16 @@ abstract class TorSettings: BaseConsts() {
150151
* */
151152
abstract val customTorrc: String?
152153

154+
/**
155+
* Adds to the torrc file "DormantClientTimeout <your value> minutes"
156+
*
157+
* Minimum value 10. Any value less than or equal to 9 will fall back to using the value of 10
158+
* when writing the config to the torrc file. Set `null` to disable
159+
*
160+
* See [DEFAULT__DORMANT_CLIENT_TIMEOUT]
161+
* */
162+
abstract val dormantClientTimeout: Int?
163+
153164
/**
154165
* OnionProxyManager will enable this on startup using the TorControlConnection based off
155166
* of the device's network state. Setting this to `true` is highly recommended.

0 commit comments

Comments
 (0)