Proxy Server Authentication
MATLAB® provides programmatic interfaces to these Web service interfaces.
RESTful (Representational state transfer)—Use the
webread
,webwrite
, andwebsave
functions in Web Services to read content from RESTful Web services.HTTP (Hypertext Transfer Protocol)—Use the Call Web Services from MATLAB Using HTTP API to implement advanced HTTP messaging semantics.
To authenticate to a server, see Server Authentication.
RESTful Web Services
MATLAB supports Basic, Digest, and NTLM proxy authentication types. On Windows® platforms, MATLAB also supports Kerberos. To specify proxy server settings, choose one of these:
If you specify the values using Web preferences, then MATLAB ignores system settings.
HTTP Web Services
MATLAB supports Basic, Digest, and NTLM proxy authentication types. On Windows platforms, MATLAB also supports Kerberos. To specify proxy server settings, choose one of these:
If you specify a ProxyURI in a
matlab.net.http.HTTPOptions
object, then set the Username and Password properties in Credentials.
MATLAB chooses the first setting in this list.
Use MATLAB Web Preferences for Proxy Server Settings
You can specify proxy server settings using MATLAB Web Preferences.
Note
Settings in Web Preferences override system settings.
To specify the proxy server settings:
On the Home tab, in the Environment section, click Preferences. Select MATLAB > Web.
Select the Use a proxy server to connect to the Internet check box.
Specify values for Proxy host and Proxy port.
Examples of acceptable formats for the host are:
172.16.10.8
andourproxy
. For the port, enter an integer only, such as22
. If you do not know the values for your proxy server, ask your system or network administrator for the information.If your proxy server requires a user name and password, select the Use a proxy with authentication check box. Then enter your proxy user name and password.
Ensure that your settings work by clicking the Test connection button.
MATLAB attempts to connect to
https://www.mathworks.com
:If MATLAB can access the Internet, Success! appears next to the button.
If MATLAB cannot access the Internet, Failed! appears next to the button. Correct the values you entered and try again. If you still cannot connect, try using the values you used when you authenticated your MATLAB license.
Click OK to accept the changes.
Restart MATLAB to enable the changes.
Use System Settings for Proxy Server Settings
If no proxy is specified in MATLAB Web preferences, then MATLAB uses the proxy set in the operating system preferences.
Operating System | System Proxy Settings |
---|---|
Windows |
|
macOS |
|
Linux® | Environment variables |
To specify proxy server settings in system preferences, refer to your Windows, Linux, or macOS operating system documentation.
MATLAB does not take into account proxy exceptions which you configure in Windows.
See Also
matlab.net.http.HTTPOptions
| matlab.net.http.Credentials