# Xget
**Repository Path**: xfworld/Xget
## Basic Information
- **Project Name**: Xget
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: GPL-3.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-08-24
- **Last Updated**: 2025-08-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Xget
**[δΈζ](README.md)**
[](#-ecosystem-integration)
[](#-ecosystem-integration)
[](cloudflare-workers)
[](#vercel)
[](#docker)
[](#github)
[](#gitlab)
[](#gitea)
[](#codeberg)
[](#sourceforge)
[](#aosp-android-open-source-project)
[](#hugging-face-mirror)
[](#civitai-ai-model-platform)
[](#npm-package-acceleration)
[](#python-package-acceleration)
[](#conda-package-acceleration)
[](#maven-package-acceleration)
[](#apache-software-downloads)
[](#gradle-package-acceleration)
[](#homebrew-package-acceleration)
[](#ruby-package-acceleration)
[](#r-package-acceleration)
[](#perl-package-acceleration)
[](#texlatex-package-acceleration)
[](#go-module-acceleration)
[](#nuget-package-acceleration)
[](#rust-package-acceleration)
[](#php-package-acceleration)
[](#debianubuntu-apt-configuration)
[](#debianubuntu-apt-configuration)
[](#fedora-dnf-configuration)
[](#rocky-linux-dnf-configuration)
[](#opensuse-zypper-configuration)
[](#arch-linux-pacman-configuration)
[](#arxiv-paper-downloads)
[](#f-droid-repository-mirror)
[](#ai-inference-providers)
[](#container-registries)
Ultra-high performance, secure, all-in-one open-source resource acceleration engine. Significantly outperforms traditional accelerators, providing unified and efficient acceleration across multiple platforms including code repositories, package managers, AI inference APIs, container images, models, and datasets.
## π― Quick Start
**Public Instance: `xget.xi-xu.me`** - Ready to use, no deployment required!
**URL Converter: [`xuc.xi-xu.me`](https://xuc.xi-xu.me)** - One-click conversion of any supported platform URL to Xget acceleration format!
> **β‘ Experience lightning-fast downloads instantly**: No registration, no configuration needed - just start using it to feel the blazing download speeds!
## π Core Advantages - Why Choose Xget?
### β‘ Extreme Performance - Breaking Traditional Accelerator Bottlenecks
- **β‘ Millisecond Response**: Cloudflare's global 330+ edge nodes with average response time < 50ms
- **π HTTP/3 Ultra-Fast Protocol**: Latest HTTP/3 protocol reduces connection latency by 40% and boosts transfer speed by 30%
- **π¦ Smart Multi-Layer Compression**: Triple compression with gzip, deflate, and brotli algorithms improves transfer efficiency by 60%
- **π Zero-Latency Pre-connection**: Connection warming and keep-alive eliminates handshake overhead for instant response
- **β‘ Parallel Chunked Downloads**: Full HTTP Range request support enables multi-threaded downloads with multiplied speeds
- **π― Intelligent Route Optimization**: Automatically selects optimal transfer paths, avoiding network congestion nodes
### π Deep Multi-Platform Integration
- **Unified Multi-Platform Support**: Single solution for code repositories, package managers, AI inference providers, container registries, and model/dataset hosting platforms
- **Smart Recognition & Transformation**: Automatically identifies platform prefixes and converts to correct target platform URL structures
- **Consistent Acceleration Experience**: Enjoy unified and stable ultra-fast download service regardless of file type or source
### π Enterprise-Grade Security
- **Multi-Layer Security Headers**:
- `Strict-Transport-Security`: Enforces HTTPS transport, prevents man-in-the-middle attacks
- `X-Frame-Options: DENY`: Prevents clickjacking attacks
- `X-XSS-Protection`: Built-in XSS protection mechanism
- `Content-Security-Policy`: Strict content security policy
- `Referrer-Policy`: Controls referrer information leakage
- **Request Validation Mechanism**:
- HTTP method whitelist: Regular requests limited to GET/HEAD, Git operations dynamically allow POST
- Path length limits: Prevents oversized URL attacks (max 2048 characters)
- Input sanitization: Prevents path traversal and injection attacks
- **Timeout Protection**: 30-second request timeout prevents resource exhaustion and malicious requests
### π Modern Architecture & Reliability
- **Smart Retry Mechanism**:
- Maximum 3 retries with linear delay strategy (1000ms Γ retry count)
- Automatic error recovery improves download success rate
- Timeout detection and interruption handling
- **Efficient Caching Strategy**:
- 1800 seconds (30 minutes) default cache duration significantly reduces origin server pressure
- Git operations bypass cache ensuring real-time updates
- Edge caching based on Cloudflare Cache API
- **Performance Monitoring System**:
- Built-in `PerformanceMonitor` class tracks request stage timing in real-time
- Detailed performance data via `X-Performance-Metrics` response header
- Cache hit rate statistics and optimization recommendations
### π― Full Git Protocol Compatibility
- **Smart Protocol Detection**:
- Automatically recognizes Git-specific endpoints (`/info/refs`, `/git-upload-pack`, `/git-receive-pack`)
- Detects Git client User-Agent patterns
- Supports query parameters like `service=git-upload-pack`
- **Complete Operation Support**:
- `git clone`: Full repository cloning with shallow clone and branch specification support
- `git push`: Code pushing and branch management
- `git pull/fetch`: Incremental updates and remote synchronization
- `git submodule`: Recursive submodule cloning
- **Protocol Optimization**:
- Preserves Git-specific request headers and authentication information
- Smart User-Agent handling (defaults to `git/2.34.1`)
- Supports Git LFS large file transfers
### π± Ecosystem Integration
- **Dedicated Browser Extensions**: [Xget Now](https://github.com/xixu-me/Xget-Now) provides seamless experience
- Automatic URL redirection without manual URL modification
- Custom Xget instance domain support
- Multi-platform preference settings and blacklist/whitelist management
- Local processing ensures privacy and security
- **Download Tool Compatibility**: Perfect support for wget, cURL, aria2, IDM, and other mainstream download tools
- **CI/CD Integration**: Direct usage in GitHub Actions, GitLab CI, and other environments
## π URL Transformation Rules
Using the public instance **`xget.xi-xu.me`** or your own deployed instance, simply replace the domain and add platform prefixes:
### Transformation Format
| Platform | Platform Prefix | Original URL Format | Accelerated URL Format |
|----------|----------------|-------------------|----------------------|
| GitHub | `gh` | `https://github.com/...` | `https://xget.xi-xu.me/gh/...` |
| GitLab | `gl` | `https://gitlab.com/...` | `https://xget.xi-xu.me/gl/...` |
| Gitea | `gitea` | `https://gitea.com/...` | `https://xget.xi-xu.me/gitea/...` |
| Codeberg | `codeberg` | `https://codeberg.org/...` | `https://xget.xi-xu.me/codeberg/...` |
| SourceForge | `sf` | `https://sourceforge.net/...` | `https://xget.xi-xu.me/sf/...` |
| AOSP | `aosp` | `https://android.googlesource.com/...` | `https://xget.xi-xu.me/aosp/...` |
| Hugging Face | `hf` | `https://huggingface.co/...` | `https://xget.xi-xu.me/hf/...` |
| Civitai | `civitai` | `https://civitai.com/...` | `https://xget.xi-xu.me/civitai/...` |
| npm | `npm` | `https://registry.npmjs.org/...` | `https://xget.xi-xu.me/npm/...` |
| PyPI | `pypi` | `https://pypi.org/...` | `https://xget.xi-xu.me/pypi/...` |
| conda | `conda` | `https://repo.anaconda.com/...` and `https://conda.anaconda.org/...` | `https://xget.xi-xu.me/conda/...` and `https://xget.xi-xu.me/conda/community/...` |
| Maven | `maven` | `https://repo1.maven.org/...` | `https://xget.xi-xu.me/maven/...` |
| Apache | `apache` | `https://downloads.apache.org/...` | `https://xget.xi-xu.me/apache/...` |
| Gradle | `gradle` | `https://plugins.gradle.org/...` | `https://xget.xi-xu.me/gradle/...` |
| Homebrew | `homebrew` | `https://github.com/Homebrew/...` | `https://xget.xi-xu.me/homebrew/...` |
| RubyGems | `rubygems` | `https://rubygems.org/...` | `https://xget.xi-xu.me/rubygems/...` |
| CRAN | `cran` | `https://cran.r-project.org/...` | `https://xget.xi-xu.me/cran/...` |
| CPAN | `cpan` | `https://www.cpan.org/...` | `https://xget.xi-xu.me/cpan/...` |
| CTAN | `ctan` | `https://tug.ctan.org/...` | `https://xget.xi-xu.me/ctan/...` |
| Go Modules | `golang` | `https://proxy.golang.org/...` | `https://xget.xi-xu.me/golang/...` |
| NuGet | `nuget` | `https://api.nuget.org/...` | `https://xget.xi-xu.me/nuget/...` |
| Rust Crates | `crates` | `https://crates.io/...` | `https://xget.xi-xu.me/crates/...` |
| Packagist | `packagist` | `https://repo.packagist.org/...` | `https://xget.xi-xu.me/packagist/...` |
| Debian | `debian` | `https://deb.debian.org/...` | `https://xget.xi-xu.me/debian/...` |
| Ubuntu | `ubuntu` | `https://archive.ubuntu.com/...` | `https://xget.xi-xu.me/ubuntu/...` |
| Fedora | `fedora` | `https://dl.fedoraproject.org/...` | `https://xget.xi-xu.me/fedora/...` |
| Rocky Linux | `rocky` | `https://download.rockylinux.org/...` | `https://xget.xi-xu.me/rocky/...` |
| openSUSE | `opensuse` | `https://download.opensuse.org/...` | `https://xget.xi-xu.me/opensuse/...` |
| Arch Linux | `arch` | `https://geo.mirror.pkgbuild.com/...` | `https://xget.xi-xu.me/arch/...` |
| arXiv | `arxiv` | `https://arxiv.org/...` | `https://xget.xi-xu.me/arxiv/...` |
| F-Droid | `fdroid` | `https://f-droid.org/...` | `https://xget.xi-xu.me/fdroid/...` |
| AI Inference Providers | `ip` | See [AI Inference Providers](#ai-inference-providers) | See [AI Inference Providers](#ai-inference-providers) |
| Container Registries | `cr` | See [Container Registries](#container-registries) | See [Container Registries](#container-registries) |
### Platform Transformation Examples
#### GitHub
```url
# Original URL
https://github.com/microsoft/vscode/archive/refs/heads/main.zip
# Transformed (add gh prefix)
https://xget.xi-xu.me/gh/microsoft/vscode/archive/refs/heads/main.zip
```
#### GitLab
```url
# Original URL
https://gitlab.com/gitlab-org/gitlab/-/archive/master/gitlab-master.zip
# Transformed (add gl prefix)
https://xget.xi-xu.me/gl/gitlab-org/gitlab/-/archive/master/gitlab-master.zip
```
#### Gitea
```url
# Original URL
https://gitea.com/gitea/gitea/archive/master.zip
# Transformed (add gitea prefix)
https://xget.xi-xu.me/gitea/gitea/gitea/archive/master.zip
```
#### Codeberg
```url
# Original URL
https://codeberg.org/forgejo/forgejo/archive/forgejo.zip
# Transformed (add codeberg prefix)
https://xget.xi-xu.me/codeberg/forgejo/forgejo/archive/forgejo.zip
```
#### SourceForge
```url
# Original URL
https://sourceforge.net/projects/sevenzip/files/7-Zip/23.01/7z2301-x64.exe/download
# Transformed (add sf prefix)
https://xget.xi-xu.me/sf/projects/sevenzip/files/7-Zip/23.01/7z2301-x64.exe/download
```
#### AOSP (Android Open Source Project)
```url
# AOSP project original URL
https://android.googlesource.com/platform/frameworks/base
# Transformed (add aosp prefix)
https://xget.xi-xu.me/aosp/platform/frameworks/base
# AOSP device tree original URL
https://android.googlesource.com/device/google/pixel
# Transformed (add aosp prefix)
https://xget.xi-xu.me/aosp/device/google/pixel
```
#### Hugging Face
```url
# Model file original URL
https://huggingface.co/microsoft/DialoGPT-medium/resolve/main/pytorch_model.bin
# Transformed (add hf prefix)
https://xget.xi-xu.me/hf/microsoft/DialoGPT-medium/resolve/main/pytorch_model.bin
# Dataset file original URL
https://huggingface.co/datasets/rajpurkar/squad/resolve/main/plain_text/train-00000-of-00001.parquet
# Transformed (add hf prefix)
https://xget.xi-xu.me/hf/datasets/rajpurkar/squad/resolve/main/plain_text/train-00000-of-00001.parquet
```
#### Civitai
```url
# AI model download original URL
https://civitai.com/api/download/models/128713
# Transformed (add civitai prefix)
https://xget.xi-xu.me/civitai/api/download/models/128713
# Model API original URL
https://civitai.com/api/v1/models/7240
# Transformed (add civitai prefix)
https://xget.xi-xu.me/civitai/api/v1/models/7240
# Model version API original URL
https://civitai.com/api/v1/model-versions/128713
# Transformed (add civitai prefix)
https://xget.xi-xu.me/civitai/api/v1/model-versions/128713
```
#### npm
```url
# Package file original URL
https://registry.npmjs.org/react/-/react-18.2.0.tgz
# Transformed (add npm prefix)
https://xget.xi-xu.me/npm/react/-/react-18.2.0.tgz
# Package metadata original URL
https://registry.npmjs.org/lodash
# Transformed (add npm prefix)
https://xget.xi-xu.me/npm/lodash
```
#### PyPI
```url
# Python package file original URL
https://pypi.org/packages/source/r/requests/requests-2.31.0.tar.gz
# Transformed (add pypi prefix)
https://xget.xi-xu.me/pypi/packages/source/r/requests/requests-2.31.0.tar.gz
# Wheel file original URL
https://pypi.org/packages/py3/r/requests/requests-2.31.0-py3-none-any.whl
# Transformed (add pypi prefix)
https://xget.xi-xu.me/pypi/packages/py3/r/requests/requests-2.31.0-py3-none-any.whl
```
#### conda
```url
# Default channel package file original URL
https://repo.anaconda.com/pkgs/main/linux-64/numpy-1.24.3-py311h08b1b3b_1.conda
# Transformed (add conda prefix)
https://xget.xi-xu.me/conda/pkgs/main/linux-64/numpy-1.24.3-py311h08b1b3b_1.conda
# Community channel metadata original URL
https://conda.anaconda.org/conda-forge/linux-64/repodata.json
# Transformed (add conda/community prefix)
https://xget.xi-xu.me/conda/community/conda-forge/linux-64/repodata.json
```
#### Maven
```url
# Maven Central repository JAR file original URL
https://repo1.maven.org/maven2/org/springframework/spring-core/5.3.21/spring-core-5.3.21.jar
# Transformed (add maven prefix)
https://xget.xi-xu.me/maven/maven2/org/springframework/spring-core/5.3.21/spring-core-5.3.21.jar
# Maven metadata original URL
https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/maven-metadata.xml
# Transformed (add maven prefix)
https://xget.xi-xu.me/maven/maven2/org/apache/commons/commons-lang3/maven-metadata.xml
```
#### Apache Software Downloads
```url
# Apache software download original URL
https://downloads.apache.org/kafka/3.6.1/kafka_2.13-3.6.1.tgz
# Transformed (add apache prefix)
https://xget.xi-xu.me/apache/kafka/3.6.1/kafka_2.13-3.6.1.tgz
# Apache Maven download original URL
https://downloads.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz
# Transformed (add apache prefix)
https://xget.xi-xu.me/apache/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz
# Apache Spark download original URL
https://downloads.apache.org/spark/spark-3.5.0/spark-3.5.0-bin-hadoop3.tgz
# Transformed (add apache prefix)
https://xget.xi-xu.me/apache/spark/spark-3.5.0/spark-3.5.0-bin-hadoop3.tgz
```
#### AI Inference Providers
Xget supports numerous mainstream AI inference providers with API acceleration using the `ip/[AI Provider Prefix]` format:
| AI Inference Provider | AI Provider Prefix | Original URL Format | Accelerated URL Format |
|----------------------|-------------------|-------------------|----------------------|
| OpenAI | `openai` | `https://api.openai.com/...` | `https://xget.xi-xu.me/ip/openai/...` |
| Anthropic | `anthropic` | `https://api.anthropic.com/...` | `https://xget.xi-xu.me/ip/anthropic/...` |
| Gemini | `gemini` | `https://generativelanguage.googleapis.com/...` | `https://xget.xi-xu.me/ip/gemini/...` |
| Vertex AI | `vertexai` | `https://aiplatform.googleapis.com/...` | `https://xget.xi-xu.me/ip/vertexai/...` |
| Cohere | `cohere` | `https://api.cohere.ai/...` | `https://xget.xi-xu.me/ip/cohere/...` |
| Mistral AI | `mistralai` | `https://api.mistral.ai/...` | `https://xget.xi-xu.me/ip/mistralai/...` |
| xAI | `xai` | `https://api.x.ai/...` | `https://xget.xi-xu.me/ip/xai/...` |
| GitHub Models | `githubmodels` | `https://models.github.ai/...` | `https://xget.xi-xu.me/ip/githubmodels/...` |
| NVIDIA API | `nvidiaapi` | `https://integrate.api.nvidia.com/...` | `https://xget.xi-xu.me/ip/nvidiaapi/...` |
| Perplexity | `perplexity` | `https://api.perplexity.ai/...` | `https://xget.xi-xu.me/ip/perplexity/...` |
| Groq | `groq` | `https://api.groq.com/...` | `https://xget.xi-xu.me/ip/groq/...` |
| Cerebras | `cerebras` | `https://api.cerebras.ai/...` | `https://xget.xi-xu.me/ip/cerebras/...` |
| SambaNova | `sambanova` | `https://api.sambanova.ai/...` | `https://xget.xi-xu.me/ip/sambanova/...` |
| HF Inference | `huggingface` | `https://router.huggingface.co/...` | `https://xget.xi-xu.me/ip/huggingface/...` |
| Together | `together` | `https://api.together.xyz/...` | `https://xget.xi-xu.me/ip/together/...` |
| Replicate | `replicate` | `https://api.replicate.com/...` | `https://xget.xi-xu.me/ip/replicate/...` |
| Fireworks | `fireworks` | `https://api.fireworks.ai/...` | `https://xget.xi-xu.me/ip/fireworks/...` |
| Nebius | `nebius` | `https://api.studio.nebius.ai/...` | `https://xget.xi-xu.me/ip/nebius/...` |
| Jina | `jina` | `https://api.jina.ai/...` | `https://xget.xi-xu.me/ip/jina/...` |
| Voyage AI | `voyageai` | `https://api.voyageai.com/...` | `https://xget.xi-xu.me/ip/voyageai/...` |
| Fal AI | `falai` | `https://fal.run/...` | `https://xget.xi-xu.me/ip/falai/...` |
| Novita | `novita` | `https://api.novita.ai/...` | `https://xget.xi-xu.me/ip/novita/...` |
| Burncloud | `burncloud` | `https://ai.burncloud.com/...` | `https://xget.xi-xu.me/ip/burncloud/...` |
| OpenRouter | `openrouter` | `https://openrouter.ai/...` | `https://xget.xi-xu.me/ip/openrouter/...` |
| Poe | `poe` | `https://api.poe.com/...` | `https://xget.xi-xu.me/ip/poe/...` |
| Featherless AI | `featherlessai` | `https://api.featherless.ai/...` | `https://xget.xi-xu.me/ip/featherlessai/...` |
| Hyperbolic | `hyperbolic` | `https://api.hyperbolic.xyz/...` | `https://xget.xi-xu.me/ip/hyperbolic/...` |
```url
# OpenAI API original URL
https://api.openai.com/v1/chat/completions
# Transformed (add ip/openai prefix)
https://xget.xi-xu.me/ip/openai/v1/chat/completions
# Anthropic API original URL
https://api.anthropic.com/v1/messages
# Transformed (add ip/anthropic prefix)
https://xget.xi-xu.me/ip/anthropic/v1/messages
# Gemini API original URL
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent
# Transformed (add ip/gemini prefix)
https://xget.xi-xu.me/ip/gemini/v1beta/models/gemini-2.5-flash:generateContent
# HF Inference API original URL
https://router.huggingface.co/hf-inference/models/openai/whisper-large-v3
# Transformed (add ip/huggingface prefix)
https://xget.xi-xu.me/ip/huggingface/hf-inference/models/openai/whisper-large-v3
```
Use cases are detailed in [AI Inference API Acceleration](#ai-inference-api-acceleration).
#### Container Registries
Xget supports multiple container registries using the `cr/[Container Registry Prefix]` format:
| Container Registry | Registry Prefix | Original URL Format | Accelerated URL Format |
|-------------------|----------------|-------------------|----------------------|
| Quay.io | `quay` | `https://quay.io/...` | `https://xget.xi-xu.me/cr/quay/...` |
| Google Container Registry | `gcr` | `https://gcr.io/...` | `https://xget.xi-xu.me/cr/gcr/...` |
| Microsoft Container Registry | `mcr` | `https://mcr.microsoft.com/...` | `https://xget.xi-xu.me/cr/mcr/...` |
| Amazon Public ECR | `ecr` | `https://public.ecr.aws/...` | `https://xget.xi-xu.me/cr/ecr/...` |
| GitHub Container Registry | `ghcr` | `https://ghcr.io/...` | `https://xget.xi-xu.me/cr/ghcr/...` |
| GitLab Container Registry | `gitlab` | `https://registry.gitlab.com/...` | `https://xget.xi-xu.me/cr/gitlab/...` |
| Red Hat Registry | `redhat` | `https://registry.redhat.io/...` | `https://xget.xi-xu.me/cr/redhat/...` |
| Oracle Container Registry | `oracle` | `https://container-registry.oracle.com/...` | `https://xget.xi-xu.me/cr/oracle/...` |
| Cloudsmith | `cloudsmith` | `https://docker.cloudsmith.io/...` | `https://xget.xi-xu.me/cr/cloudsmith/...` |
| DigitalOcean Registry | `digitalocean` | `https://registry.digitalocean.com/...` | `https://xget.xi-xu.me/cr/digitalocean/...` |
| VMware Registry | `vmware` | `https://projects.registry.vmware.com/...` | `https://xget.xi-xu.me/cr/vmware/...` |
| Kubernetes Registry | `k8s` | `https://registry.k8s.io/...` | `https://xget.xi-xu.me/cr/k8s/...` |
| Heroku Registry | `heroku` | `https://registry.heroku.com/...` | `https://xget.xi-xu.me/cr/heroku/...` |
| SUSE Registry | `suse` | `https://registry.suse.com/...` | `https://xget.xi-xu.me/cr/suse/...` |
| openSUSE Registry | `opensuse` | `https://registry.opensuse.org/...` | `https://xget.xi-xu.me/cr/opensuse/...` |
| Gitpod Registry | `gitpod` | `https://registry.gitpod.io/...` | `https://xget.xi-xu.me/cr/gitpod/...` |
```url
# GitHub Container Registry original URL
https://ghcr.io/v2/nginxinc/nginx-unprivileged/manifests/latest
# Transformed (add cr/ghcr prefix)
https://xget.xi-xu.me/cr/ghcr/v2/nginxinc/nginx-unprivileged/manifests/latest
# Google Container Registry original URL
https://gcr.io/v2/distroless/base/manifests/latest
# Transformed (add cr/gcr prefix)
https://xget.xi-xu.me/cr/gcr/v2/distroless/base/manifests/latest
```
Use cases are detailed in [Container Image Acceleration](#container-image-acceleration).
## π― Use Cases
### Git Operations & Configuration
Xget is fully compatible with Git protocol, supporting all standard Git operations with global acceleration configuration:
#### Git Operations
```bash
# Clone repository
git clone https://xget.xi-xu.me/gh/microsoft/vscode.git
# Clone specific branch
git clone -b main https://xget.xi-xu.me/gh/facebook/react.git
# Shallow clone (latest commit only)
git clone --depth 1 https://xget.xi-xu.me/gh/torvalds/linux.git
# Clone GitLab repository
git clone https://xget.xi-xu.me/gl/gitlab-org/gitlab.git
# Clone Gitea repository
git clone https://xget.xi-xu.me/gitea/gitea/gitea.git
# Clone Codeberg repository
git clone https://xget.xi-xu.me/codeberg/forgejo/forgejo.git
# Clone SourceForge repository
git clone https://xget.xi-xu.me/sf/projects/mingw-w64/code.git
# Clone AOSP repository
git clone https://xget.xi-xu.me/aosp/platform/frameworks/base.git
# Add remote repository
git remote add upstream https://xget.xi-xu.me/gh/[owner]/[repository].git
# Pull updates
git pull https://xget.xi-xu.me/gh/microsoft/vscode.git main
# Recursive submodule clone
git clone --recursive https://xget.xi-xu.me/gh/[username]/[repository-with-submodules].git
```
#### Git Global Acceleration Configuration
```bash
# Configure Git to use Xget for specific domains
git config --global url."https://xget.xi-xu.me/gh/".insteadOf "https://github.com/"
git config --global url."https://xget.xi-xu.me/gl/".insteadOf "https://gitlab.com/"
git config --global url."https://xget.xi-xu.me/gitea/".insteadOf "https://gitea.com/"
git config --global url."https://xget.xi-xu.me/codeberg/".insteadOf "https://codeberg.org/"
git config --global url."https://xget.xi-xu.me/sf/".insteadOf "https://sourceforge.net/"
git config --global url."https://xget.xi-xu.me/aosp/".insteadOf "https://android.googlesource.com/"
# Verify configuration
git config --global --get-regexp url
# Now all git clone operations for relevant platforms will automatically use Xget acceleration
git clone https://github.com/microsoft/vscode.git # Automatically converted to Xget URL
git clone https://gitlab.com/gitlab-org/gitlab.git # Automatically converted to Xget URL
git clone https://codeberg.org/forgejo/forgejo.git # Automatically converted to Xget URL
git clone https://android.googlesource.com/platform/frameworks/base.git # Automatically converted to Xget URL
```
### Mainstream Download Tool Integration
#### wget Downloads
```bash
# Download single file
wget https://xget.xi-xu.me/gh/microsoft/vscode/archive/refs/heads/main.zip
# Resume download
wget -c https://xget.xi-xu.me/hf/microsoft/DialoGPT-large/resolve/main/pytorch_model.bin
# Batch download
wget -i urls.txt # urls.txt contains multiple Xget URLs
```
#### cURL Downloads
```bash
# Basic download
curl -L -O https://xget.xi-xu.me/gh/golang/go/archive/refs/tags/go1.22.0.tar.gz
# Show progress bar
curl -L --progress-bar -o model.bin https://xget.xi-xu.me/hf/openai/whisper-large-v3/resolve/main/pytorch_model.bin
# Set user agent
curl -L -H "User-Agent: MyApp/1.0" https://xget.xi-xu.me/gl/gitlab-org/gitlab-runner/-/archive/main/gitlab-runner-main.zip
```
#### aria2 Multi-threaded Downloads
```bash
# Multi-threaded download for large files
aria2c -x 16 -s 16 https://xget.xi-xu.me/hf/microsoft/DialoGPT-large/resolve/main/pytorch_model.bin
# Resume download
aria2c -c https://xget.xi-xu.me/gh/microsoft/vscode/archive/refs/heads/main.zip
# Batch download with config file
aria2c -i download-list.txt # File containing multiple Xget URLs
```
### Hugging Face Mirror
```python
import os
from transformers import AutoTokenizer, AutoModelForCausalLM
# Set environment variable to make transformers library automatically use Xget mirror
os.environ['HF_ENDPOINT'] = 'https://xget.xi-xu.me/hf'
# Define model name
model_name = 'microsoft/DialoGPT-medium'
print(f"Downloading model from mirror: {model_name}")
# Use AutoModelForCausalLM to load dialogue generation model
# No additional parameters needed due to environment variable setting above
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
print("Model and tokenizer loaded successfully!")
# You can now use the tokenizer and model
# For example:
# new_user_input_ids = tokenizer.encode("Hello, how are you?", return_tensors='pt')
# chat_history_ids = model.generate(new_user_input_ids, max_length=1000, pad_token_id=tokenizer.eos_token_id)
# print(tokenizer.decode(chat_history_ids[:, new_user_input_ids.shape[-1]:][0], skip_special_tokens=True))
```
### Civitai AI Model Platform
```python
import requests
# Set API base URL to use Xget acceleration
base_url = "https://xget.xi-xu.me/civitai"
# Get model information
def get_model_info(model_id):
"""Retrieve Civitai model information"""
url = f"{base_url}/api/v1/models/{model_id}"
response = requests.get(url)
return response.json()
# Download model
def download_model(model_version_id, output_path):
"""Download Civitai model file"""
download_url = f"{base_url}/api/download/models/{model_version_id}"
print(f"Downloading model version {model_version_id}...")
response = requests.get(download_url, stream=True)
response.raise_for_status()
with open(output_path, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print(f"Model downloaded to: {output_path}")
# Usage example
model_id = 7240 # Example model ID
model_info = get_model_info(model_id)
print(f"Model name: {model_info['name']}")
# Download the first model version
if model_info['modelVersions']:
version_id = model_info['modelVersions'][0]['id']
download_model(version_id, f"model_{version_id}.safetensors")
```
### npm Package Acceleration
#### Configure npm to use Xget mirror
```bash
# Temporarily use Xget mirror
npm install --registry https://xget.xi-xu.me/npm/
# Globally configure npm mirror
npm config set registry https://xget.xi-xu.me/npm/
# Verify configuration
npm config get registry
```
#### Project-level usage
```bash
# Configure project-level mirror in .npmrc file
echo "registry=https://xget.xi-xu.me/npm/" > .npmrc
# Install dependencies
npm install
# Or use yarn
yarn config set registry https://xget.xi-xu.me/npm/
yarn install
```
### Python Package Acceleration
#### Configure pip to use Xget mirror
```bash
# Temporarily use Xget mirror
pip install requests -i https://xget.xi-xu.me/pypi/simple/
# Globally configure pip mirror
pip config set global.index-url https://xget.xi-xu.me/pypi/simple/
pip config set global.trusted-host xget.xi-xu.me
# Verify configuration
pip config list
```
#### Project-level usage
```bash
# Create pip.conf file (Linux/macOS)
mkdir -p ~/.pip
cat > ~/.pip/pip.conf << EOF
[global]
index-url = https://xget.xi-xu.me/pypi/simple/
trusted-host = xget.xi-xu.me
EOF
# Or create pip.conf in project root directory
cat > pip.conf << EOF
[global]
index-url = https://xget.xi-xu.me/pypi/simple/
trusted-host = xget.xi-xu.me
EOF
# Install using config file
pip install -r requirements.txt --config-file pip.conf
```
#### Specify mirror in requirements.txt
```txt
# requirements.txt
--index-url https://xget.xi-xu.me/pypi/simple/
--trusted-host xget.xi-xu.me
requests>=2.25.0
numpy>=1.21.0
pandas>=1.3.0
matplotlib>=3.4.0
```
### conda Package Acceleration
#### Configure conda to use Xget mirror
```bash
# Configure default channel mirrors
conda config --add default_channels https://xget.xi-xu.me/conda/pkgs/msys2
conda config --add default_channels https://xget.xi-xu.me/conda/pkgs/r
conda config --add default_channels https://xget.xi-xu.me/conda/pkgs/main
# Configure all community channel mirrors (recommended)
conda config --set channel_alias https://xget.xi-xu.me/conda/community
# Or configure specific community channels
conda config --add channels https://xget.xi-xu.me/conda/community/conda-forge
conda config --add channels https://xget.xi-xu.me/conda/community/bioconda
# Set channel priority
conda config --set channel_priority strict
# Verify configuration
conda config --show
```
#### Configure in .condarc
The .condarc file can be placed in the user home directory (`~/.condarc`) or project root:
```yaml
default_channels:
- https://xget.xi-xu.me/conda/pkgs/main
- https://xget.xi-xu.me/conda/pkgs/r
- https://xget.xi-xu.me/conda/pkgs/msys2
channel_alias: https://xget.xi-xu.me/conda/community
channel_priority: strict
show_channel_urls: true
```
#### Using environment files
Environment files can directly specify complete mirror URLs:
```yaml
# environment.yml
name: myproject
channels:
- https://xget.xi-xu.me/conda/pkgs/main
- https://xget.xi-xu.me/conda/pkgs/r
- https://xget.xi-xu.me/conda/community/bioconda
- https://xget.xi-xu.me/conda/community/conda-forge
dependencies:
- python=3.11
- numpy>=1.24.0
- pandas>=2.0.0
- matplotlib>=3.7.0
- scipy>=1.10.0
- pip
- pip:
- requests>=2.28.0
```
```bash
# Create environment using environment file
conda env create -f environment.yml
# Update environment
conda env update -f environment.yml
```
### Maven Package Acceleration
#### Configure Maven to use Xget mirror
```xml