PS篡改检测

API代码示例

更新于 2026-11-13

示例以 TextPromptCheck(输入指令安全检测)为例,其他接口仅需替换 Action 名称与业务参数。

cURL 完整示例

以下 Bash 脚本会生成紧凑 JSON、Body 摘要和签名,再通过 cURL 调用接口。需要 Bash、Python 3 和 cURL。

bash
#!/usr/bin/env bash
set -euo pipefail

: "${OPENAPI_ACCESS_KEY:?请设置 OPENAPI_ACCESS_KEY}"
: "${OPENAPI_ACCESS_TOKEN:?请设置 OPENAPI_ACCESS_TOKEN}"

API_URL="${OPENAPI_V2_URL:-https://openapi.ruijianai.com/openapi/v2/invoke}"
ACTION="TextPromptCheck"
VERSION="V1.0"
CONTENT_TYPE="application/json; charset=utf-8"
SIGNED_HEADERS="content-type;x-rj-access-key;x-rj-action;x-rj-content-sha256;x-rj-nonce;x-rj-timestamp;x-rj-version"
REQUEST_FILE="request.json"

# 摘要和 HTTP 请求复用同一个文件,避免 JSON 再序列化后字节变化。
python3 -  > "${REQUEST_FILE}" <<'PY'
import base64
import json
import mimetypes
import pathlib
import sys
import urllib.parse
import uuid

payload = {"idempotencyKey": "curl-" + uuid.uuid4().hex,
           "parameters": json.loads('{"prompt":"请介绍一下人工智能。","sendResult":true,"sceneCode":"your-scene-code"}')}

sys.stdout.buffer.write(json.dumps(
    payload, ensure_ascii=False, separators=(",", ":")
).encode("utf-8"))
PY

TIMESTAMP="$(python3 -c 'import time; print(int(time.time() * 1000))')"
NONCE="$(python3 -c 'import uuid; print(uuid.uuid4().hex)')"
BODY_SHA256="$(python3 -c 'import hashlib,sys; print(hashlib.sha256(open(sys.argv[1], "rb").read()).hexdigest())' "${REQUEST_FILE}")"

CANONICAL_REQUEST="$(
    printf 'POST\n/openapi/v2/invoke\n\n'
    printf 'content-type:%s\n' "${CONTENT_TYPE}"
    printf 'x-rj-access-key:%s\n' "${OPENAPI_ACCESS_KEY}"
    printf 'x-rj-action:%s\n' "${ACTION}"
    printf 'x-rj-content-sha256:%s\n' "${BODY_SHA256}"
    printf 'x-rj-nonce:%s\n' "${NONCE}"
    printf 'x-rj-timestamp:%s\n' "${TIMESTAMP}"
    printf 'x-rj-version:%s\n\n' "${VERSION}"
    printf '%s\n%s' "${SIGNED_HEADERS}" "${BODY_SHA256}"
)"
CANONICAL_SHA256="$(printf '%s' "${CANONICAL_REQUEST}" | python3 -c 'import hashlib,sys; print(hashlib.sha256(sys.stdin.buffer.read()).hexdigest())')"
STRING_TO_SIGN="$(printf 'RJ-HMAC-SHA256\n%s\n%s' "${TIMESTAMP}" "${CANONICAL_SHA256}")"
SIGNATURE="$(printf '%s' "${STRING_TO_SIGN}" | python3 -c 'import hashlib,hmac,os,sys; print(hmac.new(os.environ["OPENAPI_ACCESS_TOKEN"].encode(), sys.stdin.buffer.read(), hashlib.sha256).hexdigest())')"

curl --silent --show-error --include \
  --request POST "${API_URL}" \
  --header "Content-Type: ${CONTENT_TYPE}" \
  --header "X-RJ-Action: ${ACTION}" \
  --header "X-RJ-Version: ${VERSION}" \
  --header "X-RJ-Access-Key: ${OPENAPI_ACCESS_KEY}" \
  --header "X-RJ-Timestamp: ${TIMESTAMP}" \
  --header "X-RJ-Nonce: ${NONCE}" \
  --header "X-RJ-Content-SHA256: ${BODY_SHA256}" \
  --header "X-RJ-Signature-Method: RJ-HMAC-SHA256" \
  --header "X-RJ-Signature: ${SIGNATURE}" \
  --header "X-RJ-Async: false" \
  --data-binary "@${REQUEST_FILE}"

