# go: 从代理读取模块时超时: dial tcp 216.58.194.113:443: i/o timeout

- **ID:** `go/network-timeout-proxy`
- **领域:** go
- **类别:** network_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

网络延迟或丢包导致与 Go 模块代理的连接超时。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.19 | active | — | — |
| 1.20 | active | — | — |
| 1.21 | active | — | — |

## 解决方案

1. **Use a different proxy or direct access with GOPROXY=direct.** (85% 成功率)
   ```
   Set 'export GOPROXY=direct' to bypass the proxy and fetch from VCS directly.
   ```
2. **Retry with increased timeout using environment variable.** (60% 成功率)
   ```
   Set 'export GOFLAGS=-timeout=120s' and retry.
   ```

## 无效尝试

- **Increasing GOFLAGS with -timeout flag.** — Go's timeout flags affect build steps, not HTTP connections to proxy. (80% 失败率)
- **Using a VPN without checking proxy settings.** — VPN may add latency; timeout may worsen. (50% 失败率)
