Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Xerxes-2/clewdr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ClewdR

High-Performance LLM Proxy for the Modern Era

Ask DeepWiki GitHub Release License Performance Memory

๐ŸŒ Language Support

๐Ÿ‡บ๐Ÿ‡ธ English | ๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡


๐ŸŽฏ What is ClewdR?

ClewdR is a production-grade, high-performance proxy server engineered specifically for Claude (Claude.ai, Claude Code) and Google Gemini (AI Studio, Vertex AI). Built with Rust for maximum performance and minimal resource usage, it provides enterprise-level reliability with consumer-friendly simplicity.

๐Ÿ† Why ClewdR?

  • ๐Ÿš„ 10x Performance: Outperforms script-language implementations
  • ๐Ÿ’พ 1/10th Memory: Uses only single-digit MB in production
  • ๐Ÿ”ง Production Ready: Handles thousands of requests per second
  • ๐ŸŒ Multi-Platform: Native support for Windows, macOS, Linux, Android

โœจ Core Features

๐ŸŽจ Full-Featured Web Interface

  • React-powered dashboard with real-time monitoring
  • Multi-language support (English/Chinese)
  • Secure authentication with auto-generated passwords
  • Hot configuration reload without service interruption
  • Visual cookie & key management

๐Ÿ—๏ธ Enterprise Architecture

  • Tokio + Axum async runtime for maximum throughput
  • Event-driven design with decoupled components
  • Moka-powered caching with intelligent invalidation
  • Chrome-level fingerprinting for seamless API access
  • Multi-threaded processing with optimal resource usage

๐Ÿง  Intelligent Resource Management

  • Smart cookie rotation with status classification

  • API key health monitoring and automatic failover

  • Rate limiting protection with exponential backoff

  • Connection pooling with keep-alive optimization

๐ŸŒ Universal Compatibility

  • Static compilation - single binary, zero dependencies
  • Cross-platform native - Windows, macOS, Linux, Android
  • Docker ready with optimized images
  • Reverse proxy friendly with custom endpoint support

๐Ÿš€ Protocol Support

Claude Integration

  • โœ… Claude.ai web interface
  • โœ… Claude Code specialized support
  • โœ… System prompt caching for efficiency
  • โœ… Extended Thinking mode
  • โœ… Image attachments & web search
  • โœ… Custom stop sequences

Google Gemini Integration

  • โœ… AI Studio & Vertex AI
  • โœ… OAuth2 authentication for Vertex
  • โœ… HTTP Keep-Alive optimization
  • โœ… Model switching with automatic detection

API Compatibility

  • โœ… OpenAI format - drop-in replacement

  • โœ… Native formats - Claude & Gemini

  • โœ… Streaming responses with real-time processing

๐Ÿ“Š Performance Metrics

Metric ClewdR Traditional Proxies
Memory Usage <10 MB 100-500 MB
Requests/sec 1000+ 100-200
Startup Time <1 second 5-15 seconds
Binary Size ~15 MB 50-200 MB
Dependencies Zero Node.js/Python + libs

๐Ÿš€ Quick Start Guide

Step 1: Download & Run

# Download the latest release for your platform
wget https://github.com/Xerxes-2/clewdr/releases/latest/download/clewdr-[platform]

# Extract the binary (if necessary)
tar -xzf clewdr-[platform].tar.gz

# Navigate to the directory
cd clewdr-[platform]

# Make executable (Linux/macOS)
chmod +x clewdr

# Run ClewdR
./clewdr
๐Ÿ“ฆ Platform Downloads
Platform Architecture Download Link
๐ŸชŸ Windows x64 clewdr-windows-x64.exe
๐Ÿง Linux x64 clewdr-linux-x64
๐Ÿง Linux ARM64 clewdr-linux-arm64
๐ŸŽ macOS x64 clewdr-macos-x64
๐ŸŽ macOS ARM64 (M1/M2) clewdr-macos-arm64
๐Ÿค– Android ARM64 clewdr-android-arm64

Step 2: Access Web Interface

  1. ๐ŸŒ Open your browser to http://127.0.0.1:8484
  2. ๐Ÿ” Use the Web Admin Password displayed in the console
  3. ๐ŸŽ‰ Welcome to ClewdR's management interface!

๐Ÿ’ก Pro Tips:

  • Forgot password? Delete clewdr.toml and restart
  • Docker users: Password appears in container logs
  • Change password: Use the web interface settings

Step 3: Configure Your Services

๐Ÿƒ Claude Setup

  1. Add Cookies: Paste your Claude.ai session cookies
  2. Configure Proxy: Set upstream proxy if needed
  3. Test Connection: Verify cookie status in dashboard

