MobileBridge
Outgoing Messages
ProtectSocket
Protect a socket from VPN connections.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "ProtectSocket"
}
},
"payload": {
"socket": {{Int}}
}
}
Payload
OnActiveTransportChange
Notify transport change.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "OnActiveTransportChange"
}
},
"payload": {
"transportId": {{String}},
"transportState": {{TransportState}}
}
}
Payload
OnDeviceHandshaked
Notify a device has completed handshaking.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "OnDeviceHandshaked"
}
},
"payload": {
"transportId": {{String}},
"deviceToken": {{String}},
"friendlyName": {{String}}
}
}
Payload
OnInfo
Notify an info sent from a connected device.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "OnInfo"
}
},
"payload": {
"deviceToken": {{String}},
"infoId": {{Int}},
"info": {{String}}
}
}
Payload
GetTransports
Get the list of transports.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "GetTransports"
}
}
}
Connect
Connect to the specified transport.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "Connect"
}
},
"payload": {
"transportId": {{String}},
"inputStreamId": {{String}},
"outputStreamId": {{String}}
}
}
Payload
Disconnect
Disconnect with specified transport.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "Disconnect"
}
},
"payload": {
"transportId": {{String}}
}
}
Payload
Incoming Messages
StartMobileBridge
Start mobile bridge.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "StartMobileBridge"
}
},
"payload": {
"tunFd": {{Int}}
}
}
Payload
StopMobileBridge
Stop mobile bridge.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "StopMobileBridge"
}
}
}
AuthorizeDevice
Notify a device has completed handshaking.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "AuthorizeDevice"
}
},
"payload": {
"deviceToken": {{String}},
"authorized": {{Bool}}
}
}
Payload
SendInfo
Send an info to the specified device.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "SendInfo"
}
},
"payload": {
"deviceToken": {{String}},
"infoId": {{Int}},
"info": {{String}}
}
}
Payload
ProtectSocketReply
Reply for ProtectSocket message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "ProtectSocket",
"replyToId": {{String}}
}
},
"payload": {
"success": {{Bool}}
}
}
Payload
GetTransportsReply
Reply for GetTransports message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "GetTransports",
"replyToId": {{String}}
}
},
"payload": {
"transports": [{{Transport}}]
}
}
Payload
ConnectReply
Reply for Connect message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "Connect",
"replyToId": {{String}}
}
},
"payload": {
"transportId": {{String}},
"success": {{Bool}}
}
}
Payload
DisconnectReply
Reply for Disconnect message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "MobileBridge",
"action": "Disconnect",
"replyToId": {{String}}
}
},
"payload": {
"transportId": {{String}},
"success": {{Bool}}
}
}
Payload
Type Definitions
App
JSON Structure
Properties
Transport
JSON Structure
{
"transportId": {{String}},
"type": {{TransportType}}
}
Properties
Enums
TransportType
Values
TransportState
Values