How to use Flutter in Powershell behind a proxy?

Issue

I have tried to use the Flutter command line to download the Pub packages from a university computer where I study but, because it uses a proxy with users that, although I own it, still using the steps specified on the page from Troubleshooting pub, I always get the following error:

pub get failed (69)

No matter how much I define the environment variables:

http_proxy="http://username:password@address:port"
HTTP_PROXY="http://username:password@address:port"
or
https_proxy="http://username:password@address:port"
HTTPS_PROXY="http://username:password@address:port"

That didn’t work.

My OS is Windows 10.

Solution

remove protocol from var’s, and when you get “Proxy failed to establish tunnel 407 Proxy Authentication Required”, just add jdk.http.auth.tunneling.disabledSchemes= in your jvm options (default in $JAVA_HOME/jre/lib/net.properties).

Answered By – Zaak

Answer Checked By – David Marino (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.