Browse
 
Tools
Rss Categories

Configuring an HTTP proxy

Reference Number: AA-02118 Views: 944 0 Rating/ Voters

What is an HTTP proxy?

An HTTP (or HTTPS) proxy server is used within a network to act as an intermediary for clients seeking resources from other servers.

An example of this type of resource access may be the LumenVox License Server, which uses HTTP or HTTPS to connect to the LumenVox Licensing Nodes in the Internet, or another example may be your browser when you visit your favorite website (probably LumenVox.com ).

Whichever type of request it is, if it uses HTTP or HTTPS (both common connectivity protocols), they can be configured to connect directly from the server to the Internet, or a proxy server can act as an intermediary between your machine and the Internet when these requests are made. 

There are a number of reasons why people may configure and use a proxy server in this way, mostly relating to security, however such discussions and decisions are beyond the scope of this article. Suffice to say that HTTP/HTTP proxy servers exist, and if you are using one in your network when working with LumenVox, you may need to read this article to understand how best to configure things.


Diagram 1: LumenVox Connectivity to Licensing Nodes using Proxy Server

Proxy Environment Variables

LumenVox supports the use of special Environment Variables to control the use of an HTTP proxy. These environment variable settings work for both Windows and Linux installations, however their implementation is slightly different, as described below.


Linux Proxy Configuration

In Linux, services such as the LumenVox daemons are not able to use the global environment variables that may be located in /etc/profile.d because all environment variables except for TERM, PATH and LANG are stripped out. This creates a known problem for many Linux daemons attempting to use these variables.  As a result of this, these missing environment variables can cause a communication failure for the License Manager with our Licensing Nodes when attempting to use the http_proxy or https_proxy settings, which are being stripped out.

One way to resolve this issue is to add these environment variable settings to the LumenVox service control scripts (lvmanagerd and lvlicensed) that are used when starting, stopping and restarting the LumenVox services.   You will need to add the proxy setting to /etc/rc.d/init.d/lvmanagerd and /etc/rc.d/init.d/lvlicensed files in the DEFINE FILES AND VARIABLES HERE section as shown below.

########################################################
######### DEFINE FILES AND VARIABLES HERE   ############
########################################################
# Specify the path to lv_manager here
LV_EXE_PATH=/usr/bin/lv_manager
# Specify the proxy setting
export http_proxy=http://192.168.1.123:9090  (Replace this IP Address/Port with the correct one for your Proxy Server).

Or, if using HTTPS instead of HTTP protocol... 

export https_proxy=http://192.168.1.123:9090  (Replace this IP Address/Port with the correct one for your Proxy Server).

Once this is done to both files, restart the LumenVox Manager and the LumenVox License Server services using the Dashboard, then click the “Resync Info” button on the Licensing Page of the dashboard.  The Last Sync Time should be the current date and time if the communication with the LumenVox Licensing Nodes on the Internet is working correctly (indicating the proxy settings are working).



Windows Proxy Configuration

The LumenVox Manager and License Server services on Windows can also be configured to use a local proxy server to communicate with our Licensing Node by adding an environment variable to those services.

Because the LumenVox License Server and Manager run as services, these cannot use the regular configuration settings to define environment variables, so we need to use the registry editor utility instead, as described below.

Run the regedit.exe command with Administrative privileges to launch the Registry Editor - please note that this is a powerful utility and significant caution should be exercised when using it to avoid rendering the system inoperable. Once this is started, navigate to the following locations:

HKLM\SYSTEM\CurrentControlSet\services\Lumenvox License Server

and also

HKLM\SYSTEM\CurrentControlSet\services\LVManager

In each of these locations, create a new Multi-String Value called Environment (if one does not already exist).

Double-click on Environment to open up the edit window (shown below) allowing the value to be edited.


In this window, you should enter the proxy address:port that you want to use for redirection of HTTP or HTTPS traffic (the proxy server's address and port).  The example shown points to a proxy server at address 192.168.1.123 on port 9090. (Replace this IP Address/Port with the correct one for your Proxy Server configuration).

Use the format shown in the screen-shot above, with one setting per line, no spaces and the port number following the colon. After you’ve done this, your regedit screen for LVManager should look something like this:


And similarly, for LumenVox License Server, it should look like this:


Once this editing is complete, you will need to  restart the LumenVox Manager and  LumenVox License Server services (using the LumenVox Dashboard, or the Windows Services Manager) for the changes to take effect.  Then click the “Resync Info” button on the Licensing Page of the dashboard.  The Last Sync Time should be the current date and time if the communication with the LumenVox Licensing Nodes on the Internet is working correctly (indicating the proxy settings are working).



Other Services

Note that this proxy server configuration can be used for other LumenVox (and some non-LumenVox) services on both Windows and Linux, and will affect how HTTP and/or HTTPS network traffic is handled. 

Please be aware that many things use HTTP and HTTP protocols, including ASR grammar fetches, TTS SSML fetches among many others, so please be sure to verify the system functionality after making such changes, since these settings can affect a number of things.

The LumenVox Media Server, as with any other LumenVox speech client can also take advantage of these HTTP/HTTPS proxy settings when needed, but again, care must be exercised to ensure you understand what the effect of these changes are.