Connect through restricted networks
You use a proxy connection to ensure reliable connectivity for your users when they connect from an environment with a restricted network.
Understand the tech
To accommodate your end users’ firewall settings and business needs, Signaling SDK enables you to connect using a TCP proxy server.
The steps you need to implement in your app are:
-
Set proxy configuration
-
Apply the configuration to the Signaling Engine
Prerequisites
To follow this page, you must:
- Setup the Signaling SDK reference app
Implement communication using a TCP proxy
This section shows how to connect to Signaling using a third-party TCP proxy server.
Set proxy configuration
Apply the configuration to the Signaling Engine
Test proxy connection
To test your proxy connection:
-
Configure the project
-
Open the file
<samples-root>/signaling-manager/src/main/res/raw/config.json
-
Set
appId
to the AppID of your project. -
Choose one of the following authentication methods:
- Temporary token:
- Generate an RTM token using your
uid
. - Set
token
to this value inconfig.json
.
- Generate an RTM token using your
- Authentication server:
- Setup an Authentication server
- In
config.json
, set:token
to an empty string.serverUrl
to the base URL for your token server. For example:https://agora-token-service-production-yay.up.railway.app
.
- Temporary token:
-
-
Run the reference app
- In Android Studio, connect a physical Android device to your development machine.
- Click Run to start the app.
- A moment later you see the project installed on your device.
-
Test proxy connection:
- Open a new instance of the reference app.
- Choose the Connect through restricted networks example.
- Log in to Signaling.
- Subscribe to a channel.
You see your app starts the proxy service and magically connects to the Agora SD-RTN™ which was not possible in a restricted network environment.
Reference
This section contains information that completes the information in this page, or points you to documentation that explains other aspects to this product.