运行前设置凭据;AccessToken 只用于本地签名,不会发送给服务端:

bash
export OPENAPI_ACCESS_KEY="your-access-key"
export OPENAPI_ACCESS_TOKEN="your-access-token"
export OPENAPI_V2_URL="https://openapi.ruijianai.com/openapi/v2/invoke"

8. Java 完整示例

示例兼容 JDK 8,使用 Jackson 生成稳定的 JSON 字节,使用 OkHttp 的共享连接池发送请求。OkHttp 通过 TLS ALPN 优先协商 HTTP/2,并在协商失败时自动回退 HTTP/1.1。

连接池参数:

参数示例值说明
最大空闲连接数20HTTP/1.1 可复用的空闲连接上限;HTTP/2 连接可承载多个并发流
空闲连接保留时间5 分钟超过该时间仍未使用的空闲连接可被回收
HTTP/2 PING 间隔30 秒检测失效的长连接;设为 0 可关闭主动 PING
连接、读取、写入超时10/180/180 秒根据文件大小和任务响应时间调整

OkHttpClient 和 ConnectionPool 必须在应用生命周期内复用,不能为每次请求创建。HTTP/2 不应手工添加 Connection: keep-alive,连接复用由协议栈和连接池管理。

Maven 依赖 pom.xml:

xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>text-prompt-check-example</artifactId>
    <version>1.0.0</version>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.17.2</version>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>4.12.0</version>
        </dependency>
    </dependencies>
</project>

完整代码 TextPromptCheckExample.java:

java
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import okhttp3.ConnectionPool;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Protocol;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.Base64;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

public final class TextPromptCheckExample {
    private static final ObjectMapper JSON = new ObjectMapper();
    private static final String DEFAULT_URL =
            "https://openapi.ruijianai.com/openapi/v2/invoke";
    private static final String ACTION = "TextPromptCheck";
    private static final String VERSION = "V1.0";
    private static final String CONTENT_TYPE = "application/json; charset=utf-8";
    private static final String SIGN_METHOD = "RJ-HMAC-SHA256";
    private static final String SIGNED_HEADERS =
            "content-type;x-rj-access-key;x-rj-action;x-rj-content-sha256;"
                    + "x-rj-nonce;x-rj-timestamp;x-rj-version";
    private static final ConnectionPool CONNECTION_POOL =
            new ConnectionPool(20, 5, TimeUnit.MINUTES);
    private static final OkHttpClient HTTP_CLIENT = new OkHttpClient.Builder()
            .connectionPool(CONNECTION_POOL)
            .protocols(Arrays.asList(Protocol.HTTP_2, Protocol.HTTP_1_1))
            .connectTimeout(10, TimeUnit.SECONDS)
            .readTimeout(180, TimeUnit.SECONDS)
            .writeTimeout(180, TimeUnit.SECONDS)
            .pingInterval(30, TimeUnit.SECONDS)
            .retryOnConnectionFailure(true)
            .build();

    private TextPromptCheckExample() {
    }

    public static void main(String[] args) throws Exception {
        if (args.length != 0) {
            System.err.println("No command-line arguments are required");
            System.exit(2);
        }
        byte[] body = buildRequestBody();
        HttpResult result = post("/openapi/v2/invoke", body, "false");
        System.out.println(
                "HTTP " + result.status + " protocol=" + result.protocol);
        System.out.println(result.body);

        JsonNode response = JSON.readTree(result.body);
        if (result.status != 200 || !"200".equals(response.path("code").asText())) {
            System.exit(1);
        }
        JsonNode data = response.path("data");
        if (data.isObject() && "QUEUED".equals(data.path("status").asText())) {
            String taskId = data.path("taskId").asText();
            if (taskId.trim().isEmpty()) {
                throw new IllegalStateException("Async response is missing data.taskId");
            }
            pollTask(taskId);
        }
    }

