Skip to content

Commit 6890a41

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4d30a63 + 8e7d70a commit 6890a41

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ And this to your module build.gradle:
1919

2020
```groovy
2121
dependencies {
22-
implementation 'com.github.proxer:ProxerLibJava:5.3.0'
22+
implementation 'com.github.proxer:ProxerLibJava:5.4.0'
2323
}
2424
```
2525

2626
You can also download the `jar` directly
27-
from [here](https://jitpack.io/com/github/proxer/ProxerLibJava/5.3.0/ProxerLibJava-5.3.0.jar), if you prefer.
27+
from [here](https://jitpack.io/com/github/proxer/ProxerLibJava/5.4.0/ProxerLibJava-5.4.0.jar), if you prefer.
2828

2929
> Note that this jar does not come with the required dependencies. You have to include those manually in that case.
3030
@@ -271,7 +271,7 @@ If you need to provide the config yourself (e.g. when using an older ProGuard ve
271271

272272
### More
273273

274-
You can find detailed JavaDoc [here](https://jitpack.io/com/github/proxer/ProxerLibJava/5.3.0/javadoc/).
274+
You can find detailed JavaDoc [here](https://jitpack.io/com/github/proxer/ProxerLibJava/5.4.0/javadoc/).
275275

276276
## Working on the library
277277

library/src/main/kotlin/me/proxer/library/ProxerApi.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,12 @@ class ProxerApi private constructor(retrofit: Retrofit) {
6363
const val TEST_KEY = "test"
6464

6565
private val CERTIFICATES = arrayOf(
66-
// https://censys.io/certificates/0687260331a72403d909f105e69bcf0d32e1bd2493ffc6d9206d11bcd6770739
6766
"sha256/Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys=",
68-
// https://censys.io/certificates/16af57a9f676b0ab126095aa5ebadef22ab31119d644ac95cd4b93dbf3f26aeb
6967
"sha256/Y9mvm0exBk1JoQ57f9Vm28jKo5lFm/woKcVxrYxu80o=",
70-
// https://censys.io/certificates/1793927a0614549789adce2f8f34f7f0b66d0f3ae3a3b84d21ec15dbba4fadc7
7168
"sha256/58qRu/uxh4gFezqAcERupSkRYBlBAvfcw7mEjGPLnNU=",
72-
// https://censys.io/certificates/52f0e1c4e58ec629291b60317f074671b85d7ea80d5b07273463534b32b40234
7369
"sha256/grX4Ta9HpZx6tSHkmCrvpApTQGo67CYDnvprLg5yRME=",
74-
// https://censys.io/certificates/96bcec06264976f37460779acf28c5a7cfe8a3c0aae11a8ffcee05c0bddf08c6
75-
"sha256/C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M="
70+
"sha256/C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M=",
71+
"sha256/TeT9kTnquzkcIJC0caQ09mL9o/Fj6GqUPJ5IQQ/ztUM=",
7672
)
7773

7874
private const val DEFAULT_USER_AGENT = "ProxerLibJava/" + BuildConfig.version
@@ -182,6 +178,7 @@ class ProxerApi private constructor(retrofit: Retrofit) {
182178
private var moshi: Moshi? = null
183179
private var client: OkHttpClient? = null
184180
private var retrofit: Retrofit? = null
181+
private var enableCertificatePinning: Boolean = false
185182
private var enableRateLimitProtection: Boolean = false
186183

187184
/**
@@ -265,7 +262,7 @@ class ProxerApi private constructor(retrofit: Retrofit) {
265262
if (enableRateLimitProtection) add(4, RateLimitInterceptor(moshi, client?.cache))
266263
}
267264

268-
certificatePinner(constructCertificatePinner())
265+
if (enableCertificatePinning) certificatePinner(constructCertificatePinner())
269266
}
270267
.build()
271268
}

0 commit comments

Comments
 (0)