Files
examination/topics/networking/http-handshake/single_choice.json
T
wonder df63692a18
Deploy Examination / deploy (push) Successful in 31s
feat: add 180 questions (90 sc + 90 fb) for networking subtopics
Cover 9 subtopics from the computer networking documentation:
- http-handshake: TCP/TLS/HTTP2/HTTP3 handshakes
- http-connection-cost: connection resource overhead & million concurrency
- connection-pooling: pool reuse, HTTP/1.1 vs HTTP/2
- http-keepalive: Keep-Alive principle, head-of-line blocking
- keepalive-scenarios: when to enable/disable Keep-Alive
- domain-sharding: HTTP/1.1 hack, HTTP/2 obsolescence
- cdn: edge nodes, caching, DDoS protection
- cors: same-origin policy, preflight requests
- go-build-strip: -s -w flags, binary size optimization
2026-09-02 21:33:09 +08:00

211 lines
6.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"topic": "http-handshake",
"type": "single_choice",
"schema_version": "1.0.0",
"generated": "2026-09-02T21:20:00+08:00",
"questions": [
{
"id": "sc-001",
"type": "single_choice",
"difficulty": 2,
"tags": [
"TCP",
"三次握手"
],
"question": "TCP 三次握手中,第一次握手客户端发送的标志位是什么?",
"options": {
"A": "SYN",
"B": "ACK",
"C": "FIN",
"D": "RST"
},
"answer": "A",
"explanation": "第一次握手客户端发送 SYN(Synchronize)标志,表示发起连接请求。ACK 是确认标志,FIN 是结束连接标志,RST 是重置连接标志。",
"source": null,
"related": []
},
{
"id": "sc-002",
"type": "single_choice",
"difficulty": 3,
"tags": [
"TLS",
"HTTPS",
"握手"
],
"question": "TLS 1.2 的握手需要多少个 RTT(往返)?",
"options": {
"A": "0-RTT",
"B": "1-RTT",
"C": "2-RTT",
"D": "3-RTT"
},
"answer": "C",
"explanation": "TLS 1.2 需要 2-RTT 完成密钥协商。TLS 1.3 优化到 1-RTT,TLS 1.3 的 0-RTT 恢复可以在恢复会话时做到 0-RTT。",
"source": null,
"related": []
},
{
"id": "sc-003",
"type": "single_choice",
"difficulty": 2,
"tags": [
"HTTP/1.x",
"应用层握手"
],
"question": "HTTP/1.0 和 HTTP/1.1 有应用层握手吗?",
"options": {
"A": "有,通过 OPTIONS 请求",
"B": "有,通过 GET 请求",
"C": "没有,TCP 连上后直接发请求",
"D": "有,通过 SETTINGS 帧"
},
"answer": "C",
"explanation": "HTTP/1.0 和 HTTP/1.1 没有应用层握手。TCP 连接建立后,TLS 握手完成后,客户端直接发送 HTTP 请求。SETTINGS 帧是 HTTP/2 的特性。",
"source": null,
"related": []
},
{
"id": "sc-004",
"type": "single_choice",
"difficulty": 3,
"tags": [
"HTTP/2",
"SETTINGS"
],
"question": "HTTP/2 的 SETTINGS 交换发生在哪个层?",
"options": {
"A": "传输层",
"B": "安全层",
"C": "应用层",
"D": "物理层"
},
"answer": "C",
"explanation": "HTTP/2 的 SETTINGS 交换发生在应用层,双方通过 SETTINGS 帧协商 HTTP 协议参数(如最大并发流数、窗口大小等)。它不是传输层的 TCP 握手。",
"source": null,
"related": []
},
{
"id": "sc-005",
"type": "single_choice",
"difficulty": 4,
"tags": [
"HTTP/3",
"QUIC"
],
"question": "HTTP/3 基于 QUIC 协议,QUIC 运行在什么之上?",
"options": {
"A": "TCP",
"B": "UDP",
"C": "ICMP",
"D": "SCTP"
},
"answer": "B",
"explanation": "QUIC 运行在 UDP 之上,它把传输层握手和 TLS 1.3 握手合二为一。首次连接只需 1-RTT,恢复连接可达 0-RTT。",
"source": null,
"related": []
},
{
"id": "sc-006",
"type": "single_choice",
"difficulty": 2,
"tags": [
"TCP",
"三次握手"
],
"question": "TCP 三次握手的本质目的是什么?",
"options": {
"A": "分配端口号",
"B": "双方各确认一次收发能力",
"C": "协商传输速率",
"D": "加密数据"
},
"answer": "B",
"explanation": "三次握手的本质是双方各确认一次收发能力,确保连接可靠。客户端确认自己能发能收,服务器确认自己能发能收。",
"source": null,
"related": []
},
{
"id": "sc-007",
"type": "single_choice",
"difficulty": 3,
"tags": [
"TLS",
"HTTPS",
"重放攻击"
],
"question": "TLS 1.3 的 0-RTT 恢复存在什么安全风险?",
"options": {
"A": "中间人攻击",
"B": "重放攻击",
"C": "DDoS 攻击",
"D": "SQL 注入"
},
"answer": "B",
"explanation": "0-RTT 恢复虽然快,但存在重放攻击风险。0-RTT 发送的数据不能保证幂等性,因此不适合做敏感操作(如支付)。",
"source": null,
"related": []
},
{
"id": "sc-008",
"type": "single_choice",
"difficulty": 4,
"tags": [
"TCP",
"三次握手"
],
"question": "为什么 TCP 握手是三次而不是两次?",
"options": {
"A": "三次握手更快",
"B": "两次握手无法防止已失效的连接请求到达服务器",
"C": "三次握手更安全",
"D": "三次握手节省带宽"
},
"answer": "B",
"explanation": "两次握手无法防止已失效的连接请求到达服务器。如果客户端的旧 SYN 延迟到达,服务器会误以为是新请求并建立连接,白白浪费资源。三次握手让客户端有最后一次确认的机会。",
"source": null,
"related": []
},
{
"id": "sc-009",
"type": "single_choice",
"difficulty": 3,
"tags": [
"TLS",
"HTTPS"
],
"question": "TLS 握手完成的三件事不包括以下哪项?",
"options": {
"A": "证书验证",
"B": "密钥协商",
"C": "加密套件确定",
"D": "IP 地址分配"
},
"answer": "D",
"explanation": "TLS 握手完成的事包括:证书验证(确认服务器身份)、密钥协商(生成对称加密密钥)、加密套件确定(双方商定使用的加密算法)。IP 地址分配是 DHCP 的工作。",
"source": null,
"related": []
},
{
"id": "sc-010",
"type": "single_choice",
"difficulty": 4,
"tags": [
"HTTP/3",
"QUIC",
"TCP"
],
"question": "HTTP/3 相比 HTTP/2 解决了 TCP 的什么问题?",
"options": {
"A": "带宽不足",
"B": "队头阻塞",
"C": "加密不够",
"D": "连接数限制"
},
"answer": "B",
"explanation": "HTTP/3 基于 QUIC 解决了 TCP 的队头阻塞问题——单个流丢包不影响其他流。HTTP/2 虽然有多路复用,但底层 TCP 的队头阻塞仍然存在。",
"source": null,
"related": []
}
]
}