    private static byte[] buildRequestBody() throws Exception {
        Map<String, Object> payload = new LinkedHashMap<>();
        payload.put("idempotencyKey", "java-" + UUID.randomUUID());
        Map<String, Object> parameters = JSON.readValue(
                "{\"prompt\":\"请介绍一下人工智能。\",\"sendResult\":true,\"sceneCode\":\"your-scene-code\"}", LinkedHashMap.class);
        payload.put("parameters", parameters);
        return JSON.writeValueAsBytes(payload);
    }

    private static void pollTask(String taskId) throws Exception {
        long deadline = System.nanoTime()
                + TimeUnit.SECONDS.toNanos(120L);
        long intervalMillis = 2_000L;
        long delayMillis = intervalMillis;
        while (System.nanoTime() < deadline) {
            long remainingMillis = TimeUnit.NANOSECONDS.toMillis(deadline - System.nanoTime());
            Thread.sleep(Math.max(1L, Math.min(delayMillis, remainingMillis)));
            remainingMillis = TimeUnit.NANOSECONDS.toMillis(deadline - System.nanoTime());
            if (remainingMillis <= 0) {
                break;
            }
            Map<String, Object> query = new LinkedHashMap<>();
            query.put("taskId", taskId);
            HttpResult result = post(
                    "/openapi/v2/tasks/query", JSON.writeValueAsBytes(query), null,
                    Math.min(180_000L, remainingMillis));
            if (result.status == 429) {
                delayMillis = Math.min(30_000L, delayMillis * 2);
                System.out.println("Rate limited; retrying task=" + taskId);
                continue;
            }
            JsonNode response = JSON.readTree(result.body);
            if ("A0502".equals(response.path("code").asText())
                    && !"FAILED".equals(response.path("status").asText())) {
                delayMillis = Math.min(30_000L, delayMillis * 2);
                System.out.println("Rate limited; retrying task=" + taskId);
                continue;
            }
            String status = response.path("status").asText();
            System.out.println("task status=" + status
                    + " protocol=" + result.protocol
                    + " response=" + result.body);
            if (result.status != 200 || !"200".equals(response.path("code").asText())
                    || "FAILED".equals(status)) {
                throw new IllegalStateException("Task query failed: HTTP " + result.status
                        + ", response=" + result.body);
            }
            if ("SUCCEEDED".equals(status)) {
                return;
            }
            if (!"RUNNING".equals(status)) {
                throw new IllegalStateException("Unexpected task status: " + status);
            }
            delayMillis = intervalMillis;
        }
        throw new IllegalStateException("Task did not finish within 120 seconds");
    }

    private static HttpResult post(String path, byte[] body, String asyncMode)
            throws Exception {
        return post(path, body, asyncMode, 180_000L);
    }

    private static HttpResult post(String path, byte[] body, String asyncMode, long timeoutMillis)
            throws Exception {
        String accessKey = requiredEnv("OPENAPI_ACCESS_KEY");
        String accessToken = requiredEnv("OPENAPI_ACCESS_TOKEN");
        URL invokeUrl = new URL(env("OPENAPI_V2_URL", DEFAULT_URL));
        URL requestUrl = new URL(invokeUrl.getProtocol(), invokeUrl.getHost(),
                invokeUrl.getPort(), path);
        String timestamp = String.valueOf(System.currentTimeMillis());
        String nonce = UUID.randomUUID().toString().replace("-", "");
        String bodySha256 = sha256Hex(body);
        String signature = signature(
                path, accessKey, accessToken, timestamp, nonce, bodySha256);

        Request.Builder requestBuilder = new Request.Builder()
                .url(requestUrl)
                .post(RequestBody.create(body, MediaType.get(CONTENT_TYPE)))
                .header("Content-Type", CONTENT_TYPE)
                .header("X-RJ-Action", ACTION)
                .header("X-RJ-Version", VERSION)
                .header("X-RJ-Access-Key", accessKey)
                .header("X-RJ-Timestamp", timestamp)
                .header("X-RJ-Nonce", nonce)
                .header("X-RJ-Content-SHA256", bodySha256)
                .header("X-RJ-Signature-Method", SIGN_METHOD)
                .header("X-RJ-Signature", signature);
        if (asyncMode != null) {
            requestBuilder.header("X-RJ-Async", asyncMode);
        }
        okhttp3.Call call = HTTP_CLIENT.newCall(requestBuilder.build());
        call.timeout().timeout(timeoutMillis, TimeUnit.MILLISECONDS);
        try (Response response = call.execute()) {
            ResponseBody responseBody = response.body();
            return new HttpResult(
                    response.code(),
                    response.protocol().toString(),
                    responseBody == null ? "" : responseBody.string());
        }
    }

