MATLAB supports configuring proxy settings through the desktop preferences and, for deployed workflows, programmatically in code.
GUI-based proxy configuration (MATLAB desktop)
Please see the instructions on how to configure proxy settings
Programmatic proxy configuration (deployed application)
- Configure the proxy in the MATLAB GUI first.
- Compile the application for deployment.
- The proxy preference values may be carried into the compiled application by default.
If the compiled application does not pick up the proxy settings, set the proxy information programmatically before calling "webread" (and similarly before "webwrite") when running deployed:
if isdeployed
com.mathworks.mlwidgets.html.HTMLPrefs.setUseProxy(true)
com.mathworks.mlwidgets.html.HTMLPrefs.setProxyHost('HostName')
com.mathworks.mlwidgets.html.HTMLPrefs.setProxyPort('Port')
com.mathworks.mlwidgets.html.HTMLPrefs.setUseProxyAuthentication(true)
com.mathworks.mlwidgets.html.HTMLPrefs.setProxyUsername('test')
com.mathworks.mlwidgets.html.HTMLPrefs.setProxyPassword('test')
end