mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 18:57:08 +00:00
wip(docs): i18n (#12681)
This commit is contained in:
57
packages/web/src/content/docs/zh-tw/network.mdx
Normal file
57
packages/web/src/content/docs/zh-tw/network.mdx
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: 網絡
|
||||
description: 配置代理和自定義證書。
|
||||
---
|
||||
|
||||
OpenCode 支持企業網絡環境的標準代理環境變量和自定義證書。
|
||||
|
||||
---
|
||||
|
||||
## 代理人
|
||||
|
||||
OpenCode 尊重標準代理環境變量。
|
||||
|
||||
```bash
|
||||
# HTTPS proxy (recommended)
|
||||
export HTTPS_PROXY=https://proxy.example.com:8080
|
||||
|
||||
# HTTP proxy (if HTTPS not available)
|
||||
export HTTP_PROXY=http://proxy.example.com:8080
|
||||
|
||||
# Bypass proxy for local server (required)
|
||||
export NO_PROXY=localhost,127.0.0.1
|
||||
```
|
||||
|
||||
:::caution
|
||||
TUI 與本地 HTTP 服務器通信。您必須繞過此連接的代理以防止路由循環。
|
||||
:::
|
||||
|
||||
您可以使用[CLI 標誌](/docs/cli#run)配置服務器的端口和主機名。
|
||||
|
||||
---
|
||||
|
||||
### 認證
|
||||
|
||||
如果您的代理需要基本身份驗證,請在 URL 中包含憑據。
|
||||
|
||||
```bash
|
||||
export HTTPS_PROXY=http://username:password@proxy.example.com:8080
|
||||
```
|
||||
|
||||
:::caution
|
||||
避免對密碼進行硬編碼。使用環境變量或安全憑證存儲。
|
||||
:::
|
||||
|
||||
對於需要高級身份驗證(例如 NTLM 或 Kerberos)的代理,請考慮使用支持您的身份驗證方法的 LLM 網關。
|
||||
|
||||
---
|
||||
|
||||
## 定制證書
|
||||
|
||||
如果您的企業使用自定義 CA 進行 HTTPS 連接,請配置 OpenCode 以信任它們。
|
||||
|
||||
```bash
|
||||
export NODE_EXTRA_CA_CERTS=/path/to/ca-cert.pem
|
||||
```
|
||||
|
||||
這適用於代理連接和直接 API 訪問。
|
||||
Reference in New Issue
Block a user