This commit deletes the configuration for npm dependency updates in .github/dependabot.yml, leaving only GitHub Actions workflow updates. This streamlines automated dependency management to focus on GitHub Actions.
Xget
An ultra-high-performance, secure, all-in-one acceleration engine for developer resources whose performance far surpasses traditional accelerators, delivering a unified, efficient acceleration experience across multiple platforms, including code repositories, package management, AI inference APIs, container images, models and datasets, and more.
The technical in-depth analysis article has been posted: A Deep Dive into Xget: A High-Performance, Multi-Protocol, and Secure Acceleration Engine for Developer Resources.
🎯 Quick Start
Pre-deployed instances (no reliability guaranteed): xget.xi-xu.me - Out of the box, no deployment required!
URL Converter:xuc.xi-xu.me - One-click conversion of any URL that supports the platform to an accelerated format of Xget!
⚡ Experience the fast download now: No registration required, no configuration required, you can experience the average download speed directly!
🌟 Core Advantages — Why Choose Xget?
⚡ Blazing Performance — Breaking Traditional Bottlenecks
- ⚡ Millisecond response: Cloudflare Global 330+ edge nodes, average response time < 50ms
- 🌐 HTTP/3 Extreme Speed Protocol: Enable the latest HTTP/3 protocol, reduce connection latency by 40%, and increase transmission speed by 30%.
- 📦 Intelligent Multiple Compression: gzip, deflate, brotli triple compression algorithm, transmission efficiency is improved by 60%
- 🔗 Zero-delay pre-connection: Connection warms up and stays active, eliminates handshake overhead, and achieves second-level response
- ⚡ Parallel shard download: Full support for HTTP Range requests, multi-threaded download speed doubles
- 🎯 Intelligent routing optimization: Automatically select the optimal transmission path to avoid network congestion nodes
🌐 Deep Multi-Platform Integration
- One-stop multi-platform support: Unified support for code repository, package manager, AI inference provider, container registry, model and dataset hosting platform
- Intelligent recognition and conversion: Automatically identify the platform prefix and convert it to the correct URL structure for the target platform
- Consistent acceleration experience: You can enjoy a unified and stable and fast download experience regardless of file type or source
🔒 Enterprise-Grade Security
- Multi-layer security header:
Strict-Transport-Security: Force HTTPS transmission to prevent man-in-the-middle attacksX-Frame-Options: DENY: Prevent click hijacking attacksX-XSS-Protection: Built-in XSS protection mechanismContent-Security-Policy: Strict Content Security PolicyReferrer-Policy: Controlling the leakage of reference information
- Request verification mechanism:
- HTTP method whitelist: General requests are limited to GET/HEAD, Git operations dynamically allow POST
- Path length limit: Prevents excessively long URL attacks (maximum 2048 characters)
- Input Cleanup: Prevent path traversal and injection attacks
- Timeout Protection: 30-second request timeout to prevent resource exhaustion and malicious requests
🚀 Modern Architecture and Reliability
- Intelligent retry mechanism:
- Maximum 3 retry, linear delay strategy (1000ms × retry times)
- Automatic error recovery to improve download success rate
- Timeout detection and interrupt handling
- Efficient Caching Policy:
- 1800 seconds (30 minutes) default cache time, significantly reducing source station pressure
- Git operation skips cache to ensure real-time
- Edge Cache Based on Cloudflare Cache API
- Performance Monitoring System:
- Built-in
PerformanceMonitorclass, real-time tracking of requests for each stage - Provide detailed performance data through the
X-Performance-Metricsresponse header - Support cache hit rate statistics and optimization suggestions
- Built-in
🎯 Full Git Protocol Compatibility
- Smart Protocol Detection:
- Automatically identify Git-specific endpoints (
/info/refs,/git-upload-pack,/git-receive-pack) - Detect Git client User-Agent mode
- Support
service=git-upload-packand other query parameters
- Automatically identify Git-specific endpoints (
- Full operation support:
git clone: Full repository clone, support for shallow clones and branch specificationsgit push: Code push and branch managementgit pull/fetch: incremental update and remote synchronizationgit submodule: submodule recursive cloning
- Protocol Optimization:
- Keep Git-specific request headers and authentication information
- Intelligent User-Agent processing (default
git/2.34.1) - Support Git LFS large file transfer
📱 Ecosystem Integration
- Special browser extension: Xget Now provides a seamless experience
- Automatic URL redirection without manual URL modification
- Support custom Xget instance domain names
- Multi-platform preferences and black and white list management
- Local processing to ensure privacy and security
- Download tool compatible: Perfectly support mainstream download tools such as wget, cURL, aria2, IDM, etc.
- CI/CD integration: Can be used directly in GitHub Actions, GitLab CI and other environments
📖 URL Conversion Rules
Using pre-deployed instances xget.xi-xu.me or your own deployed instance, simply replace the domain name and add the platform prefix:
Convert 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 module | 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/... |
| Jenkins plugin | jenkins |
https://updates.jenkins.io/... |
https://xget.xi-xu.me/jenkins/... |
| AI Inference Provider | ip |
See [AI Inference Provider](#ai-Inference Provider) | See [AI Inference Provider](#ai-Inference Provider) |
| Container Registration | cr |
See [Container Registration] (#Container Registration) | See [Container Registration] (#Container Registration) |
Examples of conversion of each platform
GitHub
# Original URL
https://github.com/microsoft/vscode/archive/refs/heads/main.zip
# After conversion (add gh prefix)
https://xget.xi-xu.me/gh/microsoft/vscode/archive/refs/heads/main.zip
GitLab
# Original URL
https://gitlab.com/gitlab-org/gitlab/-/archive/master/gitlab-master.zip
# After conversion (add gl prefix)
https://xget.xi-xu.me/gl/gitlab-org/gitlab/-/archive/master/gitlab-master.zip
Gitea
# Original URL
https://gitea.com/gitea/gitea/archive/master.zip
# After conversion (add gitea prefix)
https://xget.xi-xu.me/gitea/gitea/gitea/archive/master.zip
Codeberg
# Original URL
https://codeberg.org/forgejo/forgejo/archive/forgejo.zip
# After conversion (add codeberg prefix)
https://xget.xi-xu.me/codeberg/forgejo/forgejo/archive/forgejo.zip
SourceForge
# Original URL
https://sourceforge.net/projects/sevenzip/files/7-Zip/23.01/7z2301-x64.exe/download
# After conversion (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)
# AOSP project original URL
https://android.googlesource.com/platform/frameworks/base
# After conversion (add aosp prefix)
https://xget.xi-xu.me/aosp/platform/frameworks/base
# AOSP Device Tree Original URL
https://android.googlesource.com/device/google/pixel
# After conversion (add aosp prefix)
https://xget.xi-xu.me/aosp/device/google/pixel
Hugging Face
# Original URL of model file
https://huggingface.co/microsoft/DialoGPT-medium/resolve/main/pytorch_model.bin
# After conversion (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
# After conversion (add hf prefix)
https://xget.xi-xu.me/hf/datasets/rajpurkar/squad/resolve/main/plain_text/train-00000-of-00001.parquet
Civitai
# AI model download original URL
https://civitai.com/api/download/models/128713
# After conversion (add civitai prefix)
https://xget.xi-xu.me/civitai/api/download/models/128713
# Model API Original URL
https://civitai.com/api/v1/models/7240
# After conversion (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
# After conversion (add civitai prefix)
https://xget.xi-xu.me/civitai/api/v1/model-versions/128713
npm
# Original URL of package file
https://registry.npmjs.org/react/-/react-18.2.0.tgz
# After conversion (add npm prefix)
https://xget.xi-xu.me/npm/react/-/react-18.2.0.tgz
# Package metadata original URL
https://registry.npmjs.org/lodash
# After conversion (add npm prefix)
https://xget.xi-xu.me/npm/lodash
PyPI
# Python package file original URL
https://pypi.org/packages/source/r/requests/requests-2.31.0.tar.gz
# After conversion (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
# After conversion (add pypi prefix)
https://xget.xi-xu.me/pypi/packages/py3/r/requests/requests-2.31.0-py3-none-any.whl
conda
# The default channel package file original URL
https://repo.anaconda.com/pkgs/main/linux-64/numpy-1.24.3-py311h08b1b3b_1.conda
# After conversion (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
# After conversion (add conda/community prefix)
https://xget.xi-xu.me/conda/community/conda-forge/linux-64/repodata.json
Maven
# 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
# After conversion (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 raw URL
https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/maven-metadata.xml
# After conversion (add maven prefix)
https://xget.xi-xu.me/maven/maven2/org/apache/commons/commons-lang3/maven-metadata.xml
Apache software download
# Apache software download original URL
https://downloads.apache.org/kafka/3.6.1/kafka_2.13-3.6.1.tgz
# After conversion (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
# After conversion (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
# After conversion (add apache prefix)
https://xget.xi-xu.me/apache/spark/spark-3.5.0/spark-3.5.0-bin-hadoop3.tgz
Gradle
# Gradle plugin portal JAR file original URL
https://plugins.gradle.org/m2/org/gradle/gradle-hello-world-plugin/0.2/gradle-hello-world-plugin-0.2.jar
# After conversion (add gradle prefix)
https://xget.xi-xu.me/gradle/m2/org/gradle/gradle-hello-world-plugin/0.2/gradle-hello-world-plugin-0.2.jar
# Gradle plugin metadata raw URL
https://plugins.gradle.org/m2/com/github/ben-manes/gradle-versions-plugin/0.51.0/gradle-versions-plugin-0.51.0.module
# After conversion (add gradle prefix)
https://xget.xi-xu.me/gradle/m2/com/github/ben-manes/gradle-versions-plugin/0.51.0/gradle-versions-plugin-0.51.0.module
Homebrew
# Homebrew Formula Repository Original URL
https://github.com/Homebrew/homebrew-core/raw/HEAD/Formula/g/git.rb
# After conversion (add homebrew prefix)
https://xget.xi-xu.me/homebrew/homebrew-core/raw/HEAD/Formula/g/git.rb
# Homebrew API Original URL
https://formulae.brew.sh/api/formula/git.json
# After conversion (add homebrew/api prefix)
https://xget.xi-xu.me/homebrew/api/formula/git.json
# Homebrew Bottles Original URL
https://ghcr.io/v2/homebrew/core/git/manifests/2.39.0
# After conversion (add homebrew/bottles prefix)
https://xget.xi-xu.me/homebrew/bottles/v2/homebrew/core/git/manifests/2.39.0
RubyGems
# RubyGems package file original URL
https://rubygems.org/gems/rails-7.0.4.gem
# After conversion (add rubygems prefix)
https://xget.xi-xu.me/rubygems/gems/rails-7.0.4.gem
# RubyGems API Original URL
https://rubygems.org/api/v1/gems/nokogiri.json
# After conversion (add rubygems prefix)
https://xget.xi-xu.me/rubygems/api/v1/gems/nokogiri.json
CRAN
# CRAN package file original URL
https://cran.r-project.org/src/contrib/ggplot2_3.5.2.tar.gz
# After conversion (add cran prefix)
https://xget.xi-xu.me/cran/src/contrib/ggplot2_3.5.2.tar.gz
# CRAN package metadata raw URL
https://cran.r-project.org/web/packages/dplyr/DESCRIPTION
# After conversion (add cran prefix)
https://xget.xi-xu.me/cran/web/packages/dplyr/DESCRIPTION
CPAN (Perl Package Management)
# CPAN module original URL
https://www.cpan.org/modules/by-module/DBI/DBI-1.643.tar.gz
# After conversion (add cpan prefix)
https://xget.xi-xu.me/cpan/modules/by-module/DBI/DBI-1.643.tar.gz
# CPAN Author Package Original URL
https://www.cpan.org/authors/id/T/TI/TIMB/DBI-1.643.tar.gz
# After conversion (add cpan prefix)
https://xget.xi-xu.me/cpan/authors/id/T/TI/TIMB/DBI-1.643.tar.gz
CTAN (TeX/LaTeX Package Management)
# CTAN package file original URL
https://tug.ctan.org/tex-archive/macros/latex/contrib/beamer.zip
# After conversion (add ctan prefix)
https://xget.xi-xu.me/ctan/tex-archive/macros/latex/contrib/beamer.zip
# CTAN font file original URL
https://tug.ctan.org/tex-archive/fonts/cm/pk/ljfour/public/cm/dpi600/cmr10.pk
# After conversion (add ctan prefix)
https://xget.xi-xu.me/ctan/tex-archive/fonts/cm/pk/ljfour/public/cm/dpi600/cmr10.pk
Go module
# Go module proxy original URL
https://proxy.golang.org/github.com/gin-gonic/gin/@v/v1.9.1.zip
# After conversion (add golang prefix)
https://xget.xi-xu.me/golang/github.com/gin-gonic/gin/@v/v1.9.1.zip
# Go module information original URL
https://proxy.golang.org/github.com/gorilla/mux/@v/list
# After conversion (add golang prefix)
https://xget.xi-xu.me/golang/github.com/gorilla/mux/@v/list
NuGet
# NuGet package download original URL
https://api.nuget.org/v3-flatcontainer/newtonsoft.json/13.0.3/newtonsoft.json.13.0.3.nupkg
# After conversion (add nuget prefix)
https://xget.xi-xu.me/nuget/v3-flatcontainer/newtonsoft.json/13.0.3/newtonsoft.json.13.0.3.nupkg
# NuGet package metadata raw URL
https://api.nuget.org/v3/registration5-semver1/microsoft.aspnetcore.app/index.json
# After conversion (add nuget prefix)
https://xget.xi-xu.me/nuget/v3/registration5-semver1/microsoft.aspnetcore.app/index.json
Rust Crates
# Crate Download Original URL
https://crates.io/api/v1/crates/serde/1.0.0/download
# After conversion (add crates prefix)
https://xget.xi-xu.me/crates/serde/1.0.0/download
# Crate metadata raw URL
https://crates.io/api/v1/crates/serde
# After conversion (add crates prefix)
https://xget.xi-xu.me/crates/serde
# Crate Search for original URL
https://crates.io/api/v1/crates?q=serde
# After conversion (add crates prefix)
https://xget.xi-xu.me/crates/?q=serde
Packagist
# Packagist package metadata raw URL
https://repo.packagist.org/p2/symfony/console.json
# After conversion (add packagist prefix)
https://xget.xi-xu.me/packagist/p2/symfony/console.json
# Packagist package list original URL
https://repo.packagist.org/packages/list.json
# After conversion (add packagist prefix)
https://xget.xi-xu.me/packagist/packages/list.json
Linux Distribution
# Debian package original URL
https://deb.debian.org/debian/pool/main/c/curl/curl_7.88.1-10+deb12u4_amd64.deb
# After conversion (add debian prefix)
https://xget.xi-xu.me/debian/debian/pool/main/c/curl/curl_7.88.1-10+deb12u4_amd64.deb
# Ubuntu package original URL
https://archive.ubuntu.com/ubuntu/pool/main/g/git/git_2.34.1-1ubuntu1.9_amd64.deb
# After conversion (add ubuntu prefix)
https://xget.xi-xu.me/ubuntu/ubuntu/pool/main/g/git/git_2.34.1-1ubuntu1.9_amd64.deb
# Fedora package original URL
https://dl.fedoraproject.org/pub/fedora/linux/releases/39/Everything/x86_64/os/Packages/n/nginx-1.24.0-1.fc39.x86_64.rpm
# After conversion (adding fedora prefix)
https://xget.xi-xu.me/fedora/pub/fedora/linux/releases/39/Everything/x86_64/os/Packages/n/nginx-1.24.0-1.fc39.x86_64.rpm
# Rocky Linux package original URL
https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/b/bash-5.1.8-6.el9.x86_64.rpm
# After conversion (add rocky prefix)
https://xget.xi-xu.me/rocky/pub/rocky/9/BaseOS/x86_64/os/Packages/b/bash-5.1.8-6.el9.x86_64.rpm
# openSUSE package original URL
https://download.opensuse.org/distribution/leap/15.5/repo/oss/x86_64/vim-9.0.1572-150500.20.8.1.x86_64.rpm
# After conversion (add opensuse prefix)
https://xget.xi-xu.me/opensuse/distribution/leap/15.5/repo/oss/x86_64/vim-9.0.1572-150500.20.8.1.x86_64.rpm
# Arch Linux package original URL
https://geo.mirror.pkgbuild.com/core/os/x86_64/linux-6.6.10.arch1-1-x86_64.pkg.tar.zst
# After conversion (add arch prefix)
https://xget.xi-xu.me/arch/core/os/x86_64/linux-6.6.10.arch1-1-x86_64.pkg.tar.zst
arXiv
# arXiv Paper PDF Original URL
https://arxiv.org/pdf/2301.07041.pdf
# After conversion (add arxiv prefix)
https://xget.xi-xu.me/arxiv/pdf/2301.07041.pdf
# arXiv paper source code original URL
https://arxiv.org/e-print/2301.07041
# After conversion (add arxiv prefix)
https://xget.xi-xu.me/arxiv/e-print/2301.07041
F-Droid
# F-Droid App APK Original URL
https://f-droid.org/repo/org.fdroid.fdroid_1016050.apk
# After conversion (add fdroid prefix)
https://xget.xi-xu.me/fdroid/repo/org.fdroid.fdroid_1016050.apk
# F-Droid application metadata raw URL
https://f-droid.org/api/v1/packages/org.fdroid.fdroid
# After conversion (add fdroid prefix)
https://xget.xi-xu.me/fdroid/api/v1/packages/org.fdroid.fdroid
Jenkins plugin
# Jenkins Update Center Original URL
https://updates.jenkins.io/update-center.json
# After conversion (add jenkins prefix)
https://xget.xi-xu.me/jenkins/update-center.json
# Jenkins plugin download original URL
https://updates.jenkins.io/download/plugins/maven-plugin/3.27/maven-plugin.hpi
# After conversion (add jenkins prefix)
https://xget.xi-xu.me/jenkins/download/plugins/maven-plugin/3.27/maven-plugin.hpi
AI Inference Providers
Xget supports API acceleration for many mainstream AI inference providers, using the ip/[AI inference provider prefix] format:
| AI Inference Provider | AI Inference 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/... |
| Siray | siray |
https://api.siray.ai/... |
https://xget.xi-xu.me/ip/siray/... |
| 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/... |
# OpenAI API Original URL
https://api.openai.com/v1/chat/completions
# After conversion (add ip/openai prefix)
https://xget.xi-xu.me/ip/openai/v1/chat/completions
# Anthropic API Original URL
https://api.anthropic.com/v1/messages
# After conversion (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
# After conversion (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
# After conversion (add ip/huggingface prefix)
https://xget.xi-xu.me/ip/huggingface/hf-inference/models/openai/whisper-large-v3
For application scenarios, see AI Inference API Acceleration.
Container Registries
Xget supports multiple container registries, using the cr/[Container registry prefix] format:
| Container Registry | Container 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 Elastic Container Registration | 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 Registration | 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 Registration | 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 Registration | heroku |
https://registry.heroku.com/... |
https://xget.xi-xu.me/cr/heroku/... |
| SUSE Registration | suse |
https://registry.suse.com/... |
https://xget.xi-xu.me/cr/suse/... |
| openSUSE Registration | 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/... |
# GitHub Container Registration Original URL
https://ghcr.io/v2/nginxinc/nginx-unprivileged/manifests/latest
# After conversion (add cr/ghcr prefix)
https://xget.xi-xu.me/cr/ghcr/v2/nginxinc/nginx-unprivileged/manifests/latest
# Google Container Registration Original URL
https://gcr.io/v2/distroless/base/manifests/latest
# After conversion (add cr/gcr prefix)
https://xget.xi-xu.me/cr/gcr/v2/distroless/base/manifests/latest
For application scenarios, see [Container Mirror Acceleration] (#Container Mirror Acceleration).
🎯 Application Scenarios
Git Operations and Configuration
Git Operation
# Clone the repository
git clone https://xget.xi-xu.me/gh/microsoft/vscode.git
# Clone the specified branch
git clone -b main https://xget.xi-xu.me/gh/facebook/react.git
# shallow clone (last latest submissions only)
git clone --depth 1 https://xget.xi-xu.me/gh/torvalds/linux.git
# Clone the GitLab repository
git clone https://xget.xi-xu.me/gl/gitlab-org/gitlab.git
# Clone the Git 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 a remote repository
git remote add upstream https://xget.xi-xu.me/gh/[owner]/[repository].git
# Pull update
git pull https://xget.xi-xu.me/gh/microsoft/vscode.git main
# Submodule recursive cloning
git clone --recursive https://xget.xi-xu.me/gh/[username]/[repository-with-submodules].git
Git global acceleration configuration
# Configure Git for a specific domain name using Xget
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 clones on related platforms will automatically use Xget
git clone https://github.com/microsoft/vscode.git # Automatically converted to an Xget URL
git clone https://gitlab.com/gitlab-org/gitlab.git # Automatically converted to an Xget URL
git clone https://codeberg.org/forgejo/forgejo.git # Automatically converted to an Xget URL
git clone https://android.googlesource.com/platform/frameworks/base.git # Automatically converted to an Xget URL
Mainstream download tool integration
wget download
# Download a single file
wget https://xget.xi-xu.me/gh/microsoft/vscode/archive/refs/heads/main.zip
# Breakpoint continuous transmission
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 Download
# 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 up 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 download
# Download large files from multiple threads
aria2c -x 16 -s 16 https://xget.xi-xu.me/hf/microsoft/DialoGPT-large/resolve/main/pytorch_model.bin
# Breakpoint continuous transmission
aria2c -c https://xget.xi-xu.me/gh/microsoft/vscode/archive/refs/heads/main.zip
# Download configuration files in batches
aria2c -i download-list.txt # file containing multiple Xget URLs
Hugging Face Mirror
import os
from transformers import AutoTokenizer, AutoModelForCausalLM
# Set environment variables so that the transformers library automatically uses Xget images
os.environ['HF_ENDPOINT'] = 'https://xget.xi-xu.me/hf'
# Define the model name
model_name = 'microsoft/DialoGPT-medium'
print(f"Downloading model from mirror: {model_name}")
# Use AutoModelForCausalLM to load conversation generation models
# Since the environment variable is set above, no additional parameters need to be added here
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
print("Model and tokenizer loaded successfully!")
# You can now use 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
import requests
# Setting up API Basic URL Use Xget
base_url = "https://xget.xi-xu.me/civitai"
# Get model information
def get_model_info(model_id):
"""Fetch Civitai model metadata"""
url = f"{base_url}/api/v1/models/{model_id}"
response = requests.get(url)
return response.json()
# Download the model
def download_model(model_version_id, output_path):
"""Download the 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 saved to: {output_path}")
# Example of usage
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 management acceleration
Configure npm using Xget mirroring
# Temporary use of Xget mirrors
npm install --registry https://xget.xi-xu.me/npm/
# Global configuration npm mirroring
npm config set registry https://xget.xi-xu.me/npm/
# Verify configuration
npm config get registry
Use in the project
# Configure project-level mirroring in .npmrc file
echo "registry=https://xget.xi-xu.me/npm/" > .npmrc
# Installation dependencies
npm install
# Or use yarn
yarn config set registry https://xget.xi-xu.me/npm/
yarn install
Python package management acceleration
Configure pip using Xget mirroring
# Temporary use of Xget mirrors
pip install requests -i https://xget.xi-xu.me/pypi/simple/
# Global configuration pip mirroring
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
Use in the project
# Create a 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 the 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 configuration files
pip install -r requirements.txt --config-file pip.conf
Specify the image in requirements.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 management acceleration
Configure conda using Xget mirroring
# Configure the default channel mirroring
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 images (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's home directory (~/.condarc) or in the project root directory:
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
Use environment files
The complete image URL can be directly specified in the environment file:
# 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
# Create an environment using environment files
conda env create -f environment.yml
# Update the environment
conda env update -f environment.yml
Maven package management acceleration
Configure Maven to use Xget mirroring
<!-- Configure the Maven mirror in ~/.m2/settings.xml -->
<settings>
<mirrors>
<mirror>
<id>xget-maven-central</id>
<mirrorOf>central</mirrorOf>
<name>Xget Maven Central Mirror</name>
<url>https://xget.xi-xu.me/maven/maven2</url>
</mirror>
</mirrors>
</settings>
Use in the project
<!-- Configure project-level mirrors in pom.xml -->
<project>
<repositories>
<repository>
<id>xget-maven-central</id>
<name>Xget Maven Central</name>
<url>https://xget.xi-xu.me/maven/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>xget-maven-central</id>
<name>Xget Maven Central</name>
<url>https://xget.xi-xu.me/maven/maven2</url>
</pluginRepository>
</pluginRepositories>
</project>
# Specify the image using the command line
mvn clean install -Dmaven.repo.remote=https://xget.xi-xu.me/maven/maven2
# Download specific dependencies
mvn dependency:get -Dartifact=org.springframework:spring-core:5.3.21 \
-DremoteRepositories=https://xget.xi-xu.me/maven/maven2
Apache software download acceleration
Download Apache software using Xget
# Download Apache Kafka
wget https://xget.xi-xu.me/apache/kafka/3.6.1/kafka_2.13-3.6.1.tgz
# Download Apache Maven
curl -L -O https://xget.xi-xu.me/apache/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz
# Download Apache Spark
aria2c https://xget.xi-xu.me/apache/spark/spark-3.5.0/spark-3.5.0-bin-hadoop3.tgz
# Download Apache Hadoop
wget https://xget.xi-xu.me/apache/hadoop/common/hadoop-3.3.6/hadoop-3.3.6.tar.gz
# Download Apache Flink
curl -L -O https://xget.xi-xu.me/apache/flink/flink-1.18.1/flink-1.18.1-bin-scala_2.12.tgz
Commonly used Apache software download
# Big data related
wget https://xget.xi-xu.me/apache/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz
wget https://xget.xi-xu.me/apache/hbase/2.5.7/hbase-2.5.7-bin.tar.gz
wget https://xget.xi-xu.me/apache/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
# Web Server
wget https://xget.xi-xu.me/apache/httpd/httpd-2.4.59.tar.gz
wget https://xget.xi-xu.me/apache/tomcat/tomcat-10/v10.1.19/bin/apache-tomcat-10.1.19.tar.gz
# Development Tools
wget https://xget.xi-xu.me/apache/ant/1.10.14/apache-ant-1.10.14-bin.tar.gz
wget https://xget.xi-xu.me/apache/netbeans/netbeans/20/netbeans-20-bin.zip
Gradle package management acceleration
Configure Gradle to use Xget mirroring
// Configure Gradle Image in build.gradle
repositories {
maven {
url 'https://xget.xi-xu.me/maven/maven2'
}
gradlePluginPortal {
url 'https://xget.xi-xu.me/gradle/m2'
}
}
// Configure plug-in repository
pluginManagement {
repositories {
maven {
url 'https://xget.xi-xu.me/gradle/m2'
}
gradlePluginPortal()
}
}
Global Configuration
// Configure global mirroring in ~/.gradle/init.gradle
allprojects {
repositories {
maven {
url 'https://xget.xi-xu.me/maven/maven2'
}
}
}
settingsEvaluated { settings ->
settings.pluginManagement {
repositories {
maven {
url 'https://xget.xi-xu.me/gradle/m2'
}
gradlePluginPortal()
}
}
}
# Specify the image using the command line
gradle build -Dmaven.repo.remote=https://xget.xi-xu.me/maven/maven2
# Refresh dependencies
gradle build --refresh-dependencies
Homebrew Package Management Acceleration
Configure Homebrew to use Xget mirroring
# Setting up Homebrew environment variables using Xget mirror
export HOMEBREW_BREW_GIT_REMOTE="https://xget.xi-xu.me/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://xget.xi-xu.me/homebrew/homebrew-core.git"
export HOMEBREW_API_DOMAIN="https://xget.xi-xu.me/homebrew/api"
export HOMEBREW_BOTTLE_DOMAIN="https://xget.xi-xu.me/homebrew/bottles"
# Update Homebrew
brew update
Long-term configuration
# Add to ~/.bash_profile for bash users
echo 'export HOMEBREW_BREW_GIT_REMOTE="https://xget.xi-xu.me/homebrew/brew.git"' >> ~/.bash_profile
echo 'export HOMEBREW_CORE_GIT_REMOTE="https://xget.xi-xu.me/homebrew/homebrew-core.git"' >> ~/.bash_profile
echo 'export HOMEBREW_API_DOMAIN="https://xget.xi-xu.me/homebrew/api"' >> ~/.bash_profile
echo 'export HOMEBREW_BOTTLE_DOMAIN="https://xget.xi-xu.me/homebrew/bottles"' >> ~/.bash_profile
# Add to ~/.zprofile for zsh users
echo 'export HOMEBREW_BREW_GIT_REMOTE="https://xget.xi-xu.me/homebrew/brew.git"' >> ~/.zprofile
echo 'export HOMEBREW_CORE_GIT_REMOTE="https://xget.xi-xu.me/homebrew/homebrew-core.git"' >> ~/.zprofile
echo 'export HOMEBREW_API_DOMAIN="https://xget.xi-xu.me/homebrew/api"' >> ~/.zprofile
echo 'export HOMEBREW_BOTTLE_DOMAIN="https://xget.xi-xu.me/homebrew/bottles"' >> ~/.zprofile
Use in the project
# Install the software package
brew install git
# Search for packages
brew search python
# Update the package
brew upgrade
# View installed packages
brew list
Verify the mirror configuration
# Check Homebrew configuration
brew config
# View environment variables
echo $HOMEBREW_API_DOMAIN
echo $HOMEBREW_BOTTLE_DOMAIN
Ruby package management acceleration
Configure RubyGems to use Xget mirroring
# Temporary use of Xget mirrors
gem install rails --source https://xget.xi-xu.me/rubygems/
# Global configuration RubyGems mirroring
gem sources --add https://xget.xi-xu.me/rubygems/
gem sources --remove https://rubygems.org/
# Verify configuration
gem sources -l
Use in the project
# Configure project-level mirroring in Gemfile
source 'https://xget.xi-xu.me/rubygems/'
gem 'rails', '~> 7.0.0'
gem 'pg', '~> 1.1'
gem 'puma', '~> 5.0'
# Install using bundle
bundle config mirror.https://rubygems.org https://xget.xi-xu.me/rubygems/
bundle install
R package management acceleration
Configure R Using Xget CRAN Mirror
# Temporarily use Xget CRAN image in R
install.packages("ggplot2", repos = "https://xget.xi-xu.me/cran/")
# Global configuration CRAN image
options(repos = c(CRAN = "https://xget.xi-xu.me/cran/"))
# Verify configuration
getOption("repos")
Configure in .Rprofile
# Configure global mirroring in the .Rprofile file in the user's home directory
options(repos = c(
CRAN = "https://xget.xi-xu.me/cran/",
BioCsoft = "https://bioconductor.org/packages/release/bioc",
BioCann = "https://bioconductor.org/packages/release/data/annotation",
BioCexp = "https://bioconductor.org/packages/release/data/experiment"
))
# Set up download method
options(download.file.method = "libcurl")
Use in the project
# Specify the image in the project's renv.lock or script
renv::init()
renv::settings$repos.override(c(CRAN = "https://xget.xi-xu.me/cran/"))
# Installation package
install.packages(c("dplyr", "ggplot2", "tidyr"))
# Or use the pak package manager
pak::pkg_install("tidyverse", repos = "https://xget.xi-xu.me/cran/")
# Install packages using R scripts on the command line
Rscript -e "options(repos = c(CRAN = 'https://xget.xi-xu.me/cran/')); install.packages('ggplot2')"
# Bulk installation package
Rscript -e "
options(repos = c(CRAN = 'https://xget.xi-xu.me/cran/'))
packages <- c('dplyr', 'ggplot2', 'tidyr', 'readr')
install.packages(packages)
"
Perl package management acceleration
Configure CPAN to use Xget mirroring
# Configure CPAN to use Xget mirroring
cpan o conf urllist push https://xget.xi-xu.me/cpan/
cpan o conf commit
# Or directly edit the configuration file ~/.cpan/CPAN/MyConfig.pm
# Add to:
# 'urllist' => [q[https://xget.xi-xu.me/cpan/]],
Use cpanm to install modules
# Install cpanm (if not)
curl -L https://cpanmin.us | perl - --sudo App::cpanminus
# Install the module using Xget mirror
cpanm --mirror https://xget.xi-xu.me/cpan/ DBI
cpanm --mirror https://xget.xi-xu.me/cpan/ Mojolicious
# Install dependencies from Makefile.PL
cpanm --mirror https://xget.xi-xu.me/cpan/ --installdeps .
Use in the project
# List dependencies in cpanfile
requires 'DBI';
requires 'Mojolicious';
requires 'JSON';
# Then use Xget mirror to install
cpanm --mirror https://xget.xi-xu.me/cpan/ --installdeps .
TeX/LaTeX Package Management Acceleration
Configure TeX Live with Xget CTAN mirroring
# Configure tlmgr to use Xget CTAN mirroring
tlmgr option repository https://xget.xi-xu.me/ctan/systems/texlive/tlnet
# Update package database
tlmgr update --self --all
# Installation package
tlmgr install beamer
tlmgr install tikz
Configuring MiKTeX to use Xget mirroring
# Windows MiKTeX Configuration
mpm --set-repository=https://xget.xi-xu.me/ctan/systems/win32/miktex
# Update package database
mpm --update-db
# Installation package
mpm --install=beamer
mpm --install=pgf
Use in the project
# LaTeX document automatically installs missing packages when compiling
pdflatex --shell-escape document.tex
# Or manually install specific packages
tlmgr install caption
tlmgr install subcaption
tlmgr install algorithm2e
Go module acceleration
Configure Go to use Xget proxy
# Configure Go module agent
export GOPROXY=https://xget.xi-xu.me/golang,direct
export GOSUMDB=off
# Or permanent configuration
go env -w GOPROXY=https://xget.xi-xu.me/golang,direct
go env -w GOSUMDB=off
# Verify configuration
go env GOPROXY
Use in the project
# Download dependencies
go mod download
# Update dependencies
go get -u ./...
# Clean the module cache
go clean -modcache
NuGet Package Management Acceleration
Configure NuGet to use Xget mirroring
# Add Xget package source
dotnet nuget add source https://xget.xi-xu.me/nuget/v3/index.json -n xget
# List package sources
dotnet nuget list source
# Use in a project
dotnet restore --source https://xget.xi-xu.me/nuget/v3/index.json
Configure in NuGet.Config
<!-- NuGet.Config -->
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="xget" value="https://xget.xi-xu.me/nuget/v3/index.json" />
</packageSources>
</configuration>
Rust package management acceleration
Configure Cargo using Xget mirroring
# Configure Cargo to use Xget image (in ~/.cargo/config.toml)
mkdir -p ~/.cargo
cat >> ~/.cargo/config.toml << EOF
[source.crates-io]
replace-with = "xget"
[source.xget]
registry = "https://xget.xi-xu.me/crates/"
EOF
# Verify configuration
cargo search serde
Use in the project
# Dependencies can be used normally in Cargo.toml
[dependencies]
serde = "1.0"
tokio = "1.0"
reqwest = "0.11"
# Xget will be automatically used when building the project
cargo build
# Update dependencies
cargo update
# Add new dependencies
cargo add clap
PHP package management acceleration
Configure Composer to use Xget mirroring
# Global configuration Composer image
composer config -g repo.packagist composer https://xget.xi-xu.me/packagist/
# Project-level configuration
composer config repo.packagist composer https://xget.xi-xu.me/packagist/
# Verify configuration
composer config -l
Configure in composer.json
{
"repositories": [
{
"type": "composer",
"url": "https://xget.xi-xu.me/packagist/"
}
],
"require": {
"symfony/console": "^6.0",
"guzzlehttp/guzzle": "^7.0"
}
}
Linux distribution acceleration
Debian/Ubuntu APT configuration
# Back up the original source list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Configure Debian Image
echo "deb https://xget.xi-xu.me/debian/debian bookworm main" | sudo tee /etc/apt/sources.list
echo "deb https://xget.xi-xu.me/debian/debian-security bookworm-security main" | sudo tee -a /etc/apt/sources.list
# Configure Ubuntu mirroring
echo "deb https://xget.xi-xu.me/ubuntu/ubuntu jammy main restricted universe multiverse" | sudo tee /etc/apt/sources.list
echo "deb https://xget.xi-xu.me/ubuntu/ubuntu jammy-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
# Update package list
sudo apt update
Fedora DNF Configuration
# Configure Fedora Image
sudo sed -i 's|^metalink=|#metalink=|g' /etc/yum.repos.d/fedora*.repo
sudo sed -i 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://xget.xi-xu.me/fedora/pub/fedora/linux|g' /etc/yum.repos.d/fedora*.repo
# Update package cache
sudo dnf makecache
Rocky Linux DNF configuration
# Configure Rocky Linux Image
sudo sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/rocky*.repo
sudo sed -i 's|^#baseurl=http://dl.rockylinux.org|baseurl=https://xget.xi-xu.me/rocky|g' /etc/yum.repos.d/rocky*.repo
# Update package cache
sudo dnf makecache
openSUSE Zypper configuration
# Configure openSUSE Leap image
sudo zypper mr -d repo-oss
sudo zypper ar -f https://xget.xi-xu.me/opensuse/distribution/leap/15.5/repo/oss/ repo-oss-xget
# Configure openSUSE Tumbleweed image
sudo zypper mr -d repo-oss
sudo zypper ar -f https://xget.xi-xu.me/opensuse/tumbleweed/repo/oss/ repo-oss-xget
# Refresh the software source
sudo zypper refresh
# Verify configuration
sudo zypper lr -u
Arch Linux Pacman Configuration
# Back up the original image list
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
# Configure Arch Linux Mirroring
echo 'Server = https://xget.xi-xu.me/arch/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist
# Update package database
sudo pacman -Sy
Academic Resource Acceleration
arXiv paper download
# Download arXiv paper PDF
wget https://xget.xi-xu.me/arxiv/pdf/2301.07041.pdf
# Download the paper source code
curl -L -O https://xget.xi-xu.me/arxiv/e-print/2301.07041
# Download multiple papers in batches
for id in 2301.07041 2302.13971 2303.08774; do
wget https://xget.xi-xu.me/arxiv/pdf/${id}.pdf
done
Use in academic tools
# Accelerate downloads with arXiv in Python
import requests
def download_arxiv_paper(arxiv_id, output_path):
url = f"https://xget.xi-xu.me/arxiv/pdf/{arxiv_id}.pdf"
response = requests.get(url)
if response.status_code == 200:
with open(output_path, 'wb') as f:
f.write(response.content)
print(f"Downloaded {arxiv_id} to {output_path}")
else:
print(f"Failed to download {arxiv_id}")
# Download the paper
download_arxiv_paper("2301.07041", "attention_is_all_you_need.pdf")
F-Droid Repository Mirror
Configure the F-Droid Client to Use the Xget Mirror
- Enter Settings in the F-Droid app → Repository
- Click + and enter the repository URL:
https://xget.xi-xu.me/fdroid/repo - Click Add and then click Add mirror
Supported F-Droid Services
# F-Droid App APK Download
https://xget.xi-xu.me/fdroid/repo/[package-name]_[version].apk
# F-Droid repository index
https://xget.xi-xu.me/fdroid/repo/index-v1.jar
# F-Droid app icon
https://xget.xi-xu.me/fdroid/repo/icons-640/[package-name].[version].png
# F-Droid API Interface
https://xget.xi-xu.me/fdroid/api/v1/packages/[package-name]
Example Usage
# Download the F-Droid Client APK directly
wget https://xget.xi-xu.me/fdroid/repo/org.fdroid.fdroid_1016050.apk
# Download other open source applications
curl -L -O https://xget.xi-xu.me/fdroid/repo/org.mozilla.fennec_fdroid_1014000.apk
# Get application information
curl https://xget.xi-xu.me/fdroid/api/v1/packages/org.fdroid.fdroid
Batch Application Management
# Create an application download script
cat > download_fdroid_apps.sh << 'EOF'
# !/bin/bash
# Define the list of applications to download
apps=(
"org.fdroid.fdroid_1016050.apk"
"org.mozilla.fennec_fdroid_1014000.apk"
"com.termux_1180.apk"
"org.videolan.vlc_13050399.apk"
)
# Create a download directory
mkdir -p fdroid_apps
# Download the application in batches
for app in "${apps[@]}"; do
echo "Downloading: $app"
wget -P fdroid_apps "https://xget.xi-xu.me/fdroid/repo/$app"
done
echo "All applications downloaded!"
EOF
chmod +x download_fdroid_apps.sh
./download_fdroid_apps.sh
Developer Integration
For Android developers, you can integrate F-Droid images in build scripts:
// Configure F-Droid dependency checking in build.gradle
task checkFDroidAvailability {
doLast {
def fdroidUrl = "https://xget.xi-xu.me/fdroid/api/v1/packages/${project.name}"
try {
def connection = new URL(fdroidUrl).openConnection()
connection.requestMethod = 'GET'
def responseCode = connection.responseCode
if (responseCode == 200) {
println("App available on F-Droid: $fdroidUrl")
}
} catch (Exception e) {
println("Failed to check F-Droid availability: ${e.message}")
}
}
}
Jenkins Plugin Download
Accelerate Jenkins Plugin Downloads and Updates with Xget
Supports Jenkins update center and plug-in downloads, and is compatible with the configuration methods of domestic mirror sources such as Tsinghua mirroring.
Jenkins Update Center Configuration
Method 1: Configure in the Jenkins Web Interface
- Log in to the Jenkins Management Interface
- Enter Manage Jenkins → Plugins → Advanced
- In the Update Site section, change the URL to
https://xget.xi-xu.me/jenkins/update-center.json - Click Submit to save the configuration
Method 2: Modify the Configuration File
# Modify update center configuration files on Jenkins server
# Default location: $JENKINS_HOME/hudson.model.UpdateCenter.xml
sudo nano /var/lib/jenkins/hudson.model.UpdateCenter.xml
# Change the URL to:
# <url>https://xget.xi-xu.me/jenkins/update-center.json</url>
# Restart Jenkins Service
sudo systemctl restart jenkins
Supported Jenkins Services
# Jenkins Update Center JSON
https://xget.xi-xu.me/jenkins/update-center.json
# Jenkins Update Center (actual JSON format)
https://xget.xi-xu.me/jenkins/update-center.actual.json
# Jenkins plugin download
https://xget.xi-xu.me/jenkins/download/plugins/[plugin-name]/[version]/[plugin-name].hpi
# Experimental Plugin Update Center
https://xget.xi-xu.me/jenkins/experimental/update-center.json
Example Usage
# Download the Maven plugin
wget https://xget.xi-xu.me/jenkins/download/plugins/maven-plugin/3.27/maven-plugin.hpi
# Download Git plugin
curl -L -O https://xget.xi-xu.me/jenkins/download/plugins/git/5.2.1/git.hpi
# Get update center information
curl https://xget.xi-xu.me/jenkins/update-center.json
# Batch download of commonly used plug-ins
cat > download_jenkins_plugins.sh << 'EOF'
# !/bin/bash
# Define a list of plugins to download
plugins=(
"git:5.2.1"
"maven-plugin:3.27"
"workflow-aggregator:596.v8c21c963d92d"
"blueocean:1.27.8"
"docker-workflow:563.vd5d2e5c4007f"
)
# Create a plug-in download directory
mkdir -p jenkins_plugins
# Batch download plug-in
for plugin in "${plugins[@]}"; do
name=$(echo $plugin | cut -d: -f1)
version=$(echo $plugin | cut -d: -f2)
echo "Downloading plugin: $name v$version"
wget -P jenkins_plugins "https://xget.xi-xu.me/jenkins/download/plugins/$name/$version/$name.hpi"
done
echo "All plugins downloaded!"
EOF
chmod +x download_jenkins_plugins.sh
./download_jenkins_plugins.sh
Offline Jenkins Deployment
For Jenkins deployments without network environments:
# 1. Download the Jenkins core file
wget https://xget.xi-xu.me/jenkins/war/jenkins.war
# 2. Create plug-in packaging scripts
cat > prepare_jenkins_offline.sh << 'EOF'
# !/bin/bash
# Create an offline deployment directory structure
mkdir -p jenkins_offline/{plugins,update_center}
# Download Update Center Configuration
curl -o jenkins_offline/update_center/update-center.json \
https://xget.xi-xu.me/jenkins/update-center.json
# List of essential plugins
essential_plugins=(
"ant:475.vf34069fef73c"
"build-timeout:1.31"
"credentials:1319.v7eb_51b_3a_c97b_"
"git:5.2.1"
"github:1.38.0"
"gradle:2.8.2"
"ldap:682.v7b_544c9d1512"
"mailer:463.vedf8358e006b_"
"matrix-auth:3.2.2"
"maven-plugin:3.27"
"pam-auth:1.10"
"pipeline-stage-view:2.34"
"ssh-slaves:2.973.v0fa_8c0dea_f9f"
"timestamper:1.26"
"workflow-aggregator:596.v8c21c963d92d"
"ws-cleanup:0.45"
)
# Download all the essential plugins
for plugin in "${essential_plugins[@]}"; do
name=$(echo $plugin | cut -d: -f1)
version=$(echo $plugin | cut -d: -f2)
echo "Downloading $name:$version"
wget -P jenkins_offline/plugins \
"https://xget.xi-xu.me/jenkins/download/plugins/$name/$version/$name.hpi"
done
# Creation deployment instructions
cat > jenkins_offline/deploy_instructions.md << 'DEPLOY'
# Jenkins Offline Deployment Instructions
1. Copy jenkins.war to the target server
2. Start Jenkins: java -jar jenkins.war
3. Copy the .hpi files in the plugins/ directory to $JENKINS_HOME/plugins/
4. Restart Jenkins
DEPLOY
echo "Offline deployment bundle ready!"
EOF
chmod +x prepare_jenkins_offline.sh
./prepare_jenkins_offline.sh
Use in the project
Plugin Checks in Jenkinsfile
pipeline {
agent any
stages {
stage('Check Plugin Availability') {
steps {
script {
// Check Maven plugin availability
def pluginUrl = "https://xget.xi-xu.me/jenkins/download/plugins/maven-plugin/3.27/maven-plugin.hpi"
try {
def response = httpRequest url: pluginUrl, httpMode: 'HEAD'
if (response.status == 200) {
echo "Maven plugin available: ${pluginUrl}"
}
} catch (Exception e) {
error "Maven plugin unavailable: ${e.message}"
}
}
}
}
stage('Build') {
steps {
// Your build steps
echo "Building with accelerated plugins..."
}
}
}
}
AI Inference API Acceleration
OpenAI API
import openai
# OpenAI API using Xget
client = openai.OpenAI(
api_key="your-api-key",
base_url="https://xget.xi-xu.me/ip/openai/v1" # Use Xget
)
# Chat completed
response = client.chat.completions.create(
model="gpt-4",
messages=[
{"role": "user", "content": "Hello, how are you?"}
]
)
print(response.choices[0].message.content)
Anthropic API
import anthropic
# Anthropic API using Xget
client = anthropic.Anthropic(
api_key="your-api-key",
base_url="https://xget.xi-xu.me/ip/anthropic" # Use Xget
)
# Create a message
message = client.messages.create(
model="claude-3-sonnet-20240229",
max_tokens=1000,
messages=[
{"role": "user", "content": "Hello, Claude!"}
]
)
print(message.content)
Gemini API
import google.generativeai as genai
# Configure API keys
genai.configure(api_key="your-api-key")
# Using custom transfer configuration Xget
import requests
class XgetTransport:
def __init__(self, base_url):
self.base_url = base_url
def request(self, method, url, **kwargs):
# Forward the request to Xget
accelerated_url = url.replace("https://generativelanguage.googleapis.com",
"https://xget.xi-xu.me/ip/gemini")
return requests.request(method, accelerated_url, **kwargs)
# Create a model instance
model = genai.GenerativeModel('gemini-pro')
# Generate content
response = model.generate_content("Write a short introduction to artificial intelligence")
print(response.text)
Multi-provider unified interface
import requests
import json
def call_ai_api(provider, endpoint, data, api_key):
"""
Unified AI API helper that supports multiple providers
"""
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
# Acceleration URL with Xget
url = f"https://xget.xi-xu.me/ip/{provider}/{endpoint}"
response = requests.post(url, headers=headers, json=data)
return response.json()
# Example of usage
providers = {
"openai": {
"endpoint": "v1/chat/completions",
"data": {
"model": "gpt-4",
"messages": [{"role": "user", "content": "Hello!"}]
}
},
"anthropic": {
"endpoint": "v1/messages",
"data": {
"model": "claude-3-sonnet-20240229",
"max_tokens": 1000,
"messages": [{"role": "user", "content": "Hello!"}]
}
},
"cohere": {
"endpoint": "v1/generate",
"data": {
"model": "command",
"prompt": "Hello!",
"max_tokens": 100
}
}
}
# Looping calls to different providers
for provider, config in providers.items():
try:
result = call_ai_api(
provider=provider,
endpoint=config["endpoint"],
data=config["data"],
api_key="your-api-key"
)
print(f"{provider.title()} response: {result}")
except Exception as e:
print(f"Error calling {provider}: {e}")
Use in JavaScript/Node.js
// OpenAI API Acceleration
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: 'your-api-key',
baseURL: 'https://xget.xi-xu.me/ip/openai', // Use Xget
});
async function chatWithGPT() {
const completion = await openai.chat.completions.create({
messages: [{ role: 'user', content: 'Hello!' }],
model: 'gpt-4',
});
console.log(completion.choices[0].message.content);
}
// Anthropic API acceleration
import Anthropic from '@anthropic-ai/sdk';
const anthropic = new Anthropic({
apiKey: 'your-api-key',
baseURL: 'https://xget.xi-xu.me/ip/anthropic', // Use Xget
});
async function chatWithClaude() {
const message = await anthropic.messages.create({
model: 'claude-3-sonnet-20240229',
max_tokens: 1000,
messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(message.content);
}
Environment variable configuration
# Configure in .env file
OPENAI_BASE_URL=https://xget.xi-xu.me/ip/openai
ANTHROPIC_BASE_URL=https://xget.xi-xu.me/ip/anthropic
GEMINI_BASE_URL=https://xget.xi-xu.me/ip/gemini
COHERE_BASE_URL=https://xget.xi-xu.me/ip/cohere
MISTRAL_AI_BASE_URL=https://xget.xi-xu.me/ip/mistralai
GROQ_BASE_URL=https://xget.xi-xu.me/ip/groq
Then use in the code:
import os
from openai import OpenAI
# Read configuration from environment variable
client = OpenAI(
api_key=os.getenv("OPENAI_API_KEY"),
base_url=os.getenv("OPENAI_BASE_URL") # Automatically use Xget
)
Container Image Acceleration
Docker configuration
# Configure Docker to use Xget mirror acceleration
# Edit /etc/docker/daemon.json (Linux) or ~/.docker/daemon.json (macOS/Windows)
{
"registry-mirrors": [
"https://xget.xi-xu.me/cr/ghcr"
]
}
# Restart Docker service
sudo systemctl restart docker # Linux
# Or restart the service in Docker Desktop
# Verify configuration
docker info | grep -A 10 "Registry Mirrors"
Pull Images Directly
# Pull the GitHub container registry image
docker pull xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
# Pull Google Container Registry Image
docker pull xget.xi-xu.me/cr/gcr/distroless/base:latest
# Pull the Microsoft Container Registry Image
docker pull xget.xi-xu.me/cr/mcr/dotnet/runtime:8.0
Kubernetes deployment configuration
# deployment.yaml - Mirror using Xget
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
ports:
- containerPort: 80
- name: redis
image: xget.xi-xu.me/cr/ghcr/bitnami/redis:alpine
ports:
- containerPort: 6379
Docker Compose Configuration
# docker-compose.yml - Accelerate image using Xget
version: '3.8'
services:
web:
image: xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
ports:
- "80:80"
volumes:
- ./html:/usr/share/nginx/html
database:
image: xget.xi-xu.me/cr/mcr/mssql/server:2022-latest
environment:
ACCEPT_EULA: Y
SA_PASSWORD: "MyStrongPassword123!"
volumes:
- mssql_data:/var/opt/mssql
cache:
image: xget.xi-xu.me/cr/ghcr/bitnami/redis:alpine
ports:
- "6379:6379"
volumes:
mssql_data:
Dockerfile optimization
# Use Xget to accelerate basic images in Dockerfile
FROM xget.xi-xu.me/cr/ghcr/nodejs/node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Production stage
FROM xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
COPY --from=builder /app/dist /usr/share/nginx/html
# .NET image using Microsoft Container Registry
FROM xget.xi-xu.me/cr/mcr/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
COPY --from=builder /app/publish .
ENTRYPOINT ["dotnet", "MyApp.dll"]
CI/CD Integration
# GitHub Actions - Accelerate container building with Xget
name: Build and Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build with accelerated base images
run: |
# Use Xget's basic image when building
docker build -t myapp:latest \
--build-arg BASE_IMAGE=xget.xi-xu.me/cr/ghcr/nodejs/node:18-alpine.
- name: Test with accelerated images
run: |
# Testing with accelerated image
docker run --rm \
xget.xi-xu.me/cr/mcr/dotnet/runtime:8.0 \
dotnet --version
Podman Configuration
# Configure Podman to use Xget mirror acceleration
# Edit /etc/containers/registries.conf
[[registry]]
prefix = "ghcr.io"
location = "xget.xi-xu.me/cr/ghcr"
# Or pull it directly
podman pull xget.xi-xu.me/cr/ghcr/alpine/alpine:latest
podman pull xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
containerd Configuration
# Configure containerd using Xget
# Edit /etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."ghcr.io"]
endpoint = ["https://xget.xi-xu.me/cr/ghcr"]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."gcr.io"]
endpoint = ["https://xget.xi-xu.me/cr/gcr"]
# Restart containerd
sudo systemctl restart containerd
🚀 Deployment
Cloudflare Workers
**Xget is designed and optimized for Cloudflare Workers to deliver the best performance and experience:
- 💰 Cost Advantage: In most cases, it is free in addition to the fee of registering a domain name.
- 🚀 Highest performance: Global edge nodes, fastest response speed
- 🔧 Simple maintenance: No server management required, automatic expansion and update
- 🛡️ Safe and reliable: Built-in DDoS protection and security features
Deployment Steps
-
Fork this repository: Click the Fork button in the upper right corner of the GitHub page
-
Get Cloudflare Credentials:
- Visit Cloudflare Dashboard → My Profile → API Tokens
- Create an API Token with "Edit Cloudflare Workers" permission
- Note your Account ID (visible on the right side of the Workers page)
-
Configure GitHub Secrets:
- Go to your GitHub repository → Settings → Secrets and variables → Actions
- Add the following Secrets:
CLOUDFLARE_API_TOKEN: Your API TokenCLOUDFLARE_ACCOUNT_ID: Your Account ID
-
Trigger Deployment:
- Pushing code to the
mainbranch will automatically trigger deployment - Changes only to documentation files (
.md),LICENSE,.gitignore, etc. won't trigger deployment - You can also manually trigger deployment from the GitHub Actions page
- Pushing code to the
-
Bind custom domain name (optional): Bind your custom domain name in the Cloudflare Workers console
Once the deployment is complete, your Xget service will be available at the following address:
- Worker domain name:
your-worker-name.your-subdomain.workers.dev - Custom domain name:
your-domain.com(if bound)
Environment variable configuration
You can set the following environment variables in the Cloudflare Workers console to customize the configuration:
TIMEOUT_SECONDS: Request timeout time (default: 30)MAX_RETRIES: Maximum number of retries (default: 3)RETRY_DELAY_MS: Retry delay time (default: 1000)CACHE_DURATION: cache duration (default: 1800)ALLOWED_METHODS: Allowed HTTP methods (default: GET, HEAD)ALLOWED_ORIGINS: Allowed CORS source (default: *)MAX_PATH_LENGTH: Maximum path length (default: 2048)
🔧 Configuration
Configuration Parameters
You can customize the configuration by modifying src/config/index.js:
export const CONFIG = {
TIMEOUT_SECONDS: 30, // Request timeout (seconds)
MAX_RETRIES: 3, // Maximum number of retries
RETRY_DELAY_MS: 1000, // Retry delay (ms)
CACHE_DURATION: 1800, // Cache duration (1800 seconds = 30 minutes)
SECURITY: {
ALLOWED_METHODS: ["GET", "HEAD"], // Allowed HTTP methods (POST enabled dynamically for Git operations)
ALLOWED_ORIGINS: ["*"], // Allowed CORS origins
MAX_PATH_LENGTH: 2048, // Maximum path length (characters)
},
};
Performance Tuning Tips
- Cache Optimization: Adjust
CACHE_DURATIONaccording to usage mode, frequently updated repositories can be appropriately reduced - Timeout setting: When network conditions are poor, you can add appropriately
TIMEOUT_SECONDS - Retry policy:
MAX_RETRIESandRETRY_DELAY_MScan be added in high-latency environments
Adding a New Platform
To add support for the new platform, edit src/config/platforms.js:
export const PLATFORMS = {
// Existing platform...
// New platform example
custom: {
base: "https://example.com",
transform: (path) => path.replace(/^\/custom\//, "/"),
},
};
🚧 Development
-
Repository settings
git clone https://github.com/xixu-me/Xget.git cd Xget npm install npx wrangler login # First-time login -
Local Development
npm run dev # Start the dev server (http://localhost:8787) npm run test:run # Run the full test suite npm run test:coverage # Generate code coverage report npm run lint # Lint the codebase npm run format # Format the code npm run deploy # Deploy to production
🧪 Test
The repository contains a complete test suite to ensure code quality and functional correctness.
Full Test Suite
# Install test dependencies
npm install
# Run all tests
npm run test:run
# Generate coverage report
npm run test:coverage
# Watch mode
npm run test:watch
Test Coverage
- Unit Test: Core functions, platform configuration, performance monitoring
- Integration Test: End-to-end process, platform integration, Git protocol
- Security Test: Input verification, security header, permission control
- Performance Test: Response time, memory usage, concurrent processing
🔍 Troubleshooting
FAQ
Q: Didn’t the download speed significantly improve? A: Check whether the source file is already cached on the CDN edge node. The first access may be slow, and subsequent access will be significantly improved.
Q: Git operation failed? A: Confirm that the correct URL format is used and that the Git client version supports HTTPS proxy.
Q: Is it inaccessible after deployment?
A: Check whether the Cloudflare Workers domain name is correctly bound and confirm that the wrangler.toml configuration is correct.
Q: A 400 error occurred? A: Check the URL path format to confirm that the platform prefix is used correctly.
Performance Monitoring
Returns performance metrics in response header:
X-Performance-Metrics: Contains time-consuming statistics for each phase of the requestX-Cache-Status: Show cache hit status
Log Debugging
In a development environment, you can view detailed logs through the Cloudflare Workers console:
npx wrangler dev --log-level debug
⚠️ Disclaimer
- Legal and Compliant Use: This repository is designed to accelerate legal public resource access (such as file downloads, Git operations, AI inference APIs, container image pulling and package management). Please strictly abide by the laws and regulations of the jurisdiction you are in and the terms of service and use agreements of the relevant platforms. Any use of any behavior that exceeds the scope of legally disclosed resources shall be borne by the user at their sole responsibility.
- Non-relatedness and liability: Any fork, secondary development, redistribution or derivative version based on this repository shall be independently responsible for its maintainers; the author, maintainer and contributor of this repository shall not bear any legal or joint liability for their actions or consequences, nor shall it constitute employment, cooperation, agency, endorsement or warranty relationship
- No Warranty and Limitation of Liability: To the maximum extent permitted by applicable law, this Repository is provided as “AS IS” and the author, maintainer and contributor do not provide any warranties of express or implied (including but not limited to merchantability, fitness for a particular purpose and non-infringement), nor are they liable for any direct or indirect losses, loss of data, business interruption or other consequences arising from the use of this Repository
- User's obligation: Users should evaluate and control the risks of use on their own, ensure that their actions and purposes are legal, compliant and do not infringe on the rights and interests of third parties, and do not use this repository for illegal, infringing or malicious purposes in any form.
- Third-party platforms and rate limits: Please comply with the terms of service, API usage restrictions and rate control of GitHub, GitLab, Gitea, Codeberg, SourceForge, Hugging Face, major package management platforms and container registry, etc., to avoid excessive load on the source platform
- Intellectual Property and Content Compliance: Ensure that content accessed or distributed through this repository complies with relevant copyright and licensing requirements; for copyrighted content, please comply with its license agreement and terms of use
- Data and Security: This repository adopts a log-free architecture and does not store, record or analyze user requested data. However, Internet transmission has inherent risks. It is recommended to scan downloaded files safely, especially executable files and scripts, and handle sensitive information with caution
- Support and Maintenance: This repository is an open source, community-driven work, and the authors and contributors do not assume the obligation to provide support, repair or continuous maintenance; the merged external contribution does not constitute a commitment or endorsement of its purpose, effect, or results.
- Denotation and Name Use: No cooperation, endorsement or warranty shall be implied in any scenario. External display or publicity involving the name of the repository, the author's name or logo shall comply with applicable laws and the usage specifications of the name/logo
- Update and Applicable: This disclaimer may be updated with changes in the repository or legal environment without notice; when you use, copy, distribute or modify this repository, you are deemed to have read and agree to the latest version of this disclaimer.
🤝 Contribution
We welcome contributions in all forms!Please see the [Contribution Guide] (CONTRIBUTING.md) to learn how to participate in repository development.
- Reporting issues: Use issue template to report a bug or make a feature request
- Commit code: fork repository, create feature branches, submit pull request
- Improve documentation: Fix errors, add examples, and improve instructions
- Test Feedback: Test and provide feedback in different environments
🌟 Star History
📞 Contact
- Author: Xi Xu
- Email: Contact Email
- Sponsored: Sponsored URL
📝 License
This repository is under a GPL-3.0 license - view the LICENSE file for details.
If this repository is helpful to you, consider giving it a ⭐star!
Made with ❤️ by Xi Xu