feat:调试路径混淆策略

This commit is contained in:
Max
2024-01-20 23:34:00 +08:00
parent a9c87c7f76
commit de48c6c071

View File

@@ -3,7 +3,6 @@ package com.nnbc123.core.interceptor
import android.util.Log
import com.nnbc123.core.Env
import com.nnbc123.core.UriProvider
import com.nnbc123.library.utils.codec.DESUtils
import okhttp3.Interceptor
import okhttp3.Response
@@ -28,11 +27,11 @@ class PathInterceptor : Interceptor {
} != null) {
return chain.proceed(request)
}
val newPath = DESUtils.DESAndBase64(path)
val newPath = "/${path.drop(1).reversed()}"
return if (newPath.isNullOrEmpty()) {
chain.proceed(request)
} else {
val newUrl = url.newBuilder().encodedPath("/$newPath").build()
val newUrl = url.newBuilder().encodedPath(newPath).build()
if (Env.isDebug()) {
Log.d("PathInterceptor", "$url -> $newUrl")
}