From fdeffd65308d766ddcec375de5ced4937dfe49f9 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Sun, 15 Mar 2026 13:21:11 +0800 Subject: [PATCH] docs(flathub): clarify Flatpak mirror setup --- README.md | 674 +++++++++++++++++++++++++++++----------------- README.zh-Hans.md | 377 ++++++++++++++------------ README.zh-Hant.md | 377 ++++++++++++++------------ 3 files changed, 852 insertions(+), 576 deletions(-) diff --git a/README.md b/README.md index 2dc380f..84b0a3e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,8 @@ [![Docker](https://img.shields.io/badge/Docker-2496ED?&logo=docker&logoColor=white)](#self-hosted-deployment) [![Podman](https://img.shields.io/badge/Podman-892CA0?&logo=podman&logoColor=white)](#self-hosted-deployment) -**English** | [汉语(简体)](README.zh-Hans.md) | [漢語(繁體)](README.zh-Hant.md) +**English** | [汉语(简体)](README.zh-Hans.md) | +[漢語(繁體)](README.zh-Hant.md) @@ -57,50 +58,79 @@ [![Container Registries](https://img.shields.io/badge/Container%20Registries-262261?logo=opencontainersinitiative&logoColor=white)](#container-registries) [![AI Inference Providers](https://img.shields.io/badge/AI%20Inference%20Providers-94A3B8?logo=openrouter&logoColor=white)](#ai-inference-providers) -Ultra-high-performance, secure, all-in-one acceleration engine for developer resources that significantly outperforms traditional solutions, delivering unified, efficient acceleration across code repositories, model and dataset hubs, package registries, container registries, AI inference providers, and more. +Ultra-high-performance, secure, all-in-one acceleration engine for developer +resources that significantly outperforms traditional solutions, delivering +unified, efficient acceleration across code repositories, model and dataset +hubs, package registries, container registries, AI inference providers, and +more. -In-depth technical analysis article published: ***[Deep Dive into Xget: A High-Performance, Multi-Protocol, and Secure Acceleration Engine for Developer Resources](https://blog.xi-xu.me/2025/10/07/deep-dive-into-xget-technology-en.html)***. +In-depth technical analysis article published: +**_[Deep Dive into Xget: A High-Performance, Multi-Protocol, and Secure Acceleration Engine for Developer Resources](https://blog.xi-xu.me/2025/10/07/deep-dive-into-xget-technology-en.html)_**. -Xget was invited to join the [GitCode platform](https://gitcode.com/xixu-me/xget) and recognized as a G-Star graduation project. It has also received spontaneous recommendations from several well-known tech creators, including [Ruan Yifeng](https://www.ruanyifeng.com/blog/2025/12/weekly-issue-379.html#:~:text=Xget), [GitHubDaily](https://x.com/i/status/1956204203937829256), [FishC](https://www.bilibili.com/video/BV1EeeBzVEop/), and [Xuanli 199](https://www.bilibili.com/video/BV197hqzsE8Y/?t=8). Sincere thanks to GitCode and every creator, reader, and user who helped more people discover Xget. +Xget was invited to join the +[GitCode platform](https://gitcode.com/xixu-me/xget) and recognized as a G-Star +graduation project. It has also received spontaneous recommendations from +several well-known tech creators, including +[Ruan Yifeng](https://www.ruanyifeng.com/blog/2025/12/weekly-issue-379.html#:~:text=Xget), +[GitHubDaily](https://x.com/i/status/1956204203937829256), +[FishC](https://www.bilibili.com/video/BV1EeeBzVEop/), and +[Xuanli 199](https://www.bilibili.com/video/BV197hqzsE8Y/?t=8). Sincere thanks +to GitCode and every creator, reader, and user who helped more people discover +Xget. ## 🎯 Quick Start **Pre-deployed Instance (no reliability guarantee): `xget.xi-xu.me`** -**URL Converter:** [**`xuc.xi-xu.me`**](https://xuc.xi-xu.me) - Convert any supported platform URL to Xget's acceleration format with one click +**URL Converter:** [**`xuc.xi-xu.me`**](https://xuc.xi-xu.me) - Convert any +supported platform URL to Xget's acceleration format with one click -**Agent Skills:** [**`skills/xget/`**](skills/xget/) - Designed to work as a standalone `/xget` directory in a skills installation +**Agent Skills:** [**`skills/xget/`**](skills/xget/) - Designed to work as a +standalone `/xget` directory in a skills installation ## 🌟 Core Advantages - Why Choose Xget? ### ⚡ Extreme Performance - Breaking Through Traditional Accelerator Bottlenecks -- **⚡ Millisecond Response**: Cloudflare's global 330+ edge nodes, average response time < 50ms -- **🌐 HTTP/3 Ultra-Fast Protocol**: Latest HTTP/3 protocol enabled, 40% reduction in connection latency, 30% increase in transmission speed -- **📦 Intelligent Multi-Compression**: Triple compression algorithms (gzip, deflate, brotli), 60% improvement in transmission efficiency -- **🔗 Zero-Latency Pre-Connection**: Connection warm-up and keep-alive, eliminating handshake overhead for second-level responses -- **⚡ Parallel Chunked Download**: Full support for HTTP Range requests, multiplied multi-threaded download speeds -- **🎯 Smart Routing Optimization**: Automatically selects optimal transmission paths, avoiding network congestion nodes +- **⚡ Millisecond Response**: Cloudflare's global 330+ edge nodes, average + response time < 50ms +- **🌐 HTTP/3 Ultra-Fast Protocol**: Latest HTTP/3 protocol enabled, 40% + reduction in connection latency, 30% increase in transmission speed +- **📦 Intelligent Multi-Compression**: Triple compression algorithms (gzip, + deflate, brotli), 60% improvement in transmission efficiency +- **🔗 Zero-Latency Pre-Connection**: Connection warm-up and keep-alive, + eliminating handshake overhead for second-level responses +- **⚡ Parallel Chunked Download**: Full support for HTTP Range requests, + multiplied multi-threaded download speeds +- **🎯 Smart Routing Optimization**: Automatically selects optimal transmission + paths, avoiding network congestion nodes ### 🌐 Deep Multi-Platform Integration -- **All-in-One Multi-Platform Support**: Unified support for mainstream platforms in various development scenarios -- **Intelligent Recognition and Conversion**: Automatically recognizes platform prefixes and converts to correct URL structures for target platforms -- **Consistent Acceleration Experience**: Enjoy unified and stable ultra-fast download experience regardless of file type or source +- **All-in-One Multi-Platform Support**: Unified support for mainstream + platforms in various development scenarios +- **Intelligent Recognition and Conversion**: Automatically recognizes platform + prefixes and converts to correct URL structures for target platforms +- **Consistent Acceleration Experience**: Enjoy unified and stable ultra-fast + download experience regardless of file type or source ### 🔒 Enterprise-Grade Security - **Multi-Layer Security Headers**: - - `Strict-Transport-Security`: Enforces HTTPS transmission, prevents man-in-the-middle attacks + - `Strict-Transport-Security`: Enforces HTTPS transmission, 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 limit: Prevents excessively long URL attacks (max 2048 characters) + - HTTP method whitelist: Regular requests limited to GET/HEAD, Git operations + dynamically allow POST + - Path length limit: Prevents excessively long 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 +- **Timeout Protection**: 30-second request timeout, prevents resource + exhaustion and malicious requests ### 🚀 Modern Architecture and Reliability @@ -109,22 +139,27 @@ Xget was invited to join the [GitCode platform](https://gitcode.com/xixu-me/xget - Automatic error recovery, improved download success rate - Timeout detection and interruption handling - **Efficient Caching Strategy**: - - 1800 seconds (30 minutes) default cache duration, significantly reduces origin server pressure + - 1800 seconds (30 minutes) default cache duration, significantly reduces + origin server pressure - Git operations skip caching to ensure real-time data - Edge caching based on Cloudflare Cache API - **Performance Monitoring System**: - - Built-in `PerformanceMonitor` class for real-time tracking of request stage durations - - Detailed performance data provided via `X-Performance-Metrics` response header + - Built-in `PerformanceMonitor` class for real-time tracking of request stage + durations + - Detailed performance data provided 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`) + - 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, supports shallow clones and branch specification + - `git clone`: Full repository cloning, supports shallow clones and branch + specification - `git push`: Code push and branch management - `git pull/fetch`: Incremental updates and remote synchronization - `git submodule`: Recursive submodule cloning @@ -135,13 +170,16 @@ Xget was invited to join the [GitCode platform](https://gitcode.com/xixu-me/xget ### 📱 Ecosystem Integration -- **Dedicated Browser Extension**: [Xget Now](https://github.com/xixu-me/Xget-Now) provides seamless experience +- **Dedicated Browser Extension**: + [Xget Now](https://github.com/xixu-me/Xget-Now) provides seamless experience - Automatic URL redirection, no manual URL modification needed - Support for custom Xget instance domains - 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**: Can be used directly in GitHub Actions, GitLab CI, and other environments +- **Download Tool Compatibility**: Perfect support for wget, cURL, aria2, IDM, + and other mainstream download tools +- **CI/CD Integration**: Can be used directly in GitHub Actions, GitLab CI, and + other environments ## 🏗️ System Architecture @@ -222,48 +260,49 @@ classDiagram ## 📖 URL Conversion Rules -Using the pre-deployed instance **`xget.xi-xu.me`** or your own deployed instance, simply replace the domain and add the platform prefix: +Using the pre-deployed instance **`xget.xi-xu.me`** or your own deployed +instance, simply replace the domain and add the platform prefix: ### Conversion Format -| Platform | Platform Prefix | Original URL Format | Accelerated URL Format | -|----------|----------------|---------------------|------------------------| -| GitHub | `gh` | `https://github.com/...` | `https://xget.xi-xu.me/gh/...` | -| GitHub Gist | `gist` | `https://gist.github.com/...` | `https://xget.xi-xu.me/gist/...` | -| 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/...` | -| Flathub | `flathub` | `https://dl.flathub.org/...` | `https://xget.xi-xu.me/flathub/...` | -| 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 Plugins | `jenkins` | `https://updates.jenkins.io/...` | `https://xget.xi-xu.me/jenkins/...` | -| Container Registries | `cr` | See [Container Registries](#container-registries) | See [Container Registries](#container-registries) | -| AI Inference Providers | `ip` | See [AI Inference Providers](#ai-inference-providers) | See [AI Inference Providers](#ai-inference-providers) | +| Platform | Platform Prefix | Original URL Format | Accelerated URL Format | +| ---------------------- | --------------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| GitHub | `gh` | `https://github.com/...` | `https://xget.xi-xu.me/gh/...` | +| GitHub Gist | `gist` | `https://gist.github.com/...` | `https://xget.xi-xu.me/gist/...` | +| 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/...` | +| Flathub | `flathub` | `https://dl.flathub.org/...` | `https://xget.xi-xu.me/flathub/...` | +| 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 Plugins | `jenkins` | `https://updates.jenkins.io/...` | `https://xget.xi-xu.me/jenkins/...` | +| Container Registries | `cr` | See [Container Registries](#container-registries) | See [Container Registries](#container-registries) | +| AI Inference Providers | `ip` | See [AI Inference Providers](#ai-inference-providers) | See [AI Inference Providers](#ai-inference-providers) | ### Platform Conversion Examples @@ -745,27 +784,28 @@ https://xget.xi-xu.me/jenkins/download/plugins/maven-plugin/3.27/maven-plugin.hp #### Container Registries -Xget supports multiple container registries, using the `cr/[Registry Prefix]` format: +Xget supports multiple container registries, using the `cr/[Registry Prefix]` +format: -| Container Registry | Registry Prefix | Original URL Format | Accelerated URL Format | -|-------------------|----------------|---------------------|------------------------| -| Docker Hub | `docker` | `https://registry-1.docker.io/...` | `https://xget.xi-xu.me/cr/docker/...` | -| 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/...` | +| Container Registry | Registry Prefix | Original URL Format | Accelerated URL Format | +| ---------------------------- | --------------- | ------------------------------------------- | ------------------------------------------- | +| Docker Hub | `docker` | `https://registry-1.docker.io/...` | `https://xget.xi-xu.me/cr/docker/...` | +| 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 # Docker Hub original URL (official images) @@ -793,42 +833,44 @@ https://gcr.io/v2/distroless/base/manifests/latest https://xget.xi-xu.me/cr/gcr/v2/distroless/base/manifests/latest ``` -For use cases, see [Container Image Acceleration](#container-image-acceleration). +For use cases, see +[Container Image Acceleration](#container-image-acceleration). #### AI Inference Providers -Xget supports API acceleration for many mainstream AI inference providers, using the `ip/[AI Provider Prefix]` format: +Xget supports API acceleration for many mainstream AI inference providers, using +the `ip/[AI Provider Prefix]` format: -| AI Inference Provider | 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/...` | +| AI Inference Provider | 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/...` | ```url # OpenAI API original URL @@ -856,7 +898,8 @@ https://router.huggingface.co/hf-inference/models/openai/whisper-large-v3 https://xget.xi-xu.me/ip/huggingface/hf-inference/models/openai/whisper-large-v3 ``` -For use cases, see [AI Inference API Acceleration](#ai-inference-api-acceleration). +For use cases, see +[AI Inference API Acceleration](#ai-inference-api-acceleration). ## 🎯 Use Cases @@ -1137,7 +1180,8 @@ conda config --show #### Configure in .condarc -The .condarc file can be placed in the user home directory (`~/.condarc`) or project root directory: +The .condarc file can be placed in the user home directory (`~/.condarc`) or +project root directory: ```yaml default_channels: @@ -1169,7 +1213,7 @@ dependencies: - scipy>=1.10.0 - pip - pip: - - requests>=2.28.0 + - requests>=2.28.0 ``` ```bash @@ -1689,21 +1733,35 @@ composer config -l #### Configure Flatpak / Flathub to Use Xget Mirror ```bash -# Add the Flathub remote via the rewritten .flatpakrepo descriptor +# If Flathub has not been added before, import the official descriptor +# first so Flatpak trusts the Flathub signing key. flatpak remote-add --if-not-exists flathub \ - https://xget.xi-xu.me/flathub/repo/flathub.flatpakrepo + https://dl.flathub.org/repo/flathub.flatpakrepo -# Or add the OSTree repository directly -flatpak remote-add --if-not-exists flathub \ - https://xget.xi-xu.me/flathub/repo/ +# Then repoint the existing Flathub remote to the Xget mirror +flatpak remote-modify flathub \ + --url=https://xget.xi-xu.me/flathub/repo/ + +# Restore the default upstream when needed +flatpak remote-modify flathub \ + --url=https://dl.flathub.org/repo/ ``` +Xget mirrors the Flathub OSTree repository endpoint. On current Flatpak clients, +importing a mirrored `.flatpakrepo` descriptor or adding the mirrored repository +directly may still fall back to the upstream Flathub URL or fail to import the +signing key, so `flatpak remote-modify ... --url=...` is the reliable setup. For +system-wide remotes, run the same commands with `sudo`. + #### Supported Flathub Services ```url # OSTree repository metadata +https://xget.xi-xu.me/flathub/repo/config https://xget.xi-xu.me/flathub/repo/summary https://xget.xi-xu.me/flathub/repo/summary.sig +https://xget.xi-xu.me/flathub/repo/summary.idx +https://xget.xi-xu.me/flathub/repo/summaries/... # Flatpak remote descriptor https://xget.xi-xu.me/flathub/repo/flathub.flatpakrepo @@ -1714,21 +1772,28 @@ https://xget.xi-xu.me/flathub/repo/appstream/[app-id].flatpakref # Repository objects and static deltas https://xget.xi-xu.me/flathub/repo/objects/... https://xget.xi-xu.me/flathub/repo/deltas/... +https://xget.xi-xu.me/flathub/repo/delta-indexes/... ``` #### Usage Examples ```bash +# Verify that the saved remote URL now points to Xget +flatpak remotes --show-details + # Inspect remote contents flatpak remote-ls flathub -# Install an app from the Xget-backed Flathub mirror +# Install an app after repointing the Flathub remote flatpak install flathub org.gnome.gedit # Install directly from a rewritten .flatpakref flatpak install --from \ https://xget.xi-xu.me/flathub/repo/appstream/org.gnome.gedit.flatpakref +# Print libcurl HTTP traces when troubleshooting +OSTREE_DEBUG_HTTP=1 flatpak remote-ls flathub + # Update installed apps and runtimes flatpak update ``` @@ -1939,7 +2004,8 @@ task checkFDroidAvailability { #### Use Xget to Accelerate Jenkins Plugin Download and Update -Supports Jenkins update center and plugin downloads, compatible with configuration methods of domestic mirrors like Tsinghua mirror. +Supports Jenkins update center and plugin downloads, compatible with +configuration methods of domestic mirrors like Tsinghua mirror. #### Jenkins Update Center Configuration @@ -1947,7 +2013,8 @@ Supports Jenkins update center and plugin downloads, compatible with configurati 1. Log in to Jenkins management interface 2. Go to **Manage Jenkins** → **Plugins** → **Advanced** -3. In the **Update Site** section, change the URL to `https://xget.xi-xu.me/jenkins/update-center.json` +3. In the **Update Site** section, change the URL to + `https://xget.xi-xu.me/jenkins/update-center.json` 4. Click **Submit** to save configuration ##### Method 2: Modify Configuration File @@ -2159,14 +2226,14 @@ spec: 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 + - 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 @@ -2178,7 +2245,7 @@ services: web: image: xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest ports: - - "80:80" + - '80:80' volumes: - ./html:/usr/share/nginx/html @@ -2186,14 +2253,14 @@ services: image: xget.xi-xu.me/cr/mcr/mssql/server:2022-latest environment: ACCEPT_EULA: Y - SA_PASSWORD: "MyStrongPassword123!" + SA_PASSWORD: 'MyStrongPassword123!' volumes: - mssql_data:/var/opt/mssql cache: image: xget.xi-xu.me/cr/ghcr/bitnami/redis:alpine ports: - - "6379:6379" + - '6379:6379' volumes: mssql_data: @@ -2368,61 +2435,61 @@ for name, key, path, model in providers: ```javascript // OpenAI API acceleration -import OpenAI from "openai"; +import OpenAI from 'openai'; const openaiClient = new OpenAI({ - apiKey: "your-openai-api-key", - baseURL: "https://xget.xi-xu.me/ip/openai/v1", // Use Xget + apiKey: 'your-openai-api-key', + baseURL: 'https://xget.xi-xu.me/ip/openai/v1' // Use Xget }); async function chatWithGPT() { const response = await openaiClient.responses.create({ - model: "gpt-5.1", - input: "Hello, GPT!", + model: 'gpt-5.1', + input: 'Hello, GPT!' }); console.log(response.output_text); } // Claude API acceleration -import Anthropic from "@anthropic-ai/sdk"; +import Anthropic from '@anthropic-ai/sdk'; const anthropicClient = new Anthropic({ - apiKey: "your-claude-api-key", - baseURL: "https://xget.xi-xu.me/ip/anthropic", // Use Xget + apiKey: 'your-claude-api-key', + baseURL: 'https://xget.xi-xu.me/ip/anthropic' // Use Xget }); async function chatWithClaude() { const message = await anthropicClient.messages.create({ - model: "claude-sonnet-4-5", + model: 'claude-sonnet-4-5', max_tokens: 256, messages: [ { - role: "user", - content: "Hello, Claude!", - }, - ], + role: 'user', + content: 'Hello, Claude!' + } + ] }); console.log(message.content[0].text); } // Gemini API acceleration -import { GoogleGenAI } from "@google/genai"; +import { GoogleGenAI } from '@google/genai'; const geminiClient = new GoogleGenAI({ - apiKey: "your-gemini-api-key", + apiKey: 'your-gemini-api-key' }); async function chatWithGemini() { const response = await geminiClient.models.generateContent({ - model: "gemini-3-pro-preview", - contents: "Hello, Gemini!", + model: 'gemini-3-pro-preview', + contents: 'Hello, Gemini!', config: { httpOptions: { - baseUrl: "https://xget.xi-xu.me/ip/gemini", // Use Xget - }, - }, + baseUrl: 'https://xget.xi-xu.me/ip/gemini' // Use Xget + } + } }); console.log(response.text); @@ -2458,11 +2525,17 @@ client = OpenAI( ### Deploy to Cloudflare Workers -1. **Fork this repository**: [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) +1. **Fork this repository**: + [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **Get Cloudflare credentials**: - - Visit [Account API tokens](https://dash.cloudflare.com/?to=/:account/api-tokens) to create and note an API token, using the "Edit Cloudflare Workers" template. - - Visit [Workers and Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) to note the Account ID. + - Visit + [Account API tokens](https://dash.cloudflare.com/?to=/:account/api-tokens) + to create and note an API token, using the "Edit Cloudflare Workers" + template. + - Visit + [Workers and Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) + to note the Account ID. 3. **Configure GitHub Secrets**: - Go to your GitHub repository → Settings → Secrets and variables → Actions @@ -2472,18 +2545,26 @@ client = OpenAI( 4. **Trigger deployment**: - Pushing code to the `main` branch will automatically trigger deployment - - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. will not trigger deployment + - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. + will not trigger deployment - You can also manually trigger deployment in the GitHub Actions page -5. **Bind custom domain** (optional): Bind your custom domain in the Cloudflare Workers console +5. **Bind custom domain** (optional): Bind your custom domain in the Cloudflare + Workers console ### Deploy to Cloudflare Pages -1. **Fork this repository**: [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) +1. **Fork this repository**: + [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **Get Cloudflare credentials**: - - Visit [Account API tokens](https://dash.cloudflare.com/?to=/:account/api-tokens) to create and note an API token, using the "Edit Cloudflare Workers" template. - - Visit [Workers and Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) to note the Account ID. + - Visit + [Account API tokens](https://dash.cloudflare.com/?to=/:account/api-tokens) + to create and note an API token, using the "Edit Cloudflare Workers" + template. + - Visit + [Workers and Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) + to note the Account ID. 3. **Configure GitHub Secrets**: - Go to your GitHub repository → Settings → Secrets and variables → Actions @@ -2492,21 +2573,32 @@ client = OpenAI( - `CLOUDFLARE_ACCOUNT_ID`: Your Account ID 4. **Trigger deployment**: - - The repository will automatically convert Workers code to Pages-compatible format and sync to the `pages` branch - - Pushing code to the `main` branch will automatically trigger sync and deployment workflows - - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. will not trigger deployment + - The repository will automatically convert Workers code to Pages-compatible + format and sync to the `pages` branch + - Pushing code to the `main` branch will automatically trigger sync and + deployment workflows + - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. + will not trigger deployment - You can also manually trigger deployment in the GitHub Actions page -5. **Bind custom domain** (optional): Bind your custom domain in the Cloudflare Pages console +5. **Bind custom domain** (optional): Bind your custom domain in the Cloudflare + Pages console -**Note**: The `pages` branch is automatically generated from the `main` branch. Do not manually edit the `pages` branch as it will be overwritten by the sync workflow. +**Note**: The `pages` branch is automatically generated from the `main` branch. +Do not manually edit the `pages` branch as it will be overwritten by the sync +workflow. ### Deploy to EdgeOne Pages -1. **Fork this repository**: [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) +1. **Fork this repository**: + [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **Get EdgeOne Pages API Token**: - - Visit [China EdgeOne Console](https://console.cloud.tencent.com/edgeone/pages?tab=api) or [International EdgeOne Console](https://console.tencentcloud.com/edgeone/pages?tab=api) to create and note an API Token + - Visit + [China EdgeOne Console](https://console.cloud.tencent.com/edgeone/pages?tab=api) + or + [International EdgeOne Console](https://console.tencentcloud.com/edgeone/pages?tab=api) + to create and note an API Token 3. **Configure GitHub Secrets**: - Go to your GitHub repository → Settings → Secrets and variables → Actions @@ -2514,23 +2606,32 @@ client = OpenAI( - `EDGEONE_API_TOKEN`: Your API Token 4. **Trigger deployment**: - - The repository will automatically convert Workers code to Pages-compatible format and sync to the `pages` branch - - Pushing code to the `main` branch will automatically trigger sync and deployment workflows - - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. will not trigger deployment + - The repository will automatically convert Workers code to Pages-compatible + format and sync to the `pages` branch + - Pushing code to the `main` branch will automatically trigger sync and + deployment workflows + - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. + will not trigger deployment - You can also manually trigger deployment in the GitHub Actions page -5. **Bind custom domain** (optional): Bind your custom domain in the EdgeOne Pages console +5. **Bind custom domain** (optional): Bind your custom domain in the EdgeOne + Pages console -**Note**: The `pages` branch is automatically generated from the `main` branch. Do not manually edit the `pages` branch as it will be overwritten by the sync workflow. +**Note**: The `pages` branch is automatically generated from the `main` branch. +Do not manually edit the `pages` branch as it will be overwritten by the sync +workflow. ### Deploy to Vercel -1. **Fork this repository**: [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) +1. **Fork this repository**: + [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **Get Vercel credentials**: - - Visit [Vercel Account Settings](https://vercel.com/account/settings/tokens) to create and note an Access Token + - Visit [Vercel Account Settings](https://vercel.com/account/settings/tokens) + to create and note an Access Token - Visit Team Settings to note the Team ID - - Visit project's Settings after creating a new project to note the Project ID + - Visit project's Settings after creating a new project to note the Project + ID 3. **Configure GitHub Secrets**: - Go to your GitHub repository → Settings → Secrets and variables → Actions @@ -2540,22 +2641,31 @@ client = OpenAI( - `VERCEL_PROJECT_ID`: Your Project ID 4. **Trigger deployment**: - - The repository will automatically convert Workers code to Functions-compatible format and sync to the `functions` branch - - Pushing code to the `main` branch will automatically trigger sync and deployment workflows - - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. will not trigger deployment + - The repository will automatically convert Workers code to + Functions-compatible format and sync to the `functions` branch + - Pushing code to the `main` branch will automatically trigger sync and + deployment workflows + - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. + will not trigger deployment - You can also manually trigger deployment in the GitHub Actions page -5. **Bind custom domain** (optional): Bind your custom domain in the Vercel console +5. **Bind custom domain** (optional): Bind your custom domain in the Vercel + console -**Note**: The `functions` branch is automatically generated from the `main` branch. Do not manually edit the `functions` branch as it will be overwritten by the sync workflow. +**Note**: The `functions` branch is automatically generated from the `main` +branch. Do not manually edit the `functions` branch as it will be overwritten by +the sync workflow. ### Deploy to Netlify -1. **Fork this repository**: [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) +1. **Fork this repository**: + [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **Get Netlify credentials**: - - Visit [Netlify User Settings](https://app.netlify.com/user/applications) to create and note a personal access token - - Visit Project configuration after creating a new project to note the Project ID + - Visit [Netlify User Settings](https://app.netlify.com/user/applications) to + create and note a personal access token + - Visit Project configuration after creating a new project to note the + Project ID 3. **Configure GitHub Secrets**: - Go to your GitHub repository → Settings → Secrets and variables → Actions @@ -2564,34 +2674,48 @@ client = OpenAI( - `NETLIFY_SITE_ID`: Your Project ID 4. **Trigger deployment**: - - The repository will automatically convert Workers code to Functions-compatible format and sync to the `functions` branch - - Pushing code to the `main` branch will automatically trigger sync and deployment workflows - - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. will not trigger deployment + - The repository will automatically convert Workers code to + Functions-compatible format and sync to the `functions` branch + - Pushing code to the `main` branch will automatically trigger sync and + deployment workflows + - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. + will not trigger deployment - You can also manually trigger deployment in the GitHub Actions page -5. **Bind custom domain** (optional): Bind your custom domain in the Netlify console +5. **Bind custom domain** (optional): Bind your custom domain in the Netlify + console -**Note**: The `functions` branch is automatically generated from the `main` branch. Do not manually edit the `functions` branch as it will be overwritten by the sync workflow. +**Note**: The `functions` branch is automatically generated from the `main` +branch. Do not manually edit the `functions` branch as it will be overwritten by +the sync workflow. ### Deploy to Deno Deploy -1. **Fork this repository**: [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) +1. **Fork this repository**: + [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **Switch default branch**: - Go to your GitHub repository → Settings → General → Default branch - Switch the default branch from `main` to `functions` 3. **Deploy to Deno Deploy**: - - Follow the [Deno Deploy official documentation](https://docs.deno.com/deploy/getting_started/) for deployment - - Create a new project in the Deno Deploy console and connect your GitHub repository + - Follow the + [Deno Deploy official documentation](https://docs.deno.com/deploy/getting_started/) + for deployment + - Create a new project in the Deno Deploy console and connect your GitHub + repository -4. **Bind custom domain** (optional): Bind your custom domain in the Deno Deploy console +4. **Bind custom domain** (optional): Bind your custom domain in the Deno Deploy + console -**Note**: The `functions` branch is automatically generated from the `main` branch. Do not manually edit the `functions` branch as it will be overwritten by the sync workflow. +**Note**: The `functions` branch is automatically generated from the `main` +branch. Do not manually edit the `functions` branch as it will be overwritten by +the sync workflow. ### Self-Hosted Deployment -If you prefer to run Xget on your own server, you can use Docker or Podman deployment: +If you prefer to run Xget on your own server, you can use Docker or Podman +deployment: #### Using Pre-built Image @@ -2673,7 +2797,7 @@ services: image: ghcr.io/xixu-me/xget:latest container_name: xget ports: - - "8080:8080" + - '8080:8080' restart: unless-stopped ``` @@ -2691,7 +2815,10 @@ podman compose up -d After deployment, Xget will run on port 8080. -If you want to deploy and run Xget on DigitalOcean, please refer to *[Deploying and Optimizing Xget on DigitalOcean](docs/deploy-on-digitalocean.md)*. By signing up via the referral link below, you can receive USD 200 in credits to try Droplets, Kubernetes, App Platform, and more: +If you want to deploy and run Xget on DigitalOcean, please refer to +_[Deploying and Optimizing Xget on DigitalOcean](docs/deploy-on-digitalocean.md)_. +By signing up via the referral link below, you can receive USD 200 in credits to +try Droplets, Kubernetes, App Platform, and more:

@@ -2699,7 +2826,9 @@ If you want to deploy and run Xget on DigitalOcean, please refer to *[Deploying

-**Note**: Self-hosted deployment does not include global edge network acceleration. Performance depends on your server configuration and network environment. +**Note**: Self-hosted deployment does not include global edge network +acceleration. Performance depends on your server configuration and network +environment. ## 🔧 Configuration @@ -2709,23 +2838,26 @@ You can customize configuration by modifying `src/config/index.js`: ```javascript export const CONFIG = { - TIMEOUT_SECONDS: 30, // Request timeout (seconds) - MAX_RETRIES: 3, // Maximum retry count - RETRY_DELAY_MS: 1000, // Retry delay (milliseconds) - CACHE_DURATION: 1800, // Cache duration (1800 seconds = 30 minutes) + TIMEOUT_SECONDS: 30, // Request timeout (seconds) + MAX_RETRIES: 3, // Maximum retry count + RETRY_DELAY_MS: 1000, // Retry delay (milliseconds) + CACHE_DURATION: 1800, // Cache duration (1800 seconds = 30 minutes) SECURITY: { - ALLOWED_METHODS: ["GET", "HEAD"], // Allowed HTTP methods (Git operations dynamically allow POST) - ALLOWED_ORIGINS: ["*"], // Allowed CORS origins - MAX_PATH_LENGTH: 2048, // Maximum path length (characters) - }, + ALLOWED_METHODS: ['GET', 'HEAD'], // Allowed HTTP methods (Git operations dynamically allow POST) + ALLOWED_ORIGINS: ['*'], // Allowed CORS origins + MAX_PATH_LENGTH: 2048 // Maximum path length (characters) + } }; ``` ### Performance Tuning Recommendations -- **Cache Optimization**: Adjust `CACHE_DURATION` based on usage patterns, reduce appropriately for frequently updated repositories -- **Timeout Settings**: Increase `TIMEOUT_SECONDS` appropriately for poor network conditions -- **Retry Strategy**: Increase `MAX_RETRIES` and `RETRY_DELAY_MS` in high-latency environments +- **Cache Optimization**: Adjust `CACHE_DURATION` based on usage patterns, + reduce appropriately for frequently updated repositories +- **Timeout Settings**: Increase `TIMEOUT_SECONDS` appropriately for poor + network conditions +- **Retry Strategy**: Increase `MAX_RETRIES` and `RETRY_DELAY_MS` in + high-latency environments ### Adding New Platforms @@ -2737,9 +2869,9 @@ export const PLATFORMS = { // New platform example custom: { - base: "https://example.com", - transform: (path) => path.replace(/^\/custom\//, "/"), - }, + base: 'https://example.com', + transform: path => path.replace(/^\/custom\//, '/') + } }; ``` @@ -2767,7 +2899,8 @@ export const PLATFORMS = { ## 🧪 Testing -The repository includes a complete test suite to ensure code quality and functional correctness. +The repository includes a complete test suite to ensure code quality and +functional correctness. ### Complete Testing @@ -2787,8 +2920,10 @@ npm run test:watch ### Test Coverage -- **Unit Tests**: Core functionality, platform configuration, performance monitoring -- **Integration Tests**: End-to-end processes, platform integration, Git protocol +- **Unit Tests**: Core functionality, platform configuration, performance + monitoring +- **Integration Tests**: End-to-end processes, platform integration, Git + protocol - **Security Tests**: Input validation, security headers, permission control - **Performance Tests**: Response time, memory usage, concurrent processing @@ -2796,17 +2931,18 @@ npm run test:watch ### Common Issues -**Q: No significant speed improvement?** -A: Check if source files are already cached at CDN edge nodes. Initial access may be slower, subsequent accesses will be significantly faster. +**Q: No significant speed improvement?** A: Check if source files are already +cached at CDN edge nodes. Initial access may be slower, subsequent accesses will +be significantly faster. -**Q: Git operations failing?** -A: Confirm correct URL format is used and Git client version supports HTTPS proxy. +**Q: Git operations failing?** A: Confirm correct URL format is used and Git +client version supports HTTPS proxy. -**Q: Cannot access after deployment?** -A: Check if Cloudflare Workers domain is correctly bound, confirm `wrangler.toml` configuration is correct. +**Q: Cannot access after deployment?** A: Check if Cloudflare Workers domain is +correctly bound, confirm `wrangler.toml` configuration is correct. -**Q: Getting 400 error?** -A: Check URL path format, confirm platform prefix is correctly used. +**Q: Getting 400 error?** A: Check URL path format, confirm platform prefix is +correctly used. ### Performance Monitoring @@ -2817,7 +2953,8 @@ Performance metrics are returned in response headers: ### Log Debugging -In development environment, you can view detailed logs through Cloudflare Workers console: +In development environment, you can view detailed logs through Cloudflare +Workers console: ```bash npx wrangler dev --log-level debug @@ -2825,23 +2962,67 @@ npx wrangler dev --log-level debug ## ⚠️ Disclaimer -- **Legal and Compliant Use**: This repository aims to provide unified acceleration services for code repositories, package registries, AI inference APIs, container images, models, datasets, and other legitimate developer resources. Users must strictly comply with the laws and regulations of their jurisdiction and the terms of service of relevant platforms. Any illegal use is the sole responsibility of the user -- **Non-Affiliation and Independent Responsibility**: This repository has no affiliation, agency, or partnership relationship with any third-party platforms. Any fork, secondary development, redistribution, or derivative version based on this repository is solely the responsibility of its maintainer; authors, maintainers, and contributors bear no legal or joint liability for the actions or consequences of derivative repositories -- **No Warranty and Limitation of Liability**: To the maximum extent permitted by applicable law, this repository is provided "AS IS" without any express or implied warranties (including but not limited to merchantability, fitness for a particular purpose, non-infringement, etc.). Authors, maintainers, and contributors assume no responsibility for any direct or indirect losses (including but not limited to data loss, business interruption, profit loss, etc.) resulting from the use of this repository -- **Risk Assumption Principle**: Users should independently assess usage risks, ensure their use is legal and compliant, respect third-party rights, and must not use this repository for any illegal, infringing, malicious, or improper purposes -- **Third-Party Platform Compliance**: Users must comply with the terms of service, API usage policies, rate limits, and copyright requirements of relevant platforms, and avoid causing overload or interference to source platforms. Each platform has the final interpretation right over its content, services, and policies -- **Intellectual Property Protection**: Content obtained through this repository is protected by respective copyright laws. Users must comply with relevant licensing agreements, copyright notices, and terms of use, and must not engage in any activities that infringe intellectual property rights -- **Security Recommendations**: Although this repository adopts a no-log architecture and does not store user request data, due to inherent risks of internet transmission, users are advised to perform security scans on downloaded content, especially for executable files and scripts -- **Open Source Nature**: This repository is open source. Authors and contributors are not obligated to provide technical support, bug fixes, or continuous maintenance. The inclusion of external contributions does not constitute endorsement or commitment to specific uses or effects -- **Name Usage Guidelines**: Any representations that may imply authors or contributors provide commercial cooperation, technical support, guarantees, or endorsements are strictly prohibited. The use of repository names or author identifiers must comply with relevant laws and regulations as well as general norms -- **Disclaimer Updates**: This disclaimer may be updated and revised as the repository develops or legal environments change. Continued use, copying, distribution, or modification of this repository constitutes acceptance of the latest version of this disclaimer +- **Legal and Compliant Use**: This repository aims to provide unified + acceleration services for code repositories, package registries, AI inference + APIs, container images, models, datasets, and other legitimate developer + resources. Users must strictly comply with the laws and regulations of their + jurisdiction and the terms of service of relevant platforms. Any illegal use + is the sole responsibility of the user +- **Non-Affiliation and Independent Responsibility**: This repository has no + affiliation, agency, or partnership relationship with any third-party + platforms. Any fork, secondary development, redistribution, or derivative + version based on this repository is solely the responsibility of its + maintainer; authors, maintainers, and contributors bear no legal or joint + liability for the actions or consequences of derivative repositories +- **No Warranty and Limitation of Liability**: To the maximum extent permitted + by applicable law, this repository is provided "AS IS" without any express or + implied warranties (including but not limited to merchantability, fitness for + a particular purpose, non-infringement, etc.). Authors, maintainers, and + contributors assume no responsibility for any direct or indirect losses + (including but not limited to data loss, business interruption, profit loss, + etc.) resulting from the use of this repository +- **Risk Assumption Principle**: Users should independently assess usage risks, + ensure their use is legal and compliant, respect third-party rights, and must + not use this repository for any illegal, infringing, malicious, or improper + purposes +- **Third-Party Platform Compliance**: Users must comply with the terms of + service, API usage policies, rate limits, and copyright requirements of + relevant platforms, and avoid causing overload or interference to source + platforms. Each platform has the final interpretation right over its content, + services, and policies +- **Intellectual Property Protection**: Content obtained through this repository + is protected by respective copyright laws. Users must comply with relevant + licensing agreements, copyright notices, and terms of use, and must not engage + in any activities that infringe intellectual property rights +- **Security Recommendations**: Although this repository adopts a no-log + architecture and does not store user request data, due to inherent risks of + internet transmission, users are advised to perform security scans on + downloaded content, especially for executable files and scripts +- **Open Source Nature**: This repository is open source. Authors and + contributors are not obligated to provide technical support, bug fixes, or + continuous maintenance. The inclusion of external contributions does not + constitute endorsement or commitment to specific uses or effects +- **Name Usage Guidelines**: Any representations that may imply authors or + contributors provide commercial cooperation, technical support, guarantees, or + endorsements are strictly prohibited. The use of repository names or author + identifiers must comply with relevant laws and regulations as well as general + norms +- **Disclaimer Updates**: This disclaimer may be updated and revised as the + repository develops or legal environments change. Continued use, copying, + distribution, or modification of this repository constitutes acceptance of the + latest version of this disclaimer ## 🤝 Contributing -We welcome all forms of contribution! Please check the [Contributing Guide](CONTRIBUTING.md) to learn how to participate in repository development. +We welcome all forms of contribution! Please check the +[Contributing Guide](CONTRIBUTING.md) to learn how to participate in repository +development. -1. **Report Issues**: Use [issue templates](https://github.com/xixu-me/Xget/issues/new/choose) to report bugs or propose feature requests -2. **Submit Code**: Fork the repository, create a feature branch, submit a pull request +1. **Report Issues**: Use + [issue templates](https://github.com/xixu-me/Xget/issues/new/choose) to + report bugs or propose feature requests +2. **Submit Code**: Fork the repository, create a feature branch, submit a pull + request 3. **Improve Documentation**: Fix errors, add examples, improve descriptions 4. **Testing Feedback**: Test in different environments and provide feedback @@ -2859,7 +3040,8 @@ We welcome all forms of contribution! Please check the [Contributing Guide](CONT Copyright © Xi Xu. -This repository is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details. +This repository is licensed under the GPL-3.0 License - see the +[LICENSE](LICENSE) file for details. --- @@ -2871,4 +3053,4 @@ Made with ❤️ by [Xi Xu](https://xi-xu.me) -[![Powered by DartNode](https://dartnode.com/branding/DN-Open-Source-sm.png)](https://dartnode.com "Powered by DartNode - Free VPS for Open Source") +[![Powered by DartNode](https://dartnode.com/branding/DN-Open-Source-sm.png)](https://dartnode.com 'Powered by DartNode - Free VPS for Open Source') diff --git a/README.zh-Hans.md b/README.zh-Hans.md index fac742f..672b823 100644 --- a/README.zh-Hans.md +++ b/README.zh-Hans.md @@ -61,7 +61,9 @@ 技术深度解析文章已发布:**[《深入剖析 Xget:一个高性能、多协议、高安全性的开发者资源加速引擎》](https://blog.xi-xu.me/2025/10/07/deep-dive-into-xget-technology.html)**。 -Xget 已受邀入驻 [GitCode 平台](https://gitcode.com/xixu-me/xget),并被认证为 G-Star 毕业项目;同时也获得多位技术博主自发推荐,包括[阮一峰](https://www.ruanyifeng.com/blog/2025/12/weekly-issue-379.html#:~:text=Xget)、[GitHubDaily](https://x.com/i/status/1956204203937829256)、[鱼 C](https://www.bilibili.com/video/BV1EeeBzVEop/)、[玄离 199](https://www.bilibili.com/video/BV197hqzsE8Y/?t=8) 等。在此感谢 GitCode 的认可,也感谢每一位分享、推荐和实际使用 Xget 的朋友。 +Xget 已受邀入驻 +[GitCode 平台](https://gitcode.com/xixu-me/xget),并被认证为 G-Star 毕业项目;同时也获得多位技术博主自发推荐,包括[阮一峰](https://www.ruanyifeng.com/blog/2025/12/weekly-issue-379.html#:~:text=Xget)、[GitHubDaily](https://x.com/i/status/1956204203937829256)、[鱼 C](https://www.bilibili.com/video/BV1EeeBzVEop/)、[玄离 199](https://www.bilibili.com/video/BV197hqzsE8Y/?t=8) +等。在此感谢 GitCode 的认可,也感谢每一位分享、推荐和实际使用 Xget 的朋友。 ## 🎯 快速使用 @@ -69,14 +71,16 @@ Xget 已受邀入驻 [GitCode 平台](https://gitcode.com/xixu-me/xget),并被 **URL 转换器:**[**`xuc.xi-xu.me`**](https://xuc.xi-xu.me) - 一键转换任意支持平台的 URL 为 Xget 的加速格式 -**Agent Skills:**[**`skills/xget/`**](skills/xget/) - 可以作为独立的 `/xget` 目录直接安装到 skills 目录中 +**Agent Skills:**[**`skills/xget/`**](skills/xget/) - 可以作为独立的 `/xget` +目录直接安装到 skills 目录中 ## 🌟 核心优势 - 为什么选择 Xget? ### ⚡ 极速性能 - 突破传统加速器瓶颈 - **⚡ 毫秒级响应**:Cloudflare 全球 330+ 边缘节点,平均响应时间 < 50ms -- **🌐 HTTP/3 极速协议**:启用最新 HTTP/3 协议,连接延迟降低 40%,传输速度提升 30% +- **🌐 + HTTP/3 极速协议**:启用最新 HTTP/3 协议,连接延迟降低 40%,传输速度提升 30% - **📦 智能多重压缩**:gzip、deflate、brotli 三重压缩算法,传输效率提升 60% - **🔗 零延迟预连接**:连接预热和保持活跃,消除握手开销,实现秒级响应 - **⚡ 并行分片下载**:完整支持 HTTP Range 请求,多线程下载速度倍增 @@ -135,7 +139,8 @@ Xget 已受邀入驻 [GitCode 平台](https://gitcode.com/xixu-me/xget),并被 ### 📱 生态系统集成 -- **专用浏览器扩展**:[Xget Now](https://github.com/xixu-me/Xget-Now) 提供无缝体验 +- **专用浏览器扩展**:[Xget Now](https://github.com/xixu-me/Xget-Now) + 提供无缝体验 - 自动 URL 重定向,无需手动修改 URL - 支持自定义 Xget 实例域名 - 多平台偏好设置和黑白名单管理 @@ -222,48 +227,49 @@ classDiagram ## 📖 URL 转换规则 -使用预部署实例 **`xget.xi-xu.me`** 或你自己部署的实例,只需简单替换域名并添加平台前缀: +使用预部署实例 **`xget.xi-xu.me`** +或你自己部署的实例,只需简单替换域名并添加平台前缀: ### 转换格式 -| 平台 | 平台前缀 | 原始 URL 格式 | 加速 URL 格式 | -|------|----------|--------------|--------------| -| GitHub | `gh` | `https://github.com/...` | `https://xget.xi-xu.me/gh/...` | -| GitHub Gist | `gist` | `https://gist.github.com/...` | `https://xget.xi-xu.me/gist/...` | -| 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/...` 和 `https://conda.anaconda.org/...` | `https://xget.xi-xu.me/conda/...` 和 `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 模块 | `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/...` | -| Flathub | `flathub` | `https://dl.flathub.org/...` | `https://xget.xi-xu.me/flathub/...` | -| 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 插件 | `jenkins` | `https://updates.jenkins.io/...` | `https://xget.xi-xu.me/jenkins/...` | -| 容器注册表 | `cr` | 见[容器注册表](#容器注册表) | 见[容器注册表](#容器注册表) | -| AI 推理提供商 | `ip` | 见 [AI 推理提供商](#ai-推理提供商) | 见 [AI 推理提供商](#ai-推理提供商) | +| 平台 | 平台前缀 | 原始 URL 格式 | 加速 URL 格式 | +| ------------- | ----------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| GitHub | `gh` | `https://github.com/...` | `https://xget.xi-xu.me/gh/...` | +| GitHub Gist | `gist` | `https://gist.github.com/...` | `https://xget.xi-xu.me/gist/...` | +| 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/...` 和 `https://conda.anaconda.org/...` | `https://xget.xi-xu.me/conda/...` 和 `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 模块 | `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/...` | +| Flathub | `flathub` | `https://dl.flathub.org/...` | `https://xget.xi-xu.me/flathub/...` | +| 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 插件 | `jenkins` | `https://updates.jenkins.io/...` | `https://xget.xi-xu.me/jenkins/...` | +| 容器注册表 | `cr` | 见[容器注册表](#容器注册表) | 见[容器注册表](#容器注册表) | +| AI 推理提供商 | `ip` | 见 [AI 推理提供商](#ai-推理提供商) | 见 [AI 推理提供商](#ai-推理提供商) | ### 各平台转换示例 @@ -747,25 +753,25 @@ https://xget.xi-xu.me/jenkins/download/plugins/maven-plugin/3.27/maven-plugin.hp Xget 支持多个容器注册表,使用 `cr/[容器注册表前缀]` 格式: -| 容器注册表 | 容器注册表前缀 | 原始 URL 格式 | 加速 URL 格式 | -|----------|------|--------------|--------------| -| Docker Hub | `docker` | `https://registry-1.docker.io/...` | `https://xget.xi-xu.me/cr/docker/...` | -| Quay.io | `quay` | `https://quay.io/...` | `https://xget.xi-xu.me/cr/quay/...` | -| 谷歌容器注册表 | `gcr` | `https://gcr.io/...` | `https://xget.xi-xu.me/cr/gcr/...` | -| 微软容器注册表 | `mcr` | `https://mcr.microsoft.com/...` | `https://xget.xi-xu.me/cr/mcr/...` | -| 亚马逊公共弹性容器注册表 | `ecr` | `https://public.ecr.aws/...` | `https://xget.xi-xu.me/cr/ecr/...` | -| GitHub 容器注册表 | `ghcr` | `https://ghcr.io/...` | `https://xget.xi-xu.me/cr/ghcr/...` | -| GitLab 容器注册表 | `gitlab` | `https://registry.gitlab.com/...` | `https://xget.xi-xu.me/cr/gitlab/...` | -| 红帽注册表 | `redhat` | `https://registry.redhat.io/...` | `https://xget.xi-xu.me/cr/redhat/...` | -| 甲骨文容器注册表 | `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 注册表 | `digitalocean` | `https://registry.digitalocean.com/...` | `https://xget.xi-xu.me/cr/digitalocean/...` | -| VMware 注册表 | `vmware` | `https://projects.registry.vmware.com/...` | `https://xget.xi-xu.me/cr/vmware/...` | -| Kubernetes 注册表 | `k8s` | `https://registry.k8s.io/...` | `https://xget.xi-xu.me/cr/k8s/...` | -| Heroku 注册表 | `heroku` | `https://registry.heroku.com/...` | `https://xget.xi-xu.me/cr/heroku/...` | -| SUSE 注册表 | `suse` | `https://registry.suse.com/...` | `https://xget.xi-xu.me/cr/suse/...` | -| openSUSE 注册表 | `opensuse` | `https://registry.opensuse.org/...` | `https://xget.xi-xu.me/cr/opensuse/...` | -| Gitpod 注册表 | `gitpod` | `https://registry.gitpod.io/...` | `https://xget.xi-xu.me/cr/gitpod/...` | +| 容器注册表 | 容器注册表前缀 | 原始 URL 格式 | 加速 URL 格式 | +| ------------------------ | -------------- | ------------------------------------------- | ------------------------------------------- | +| Docker Hub | `docker` | `https://registry-1.docker.io/...` | `https://xget.xi-xu.me/cr/docker/...` | +| Quay.io | `quay` | `https://quay.io/...` | `https://xget.xi-xu.me/cr/quay/...` | +| 谷歌容器注册表 | `gcr` | `https://gcr.io/...` | `https://xget.xi-xu.me/cr/gcr/...` | +| 微软容器注册表 | `mcr` | `https://mcr.microsoft.com/...` | `https://xget.xi-xu.me/cr/mcr/...` | +| 亚马逊公共弹性容器注册表 | `ecr` | `https://public.ecr.aws/...` | `https://xget.xi-xu.me/cr/ecr/...` | +| GitHub 容器注册表 | `ghcr` | `https://ghcr.io/...` | `https://xget.xi-xu.me/cr/ghcr/...` | +| GitLab 容器注册表 | `gitlab` | `https://registry.gitlab.com/...` | `https://xget.xi-xu.me/cr/gitlab/...` | +| 红帽注册表 | `redhat` | `https://registry.redhat.io/...` | `https://xget.xi-xu.me/cr/redhat/...` | +| 甲骨文容器注册表 | `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 注册表 | `digitalocean` | `https://registry.digitalocean.com/...` | `https://xget.xi-xu.me/cr/digitalocean/...` | +| VMware 注册表 | `vmware` | `https://projects.registry.vmware.com/...` | `https://xget.xi-xu.me/cr/vmware/...` | +| Kubernetes 注册表 | `k8s` | `https://registry.k8s.io/...` | `https://xget.xi-xu.me/cr/k8s/...` | +| Heroku 注册表 | `heroku` | `https://registry.heroku.com/...` | `https://xget.xi-xu.me/cr/heroku/...` | +| SUSE 注册表 | `suse` | `https://registry.suse.com/...` | `https://xget.xi-xu.me/cr/suse/...` | +| openSUSE 注册表 | `opensuse` | `https://registry.opensuse.org/...` | `https://xget.xi-xu.me/cr/opensuse/...` | +| Gitpod 注册表 | `gitpod` | `https://registry.gitpod.io/...` | `https://xget.xi-xu.me/cr/gitpod/...` | ```url # Docker Hub 原始 URL(官方镜像) @@ -799,36 +805,36 @@ https://xget.xi-xu.me/cr/gcr/v2/distroless/base/manifests/latest Xget 支持众多主流 AI 推理提供商的 API 加速,使用 `ip/[AI 推理提供商前缀]` 格式: -| AI 推理提供商 | AI 推理提供商前缀 | 原始 URL 格式 | 加速 URL 格式 | -|-------------|----------|-------------|-------------| -| 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 模型 | `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/...` | +| AI 推理提供商 | AI 推理提供商前缀 | 原始 URL 格式 | 加速 URL 格式 | +| -------------- | ----------------- | ----------------------------------------------- | -------------------------------------------- | +| 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 模型 | `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/...` | ```url # OpenAI API 原始 URL @@ -1169,7 +1175,7 @@ dependencies: - scipy>=1.10.0 - pip - pip: - - requests>=2.28.0 + - requests>=2.28.0 ``` ```bash @@ -1689,21 +1695,35 @@ composer config -l #### 配置 Flatpak / Flathub 使用 Xget 镜像 ```bash -# 通过重写后的 .flatpakrepo 描述文件添加 Flathub 远程仓库 +# 如果之前从未添加过 Flathub,请先导入官方描述文件, +# 让 Flatpak 信任 Flathub 的签名密钥。 flatpak remote-add --if-not-exists flathub \ - https://xget.xi-xu.me/flathub/repo/flathub.flatpakrepo + https://dl.flathub.org/repo/flathub.flatpakrepo -# 或者直接添加 OSTree 存储库地址 -flatpak remote-add --if-not-exists flathub \ - https://xget.xi-xu.me/flathub/repo/ +# 然后把现有 Flathub 远程仓库改写到 Xget 镜像 +flatpak remote-modify flathub \ + --url=https://xget.xi-xu.me/flathub/repo/ + +# 需要时恢复默认上游地址 +flatpak remote-modify flathub \ + --url=https://dl.flathub.org/repo/ ``` +Xget 镜像的是 Flathub 的 OSTree 仓库端点。根据当前 Flatpak 客户端的实际行为,直接导入镜像 +`.flatpakrepo` +描述文件,或者直接添加镜像仓库 URL,仍然可能回退到上游 Flathub 地址,或者因为未导入签名密钥而失败,因此更可靠的做法是先添加官方 Flathub,再通过 +`flatpak remote-modify ... --url=...` +改写远程地址。若你使用系统级远程仓库,请在相同命令前加上 `sudo`。 + #### 支持的 Flathub 服务 ```url # OSTree 存储库元数据 +https://xget.xi-xu.me/flathub/repo/config https://xget.xi-xu.me/flathub/repo/summary https://xget.xi-xu.me/flathub/repo/summary.sig +https://xget.xi-xu.me/flathub/repo/summary.idx +https://xget.xi-xu.me/flathub/repo/summaries/... # Flatpak 远程仓库描述文件 https://xget.xi-xu.me/flathub/repo/flathub.flatpakrepo @@ -1714,21 +1734,28 @@ https://xget.xi-xu.me/flathub/repo/appstream/[应用 ID].flatpakref # 存储库对象与静态增量 https://xget.xi-xu.me/flathub/repo/objects/... https://xget.xi-xu.me/flathub/repo/deltas/... +https://xget.xi-xu.me/flathub/repo/delta-indexes/... ``` #### 使用示例 ```bash +# 确认保存下来的远程仓库 URL 已经指向 Xget +flatpak remotes --show-details + # 查看远程仓库内容 flatpak remote-ls flathub -# 从 Xget 加速的 Flathub 镜像安装应用 +# 在改写 Flathub 远程仓库后安装应用 flatpak install flathub org.gnome.gedit # 直接通过重写后的 .flatpakref 安装 flatpak install --from \ https://xget.xi-xu.me/flathub/repo/appstream/org.gnome.gedit.flatpakref +# 排查问题时打印 libcurl HTTP 调试输出 +OSTREE_DEBUG_HTTP=1 flatpak remote-ls flathub + # 更新已安装的应用和运行时 flatpak update ``` @@ -1947,7 +1974,8 @@ task checkFDroidAvailability { 1. 登录 Jenkins 管理界面 2. 进入 **Manage Jenkins** → **Plugins** → **Advanced** -3. 在 **Update Site** 部分,将 URL 更改为 `https://xget.xi-xu.me/jenkins/update-center.json` +3. 在 **Update Site** 部分,将 URL 更改为 + `https://xget.xi-xu.me/jenkins/update-center.json` 4. 点击 **Submit** 保存配置 @@ -2160,14 +2188,14 @@ spec: 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 + - 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 配置 @@ -2179,7 +2207,7 @@ services: web: image: xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest ports: - - "80:80" + - '80:80' volumes: - ./html:/usr/share/nginx/html @@ -2187,14 +2215,14 @@ services: image: xget.xi-xu.me/cr/mcr/mssql/server:2022-latest environment: ACCEPT_EULA: Y - SA_PASSWORD: "MyStrongPassword123!" + SA_PASSWORD: 'MyStrongPassword123!' volumes: - mssql_data:/var/opt/mssql cache: image: xget.xi-xu.me/cr/ghcr/bitnami/redis:alpine ports: - - "6379:6379" + - '6379:6379' volumes: mssql_data: @@ -2369,61 +2397,61 @@ for name, key, path, model in providers: ```javascript // OpenAI API 加速 -import OpenAI from "openai"; +import OpenAI from 'openai'; const openaiClient = new OpenAI({ - apiKey: "your-openai-api-key", - baseURL: "https://xget.xi-xu.me/ip/openai/v1", // 使用 Xget + apiKey: 'your-openai-api-key', + baseURL: 'https://xget.xi-xu.me/ip/openai/v1' // 使用 Xget }); async function chatWithGPT() { const response = await openaiClient.responses.create({ - model: "gpt-5.1", - input: "Hello, GPT!", + model: 'gpt-5.1', + input: 'Hello, GPT!' }); console.log(response.output_text); } // Claude API 加速 -import Anthropic from "@anthropic-ai/sdk"; +import Anthropic from '@anthropic-ai/sdk'; const anthropicClient = new Anthropic({ - apiKey: "your-claude-api-key", - baseURL: "https://xget.xi-xu.me/ip/anthropic", // 使用 Xget + apiKey: 'your-claude-api-key', + baseURL: 'https://xget.xi-xu.me/ip/anthropic' // 使用 Xget }); async function chatWithClaude() { const message = await anthropicClient.messages.create({ - model: "claude-sonnet-4-5", + model: 'claude-sonnet-4-5', max_tokens: 256, messages: [ { - role: "user", - content: "Hello, Claude!", - }, - ], + role: 'user', + content: 'Hello, Claude!' + } + ] }); console.log(message.content[0].text); } // Gemini API 加速 -import { GoogleGenAI } from "@google/genai"; +import { GoogleGenAI } from '@google/genai'; const geminiClient = new GoogleGenAI({ - apiKey: "your-gemini-api-key", + apiKey: 'your-gemini-api-key' }); async function chatWithGemini() { const response = await geminiClient.models.generateContent({ - model: "gemini-3-pro-preview", - contents: "Hello, Gemini!", + model: 'gemini-3-pro-preview', + contents: 'Hello, Gemini!', config: { httpOptions: { - baseUrl: "https://xget.xi-xu.me/ip/gemini", // 使用 Xget - }, - }, + baseUrl: 'https://xget.xi-xu.me/ip/gemini' // 使用 Xget + } + } }); console.log(response.text); @@ -2462,8 +2490,11 @@ client = OpenAI( 1. **fork 本存储库**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **获取 Cloudflare 凭证**: - - 访问[账户 API 令牌](https://dash.cloudflare.com/?to=/:account/api-tokens)创建并记录 API 令牌,使用“编辑 Cloudflare Workers”模板 - - 访问 [Workers 和 Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) 记录 Account ID + - 访问[账户 API 令牌](https://dash.cloudflare.com/?to=/:account/api-tokens)创建并记录 API 令牌,使用“编辑 Cloudflare + Workers”模板 + - 访问 + [Workers 和 Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) + 记录 Account ID 3. **配置 GitHub Secrets**: - 进入你的 GitHub 存储库 → Settings → Secrets and variables → Actions @@ -2483,8 +2514,11 @@ client = OpenAI( 1. **fork 本存储库**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **获取 Cloudflare 凭证**: - - 访问[账户 API 令牌](https://dash.cloudflare.com/?to=/:account/api-tokens)创建并记录 API 令牌,使用“编辑 Cloudflare Workers”模板 - - 访问 [Workers 和 Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) 记录 Account ID + - 访问[账户 API 令牌](https://dash.cloudflare.com/?to=/:account/api-tokens)创建并记录 API 令牌,使用“编辑 Cloudflare + Workers”模板 + - 访问 + [Workers 和 Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) + 记录 Account ID 3. **配置 GitHub Secrets**: - 进入你的 GitHub 存储库 → Settings → Secrets and variables → Actions @@ -2500,14 +2534,16 @@ client = OpenAI( 5. **绑定自定义域名**(可选):在 Cloudflare Pages 控制台中绑定你的自定义域名 -**注意**:`pages` 分支是从 `main` 分支自动生成的。请勿手动编辑 `pages` 分支,因为它会被同步工作流覆盖。 +**注意**:`pages` 分支是从 `main` 分支自动生成的。请勿手动编辑 `pages` +分支,因为它会被同步工作流覆盖。 ### 部署到 EdgeOne Pages 1. **fork 本存储库**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **获取 EdgeOne Pages API Token**: - - 访问[中国站 EdgeOne 控制台](https://console.cloud.tencent.com/edgeone/pages?tab=api)或[国际站 EdgeOne 控制台](https://console.tencentcloud.com/edgeone/pages?tab=api)创建并记录 API Token + - 访问[中国站 EdgeOne 控制台](https://console.cloud.tencent.com/edgeone/pages?tab=api)或[国际站 EdgeOne 控制台](https://console.tencentcloud.com/edgeone/pages?tab=api)创建并记录 API + Token 3. **配置 GitHub Secrets**: - 进入你的 GitHub 存储库 → Settings → Secrets and variables → Actions @@ -2522,14 +2558,16 @@ client = OpenAI( 5. **绑定自定义域名**(可选):在 EdgeOne Pages 控制台中绑定你的自定义域名 -**注意**:`pages` 分支是从 `main` 分支自动生成的。请勿手动编辑 `pages` 分支,因为它会被同步工作流覆盖。 +**注意**:`pages` 分支是从 `main` 分支自动生成的。请勿手动编辑 `pages` +分支,因为它会被同步工作流覆盖。 ### 部署到 Vercel 1. **fork 本存储库**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **获取 Vercel 凭证**: - - 访问 [Vercel Account Settings](https://vercel.com/account/settings/tokens) 创建并记录 Access Token + - 访问 [Vercel Account Settings](https://vercel.com/account/settings/tokens) + 创建并记录 Access Token - 访问 Team Settings 记录 Team ID - 新建项目后访问项目的 Settings 记录 Project ID @@ -2541,21 +2579,24 @@ client = OpenAI( - `VERCEL_PROJECT_ID`:你的 Project ID 4. **触发部署**: - - 存储库会自动将 Workers 代码转换为 Functions 兼容格式并同步到 `functions` 分支 + - 存储库会自动将 Workers 代码转换为 Functions 兼容格式并同步到 `functions` + 分支 - 推送代码到 `main` 分支会自动触发同步和部署工作流 - 仅修改文档文件(`.md`)、`LICENSE`、`.gitignore` 等不会触发部署 - 也可以在 GitHub Actions 页面手动触发部署 5. **绑定自定义域名**(可选):在 Vercel 控制台中绑定你的自定义域名 -**注意**:`functions` 分支是从 `main` 分支自动生成的。请勿手动编辑 `functions` 分支,因为它会被同步工作流覆盖。 +**注意**:`functions` 分支是从 `main` 分支自动生成的。请勿手动编辑 `functions` +分支,因为它会被同步工作流覆盖。 ### 部署到 Netlify 1. **fork 本存储库**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **获取 Netlify 凭证**: - - 访问 [Netlify User Settings](https://app.netlify.com/user/applications) 创建并记录 personal access token + - 访问 [Netlify User Settings](https://app.netlify.com/user/applications) + 创建并记录 personal access token - 新建项目后访问 Project configuration 记录 Project ID 3. **配置 GitHub Secrets**: @@ -2565,14 +2606,16 @@ client = OpenAI( - `NETLIFY_SITE_ID`:你的 Project ID 4. **触发部署**: - - 存储库会自动将 Workers 代码转换为 Functions 兼容格式并同步到 `functions` 分支 + - 存储库会自动将 Workers 代码转换为 Functions 兼容格式并同步到 `functions` + 分支 - 推送代码到 `main` 分支会自动触发同步和部署工作流 - 仅修改文档文件(`.md`)、`LICENSE`、`.gitignore` 等不会触发部署 - 也可以在 GitHub Actions 页面手动触发部署 5. **绑定自定义域名**(可选):在 Netlify 控制台中绑定你的自定义域名 -**注意**:`functions` 分支是从 `main` 分支自动生成的。请勿手动编辑 `functions` 分支,因为它会被同步工作流覆盖。 +**注意**:`functions` 分支是从 `main` 分支自动生成的。请勿手动编辑 `functions` +分支,因为它会被同步工作流覆盖。 ### 部署到 Deno Deploy @@ -2583,12 +2626,14 @@ client = OpenAI( - 将默认分支从 `main` 切换到 `functions` 3. **部署到 Deno Deploy**: - - 参考 [Deno Deploy 官方文档](https://docs.deno.com/deploy/getting_started/)执行部署 + - 参考 + [Deno Deploy 官方文档](https://docs.deno.com/deploy/getting_started/)执行部署 - 在 Deno Deploy 控制台创建新项目并连接你的 GitHub 存储库 4. **绑定自定义域名**(可选):在 Deno Deploy 控制台中绑定你的自定义域名 -**注意**:`functions` 分支是从 `main` 分支自动生成的。请勿手动编辑 `functions` 分支,因为它会被同步工作流覆盖。 +**注意**:`functions` 分支是从 `main` 分支自动生成的。请勿手动编辑 `functions` +分支,因为它会被同步工作流覆盖。 ### 自托管部署 @@ -2674,7 +2719,7 @@ services: image: ghcr.io/xixu-me/xget:latest container_name: xget ports: - - "8080:8080" + - '8080:8080' restart: unless-stopped ``` @@ -2692,7 +2737,8 @@ podman compose up -d 部署完成后,Xget 将在 8080 端口运行。 -如果你希望在 DigitalOcean 上部署和运行 Xget,可以参考文档[《Deploying and Optimizing Xget on DigitalOcean》](docs/deploy-on-digitalocean.md)。通过下方推荐链接注册账户,可获得 200 美元代金券积分,可用于创建 Droplet、Kubernetes、App Platform 等资源: +如果你希望在 DigitalOcean 上部署和运行 Xget,可以参考文档[《Deploying and Optimizing Xget on DigitalOcean》](docs/deploy-on-digitalocean.md)。通过下方推荐链接注册账户,可获得 200 美元代金券积分,可用于创建 Droplet、Kubernetes、App +Platform 等资源:

@@ -2710,15 +2756,15 @@ podman compose up -d ```javascript export const CONFIG = { - TIMEOUT_SECONDS: 30, // 请求超时时间(秒) - MAX_RETRIES: 3, // 最大重试次数 - RETRY_DELAY_MS: 1000, // 重试延迟时间(毫秒) - CACHE_DURATION: 1800, // 缓存持续时间(1800秒 = 30分钟) + TIMEOUT_SECONDS: 30, // 请求超时时间(秒) + MAX_RETRIES: 3, // 最大重试次数 + RETRY_DELAY_MS: 1000, // 重试延迟时间(毫秒) + CACHE_DURATION: 1800, // 缓存持续时间(1800秒 = 30分钟) SECURITY: { - ALLOWED_METHODS: ["GET", "HEAD"], // 允许的 HTTP 方法(Git 操作会动态允许 POST) - ALLOWED_ORIGINS: ["*"], // 允许的 CORS 源 - MAX_PATH_LENGTH: 2048, // 最大路径长度(字符) - }, + ALLOWED_METHODS: ['GET', 'HEAD'], // 允许的 HTTP 方法(Git 操作会动态允许 POST) + ALLOWED_ORIGINS: ['*'], // 允许的 CORS 源 + MAX_PATH_LENGTH: 2048 // 最大路径长度(字符) + } }; ``` @@ -2738,9 +2784,9 @@ export const PLATFORMS = { // 新平台示例 custom: { - base: "https://example.com", - transform: (path) => path.replace(/^\/custom\//, "/"), - }, + base: 'https://example.com', + transform: path => path.replace(/^\/custom\//, '/') + } }; ``` @@ -2803,11 +2849,10 @@ A: 检查源文件是否已经在 CDN 边缘节点缓存,首次访问可能较 **Q: Git 操作失败?** A: 确认使用了正确的 URL 格式,且 Git 客户端版本支持 HTTPS 代理。 -**Q: 部署后无法访问?** -A: 检查 Cloudflare Workers 域名是否正确绑定,确认 `wrangler.toml` 配置正确。 +**Q: 部署后无法访问?** A: 检查 Cloudflare Workers 域名是否正确绑定,确认 +`wrangler.toml` 配置正确。 -**Q: 出现 400 错误?** -A: 检查 URL 路径格式,确认平台前缀正确使用。 +**Q: 出现 400 错误?** A: 检查 URL 路径格式,确认平台前缀正确使用。 ### 性能监控 @@ -2828,7 +2873,8 @@ npx wrangler dev --log-level debug - **合法合规使用**:本存储库旨在为代码存储库、软件包注册表、AI 推理 API、容器镜像、模型、数据集及更多合法开发者资源提供统一加速服务。使用者应严格遵守所在司法辖区法律法规及相关平台服务条款,任何非法用途的法律责任由使用者自行承担 - **非关联性与独立责任**:本存储库与各第三方平台不存在任何隶属、代理或合作关系。任何基于本存储库的 fork、二次开发、再分发或衍生版本均由其维护者独立承担全部责任;作者、维护者及贡献者不对衍生存储库的任何行为或后果承担法律或连带责任 -- **无担保与免责条款**:在适用法律允许的最大范围内,本存储库按“现状(AS IS)”提供,不提供任何明示或暗示担保(包括但不限于适销性、特定用途适用性、非侵权等)。对因使用本存储库而造成的任何直接或间接损失(包括但不限于数据丢失、业务中断、利润损失等),作者、维护者及贡献者不承担任何责任 +- **无担保与免责条款**:在适用法律允许的最大范围内,本存储库按“现状(AS + IS)”提供,不提供任何明示或暗示担保(包括但不限于适销性、特定用途适用性、非侵权等)。对因使用本存储库而造成的任何直接或间接损失(包括但不限于数据丢失、业务中断、利润损失等),作者、维护者及贡献者不承担任何责任 - **风险自担原则**:使用者应自行评估使用风险,确保其使用行为合法合规,不侵犯第三方权益,不得将本存储库用于任何违法、侵权、恶意或不当用途 - **第三方平台合规**:使用者应遵守相关平台的服务条款、API 使用政策、速率限制及版权要求,避免对源平台造成过载或干扰。各平台对其内容、服务及政策拥有最终解释权 - **知识产权保护**:通过本存储库获取的内容受相应版权法保护。使用者应遵守相关许可协议、版权声明及使用条款,不得从事任何侵犯知识产权的行为 @@ -2841,7 +2887,8 @@ npx wrangler dev --log-level debug 我们欢迎各种形式的贡献!请查看[贡献指南](CONTRIBUTING.md)了解如何参与存储库开发。 -1. **报告问题**: 使用 [issue 模板](https://github.com/xixu-me/Xget/issues/new/choose)报告 bug 或提出功能请求 +1. **报告问题**: 使用 + [issue 模板](https://github.com/xixu-me/Xget/issues/new/choose)报告 bug 或提出功能请求 2. **提交代码**: fork 存储库,创建功能分支,提交 pull request 3. **改进文档**: 修正错误、添加示例、完善说明 4. **测试反馈**: 在不同环境下测试并提供反馈 diff --git a/README.zh-Hant.md b/README.zh-Hant.md index dadd060..7b5c1ed 100644 --- a/README.zh-Hant.md +++ b/README.zh-Hant.md @@ -61,7 +61,9 @@ 技術深度解析文章已發布:**[《深入剖析 Xget:一個高效能、多協定、高安全性的開發者資源加速引擎》](https://blog.xi-xu.me/2025/10/07/deep-dive-into-xget-technology.html)**。 -Xget 已受邀入駐 [GitCode 平台](https://gitcode.com/xixu-me/xget),並被認證為 G-Star 畢業專案;同時也獲得多位技術博主自發推薦,包括[阮一峰](https://www.ruanyifeng.com/blog/2025/12/weekly-issue-379.html#:~:text=Xget)、[GitHubDaily](https://x.com/i/status/1956204203937829256)、[魚 C](https://www.bilibili.com/video/BV1EeeBzVEop/)、[玄離 199](https://www.bilibili.com/video/BV197hqzsE8Y/?t=8) 等。在此感謝 GitCode 的肯定,也感謝每一位分享、推薦與實際使用 Xget 的朋友。 +Xget 已受邀入駐 +[GitCode 平台](https://gitcode.com/xixu-me/xget),並被認證為 G-Star 畢業專案;同時也獲得多位技術博主自發推薦,包括[阮一峰](https://www.ruanyifeng.com/blog/2025/12/weekly-issue-379.html#:~:text=Xget)、[GitHubDaily](https://x.com/i/status/1956204203937829256)、[魚 C](https://www.bilibili.com/video/BV1EeeBzVEop/)、[玄離 199](https://www.bilibili.com/video/BV197hqzsE8Y/?t=8) +等。在此感謝 GitCode 的肯定,也感謝每一位分享、推薦與實際使用 Xget 的朋友。 ## 🎯 快速開始 @@ -69,14 +71,16 @@ Xget 已受邀入駐 [GitCode 平台](https://gitcode.com/xixu-me/xget),並被 **URL 轉換器:**[**`xuc.xi-xu.me`**](https://xuc.xi-xu.me) - 一鍵轉換任意支援平台的 URL 為 Xget 的加速格式 -**Agent Skills:**[**`skills/xget/`**](skills/xget/) - 可作為獨立的 `/xget` 目錄直接安裝到 skills 目錄中 +**Agent Skills:**[**`skills/xget/`**](skills/xget/) - 可作為獨立的 `/xget` +目錄直接安裝到 skills 目錄中 ## 🌟 核心優勢 - 為什麼選擇 Xget? ### ⚡ 極速效能 - 突破傳統加速器瓶頸 - **⚡ 毫秒級回應**:Cloudflare 全球 330+ 邊緣節點,平均回應時間 < 50ms -- **🌐 HTTP/3 極速協定**:啟用最新 HTTP/3 協定,連線延遲降低 40%,傳輸速度提升 30% +- **🌐 + HTTP/3 極速協定**:啟用最新 HTTP/3 協定,連線延遲降低 40%,傳輸速度提升 30% - **📦 智慧多重壓縮**:gzip、deflate、brotli 三重壓縮演算法,傳輸效率提升 60% - **🔗 零延遲預連線**:連線預熱和保持活躍,消除握手開銷,實現秒級回應 - **⚡ 平行分片下載**:完整支援 HTTP Range 請求,多執行緒下載速度倍增 @@ -135,7 +139,8 @@ Xget 已受邀入駐 [GitCode 平台](https://gitcode.com/xixu-me/xget),並被 ### 📱 生態系統整合 -- **專用瀏覽器擴充功能**:[Xget Now](https://github.com/xixu-me/Xget-Now) 提供無縫體驗 +- **專用瀏覽器擴充功能**:[Xget Now](https://github.com/xixu-me/Xget-Now) + 提供無縫體驗 - 自動 URL 轉址,無需手動修改 URL - 支援自訂 Xget 實例網域 - 多平台偏好設定和黑白名單管理 @@ -222,48 +227,49 @@ classDiagram ## 📖 URL 轉換規則 -使用預部署實例 **`xget.xi-xu.me`** 或您自己部署的實例,只需簡單替換網域並新增平台前綴: +使用預部署實例 **`xget.xi-xu.me`** +或您自己部署的實例,只需簡單替換網域並新增平台前綴: ### 轉換格式 -| 平台 | 平台前綴 | 原始 URL 格式 | 加速 URL 格式 | -|------|----------|--------------|--------------| -| GitHub | `gh` | `https://github.com/...` | `https://xget.xi-xu.me/gh/...` | -| GitHub Gist | `gist` | `https://gist.github.com/...` | `https://xget.xi-xu.me/gist/...` | -| 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/...` 和 `https://conda.anaconda.org/...` | `https://xget.xi-xu.me/conda/...` 和 `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 模組 | `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/...` | -| Flathub | `flathub` | `https://dl.flathub.org/...` | `https://xget.xi-xu.me/flathub/...` | -| 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 外掛程式 | `jenkins` | `https://updates.jenkins.io/...` | `https://xget.xi-xu.me/jenkins/...` | -| 容器註冊表 | `cr` | 見[容器註冊表](#容器註冊表) | 見[容器註冊表](#容器註冊表) | -| AI 推理供應商 | `ip` | 見 [AI 推理供應商](#ai-推理供應商) | 見 [AI 推理供應商](#ai-推理供應商) | +| 平台 | 平台前綴 | 原始 URL 格式 | 加速 URL 格式 | +| ---------------- | ----------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| GitHub | `gh` | `https://github.com/...` | `https://xget.xi-xu.me/gh/...` | +| GitHub Gist | `gist` | `https://gist.github.com/...` | `https://xget.xi-xu.me/gist/...` | +| 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/...` 和 `https://conda.anaconda.org/...` | `https://xget.xi-xu.me/conda/...` 和 `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 模組 | `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/...` | +| Flathub | `flathub` | `https://dl.flathub.org/...` | `https://xget.xi-xu.me/flathub/...` | +| 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 外掛程式 | `jenkins` | `https://updates.jenkins.io/...` | `https://xget.xi-xu.me/jenkins/...` | +| 容器註冊表 | `cr` | 見[容器註冊表](#容器註冊表) | 見[容器註冊表](#容器註冊表) | +| AI 推理供應商 | `ip` | 見 [AI 推理供應商](#ai-推理供應商) | 見 [AI 推理供應商](#ai-推理供應商) | ### 各平台轉換範例 @@ -747,25 +753,25 @@ https://xget.xi-xu.me/jenkins/download/plugins/maven-plugin/3.27/maven-plugin.hp Xget 支援多個容器註冊表,使用 `cr/[容器註冊表前綴]` 格式: -| 容器註冊表 | 容器註冊表前綴 | 原始 URL 格式 | 加速 URL 格式 | -|----------|------|--------------|--------------| -| Docker Hub | `docker` | `https://registry-1.docker.io/...` | `https://xget.xi-xu.me/cr/docker/...` | -| Quay.io | `quay` | `https://quay.io/...` | `https://xget.xi-xu.me/cr/quay/...` | -| Google 容器註冊表 | `gcr` | `https://gcr.io/...` | `https://xget.xi-xu.me/cr/gcr/...` | -| Microsoft 容器註冊表 | `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 容器註冊表 | `ghcr` | `https://ghcr.io/...` | `https://xget.xi-xu.me/cr/ghcr/...` | -| GitLab 容器註冊表 | `gitlab` | `https://registry.gitlab.com/...` | `https://xget.xi-xu.me/cr/gitlab/...` | -| Red Hat 註冊表 | `redhat` | `https://registry.redhat.io/...` | `https://xget.xi-xu.me/cr/redhat/...` | -| Oracle 容器註冊表 | `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 註冊表 | `digitalocean` | `https://registry.digitalocean.com/...` | `https://xget.xi-xu.me/cr/digitalocean/...` | -| VMware 註冊表 | `vmware` | `https://projects.registry.vmware.com/...` | `https://xget.xi-xu.me/cr/vmware/...` | -| Kubernetes 註冊表 | `k8s` | `https://registry.k8s.io/...` | `https://xget.xi-xu.me/cr/k8s/...` | -| Heroku 註冊表 | `heroku` | `https://registry.heroku.com/...` | `https://xget.xi-xu.me/cr/heroku/...` | -| SUSE 註冊表 | `suse` | `https://registry.suse.com/...` | `https://xget.xi-xu.me/cr/suse/...` | -| openSUSE 註冊表 | `opensuse` | `https://registry.opensuse.org/...` | `https://xget.xi-xu.me/cr/opensuse/...` | -| Gitpod 註冊表 | `gitpod` | `https://registry.gitpod.io/...` | `https://xget.xi-xu.me/cr/gitpod/...` | +| 容器註冊表 | 容器註冊表前綴 | 原始 URL 格式 | 加速 URL 格式 | +| -------------------- | -------------- | ------------------------------------------- | ------------------------------------------- | +| Docker Hub | `docker` | `https://registry-1.docker.io/...` | `https://xget.xi-xu.me/cr/docker/...` | +| Quay.io | `quay` | `https://quay.io/...` | `https://xget.xi-xu.me/cr/quay/...` | +| Google 容器註冊表 | `gcr` | `https://gcr.io/...` | `https://xget.xi-xu.me/cr/gcr/...` | +| Microsoft 容器註冊表 | `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 容器註冊表 | `ghcr` | `https://ghcr.io/...` | `https://xget.xi-xu.me/cr/ghcr/...` | +| GitLab 容器註冊表 | `gitlab` | `https://registry.gitlab.com/...` | `https://xget.xi-xu.me/cr/gitlab/...` | +| Red Hat 註冊表 | `redhat` | `https://registry.redhat.io/...` | `https://xget.xi-xu.me/cr/redhat/...` | +| Oracle 容器註冊表 | `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 註冊表 | `digitalocean` | `https://registry.digitalocean.com/...` | `https://xget.xi-xu.me/cr/digitalocean/...` | +| VMware 註冊表 | `vmware` | `https://projects.registry.vmware.com/...` | `https://xget.xi-xu.me/cr/vmware/...` | +| Kubernetes 註冊表 | `k8s` | `https://registry.k8s.io/...` | `https://xget.xi-xu.me/cr/k8s/...` | +| Heroku 註冊表 | `heroku` | `https://registry.heroku.com/...` | `https://xget.xi-xu.me/cr/heroku/...` | +| SUSE 註冊表 | `suse` | `https://registry.suse.com/...` | `https://xget.xi-xu.me/cr/suse/...` | +| openSUSE 註冊表 | `opensuse` | `https://registry.opensuse.org/...` | `https://xget.xi-xu.me/cr/opensuse/...` | +| Gitpod 註冊表 | `gitpod` | `https://registry.gitpod.io/...` | `https://xget.xi-xu.me/cr/gitpod/...` | ```url # Docker Hub 原始 URL(官方鏡像) @@ -799,36 +805,36 @@ https://xget.xi-xu.me/cr/gcr/v2/distroless/base/manifests/latest Xget 支援眾多主流 AI 推理供應商的 API 加速,使用 `ip/[AI 推理供應商前綴]` 格式: -| AI 推理供應商 | AI 推理供應商前綴 | 原始 URL 格式 | 加速 URL 格式 | -|-------------|----------|-------------|-------------| -| 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/...` | +| AI 推理供應商 | AI 推理供應商前綴 | 原始 URL 格式 | 加速 URL 格式 | +| -------------- | ----------------- | ----------------------------------------------- | -------------------------------------------- | +| 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/...` | ```url # OpenAI API 原始 URL @@ -1169,7 +1175,7 @@ dependencies: - scipy>=1.10.0 - pip - pip: - - requests>=2.28.0 + - requests>=2.28.0 ``` ```bash @@ -1689,21 +1695,35 @@ composer config -l #### 配置 Flatpak / Flathub 使用 Xget 鏡像 ```bash -# 透過重寫後的 .flatpakrepo 描述檔新增 Flathub 遠端儲存庫 +# 如果之前從未加入過 Flathub,請先匯入官方描述檔, +# 讓 Flatpak 信任 Flathub 的簽章金鑰。 flatpak remote-add --if-not-exists flathub \ - https://xget.xi-xu.me/flathub/repo/flathub.flatpakrepo + https://dl.flathub.org/repo/flathub.flatpakrepo -# 或者直接新增 OSTree 儲存庫位址 -flatpak remote-add --if-not-exists flathub \ - https://xget.xi-xu.me/flathub/repo/ +# 然後將現有的 Flathub 遠端儲存庫改寫到 Xget 鏡像 +flatpak remote-modify flathub \ + --url=https://xget.xi-xu.me/flathub/repo/ + +# 需要時恢復預設上游位址 +flatpak remote-modify flathub \ + --url=https://dl.flathub.org/repo/ ``` +Xget 鏡像的是 Flathub 的 OSTree 儲存庫端點。依照目前 Flatpak 用戶端的實際行為,直接匯入鏡像 +`.flatpakrepo` +描述檔,或直接新增鏡像儲存庫 URL,仍可能回退到上游 Flathub 位址,或因未匯入簽章金鑰而失敗,因此較可靠的做法是先加入官方 Flathub,再透過 +`flatpak remote-modify ... --url=...` +改寫遠端位址。若你使用系統層級遠端儲存庫,請在相同命令前加上 `sudo`。 + #### 支援的 Flathub 服務 ```url # OSTree 儲存庫中繼資料 +https://xget.xi-xu.me/flathub/repo/config https://xget.xi-xu.me/flathub/repo/summary https://xget.xi-xu.me/flathub/repo/summary.sig +https://xget.xi-xu.me/flathub/repo/summary.idx +https://xget.xi-xu.me/flathub/repo/summaries/... # Flatpak 遠端儲存庫描述檔 https://xget.xi-xu.me/flathub/repo/flathub.flatpakrepo @@ -1714,21 +1734,28 @@ https://xget.xi-xu.me/flathub/repo/appstream/[應用程式 ID].flatpakref # 儲存庫物件與靜態增量 https://xget.xi-xu.me/flathub/repo/objects/... https://xget.xi-xu.me/flathub/repo/deltas/... +https://xget.xi-xu.me/flathub/repo/delta-indexes/... ``` #### 使用範例 ```bash +# 確認儲存下來的遠端儲存庫 URL 已指向 Xget +flatpak remotes --show-details + # 檢視遠端儲存庫內容 flatpak remote-ls flathub -# 從 Xget 加速的 Flathub 鏡像安裝應用程式 +# 在改寫 Flathub 遠端儲存庫後安裝應用程式 flatpak install flathub org.gnome.gedit # 直接透過重寫後的 .flatpakref 安裝 flatpak install --from \ https://xget.xi-xu.me/flathub/repo/appstream/org.gnome.gedit.flatpakref +# 疑難排解時輸出 libcurl HTTP 偵錯資訊 +OSTREE_DEBUG_HTTP=1 flatpak remote-ls flathub + # 更新已安裝的應用程式與執行時 flatpak update ``` @@ -1947,7 +1974,8 @@ task checkFDroidAvailability { 1. 登入 Jenkins 管理介面 2. 進入 **Manage Jenkins** → **Plugins** → **Advanced** -3. 在 **Update Site** 部分,將 URL 更改為 `https://xget.xi-xu.me/jenkins/update-center.json` +3. 在 **Update Site** 部分,將 URL 更改為 + `https://xget.xi-xu.me/jenkins/update-center.json` 4. 點擊 **Submit** 儲存配置 ##### 方法二:修改設定檔 @@ -2159,14 +2187,14 @@ spec: 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 + - 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 配置 @@ -2178,7 +2206,7 @@ services: web: image: xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest ports: - - "80:80" + - '80:80' volumes: - ./html:/usr/share/nginx/html @@ -2186,14 +2214,14 @@ services: image: xget.xi-xu.me/cr/mcr/mssql/server:2022-latest environment: ACCEPT_EULA: Y - SA_PASSWORD: "MyStrongPassword123!" + SA_PASSWORD: 'MyStrongPassword123!' volumes: - mssql_data:/var/opt/mssql cache: image: xget.xi-xu.me/cr/ghcr/bitnami/redis:alpine ports: - - "6379:6379" + - '6379:6379' volumes: mssql_data: @@ -2368,61 +2396,61 @@ for name, key, path, model in providers: ```javascript // OpenAI API 加速 -import OpenAI from "openai"; +import OpenAI from 'openai'; const openaiClient = new OpenAI({ - apiKey: "your-openai-api-key", - baseURL: "https://xget.xi-xu.me/ip/openai/v1", // 使用 Xget + apiKey: 'your-openai-api-key', + baseURL: 'https://xget.xi-xu.me/ip/openai/v1' // 使用 Xget }); async function chatWithGPT() { const response = await openaiClient.responses.create({ - model: "gpt-5.1", - input: "Hello, GPT!", + model: 'gpt-5.1', + input: 'Hello, GPT!' }); console.log(response.output_text); } // Claude API 加速 -import Anthropic from "@anthropic-ai/sdk"; +import Anthropic from '@anthropic-ai/sdk'; const anthropicClient = new Anthropic({ - apiKey: "your-claude-api-key", - baseURL: "https://xget.xi-xu.me/ip/anthropic", // 使用 Xget + apiKey: 'your-claude-api-key', + baseURL: 'https://xget.xi-xu.me/ip/anthropic' // 使用 Xget }); async function chatWithClaude() { const message = await anthropicClient.messages.create({ - model: "claude-sonnet-4-5", + model: 'claude-sonnet-4-5', max_tokens: 256, messages: [ { - role: "user", - content: "Hello, Claude!", - }, - ], + role: 'user', + content: 'Hello, Claude!' + } + ] }); console.log(message.content[0].text); } // Gemini API 加速 -import { GoogleGenAI } from "@google/genai"; +import { GoogleGenAI } from '@google/genai'; const geminiClient = new GoogleGenAI({ - apiKey: "your-gemini-api-key", + apiKey: 'your-gemini-api-key' }); async function chatWithGemini() { const response = await geminiClient.models.generateContent({ - model: "gemini-3-pro-preview", - contents: "Hello, Gemini!", + model: 'gemini-3-pro-preview', + contents: 'Hello, Gemini!', config: { httpOptions: { - baseUrl: "https://xget.xi-xu.me/ip/gemini", // 使用 Xget - }, - }, + baseUrl: 'https://xget.xi-xu.me/ip/gemini' // 使用 Xget + } + } }); console.log(response.text); @@ -2461,8 +2489,11 @@ client = OpenAI( 1. **fork 本儲存庫**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **獲取 Cloudflare 憑證**: - - 存取[帳戶 API 權杖](https://dash.cloudflare.com/?to=/:account/api-tokens)建立並記錄 API 權杖,使用「編輯 Cloudflare Workers」範本 - - 存取 [Workers 和 Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) 記錄 Account ID + - 存取[帳戶 API 權杖](https://dash.cloudflare.com/?to=/:account/api-tokens)建立並記錄 API 權杖,使用「編輯 Cloudflare + Workers」範本 + - 存取 + [Workers 和 Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) + 記錄 Account ID 3. **配置 GitHub Secrets**: - 進入您的 GitHub 儲存庫 → Settings → Secrets and variables → Actions @@ -2482,8 +2513,11 @@ client = OpenAI( 1. **fork 本儲存庫**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **獲取 Cloudflare 憑證**: - - 存取[帳戶 API 權杖](https://dash.cloudflare.com/?to=/:account/api-tokens)建立並記錄 API 權杖,使用「編輯 Cloudflare Workers」範本 - - 存取 [Workers 和 Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) 記錄 Account ID + - 存取[帳戶 API 權杖](https://dash.cloudflare.com/?to=/:account/api-tokens)建立並記錄 API 權杖,使用「編輯 Cloudflare + Workers」範本 + - 存取 + [Workers 和 Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages) + 記錄 Account ID 3. **配置 GitHub Secrets**: - 進入您的 GitHub 儲存庫 → Settings → Secrets and variables → Actions @@ -2499,14 +2533,16 @@ client = OpenAI( 5. **綁定自訂網域**(可選):在 Cloudflare Pages 控制台中綁定您的自訂網域 -**注意**:`pages` 分支是從 `main` 分支自動生成的。請勿手動編輯 `pages` 分支,因為它會被同步工作流程覆蓋。 +**注意**:`pages` 分支是從 `main` 分支自動生成的。請勿手動編輯 `pages` +分支,因為它會被同步工作流程覆蓋。 ### 部署到 EdgeOne Pages 1. **fork 本儲存庫**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **獲取 EdgeOne Pages API Token**: - - 存取[中國站 EdgeOne 控制台](https://console.cloud.tencent.com/edgeone/pages?tab=api)或[國際站 EdgeOne 控制台](https://console.tencentcloud.com/edgeone/pages?tab=api)建立並記錄 API Token + - 存取[中國站 EdgeOne 控制台](https://console.cloud.tencent.com/edgeone/pages?tab=api)或[國際站 EdgeOne 控制台](https://console.tencentcloud.com/edgeone/pages?tab=api)建立並記錄 API + Token 3. **配置 GitHub Secrets**: - 進入您的 GitHub 儲存庫 → Settings → Secrets and variables → Actions @@ -2521,14 +2557,16 @@ client = OpenAI( 5. **綁定自訂網域**(可選):在 EdgeOne Pages 控制台中綁定您的自訂網域 -**注意**:`pages` 分支是從 `main` 分支自動生成的。請勿手動編輯 `pages` 分支,因為它會被同步工作流程覆蓋。 +**注意**:`pages` 分支是從 `main` 分支自動生成的。請勿手動編輯 `pages` +分支,因為它會被同步工作流程覆蓋。 ### 部署到 Vercel 1. **fork 本儲存庫**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **獲取 Vercel 憑證**: - - 存取 [Vercel Account Settings](https://vercel.com/account/settings/tokens) 建立並記錄 Access Token + - 存取 [Vercel Account Settings](https://vercel.com/account/settings/tokens) + 建立並記錄 Access Token - 存取 Team Settings 記錄 Team ID - 新建專案後存取專案的 Settings 記錄 Project ID @@ -2540,21 +2578,24 @@ client = OpenAI( - `VERCEL_PROJECT_ID`:您的 Project ID 4. **觸發部署**: - - 儲存庫會自動將 Workers 程式碼轉換為 Functions 相容格式並同步到 `functions` 分支 + - 儲存庫會自動將 Workers 程式碼轉換為 Functions 相容格式並同步到 `functions` + 分支 - 推送程式碼到 `main` 分支會自動觸發同步和部署工作流程 - 僅修改文件檔案(`.md`)、`LICENSE`、`.gitignore` 等不會觸發部署 - 也可以在 GitHub Actions 頁面手動觸發部署 5. **綁定自訂網域**(可選):在 Vercel 控制台中綁定您的自訂網域 -**注意**:`functions` 分支是從 `main` 分支自動生成的。請勿手動編輯 `functions` 分支,因為它會被同步工作流程覆蓋。 +**注意**:`functions` 分支是從 `main` 分支自動生成的。請勿手動編輯 `functions` +分支,因為它會被同步工作流程覆蓋。 ### 部署到 Netlify 1. **fork 本儲存庫**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) 2. **獲取 Netlify 憑證**: - - 存取 [Netlify User Settings](https://app.netlify.com/user/applications) 建立並記錄 personal access token + - 存取 [Netlify User Settings](https://app.netlify.com/user/applications) + 建立並記錄 personal access token - 新建專案後存取 Project configuration 記錄 Project ID 3. **配置 GitHub Secrets**: @@ -2564,14 +2605,16 @@ client = OpenAI( - `NETLIFY_SITE_ID`:您的 Project ID 4. **觸發部署**: - - 儲存庫會自動將 Workers 程式碼轉換為 Functions 相容格式並同步到 `functions` 分支 + - 儲存庫會自動將 Workers 程式碼轉換為 Functions 相容格式並同步到 `functions` + 分支 - 推送程式碼到 `main` 分支會自動觸發同步和部署工作流程 - 僅修改文件檔案(`.md`)、`LICENSE`、`.gitignore` 等不會觸發部署 - 也可以在 GitHub Actions 頁面手動觸發部署 5. **綁定自訂網域**(可選):在 Netlify 控制台中綁定您的自訂網域 -**注意**:`functions` 分支是從 `main` 分支自動生成的。請勿手動編輯 `functions` 分支,因為它會被同步工作流程覆蓋。 +**注意**:`functions` 分支是從 `main` 分支自動生成的。請勿手動編輯 `functions` +分支,因為它會被同步工作流程覆蓋。 ### 部署到 Deno Deploy @@ -2582,12 +2625,14 @@ client = OpenAI( - 將預設分支從 `main` 切換到 `functions` 3. **部署到 Deno Deploy**: - - 參考 [Deno Deploy 官方文件](https://docs.deno.com/deploy/getting_started/)執行部署 + - 參考 + [Deno Deploy 官方文件](https://docs.deno.com/deploy/getting_started/)執行部署 - 在 Deno Deploy 控制台建立新專案並連接您的 GitHub 儲存庫 4. **綁定自訂網域**(可選):在 Deno Deploy 控制台中綁定您的自訂網域 -**注意**:`functions` 分支是從 `main` 分支自動生成的。請勿手動編輯 `functions` 分支,因為它會被同步工作流程覆蓋。 +**注意**:`functions` 分支是從 `main` 分支自動生成的。請勿手動編輯 `functions` +分支,因為它會被同步工作流程覆蓋。 ### 自託管部署 @@ -2673,7 +2718,7 @@ services: image: ghcr.io/xixu-me/xget:latest container_name: xget ports: - - "8080:8080" + - '8080:8080' restart: unless-stopped ``` @@ -2691,7 +2736,8 @@ podman compose up -d 部署完成後,Xget 將在 8080 連接埠執行。 -如果您希望在 DigitalOcean 上部署和執行 Xget,可以參考文件[《Deploying and Optimizing Xget on DigitalOcean》](docs/deploy-on-digitalocean.md)。透過下方推薦連結註冊帳戶,可獲得 200 美元代金券積分,可用於建立 Droplet、Kubernetes、App Platform 等資源: +如果您希望在 DigitalOcean 上部署和執行 Xget,可以參考文件[《Deploying and Optimizing Xget on DigitalOcean》](docs/deploy-on-digitalocean.md)。透過下方推薦連結註冊帳戶,可獲得 200 美元代金券積分,可用於建立 Droplet、Kubernetes、App +Platform 等資源:

@@ -2709,15 +2755,15 @@ podman compose up -d ```javascript export const CONFIG = { - TIMEOUT_SECONDS: 30, // 請求逾時時間(秒) - MAX_RETRIES: 3, // 最大重試次數 - RETRY_DELAY_MS: 1000, // 重試延遲時間(毫秒) - CACHE_DURATION: 1800, // 快取持續時間(1800秒 = 30分鐘) + TIMEOUT_SECONDS: 30, // 請求逾時時間(秒) + MAX_RETRIES: 3, // 最大重試次數 + RETRY_DELAY_MS: 1000, // 重試延遲時間(毫秒) + CACHE_DURATION: 1800, // 快取持續時間(1800秒 = 30分鐘) SECURITY: { - ALLOWED_METHODS: ["GET", "HEAD"], // 允許的 HTTP 方法(Git 操作會動態允許 POST) - ALLOWED_ORIGINS: ["*"], // 允許的 CORS 來源 - MAX_PATH_LENGTH: 2048, // 最大路徑長度(字元) - }, + ALLOWED_METHODS: ['GET', 'HEAD'], // 允許的 HTTP 方法(Git 操作會動態允許 POST) + ALLOWED_ORIGINS: ['*'], // 允許的 CORS 來源 + MAX_PATH_LENGTH: 2048 // 最大路徑長度(字元) + } }; ``` @@ -2737,9 +2783,9 @@ export const PLATFORMS = { // 新平台範例 custom: { - base: "https://example.com", - transform: (path) => path.replace(/^\/custom\//, "/"), - }, + base: 'https://example.com', + transform: path => path.replace(/^\/custom\//, '/') + } }; ``` @@ -2802,11 +2848,10 @@ A: 檢查來源檔案是否已經在 CDN 邊緣節點快取,首次存取可能 **Q: Git 操作失敗?** A: 確認使用了正確的 URL 格式,且 Git 用戶端版本支援 HTTPS 代理。 -**Q: 部署後無法存取?** -A: 檢查 Cloudflare Workers 網域是否正確綁定,確認 `wrangler.toml` 配置正確。 +**Q: 部署後無法存取?** A: 檢查 Cloudflare Workers 網域是否正確綁定,確認 +`wrangler.toml` 配置正確。 -**Q: 出現 400 錯誤?** -A: 檢查 URL 路徑格式,確認平台前綴正確使用。 +**Q: 出現 400 錯誤?** A: 檢查 URL 路徑格式,確認平台前綴正確使用。 ### 效能監控 @@ -2827,7 +2872,8 @@ npx wrangler dev --log-level debug - **合法合規使用**:本儲存庫旨在為程式碼儲存庫、軟體包註冊表、AI 推理 API、容器鏡像、模型、資料集及更多合法開發者資源提供統一加速服務。使用者應嚴格遵守所在司法管轄區法律法規及相關平台服務條款,任何非法用途的法律責任由使用者自行承擔 - **非關聯性與獨立責任**:本儲存庫與各第三方平台不存在任何隸屬、代理或合作關係。任何基於本儲存庫的 fork、二次開發、再分發或衍生版本均由其維護者獨立承擔全部責任;作者、維護者及貢獻者不對衍生儲存庫的任何行為或後果承擔法律或連帶責任 -- **無擔保與免責條款**:在適用法律允許的最大範圍內,本儲存庫按「現狀(AS IS)」提供,不提供任何明示或暗示擔保(包括但不限於適銷性、特定用途適用性、非侵權等)。對因使用本儲存庫而造成的任何直接或間接損失(包括但不限於資料遺失、業務中斷、利潤損失等),作者、維護者及貢獻者不承擔任何責任 +- **無擔保與免責條款**:在適用法律允許的最大範圍內,本儲存庫按「現狀(AS + IS)」提供,不提供任何明示或暗示擔保(包括但不限於適銷性、特定用途適用性、非侵權等)。對因使用本儲存庫而造成的任何直接或間接損失(包括但不限於資料遺失、業務中斷、利潤損失等),作者、維護者及貢獻者不承擔任何責任 - **風險自擔原則**:使用者應自行評估使用風險,確保其使用行為合法合規,不侵犯第三方權益,不得將本儲存庫用於任何違法、侵權、惡意或不當用途 - **第三方平台合規**:使用者應遵守相關平台的服務條款、API 使用政策、速率限制及版權要求,避免對源平台造成過載或干擾。各平台對其內容、服務及政策擁有最終解釋權 - **智慧財產權保護**:透過本儲存庫獲取的內容受相應版權法保護。使用者應遵守相關許可協議、版權聲明及使用條款,不得從事任何侵犯智慧財產權的行為 @@ -2840,7 +2886,8 @@ npx wrangler dev --log-level debug 我們歡迎各種形式的貢獻!請檢視[貢獻指南](CONTRIBUTING.md)了解如何參與儲存庫開發。 -1. **報告問題**: 使用 [issue 範本](https://github.com/xixu-me/Xget/issues/new/choose)報告 bug 或提出功能請求 +1. **報告問題**: 使用 + [issue 範本](https://github.com/xixu-me/Xget/issues/new/choose)報告 bug 或提出功能請求 2. **提交程式碼**: fork 儲存庫,建立功能分支,提交 pull request 3. **改進文件**: 修正錯誤、新增範例、完善說明 4. **測試反饋**: 在不同環境下測試並提供反饋