ThingWorx Remote Access Client (RAC) > Configuring RAC Using a JSON File
Configuring RAC Using a JSON File
You can set different RAC configurations such as the proxy settings and data frame size by adding a config.json file. The file is placed in the following location on these operating systems:
Linux—$HOME/.config/tw-ra-client/config.json
Windows—%USER_HOME%\AppData\Roaming\tw-ra-client\config.json
Mac OS—$HOME/Library/Application Support/tw-ra-client/config.json
Example config.json File
Use the following example as a reference when creating configuration files.
* 
Using a configuration file overrides options that are set in the RAC user interface.
{

"proxy": {
"hostname": "proxyserver.com",
"port": "8230",
"username": "proxyUsername",
"password": "proxyPassword"
},
"chunk_size":32000,
"secure": true

}
The following sections list the configurations that you can set in the config.json file.
Configuring the Size of Websocket Frames
The RAC application creates connections using the WebSocket Secure (WSS) protocol. When a tunnel connection is created, data messages are sent from an application to a server through the tunnel as frames. By default, RAC does not enforce any limits on the frame size. Setting frame size limits can improve performance when transferring large data. To break large messages into multiple frames, set frame size limits in Bytes using the chunk_size property.
{
"chunk_size": 32000,
"proxy": {...}
}
When RAC receives a message that exceed the limit, the message is divided into smaller pieces before it is sent through the tunnel connection.
Configuring Proxy Settings
To configure proxy settings for RAC, add a proxy object to the config.json file.
{

"proxy": {
"hostname": "proxyserver.com",
"port": "8230",
"username": "proxyUsername",
"password": "<Encrypted_Proxy_Password>"
},
"chunk_size":32000,
"secure": true

}
hostname—The host name of the proxy server.
port—The port number to connect to.
username—The user name used to access the proxy server (Optional).
password—The password of the proxy user (Optional).
* 
The password is automatically encrypted when RAC is launched for the first time.
You can also configure the proxy settings in the RAC user interface when the proxy object is not added to the config.json file. For more information, see ThingWorx Remote Access Client (RAC).
Disabling Secure Connections
By default, all RAC connections are created using the WebSocket Secure (WSS) protocol. To use the non-secure WebSocket (WS) protocol and send plain-text data, set the secure property to false:
{
"secure": false,
"proxy": {...}
}
* 
Using non-secure connections is not recommended. Disabling encryption exposes you to security threats and you should only disable it when necessary.
Specifying a Custom Folder for the Self-Signed Certificate
By default, RAC uses available self-signed certificates from the tw-ra-client folder. You can add the certs_directory property to specify a custom folder location for self-signed certificates. For more information, see Configuring RAC to Use Self-Signed Certificates.
{
"certs_directory":"/home/user/certificates",
"proxy": {...}
}
Was this helpful?