๐Ÿ”น Gemini Setup

  1. Add API Keys: Input your Google AI Studio keys
  2. Vertex AI (Optional): Configure OAuth2 for enterprise
  3. Model Selection: Choose your preferred models

Step 4: Connect Your Applications

ClewdR provides multiple API endpoints. Check the console output for available endpoints:

๐Ÿ”— API Endpoints

# Claude Endpoints
Claude Web:    http://127.0.0.1:8484/v1/messages          # Native format
Claude OpenAI: http://127.0.0.1:8484/v1/chat/completions  # OpenAI compatible
Claude Code:   http://127.0.0.1:8484/code/v1/messages     # Claude Code

# Gemini Endpoints  
Gemini Native: http://127.0.0.1:8484/v1/v1beta/generateContent    # Native format
Gemini OpenAI: http://127.0.0.1:8484/gemini/chat/completions      # OpenAI compatible
Vertex AI:     http://127.0.0.1:8484/v1/vertex/v1beta/            # Vertex AI

โš™๏ธ Application Configuration Examples

SillyTavern Configuration
{
  "api_url": "http://127.0.0.1:8484/v1/chat/completions",
  "api_key": "your-api-password-from-console",
  "model": "claude-3-sonnet-20240229"
}
Continue VSCode Extension
{
  "models": [
    {
      "title": "Claude via ClewdR",
      "provider": "openai",
      "model": "claude-3-sonnet-20240229",
      "apiBase": "http://127.0.0.1:8484/v1/",
      "apiKey": "your-api-password-from-console"
    }
  ]
}
Cursor IDE Configuration
{
  "openaiApiBase": "http://127.0.0.1:8484/v1/",
  "openaiApiKey": "your-api-password-from-console"
}

Step 5: Verify & Monitor

  • โœ… Check cookie/key status in the web dashboard
  • โœ… Monitor request logs for successful connections
  • โœ… Test with a simple chat request
  • โœ… Enjoy blazing-fast LLM proxy performance!

๐Ÿ—ƒ๏ธ Database Persistence

ClewdR keeps state in a local clewdr.toml file by default. To persist configuration, cookies, and API keys in a database instead, compile the binary with the database feature set and point persistence.mode at your driver.

Enable database features

  • Build from source with the matching feature flag: cargo build --release --no-default-features --features "embed-resource,xdg,db-sqlite"
  • Choose db-sqlite, db-postgres, or db-mysql (they automatically include the base db feature)
  • Custom Docker images should adjust the cargo build step to include the desired db-* feature; the published Dockerfile uses file mode by default

Configure the connection

Add a persistence section to clewdr.toml (or set the equivalent environment variables):

[persistence]
mode = "postgres"            # sqlite | postgres | mysql
database_url = "postgres://user:pass@db:5432/clewdr"
  • SQLite: optionally set sqlite_path = "/var/lib/clewdr/clewdr.db"; ClewdR expands this to sqlite:///var/lib/clewdr/clewdr.db?mode=rwc and creates the parent folder when possible

  • Postgres/MySQL: database_url must be provided (for example postgres://user:pass@host:5432/db)

  • Environment variable form uses Figmentโ€™s double-underscore syntax, e.g.:

    export CLEWDR_PERSISTENCE__MODE=sqlite
    export CLEWDR_PERSISTENCE__SQLITE_PATH=/var/lib/clewdr/clewdr.db
    # or database_url for server backends
    export CLEWDR_PERSISTENCE__DATABASE_URL="postgres://user:pass@db/clewdr"

Operational notes & precautions

  • On first start ClewdR runs automatic SeaORM migrations (config, cookies, keys, wasted tables); ensure the account can create tables and indexes
  • API endpoints that write cookies/keys check GET /api/storage/status; failed connections surface as Database storage is unavailable
  • SQLite paths should live on persistent storage (bind mount the directory when running in containers)
  • Setting persistence.mode without a matching db-* build leaves ClewdR in file modeโ€”verify your binary with clewdr -V or rebuild with the correct features
  • The admin API exposes helpers: GET /api/storage/status to inspect health, and authenticated POST /api/storage/import|export for file migration

Community Resources

Github Aggregated Wiki: https://github.com/Xerxes-2/clewdr/wiki

Acknowledgements

  • wreq - Excellent browser fingerprinting library used for API access.
  • Clewd Modified Version - A modified version of the original Clewd, providing many inspirations and foundational features.
  • Clove - Provides the support logic for Claude Code.

About

High Performance LLM Reverse Proxy

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages