Configuring Tunneling
To set up the tunneling system (for remote sessions with devices), you need to set properties in the cx-server.tunneling group of your configuration file for the Connection Server.
Follow these steps to configure tunneling for the Connection Server:
1. If the Connection Server is running, stop it.
2. Using a text editor, open the configuration file (cxserver.conf).
3. Locate the tunneling group.
4. To limit that maximum number of tunnels that can exist concurrently through the Connection Server, set the max-concurrent-tunnels property. The default number of tunnels is 50, as shown in the following example:

cx-server (
. . .
tunneling {
max-concurrent-tunnels = 50
}
. . .
}
5. If desired, you can configure the HTTP headers to copy from the incoming tunneling WebSocket request to the back-end WebSocket request. The client side uses cookies while the server side uses the application key. Here are the default headers:

cx-server (
. . .
tunneling {
max-concurrent-tunnels = 50
headers-to-copy = ["appKey", "Cookie"]
}
. . .
}
Note that this property takes an array of Strings, with the server-side header first and the client-side header second.
6. The default idle timeout for Tunneling WebSockets is 30000. If the WebSocket is idle for longer than the 30 seconds,the WebSocket is closed. If you require a longer timeout, set the idle-timeout property for tunneling:

cx-server (
. . .
tunneling {
max-concurrent-tunnels = 50
headers-to-copy = ["appKey", "Cookie"]
idle-timeout-ms = 30000
}
. . .
}
7. Save and close the configuration file.
Was this helpful?