File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
arduino-core/src/cc/arduino/utils/network Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2929
3030package cc .arduino .utils .network ;
3131
32+ import cc .arduino .net .CustomProxySelector ;
3233import org .apache .commons .codec .binary .Base64 ;
3334import org .apache .commons .compress .utils .IOUtils ;
35+ import processing .app .PreferencesData ;
3436
3537import java .io .File ;
3638import java .io .IOException ;
@@ -120,7 +122,10 @@ public void download() throws InterruptedException {
120122
121123 setStatus (Status .CONNECTING );
122124
123- Proxy proxy = ProxySelector .getDefault ().select (downloadUrl .toURI ()).get (0 );
125+ Proxy proxy = new CustomProxySelector (PreferencesData .getMap ()).getProxyFor (downloadUrl .toURI ());
126+ if ("true" .equals (System .getProperty ("DEBUG" ))) {
127+ System .err .println ("Using proxy " + proxy );
128+ }
124129
125130 HttpURLConnection connection = (HttpURLConnection ) downloadUrl .openConnection (proxy );
126131
You can’t perform that action at this time.
0 commit comments