
/tmp # ip rule0: from all lookup 1281: from all lookup local79: from 198.18.0.1 lookup 18079: from all fwmark 0x1/0xf lookup 18080: from 192.168.81.80 lookup 10081: from 10.221.7.233 lookup 101
/tmp # ip route ls table 100default via 192.168.81.1 dev ath0unreachable default metric 50000/tmp # ip route ls table 101default via 10.21.5.17 dev rmnet_mhi0.1unreachable default metric 50000
curl -X POST 'http://127.0.0.1:9801/api/v2/route/policyRouteManagment' --header 'enable:true'
curl -X POST 'http://127.0.0.1:9801/api/v2/route/policyRouteManagment' --header 'enable:false'
Mode | Scenario | Description |
bonding | Live streaming, high bandwidth | Distributes service traffic across multiple links to fully utilize the bandwidth of all links. Benefits: high bandwidth, reliable transmission, and weak network resistance. |
redundant | Gaming, control signaling | Copies and sends service packets over all links, and the receiver forwards the packet that arrives first. Effect: consumes extra bandwidth to guarantee the lowest latency. |
rtc | Real-time audio and video communication | Prioritizes transmitting service traffic over the link with the lowest latency, while utilizing other links as backups. Effect: consumes no extra bandwidth, ensures smooth and non-lagging service, and provides strong weak network resistance. |
curl -X 'POST' 'http://127.0.0.1:9801/api/v2/client/mp-speeder' -H 'accept: */*' -H 'Content-Type: application/json' -d '{"dataKey":"get this devicekey from tencent and replace it here","interfaces": ["usb0","usb1","eth0"],"registerEnv": -2,"scheduleMode": "bonding"}'
name | type | Description |
dataKey | string | Required: Choose either vendor+sn or dataKey. The device dataKey. |
vendor | string | Required: Choose either vendor+sn or dataKey. The device vendor and model. |
sn | string | Required: Choose either vendor+sn or dataKey. The unique device serial number provided by the device vendor. |
interfaces | [string] | Required. The list of interfaces participating in multi-network aggregation. Supports specifying a priority, ranging from 0 to 255. A smaller value indicates a higher priority. The priority is separated from the network interface card by a colon. If no priority is provided, it defaults to 64. Note: Priority specification is not supported in redundant mode. ["eth1:100", "eth2"]. |
scheduleMode | string | Required. The default acceleration mode. "bonding", "redundant", "rtc". |
accGateway | string | Optional. Specify the acceleration gateway IP address. Multiple IP addresses should be separated by commas. If this parameter is not specified, the SDK will automatically connect to the nearest gateway. Otherwise, it will forcibly connect to the specified acceleration gateway, for example: "120.30.39.129". |
gwPort | string | Optional. The gateway port. Default: "443". |
UUID | string | Optional. The hardware fingerprint. If this parameter is not specified, the SDK will automatically generate it based on the hardware. |
disableCrypto | integer | Optional. Allows the customer to choose whether to enable encryption when acceleration is started. Traffic encryption is enabled by default. Disabling encryption can reduce traffic consumption. 0: Enable traffic encryption (default). 1: Disable traffic encryption. |
flowStatisticsInterval | integer | Optional. The link acceleration traffic statistics frequency. Default: 3 seconds. |
maxRttDisableAggregation | integer | Optional. The latency threshold for link participation in aggregation. Default: 460 ms. |
maxRttThreshold | integer | Optional. The latency for initiating link failure detection. Default: 460 ms. |
minSwitchRTT | integer | Optional. The sensitivity for fast link switching. Default: 20 ms. |
maxDelayUntilFailed | integer | Optional. The latency threshold for link participation in switching. Default: 460 ms. |
registerEnv | integer | Optional. The cloud acceleration gateway cluster environment to which the SDK connects. (For testing only.) 0: Production environment (default). 1: Production environment (International site). -2: Customer experience environment (POC test environment). |
enableRecreatePathPconn | bool | Whether to enable path recreation. |
/usr/local/etc/mp-speeder/mp_client_ifname.conf file.echo '{"ifName":"eth0"}' > /usr/local/etc/mp-speeder/mp_client_ifname.conf
curl -X 'POST' 'http://127.0.0.1:9801/api/v2/client/mp-speeder/start' -H 'accept: */*' -H 'Content-Type: application/json'
curl -X 'POST' 'http://127.0.0.1:9801/api/v2/client/mp-speeder/stop' -H 'accept: */*' -H 'Content-Type: application/json'
curl -X 'POST' 'http://127.0.0.1:9801/api/v2/client/mp-speeder/restart' -H 'accept: */*' -H 'Content-Type: application/json'
curl -X GET "http://127.0.0.1:9801/api/v2/client/mp-speeder" -H "accept: */*" -H "Content-Type: application/json"
name | type | Description |
ready | boolean | Whether the acceleration process is started normally. |
UUID | string | The hardware fingerprint of the device. |
dataKey | string | The device dataKey. |
swVersion | string | The SDK software version. |
accGateway | string | The IP address of the acceleration gateway. |
gatewayPort | string | The port of the acceleration gateway. |
interfaces | [string] | The list of interfaces participating in multi-link aggregation. |
scheduleMode | string | The default acceleration mode. "bonding", "redundant", "rtc". |
registerEnv | integer | The cloud acceleration gateway cluster environment to which the SDK connects. 0: Production environment (default). 1: Production environment (International site). -2: Customer experience environment (POC test environment). |
curl -X 'GET' 'http://127.0.0.1:9801/api/v2/client/flowStatistics' -H 'accept: application/json' -H 'all: true'
name | type | Description |
interface | string | Name of the link NIC. |
state | integer | Current link operational status: -2: Link unavailable. 60: Link temporarily disabled. 100: Link normal. |
totalReceivedBytes | integer | Cumulative accelerated traffic in the receive direction, in Bytes. |
totalSendBytes | integer | Cumulative accelerated traffic in the send direction, in Bytes. |
receivedRate | float | Receive rate of the current NIC acceleration channel, in bit/s. |
sendRate | float | Send rate of the current NIC acceleration channel, in bit/s. |
loss | float | Packet loss rate of the current NIC acceleration channel. The packet loss rate is expressed as a decimal, for example, 0.1 indicates a packet loss rate of 10%, and 1 indicates a packet loss rate of 100%. |
rtt | integer | rtt of the current NIC acceleration channel, in ms. Note: -1 indicates that the current link is unavailable. |
curl -X 'POST' 'http://127.0.0.1:9801/api/v2/client/mp-speeder/restart' -H 'accept: */*' -H 'Content-Type: application/json' curl -X 'POST' 'http://127.0.0.1:9801/api/v2/route/businessRoute' -H 'accept: */*' -H 'all: true'
curl -X 'POST' \\'http://127.0.0.1:9801/api/v2/route/businessRoute' \\-H 'accept: */*' \\-H 'all: false' \\-H 'Content-Type: application/json' \\-d '[{"dstIP": "9.134.246.109","protocol": "tcp"}]'
name | type | Description |
srcIP | string | Optional: The source IP address. Supports subnet masks. For example: "192.168.3.3/30". |
dstIP | string | Optional: The destination IP address. Supports subnet masks. For example: "192.168.3.3/30". |
protocol | string | Optional: "TCP", "UDP". |
srcPorts | string | Optional: The source port. Supports a range. For example: "3303-3330". |
dstPorts | string | Optional: The destination port. Supports a range. For example: "3303-3330". |
isBlack | bool | Optional: Whether blocklist or not. Default: false. |
curl -X DELETE 'http://127.0.0.1:9801/api/v2/route/businessRoute' --header 'all: true'
curl -X 'DELETE' \\'http://127.0.0.1:9801/api/v2/route/businessRoute' \\-H 'accept: */*' \\-H 'all: false' \\-H 'Content-Type: application/json' \\-d '[{"dstIP": "124.220.191.156","protocol": "tcp"}]'
curl -X 'GET' 'http://127.0.0.1:9801/api/v2/route/businessRoute'
curl -X 'POST' 'http://127.0.0.1:9801/api/v2/client/mp-speeder/restart' -H 'accept: */*' -H 'Content-Type: application/json' curl -X 'POST' \\'http://127.0.0.1:9801/api/v2/client/multi-mode' \\-H 'accept: application/json' \\-H 'Content-Type: application/json' \\-d '{"dstIP": "124.220.191.156/32","protocol": "UDP","speedMode": 3}'
name | type | Description |
priority | integer | Optional: 1-255. A lower value indicates a higher priority. The default priority is 255. |
srcIP | string | Optional: The source IP address. Supports subnet masks. For example: "192.168.3.3/30". |
dstIP | string | Optional: The destination IP address. Supports subnet masks. For example: "192.168.3.3/30". |
protocol | string | Optional: "TCP", "UDP", "ANY". |
srcPorts | string | Optional: The source port. Supports a range. For example: "3303-3330". |
dstPorts | string | Optional: The destination port. Supports a range. For example: "3303-3330". |
speedMode | integer | Required: ● 0 - "DEFAULT": Reuses the default acceleration mode. ● 1 - "DIRECT": No acceleration. Traffic uses the system's default NIC. ● 2 - "bonding": Aggregation mode. ● 3 - "rtc": Real-time audio and video mode. ● 4 - "redundant": Multi-send selective-receive mode. |
curl -X 'DELETE' \\'http://127.0.0.1:9801/api/v2/client/multi-mode' \\-H 'accept: application/json' \\-H 'all: false' \\-H 'Content-Type: application/json' \\-d '{"priority":0,"dstIP": "124.220.191.156/32","protocol": "UDP"}'
name | type | Description |
priority | integer | Optional: 1-255. A lower value indicates a higher priority. The default priority is 255. |
srcIP | string | Optional: The source IP address. Supports subnet masks. For example: "192.168.3.3/30". |
dstIP | string | Optional: The destination IP address. Supports subnet masks. For example: "192.168.3.3/30". |
protocol | string | Optional: "TCP", "UDP", "ANY". |
srcPorts | string | Optional: The source port. Supports a range. For example: "3303-3306". |
dstPorts | string | Optional: The destination port. Supports a range. For example: "3303-3306". |
curl -X 'DELETE' \\'http://127.0.0.1:9801/api/v2/client/multi-mode' \\-H 'accept: application/json' \\-H 'all: true' \\-H 'Content-Type: application/json' \\-d '{}'
curl -X 'GET' \\'http://127.0.0.1:9801/api/v2/client/multi-mode' \\-H 'accept: application/json' \\-H 'Content-Type: application/json' \\-H 'all: true' \\-d '{}'
{"logLevel": "info","autoUpload": false,"uploadInterval": 10,"logDir": "/var/log"}
curl -X POST 'http://127.0.0.1:9801/api/v2/diagnosis/log' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"logLevel": "debug","upload": false,"uploadInterval": 10}'
name | type | Description |
logLevel | string | Optional: The program log level. Defaults to "info". Supports configuration of "info", "debug", and "warn". |
autoUpload | boolean | Optional: The automatic upload switch. Defaults to false. When set to true, logs are automatically uploaded. |
uploadInterval | integer | Optional: The automatic upload interval. Defaults to 10 minutes. This parameter does not take effect when automatic upload is not enabled. |
curl -X POST 'http://127.0.0.1:9801/api/v2/diagnosis/log'
curl -X POST'http://127.0.0.1:9801/api/v2/client/setCallback'-H 'accept: application/json'-H 'Content-Type: application/json'-d '{"callback_url": "http://127.0.0.1:9801/api/v2/client/callBackMock"}'
{"acc_mode": "1","mandatory": true,"code": 2,"reason": "Acc RTT 496.634µs over Master 447.855µs * 1 in 5m0s"}
Field | Type | Meaning |
acc_mode | string | Acceleration mode. Acceleration mode. 1: Aggregation mode; 2: Dual-send mode; 3: Fast-switch mode. |
mandatory | bool | Notifies the SDK whether to actively disable acceleration. When false, the notification event is only a suggestion. |
code | int | Error code for disabling acceleration. Return value for the code field: -6: ACC link sustained packet loss anomaly; -7: ACC link maximum delay anomaly, where the ACC link delay continuously exceeds the specified threshold while the primary link remains normal; -8: ACC link average delay exceeds the primary link average delay within the time window; -9: ACC link average delay exceeds the configured threshold; -100: A link anomaly may exist, applicable only to aggregation mode; 2: Acceleration is ineffective; it is recommended to disable acceleration. |
reason | string | Specific reason for disabling acceleration. |
/usr/local/etc/mp-speeder/metric.json. You can use default configuration or customize it."bonding":{"probeCfg": {"fastProbeInterval": 200,"normalProbeInterval": 1000,"minTimeForSelectProbePoint": 3000},"checkCfg": {"quicDetectTime": 10000,"primaryDetectTime":60000,"secondaryDetectTime":300000,"iQRAlpha": 0.75,"minDetectCount": 4,"maxDetectRTT": 400,"detectTimeout": 1000},"enableAcc": {"lossRate": 5,"quicRTT": 100,"avgRTT": 110,"jitterRTT": 20,"mdevRTT": 20,"maxRTT": 300,"disableQuicWndDetect": true,"disableAvgRTTDetect": false,"disableJitterDetect": false,"disableLossDetect": false},"disableAcc": {"lossCount": 4,"maxRTTCount": 4,"avgRTT": 130,"toleranceRate": 1.1,"minAvgRTT": 66,"SecondaryToleranceRate":1.0,"SecondaryJitterRate":0.8,// Escape: ${lossCount} consecutive packet losses and no consecutive packet loss on the primary link"EnableLossDetect": true,// Escape: ${maxRTTCount} consecutive RTTs above ${checkCfg.maxDetectRTT} and normal primary link"EnableMaxRTTDetect": false,// Escape: The avgRTT of the acc link exceeds ${disableAcc.avgRTT} within the ${checkCfg.primaryDetectTime} time window"EnablePrimaryAvgRTTDetect": false,// Escape: The avgRTT of the acc link exceeds that of the primary link within the ${checkCfg.primaryDetectTime} time window"EnablePrimaryDetect": false,// Recommended to disable: The avgRTT of the acc link exceeds that of the primary link within the ${checkCfg.secondaryDetectTime} time window"EnableSecondaryDetect": false,// Recommended to disable: ALL secondary links with packet loss in the time window ${checkCfg.primaryDetectTime}"EnableSlaveLossDetect": false}}
curl -X 'GET''http://127.0.0.1:9801/api/v2/client/getCallback'-H 'accept: application/json'-H 'Content-Type: application/json'
フィードバック