From a26ba9292d88d98e7321c8a5d0be4bf9168062e5 Mon Sep 17 00:00:00 2001 From: Konstantin Aksenov Date: Fri, 31 May 2024 15:24:40 +1000 Subject: [PATCH] fix(proxy): support proxy authentication --- src/main/kotlin/com/github/vacxe/googleplaycli/PlayStoreApi.kt | 3 --- .../kotlin/com/github/vacxe/googleplaycli/TransportFactory.kt | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/kotlin/com/github/vacxe/googleplaycli/PlayStoreApi.kt b/src/main/kotlin/com/github/vacxe/googleplaycli/PlayStoreApi.kt index 5d5a3fd..77562c1 100644 --- a/src/main/kotlin/com/github/vacxe/googleplaycli/PlayStoreApi.kt +++ b/src/main/kotlin/com/github/vacxe/googleplaycli/PlayStoreApi.kt @@ -3,7 +3,6 @@ package com.github.vacxe.googleplaycli import com.github.vacxe.googleplaycli.actions.* import com.github.vacxe.googleplaycli.environments.Env import com.github.vacxe.googleplaycli.environments.Proxy -import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport import com.google.api.client.http.HttpRequestInitializer import com.google.api.client.json.gson.GsonFactory import com.google.api.services.androidpublisher.AndroidPublisher @@ -38,8 +37,6 @@ class PlayStoreApi(serviceAccountInputStream: InputStream, appName: String) : .fromStream(serviceAccountInputStream) .createScoped(listOf(AndroidPublisherScopes.ANDROIDPUBLISHER)) - Proxy.apply() - androidPublisher = AndroidPublisher.Builder( TransportFactory.buildTransport(), GsonFactory.getDefaultInstance(), diff --git a/src/main/kotlin/com/github/vacxe/googleplaycli/TransportFactory.kt b/src/main/kotlin/com/github/vacxe/googleplaycli/TransportFactory.kt index 01f1c48..4175c74 100644 --- a/src/main/kotlin/com/github/vacxe/googleplaycli/TransportFactory.kt +++ b/src/main/kotlin/com/github/vacxe/googleplaycli/TransportFactory.kt @@ -65,8 +65,7 @@ object TransportFactory { } } .build() - val httpTransport: HttpTransport = ApacheHttpTransport(httpClient) - return HttpTransportFactory { httpTransport }.create() + return ApacheHttpTransport(httpClient) } private fun createHttpTransportTrustStore(