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 29
29
30
30
package cc .arduino .utils .network ;
31
31
32
+ import cc .arduino .net .CustomProxySelector ;
32
33
import org .apache .commons .codec .binary .Base64 ;
33
34
import org .apache .commons .compress .utils .IOUtils ;
35
+ import processing .app .PreferencesData ;
34
36
35
37
import java .io .File ;
36
38
import java .io .IOException ;
@@ -120,7 +122,10 @@ public void download() throws InterruptedException {
120
122
121
123
setStatus (Status .CONNECTING );
122
124
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
+ }
124
129
125
130
HttpURLConnection connection = (HttpURLConnection ) downloadUrl .openConnection (proxy );
126
131
You can’t perform that action at this time.
0 commit comments