This page shows how enterprises can use the API methods provided by the Agora Signaling SDK for the Web to access Agora’s services through a company firewall.
This page applies to the Agora Signaling SDK for the Web only. Proxy services by different service providers may result in slow performance, if you use the Firefox browser. Therefore, Agora recommends using the same service provider for the proxy services. If you use different service providers, Agora recommends not using the Firefox browser.
Introduction
Enterprises may restrict employees’ access to unauthorized websites through a company firewall. The firewall may also restrict access to Agora’s services. Agora provides an interface in the Signaling SDK for the Web. The interface allows requests to bypass the company firewall and reach the Agora SD-RTN directly through proxy servers. Enterprises can deploy the Nginx server and call the provided interface to enable internal access to Agora’s services.
Implementations
You need to deploy the Nginx server before calling the method in the Signaling SDK for the Web to enable the proxy service.
1. Deploying the Nginx Server
Ensure that you have acquired the domain name and certificate of the Nginx server before proceeding.
Install the Nginx Server
Refer to the steps in Nginx Installation Guide to deploy the Nginx server.
Configure the conf
file of the Nginx Server
Run the following command line.
sudo vim /etc/nginx/nginx.conf
Add the following configuration in the http domain of the
conf
file.resolver 8.8.8.8; server { listen 80; listen 443; server_name <you dns>; ssl on; ssl_certificate <you certificate file absolute path>; ssl_certificate_key <you certificate key file absolute path>; location /cs/ { proxy_pass https://$arg_h:$arg_p/$arg_d; } location /rs/ { proxy_pass https://$arg_h:$arg_p/$arg_d; } location /ws/ { proxy_pass https://$arg_h:$arg_p; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
Run the following command line.
sudo nginx -s reload
2. Call the Method in the Signaling SDK for the Web to Set the Proxy
Set the name
and value
parameters in the setupdebugging
method.
setup_debugging(name, value)
Set the proxyServer
and turnServer
parameters.
Name | Description |
name |
proxy_server: Enterprises with a company firewall can deploy the Nginx server and use this parameter to pass signaling messages to Agora through the Nginx server. |
value |
Your server IP or URL. |
Working Principles
The following figure shows how the proxy works:

The enterprise deploys an Nginx proxy server.
The enterprise users call the method provided by the Signaling SDK for the Web. Signaling messages are passed to Agora through the Nginx server, thus enabling access to Agora’s services.