From 7e5360f1cc8460cc9cc2a1ae8607c781c6caacdb Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 27 May 2023 22:51:40 +0200 Subject: WIP: pac file download --- tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tunnel') diff --git a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java index 74d1c553..cf88aa2a 100644 --- a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java +++ b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java @@ -566,7 +566,8 @@ public final class GoBackend implements Backend { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (pacFileUrl != null && pacFileUrl != Uri.EMPTY) { - int listenPort = startHttpProxy(pacFileUrl); + String pacFile = downloadPacFile(activeNetwork, pacFileUrl); + int listenPort = startHttpProxy(pacFile); ProxyInfo localPi = ProxyInfo.buildDirectProxy("localhost", listenPort); builder.setHttpProxy(localPi); } else { -- cgit v1.2.3