    private static String signature(String path, String accessKey,
                                    String accessToken, String timestamp,
                                    String nonce, String bodySha256) throws Exception {
        String canonicalHeaders =
                "content-type:" + CONTENT_TYPE + "\n"
                        + "x-rj-access-key:" + accessKey + "\n"
                        + "x-rj-action:" + ACTION + "\n"
                        + "x-rj-content-sha256:" + bodySha256 + "\n"
                        + "x-rj-nonce:" + nonce + "\n"
                        + "x-rj-timestamp:" + timestamp + "\n"
                        + "x-rj-version:" + VERSION + "\n";
        String canonicalRequest = "POST\n" + path + "\n\n"
                + canonicalHeaders + "\n" + SIGNED_HEADERS + "\n" + bodySha256;
        String stringToSign = SIGN_METHOD + "\n" + timestamp + "\n"
                + sha256Hex(canonicalRequest.getBytes(StandardCharsets.UTF_8));
        Mac mac = Mac.getInstance("HmacSHA256");
        mac.init(new SecretKeySpec(
                accessToken.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
        return hex(mac.doFinal(stringToSign.getBytes(StandardCharsets.UTF_8)));
    }

    private static String sha256Hex(byte[] value) throws Exception {
        return hex(MessageDigest.getInstance("SHA-256").digest(value));
    }

    private static String hex(byte[] value) {
        StringBuilder result = new StringBuilder(value.length * 2);
        for (byte item : value) {
            result.append(String.format("%02x", item & 0xff));
        }
        return result.toString();
    }

    private static String requiredEnv(String name) {
        String value = System.getenv(name);
        if (value == null || value.trim().isEmpty()) {
            throw new IllegalStateException(name + " is required");
        }
        return value.trim();
    }

    private static String env(String name, String defaultValue) {
        String value = System.getenv(name);
        return value == null || value.trim().isEmpty() ? defaultValue : value.trim();
    }

    private static final class HttpResult {
        private final int status;
        private final String protocol;
        private final String body;

        private HttpResult(int status, String protocol, String body) {
            this.status = status;
            this.protocol = protocol;
            this.body = body;
        }
    }
}

编译并运行:

bash
export OPENAPI_ACCESS_KEY="your-access-key"
export OPENAPI_ACCESS_TOKEN="your-access-token"
export OPENAPI_V2_URL="https://openapi.ruijianai.com/openapi/v2/invoke"

mvn -q clean dependency:copy-dependencies package
java -cp "target/classes:target/dependency/*" TextPromptCheckExample

Windows 环境请将 classpath 中的冒号 : 改为分号 ;。

9. Python 完整示例

示例支持 Python 3.9 及以上版本,使用同一个 HTTPX Client 复用连接,并通过 http2=True 优先使用 HTTP/2。安装 HTTP/2 可选依赖:

bash
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install "httpx[http2]>=0.27.0,<1.0.0"

连接池参数:

参数示例值说明
max_connections100连接池最大连接数
max_keepalive_connections20允许保留的空闲长连接数
keepalive_expiry300 秒空闲连接保留时间
pool timeout10 秒从连接池获取连接的最长等待时间

httpx.Client 应在应用生命周期内复用。示例使用上下文管理器覆盖首次调用和后续任务轮询;生产服务中可把 Client 注册为单例,并在应用停止时调用 close()。不要手工添加 Connection: keep-alive,HTTP/2 不使用该连接级请求头。

完整代码 text_prompt_check_example.py:

python
#!/usr/bin/env python3
"""TextPromptCheck 完整调用示例。"""

import base64
import hashlib
import hmac
import json
import mimetypes
import os
import sys
import time
import urllib.parse
import uuid
from pathlib import Path

import httpx

DEFAULT_URL = "https://openapi.ruijianai.com/openapi/v2/invoke"
ACTION = "TextPromptCheck"
VERSION = "V1.0"
CONTENT_TYPE = "application/json; charset=utf-8"
SIGN_METHOD = "RJ-HMAC-SHA256"
SIGNED_HEADERS = (
    "content-type;x-rj-access-key;x-rj-action;"
    "x-rj-content-sha256;x-rj-nonce;x-rj-timestamp;x-rj-version"
)


def required_env(name):
    value = os.getenv(name)
    if not value or not value.strip():
        raise RuntimeError(f"{name} is required")
    return value.strip()


def create_http_client():
    """创建一个支持 HTTP/2 和连接复用的长生命周期客户端。"""
    limits = httpx.Limits(
        max_connections=100,
        max_keepalive_connections=20,
        keepalive_expiry=300.0,
    )
    timeout = httpx.Timeout(
        connect=10.0,
        read=180.0,
        write=180.0,
        pool=10.0,
    )
    return httpx.Client(
        http2=True,
        http1=True,
        limits=limits,
        timeout=timeout,
    )



def build_request_body():
    parameters = json.loads('{"prompt":"请介绍一下人工智能。","sendResult":true,"sceneCode":"your-scene-code"}')

    payload = {"idempotencyKey": "python-" + uuid.uuid4().hex,
               "parameters": parameters}

    # 摘要、签名和发送都复用这一份序列化结果。
    return json.dumps(payload, ensure_ascii=False,
                      separators=(",", ":")).encode("utf-8")


def calculate_signature(path, access_key, access_token,
                        timestamp, nonce, body_sha256):
    canonical_headers = "".join((
        f"content-type:{CONTENT_TYPE}\n",
        f"x-rj-access-key:{access_key}\n",
        f"x-rj-action:{ACTION}\n",
        f"x-rj-content-sha256:{body_sha256}\n",
        f"x-rj-nonce:{nonce}\n",
        f"x-rj-timestamp:{timestamp}\n",
        f"x-rj-version:{VERSION}\n",
    ))
    canonical_request = "\n".join((
        "POST", path, "", canonical_headers,
        SIGNED_HEADERS, body_sha256,
    ))
    canonical_hash = hashlib.sha256(
        canonical_request.encode("utf-8")
    ).hexdigest()
    string_to_sign = "\n".join((SIGN_METHOD, timestamp, canonical_hash))
    return hmac.new(access_token.encode("utf-8"),
                    string_to_sign.encode("utf-8"),
                    hashlib.sha256).hexdigest()


def post(client, path, body, async_mode=None, timeout=180.0):
    access_key = required_env("OPENAPI_ACCESS_KEY")
    access_token = required_env("OPENAPI_ACCESS_TOKEN")
    invoke_url = urllib.parse.urlsplit(os.getenv("OPENAPI_V2_URL", DEFAULT_URL))
    request_url = urllib.parse.urlunsplit(
        (invoke_url.scheme, invoke_url.netloc, path, "", "")
    )
    timestamp = str(int(time.time() * 1000))
    nonce = uuid.uuid4().hex
    body_sha256 = hashlib.sha256(body).hexdigest()
    signature = calculate_signature(
        path, access_key, access_token, timestamp, nonce, body_sha256
    )
    headers = {
        "Content-Type": CONTENT_TYPE,
        "X-RJ-Action": ACTION,
        "X-RJ-Version": VERSION,
        "X-RJ-Access-Key": access_key,
        "X-RJ-Timestamp": timestamp,
        "X-RJ-Nonce": nonce,
        "X-RJ-Content-SHA256": body_sha256,
        "X-RJ-Signature-Method": SIGN_METHOD,
        "X-RJ-Signature": signature,
    }
    if async_mode is not None:
        headers["X-RJ-Async"] = async_mode
    response = client.post(
        request_url, content=body, headers=headers,
        timeout=httpx.Timeout(timeout, connect=min(10.0, timeout), pool=min(10.0, timeout)),
    )
    if response.status_code == 429:
        return response.status_code, {"message": "HTTP rate limit"}, response.http_version
    payload = response.json()
    if not isinstance(payload, dict):
        raise RuntimeError("响应JSON必须是对象")
    return response.status_code, payload, response.http_version


def poll_task(client, task_id):
    deadline = time.monotonic() + 120
    delay = 2
    while time.monotonic() < deadline:
        time.sleep(min(delay, max(0, deadline - time.monotonic())))
        remaining = deadline - time.monotonic()
        if remaining <= 0:
            break
        body = json.dumps({"taskId": task_id},
                          separators=(",", ":")).encode("utf-8")
        http_status, response, http_version = post(
            client, "/openapi/v2/tasks/query", body, timeout=min(180.0, remaining)
        )
        if time.monotonic() >= deadline:
            break
        if http_status == 429 or (response.get("code") == "A0502" and response.get("status") != "FAILED"):
            delay = min(30, delay * 2)
            print(f"限流,稍后重试 task={task_id}")
            continue
        status = response.get("status")
        print(f"HTTP {http_status} protocol={http_version} task={status}")
        print(json.dumps(response, ensure_ascii=False, indent=2))
        if http_status != 200 or response.get("code") != "200" or status == "FAILED":
            raise RuntimeError(f"任务查询失败: {response}")
        if status == "SUCCEEDED":
            return response
        if status != "RUNNING":
            raise RuntimeError(f"任务状态缺失或非法: {status}")
        delay = 2
    raise TimeoutError("任务在 120 秒内未完成")


def main():
    if len(sys.argv) != 1:
        print("用法: python3 text_prompt_check_example.py", file=sys.stderr)
        return 2
    body = build_request_body()
    with create_http_client() as client:
        http_status, response, http_version = post(
            client, "/openapi/v2/invoke", body, "false"
        )
        print(f"HTTP {http_status} protocol={http_version}")
        print(json.dumps(response, ensure_ascii=False, indent=2))
        if http_status != 200 or response.get("code") != "200":
            return 1
        data = response.get("data")
        if isinstance(data, dict) and data.get("status") == "QUEUED":
            task_id = data.get("taskId")
            if not isinstance(task_id, str) or not task_id.strip():
                raise RuntimeError("异步受理响应缺少data.taskId")
            poll_task(client, task_id)
    return 0


if __name__ == "__main__":
    sys.exit(main())

运行:

bash
export OPENAPI_ACCESS_KEY="your-access-key"
export OPENAPI_ACCESS_TOKEN="your-access-token"
export OPENAPI_V2_URL="https://openapi.ruijianai.com/openapi/v2/invoke"
python3 text_prompt_check_example.py

客户端复用建议

Java(OkHttp)与 Python(HTTPX)客户端均应配置连接池并在应用生命周期内复用,避免每次调用重新完成 TCP/TLS 握手:

参数建议值说明
最大空闲连接20HTTP/1.1 复用上限;HTTP/2 单连接可承载多路并发流
空闲连接保留时间5 分钟超时未使用的空闲连接回收
连接/读取/写入超时10 / 180 / 180 秒按文件大小与任务响应时间调整

HTTP/2 通过 ALPN 自动协商、失败自动回退 HTTP/1.1;不要手工添加 Connection: keep-alive 请求头。

本页目录