Spaces:
Paused
Paused
Commit
·
fe49d24
1
Parent(s):
426033f
部署
Browse files- Dockerfile +21 -0
- config.yaml +141 -0
Dockerfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 使用你指定的基础镜像
|
| 2 |
+
FROM eceasy/cli-proxy-api:latest
|
| 3 |
+
#复制配置文件到容器内
|
| 4 |
+
WORKDIR /CLIProxyAPI
|
| 5 |
+
COPY config.yaml /CLIProxyAPI/config.yaml
|
| 6 |
+
|
| 7 |
+
# 声明容器会监听的端口。
|
| 8 |
+
# 这些端口对应于 docker run 命令中的 -p 参数的容器侧端口。
|
| 9 |
+
EXPOSE 8317
|
| 10 |
+
# EXPOSE 8085
|
| 11 |
+
# EXPOSE 1455
|
| 12 |
+
# EXPOSE 54545
|
| 13 |
+
# EXPOSE 11451
|
| 14 |
+
|
| 15 |
+
# 设置环境变量。
|
| 16 |
+
#ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 17 |
+
ENV TZ="Asia/Shanghai"
|
| 18 |
+
ENV PORT=8317
|
| 19 |
+
ENV HOST=0.0.0.0
|
| 20 |
+
#ENV REMOTE_MANAGEMENT_ALLOW_REMOTE="" \
|
| 21 |
+
#ENV REMOTE_MANAGEMENT_SECRET_KEY=""
|
config.yaml
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Server port
|
| 2 |
+
|
| 3 |
+
port: 8317
|
| 4 |
+
# Management API settings
|
| 5 |
+
remote-management:
|
| 6 |
+
# Whether to allow remote (non-localhost) management access.
|
| 7 |
+
|
| 8 |
+
# When false, only localhost can access management endpoints (a key is still required).
|
| 9 |
+
allow-remote: true
|
| 10 |
+
# Management key. If a plaintext value is provided here, it will be hashed on startup.
|
| 11 |
+
|
| 12 |
+
# All management requests (even from localhost) require this key.
|
| 13 |
+
|
| 14 |
+
# Leave empty to disable the Management API entirely (404 for all /v0/management routes).
|
| 15 |
+
secret-key:"taitai9616" # "$2a$10$5PaXKjtlBsM0NkQJQaeNO.5R2YrpsLyUTFTf8/5puwKUOeLqFShxu"
|
| 16 |
+
# Disable the bundled management control panel asset download and HTTP route when true.
|
| 17 |
+
disable-control-panel: false
|
| 18 |
+
# Authentication directory (supports ~ for home directory)
|
| 19 |
+
auth-dir: "/root/.cli-proxy-api"
|
| 20 |
+
# API keys for authentication
|
| 21 |
+
api-keys: [sk-123]
|
| 22 |
+
# Enable debug logging
|
| 23 |
+
debug: false
|
| 24 |
+
# When true, write application logs to rotating files instead of stdout
|
| 25 |
+
logging-to-file: true
|
| 26 |
+
# When false, disable in-memory usage statistics aggregation
|
| 27 |
+
usage-statistics-enabled: true
|
| 28 |
+
# Proxy URL. Supports socks5/http/https protocols. Example: socks5://user:pass@192.168.1.1:1080/
|
| 29 |
+
proxy-url: ""
|
| 30 |
+
# Number of times to retry a request. Retries will occur if the HTTP response code is 403, 408, 500, 502, 503, or 504.
|
| 31 |
+
request-retry: 0
|
| 32 |
+
# Quota exceeded behavior
|
| 33 |
+
quota-exceeded:
|
| 34 |
+
switch-project: false # Whether to automatically switch to another project when a quota is exceeded
|
| 35 |
+
switch-preview-model: false # Whether to automatically switch to a preview model when a quota is exceeded
|
| 36 |
+
request-log: false
|
| 37 |
+
generative-language-api-key: []
|
| 38 |
+
claude-api-key: []
|
| 39 |
+
codex-api-key: []
|
| 40 |
+
openai-compatibility: []
|
| 41 |
+
gemini-web:
|
| 42 |
+
context: true
|
| 43 |
+
gem-mode: ""
|
| 44 |
+
code-mode: false
|
| 45 |
+
max-chars-per-request: 0
|
| 46 |
+
|
| 47 |
+
# API keys for official Generative Language API
|
| 48 |
+
|
| 49 |
+
#generative-language-api-key:
|
| 50 |
+
|
| 51 |
+
# - "AIzaSy...01"
|
| 52 |
+
|
| 53 |
+
# - "AIzaSy...02"
|
| 54 |
+
|
| 55 |
+
# - "AIzaSy...03"
|
| 56 |
+
|
| 57 |
+
# - "AIzaSy...04"
|
| 58 |
+
|
| 59 |
+
# Codex API keys
|
| 60 |
+
|
| 61 |
+
#codex-api-key:
|
| 62 |
+
|
| 63 |
+
# - api-key: "sk-atSM..."
|
| 64 |
+
|
| 65 |
+
# base-url: "https://www.example.com" # use the custom codex API endpoint
|
| 66 |
+
|
| 67 |
+
# proxy-url: "socks5://proxy.example.com:1080" # optional: per-key proxy override
|
| 68 |
+
|
| 69 |
+
# Claude API keys
|
| 70 |
+
|
| 71 |
+
#claude-api-key:
|
| 72 |
+
|
| 73 |
+
# - api-key: "sk-atSM..." # use the official claude API key, no need to set the base url
|
| 74 |
+
|
| 75 |
+
# - api-key: "sk-atSM..."
|
| 76 |
+
|
| 77 |
+
# base-url: "https://www.example.com" # use the custom claude API endpoint
|
| 78 |
+
|
| 79 |
+
# proxy-url: "socks5://proxy.example.com:1080" # optional: per-key proxy override
|
| 80 |
+
|
| 81 |
+
# OpenAI compatibility providers
|
| 82 |
+
|
| 83 |
+
#openai-compatibility:
|
| 84 |
+
|
| 85 |
+
# - name: "openrouter" # The name of the provider; it will be used in the user agent and other places.
|
| 86 |
+
|
| 87 |
+
# base-url: "https://openrouter.ai/api/v1" # The base URL of the provider.
|
| 88 |
+
|
| 89 |
+
# # New format with per-key proxy support (recommended):
|
| 90 |
+
|
| 91 |
+
# api-key-entries:
|
| 92 |
+
|
| 93 |
+
# - api-key: "sk-or-v1-...b780"
|
| 94 |
+
|
| 95 |
+
# proxy-url: "socks5://proxy.example.com:1080" # optional: per-key proxy override
|
| 96 |
+
|
| 97 |
+
# - api-key: "sk-or-v1-...b781" # without proxy-url
|
| 98 |
+
|
| 99 |
+
# # Legacy format (still supported, but cannot specify proxy per key):
|
| 100 |
+
|
| 101 |
+
# # api-keys:
|
| 102 |
+
|
| 103 |
+
# # - "sk-or-v1-...b780"
|
| 104 |
+
|
| 105 |
+
# # - "sk-or-v1-...b781"
|
| 106 |
+
|
| 107 |
+
# models: # The models supported by the provider.
|
| 108 |
+
|
| 109 |
+
# - name: "moonshotai/kimi-k2:free" # The actual model name.
|
| 110 |
+
|
| 111 |
+
# alias: "kimi-k2" # The alias used in the API.
|
| 112 |
+
|
| 113 |
+
# Gemini Web settings
|
| 114 |
+
|
| 115 |
+
#gemini-web:
|
| 116 |
+
|
| 117 |
+
# # Conversation reuse: set to true to enable (default), false to disable.
|
| 118 |
+
|
| 119 |
+
# context: true
|
| 120 |
+
|
| 121 |
+
# # Maximum characters per single request to Gemini Web. Requests exceeding this
|
| 122 |
+
|
| 123 |
+
# # size split into chunks. Only the last chunk carries files and yields the final answer.
|
| 124 |
+
|
| 125 |
+
# max-chars-per-request: 1000000
|
| 126 |
+
|
| 127 |
+
# # Disable the short continuation hint appended to intermediate chunks
|
| 128 |
+
|
| 129 |
+
# # when splitting long prompts. Default is false (hint enabled by default).
|
| 130 |
+
|
| 131 |
+
# disable-continuation-hint: false
|
| 132 |
+
|
| 133 |
+
# # Gem selection (Gem Mode):
|
| 134 |
+
|
| 135 |
+
# # - "coding-partner": attach the predefined Coding partner Gem
|
| 136 |
+
|
| 137 |
+
# # - "writing-editor": attach the predefined Writing editor Gem
|
| 138 |
+
|
| 139 |
+
# # - empty: do not attach any Gem
|
| 140 |
+
|
| 141 |
+
# gem-mode: ""
|