Skip to content

Commit f2651a2

Browse files
committed
enableQuic to disable EhSSLSocketFactory
1 parent 4cf9561 commit f2651a2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

patches/0001-anti-dpi.patch

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,11 @@ diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ktor/OkhttpExtensions.kt b/a
187187
index a13cc9003..fcb996115 100644
188188
--- a/app/src/main/kotlin/com/hippo/ehviewer/ktor/OkhttpExtensions.kt
189189
+++ b/app/src/main/kotlin/com/hippo/ehviewer/ktor/OkhttpExtensions.kt
190-
@@ -1,14 +1,13 @@
190+
@@ -1,14 +1,16 @@
191191
package com.hippo.ehviewer.ktor
192192

193193
-import com.ehviewer.core.util.isAtLeastQ
194+
+import com.hippo.ehviewer.Settings
194195
+import com.hippo.ehviewer.client.EhDns
195196
+import com.hippo.ehviewer.client.EhSSLSocketFactory
196197
+import com.hippo.ehviewer.client.install
@@ -202,8 +203,9 @@ index a13cc9003..fcb996115 100644
202203
config {
203204
- if (isAtLeastQ) {
204205
- dns(AsyncDns.toDns(AndroidAsyncDns.IPv4, AndroidAsyncDns.IPv6))
205-
- }
206206
+ dns(EhDns)
207-
+ install(EhSSLSocketFactory)
207+
+ if (!Settings.enableQuic.value) {
208+
+ install(EhSSLSocketFactory)
209+
}
208210
}
209211
}

0 commit comments

Comments
 (0)