Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueMB committed May 7, 2024
2 parents 4d30a63 + 8e7d70a commit 6890a41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ And this to your module build.gradle:

```groovy
dependencies {
implementation 'com.github.proxer:ProxerLibJava:5.3.0'
implementation 'com.github.proxer:ProxerLibJava:5.4.0'
}
```

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

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

### More

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

## Working on the library

Expand Down
11 changes: 4 additions & 7 deletions library/src/main/kotlin/me/proxer/library/ProxerApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,12 @@ class ProxerApi private constructor(retrofit: Retrofit) {
const val TEST_KEY = "test"

private val CERTIFICATES = arrayOf(
// https://censys.io/certificates/0687260331a72403d909f105e69bcf0d32e1bd2493ffc6d9206d11bcd6770739
"sha256/Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys=",
// https://censys.io/certificates/16af57a9f676b0ab126095aa5ebadef22ab31119d644ac95cd4b93dbf3f26aeb
"sha256/Y9mvm0exBk1JoQ57f9Vm28jKo5lFm/woKcVxrYxu80o=",
// https://censys.io/certificates/1793927a0614549789adce2f8f34f7f0b66d0f3ae3a3b84d21ec15dbba4fadc7
"sha256/58qRu/uxh4gFezqAcERupSkRYBlBAvfcw7mEjGPLnNU=",
// https://censys.io/certificates/52f0e1c4e58ec629291b60317f074671b85d7ea80d5b07273463534b32b40234
"sha256/grX4Ta9HpZx6tSHkmCrvpApTQGo67CYDnvprLg5yRME=",
// https://censys.io/certificates/96bcec06264976f37460779acf28c5a7cfe8a3c0aae11a8ffcee05c0bddf08c6
"sha256/C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M="
"sha256/C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M=",
"sha256/TeT9kTnquzkcIJC0caQ09mL9o/Fj6GqUPJ5IQQ/ztUM=",
)

private const val DEFAULT_USER_AGENT = "ProxerLibJava/" + BuildConfig.version
Expand Down Expand Up @@ -182,6 +178,7 @@ class ProxerApi private constructor(retrofit: Retrofit) {
private var moshi: Moshi? = null
private var client: OkHttpClient? = null
private var retrofit: Retrofit? = null
private var enableCertificatePinning: Boolean = false
private var enableRateLimitProtection: Boolean = false

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

certificatePinner(constructCertificatePinner())
if (enableCertificatePinning) certificatePinner(constructCertificatePinner())
}
.build()
}
Expand Down

0 comments on commit 6890a41

Please sign in to comment.