0

How to set system proxy setting for Android using C# in a MAUI application?

I have tried the following but no luck:

Java.Lang.JavaSystem.SetProperty("http.proxyHost", "127.0.0.1");
Java.Lang.JavaSystem.SetProperty("http.proxyPort", "8080");

I have set the following permission:

<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
Arnold Zahrneinder
  • 4,788
  • 10
  • 40
  • 76
  • You can check this [How to set proxy for Android in a Xamarin C# application using WebView?](https://stackoverflow.com/questions/50230106/how-to-set-proxy-for-android-in-a-xamarin-c-sharp-application-using-webview) for more information. – Guangyu Bai - MSFT Feb 02 '23 at 09:08
  • @GuangyuBai-MSFT: I already came across that. The problem is MAUI is not really Xamarin and that solution actually does not do what I am after. – Arnold Zahrneinder Feb 02 '23 at 09:11

0 Answers0