# go: 从代理读取模块时连接被拒绝: dial tcp 216.58.194.113:443: connect: connection refused

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

## 根因

Go 模块代理无法访问，由于网络问题、防火墙阻止或代理宕机。

## 版本兼容性

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

## 解决方案

1. **Use a different proxy or direct source.** (85% 成功率)
   ```
   Set 'export GOPROXY=direct' to bypass the proxy and fetch directly from VCS.
   ```
2. **Configure a corporate proxy or VPN if behind a firewall.** (70% 成功率)
   ```
   Set 'export GOPROXY=http://corporate-proxy:8080' or use 'https_proxy' environment variable.
   ```

## 无效尝试

- **Retrying with 'go get -u' which uses the same proxy.** — The proxy is still unreachable; retrying doesn't change network conditions. (90% 失败率)
- **Setting GOFLAGS=-insecure to ignore TLS errors.** — The error is connection refused, not TLS; this doesn't help. (80% 失败率)
