Signaling Service
SwarmCloud
# Introduction
To communicate with another peer you simply need to exchange contact information and the rest will be done by WebRTC. The process of connecting to the other peers is also known as signaling.
Peers with different signaling address can not connect to each other.
# Official Signaling Service
# Default
- HongKong
- wss://signal.cdnbye.com
# Europe
- Germany
- wss://signalcloud.cdnbye.com
- France
- wss://fr.cdnbye.com
# South America
- Brazil
- wss://br.cdnbye.com
# North America
- USA
- wss://opensignal.cdnbye.com
# Asia-Pacific
- Singapore
- wss://sg.cdnbye.com
- Japan
- wss://jp.cdnbye.com
# Chinese Mainland
- Guangzhou
- wss://gz.swarmcloud.net
- Beijing
- wss://pk.swarmcloud.net
- Shanghai
- wss://signal.swarmcloud.net
- Chengdu
- wss://cd.swarmcloud.net
# Deploy by Yourself
Deploy your own Signaling Service
- cbsignal (opens new window) (Golang, made for stand-alone)
- cbsignal_node (opens new window) (Node.js, made for stand-alone)
- cbsignal_redis (opens new window) (Golang, made for cluster)
# Change Signaling Address
# Via Console (Recommended)
- Log on Console
- Click on the Signal Management button in the P2P Setting
- Input your signaling address and conform
# Via SDK Config
# Web SDK
p2pConfig: {
wsSignalerAddr: 'ws://your.signalservice.com',
// Other p2pConfig options provided by cdnbye
}
// Pass p2pConfig to your P2PEngine ...
# Android SDK
val config = P2pConfig.Builder()
.wsSignalerAddr("ws://your.signalservice.com")
.build()
P2pEngine.init(ctx, YOUR_TOKEN, config)
# iOS SDK
let config = SWCP2pConfig.defaultConfiguration()
config.wsSignalerAddr = "ws://your.signalservice.com"
SWCP2pEngine.sharedInstance().start(token: YOUR_TOKEN, p2pConfig: config)
# Flutter SDK
SwarmCloud.init(
YOUR_TOKEN,
config: P2pConfig(
wsSignalerAddr: 'ws://your.signalservice.com',
)
);
# Enable Signaling Authentication
The signaling connection authentication can be enabled to prevent unauthorized requests to your signaling server. The steps are as follows:
- Setup authentication on config.yaml for cbsignal
security:
enable: true # Enable Authentication
maxTimeStampAge: 3600 # Timestamp expiration time in seconds
token: YOUR_TOKEN # Custom token, no more than 8 characters
- Setup authentication on config.json for cbsignal_node
"websocketsAccess": {
"token": YOUR_YOKEN,
"maxTimeStampAge": 3600
}
- Contact the official customer service to inform the signaling address and token
- The tracker server will issue a token encrypted string to the authorized node for signaling service authentication
You need to setup signal address via console before enabling signaling authentication.