mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-21 15:55:50 +00:00
feat: 支持自托管的 remote-control-server (#214)
* feat: 支持自托管的 remote-control-server (#214) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
16
packages/remote-control-server/src/config.ts
Normal file
16
packages/remote-control-server/src/config.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
export const config = {
|
||||
version: process.env.RCS_VERSION || "0.1.0",
|
||||
port: parseInt(process.env.RCS_PORT || "3000"),
|
||||
host: process.env.RCS_HOST || "0.0.0.0",
|
||||
apiKeys: (process.env.RCS_API_KEYS || "").split(",").filter(Boolean),
|
||||
baseUrl: process.env.RCS_BASE_URL || "",
|
||||
pollTimeout: parseInt(process.env.RCS_POLL_TIMEOUT || "8"),
|
||||
heartbeatInterval: parseInt(process.env.RCS_HEARTBEAT_INTERVAL || "20"),
|
||||
jwtExpiresIn: parseInt(process.env.RCS_JWT_EXPIRES_IN || "3600"),
|
||||
disconnectTimeout: parseInt(process.env.RCS_DISCONNECT_TIMEOUT || "300"),
|
||||
} as const;
|
||||
|
||||
export function getBaseUrl(): string {
|
||||
if (config.baseUrl) return config.baseUrl;
|
||||
return `http://localhost:${config.port}`;
|
||||
}
|
||||
Reference in New Issue
Block a user