Description
Describe the problem
Users may access the Internet via a proxy server. Arduino IDE can be configured for this use case via the "Network" tab of the "Preferences" dialog.
Two types of proxies are supported:
- HTTP
- SOCKS
The proxy type is selected via a radio button on the dialog.
🐛 The radio button is set to "SOCKS" after the IDE is reloaded even though the user selected the "HTTP" radio button in the "Preferences" dialog when they configured the proxy preferences.
To reproduce
- Select File > Preferences... from the Arduino IDE menus.
- Click the "Network" tab.
- Select the "Manual proxy configuration" radio button.
- Configure proxy as follows:
- Select the "HTTP" radio button.
- Set "Host name" to
example.com
- Set "Port number" to
42
- Set "Username" to
foo
- Set "Password" to
bar
- Click the OK button.
The index download process may now fail. This is expected due to the use of an dummy proxy configuration for the demo. - Select File > Quit from the Arduino IDE menus.
- Start Arduino IDE.
- Select File > Preferences... from the Arduino IDE menus.
- Click the "Network" tab.
🐛 The radio button is set to "SOCKS":
Expected behavior
Proxy type radio button in the "Preferences" dialog always correctly reflects the proxy type that was configured.
Arduino IDE version
Operating system
Windows
Operating system version
10
Additional context
The "Preferences" dialog shows the correct "HTTP" radio button if the dialog is opened again after configuring the proxy but before restarting Arduino IDE. The fault only occurs after a restart.
The network.proxy
key in ~/.arduinoIDE/arduino-cli.yaml
does have the http
URL scheme as expected even though the "Preferences" dialog indicates it is a SOCKS proxy (for which Arduino IDE currently uses the socks
URL scheme):
network:
proxy: http://foo:bar@example.com:42/
Originally reported by @wh201906 at #1769
Issue checklist
- I searched for previous reports in the issue trackerI verified the problem still occurs when using the latest nightly buildMy report contains all necessary details
Activity
wh201906 commentedon Dec 17, 2022
This is what I found.

I put a breakpoint in renderProxySettings() and I found the
this.state.network.protocol
ishttp:
rather thanhttp
(I printed
this.state.network
in the console. You can find theprotocol
in the bottom of the image.)Since the SOCKS radiobutton loads after the HTTP radiobutton, it find
http:
doesn't matchhttp
, then setchecked=true
I guess this is the reason?
wh201906 commentedon Dec 17, 2022
If I click HTTP button in Preferences->Network,

this.state.network
ishttp
rather thanhttp:
wh201906 commentedon Dec 17, 2022
I think PR #1778 will fix this.