feat:调试路径混淆策略
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
Reference in New Issue
Block a user