@@ -1091,17 +1091,17 @@ conda env update -f environment.yml
```
```bash
-# Specify the image using the command line
+# Specify mirror using command line
mvn clean install -Dmaven.repo.remote=https://xget.xi-xu.me/maven/maven2
-# Download specific dependencies
+# Download specific dependency
mvn dependency:get -Dartifact=org.springframework:spring-core:5.3.21 \
-DremoteRepositories=https://xget.xi-xu.me/maven/maven2
```
-### Apache software download acceleration
+### Apache Software Download Acceleration
-#### Download Apache software using Xget
+#### Download Apache Software Using Xget
```bash
# Download Apache Kafka
@@ -1120,7 +1120,7 @@ wget https://xget.xi-xu.me/apache/hadoop/common/hadoop-3.3.6/hadoop-3.3.6.tar.gz
curl -L -O https://xget.xi-xu.me/apache/flink/flink-1.18.1/flink-1.18.1-bin-scala_2.12.tgz
```
-#### Commonly used Apache software download
+#### Common Apache Software Downloads
```bash
# Big data related
@@ -1128,21 +1128,21 @@ wget https://xget.xi-xu.me/apache/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz
wget https://xget.xi-xu.me/apache/hbase/2.5.7/hbase-2.5.7-bin.tar.gz
wget https://xget.xi-xu.me/apache/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
-# Web Server
+# Web servers
wget https://xget.xi-xu.me/apache/httpd/httpd-2.4.59.tar.gz
wget https://xget.xi-xu.me/apache/tomcat/tomcat-10/v10.1.19/bin/apache-tomcat-10.1.19.tar.gz
-# Development Tools
+# Development tools
wget https://xget.xi-xu.me/apache/ant/1.10.14/apache-ant-1.10.14-bin.tar.gz
wget https://xget.xi-xu.me/apache/netbeans/netbeans/20/netbeans-20-bin.zip
```
-### Gradle package management acceleration
+### Gradle Package Acceleration
-#### Configure Gradle to use Xget mirroring
+#### Configure Gradle to Use Xget Mirror
```gradle
-// Configure Gradle Image in build.gradle
+// Configure Gradle mirror in build.gradle
repositories {
maven {
url 'https://xget.xi-xu.me/maven/maven2'
@@ -1152,7 +1152,7 @@ repositories {
}
}
-// Configure plug-in repository
+// Configure plugin repositories
pluginManagement {
repositories {
maven {
@@ -1166,7 +1166,7 @@ pluginManagement {
#### Global Configuration
```gradle
-// Configure global mirroring in ~/.gradle/init.gradle
+// Configure global mirror in ~/.gradle/init.gradle
allprojects {
repositories {
maven {
@@ -1188,19 +1188,19 @@ settingsEvaluated { settings ->
```
```bash
-# Specify the image using the command line
+# Specify mirror using command line
gradle build -Dmaven.repo.remote=https://xget.xi-xu.me/maven/maven2
# Refresh dependencies
gradle build --refresh-dependencies
```
-### Homebrew Package Management Acceleration
+### Homebrew Package Acceleration
-#### Configure Homebrew to use Xget mirroring
+#### Configure Homebrew to Use Xget Mirror
```bash
-# Setting up Homebrew environment variables using Xget mirror
+# Set Homebrew environment variables to use Xget mirror
export HOMEBREW_BREW_GIT_REMOTE="https://xget.xi-xu.me/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://xget.xi-xu.me/homebrew/homebrew-core.git"
export HOMEBREW_API_DOMAIN="https://xget.xi-xu.me/homebrew/api"
@@ -1210,39 +1210,39 @@ export HOMEBREW_BOTTLE_DOMAIN="https://xget.xi-xu.me/homebrew/bottles"
brew update
```
-#### Long-term configuration
+#### Long-term Configuration
```bash
-# Add to ~/.bash_profile for bash users
+# For bash users, add to ~/.bash_profile
echo 'export HOMEBREW_BREW_GIT_REMOTE="https://xget.xi-xu.me/homebrew/brew.git"' >> ~/.bash_profile
echo 'export HOMEBREW_CORE_GIT_REMOTE="https://xget.xi-xu.me/homebrew/homebrew-core.git"' >> ~/.bash_profile
echo 'export HOMEBREW_API_DOMAIN="https://xget.xi-xu.me/homebrew/api"' >> ~/.bash_profile
echo 'export HOMEBREW_BOTTLE_DOMAIN="https://xget.xi-xu.me/homebrew/bottles"' >> ~/.bash_profile
-# Add to ~/.zprofile for zsh users
+# For zsh users, add to ~/.zprofile
echo 'export HOMEBREW_BREW_GIT_REMOTE="https://xget.xi-xu.me/homebrew/brew.git"' >> ~/.zprofile
echo 'export HOMEBREW_CORE_GIT_REMOTE="https://xget.xi-xu.me/homebrew/homebrew-core.git"' >> ~/.zprofile
echo 'export HOMEBREW_API_DOMAIN="https://xget.xi-xu.me/homebrew/api"' >> ~/.zprofile
echo 'export HOMEBREW_BOTTLE_DOMAIN="https://xget.xi-xu.me/homebrew/bottles"' >> ~/.zprofile
```
-#### Use in the project
+#### Use in Project
```bash
-# Install the software package
+# Install packages
brew install git
-# Search for packages
+# Search packages
brew search python
-# Update the package
+# Update packages
brew upgrade
# View installed packages
brew list
```
-#### Verify the mirror configuration
+#### Verify Mirror Configuration
```bash
# Check Homebrew configuration
@@ -1253,15 +1253,15 @@ echo $HOMEBREW_API_DOMAIN
echo $HOMEBREW_BOTTLE_DOMAIN
```
-### Ruby package management acceleration
+### Ruby Package Acceleration
-#### Configure RubyGems to use Xget mirroring
+#### Configure RubyGems to Use Xget Mirror
```bash
-# Temporary use of Xget mirrors
+# Temporarily use Xget mirror
gem install rails --source https://xget.xi-xu.me/rubygems/
-# Global configuration RubyGems mirroring
+# Globally configure RubyGems mirror
gem sources --add https://xget.xi-xu.me/rubygems/
gem sources --remove https://rubygems.org/
@@ -1269,10 +1269,10 @@ gem sources --remove https://rubygems.org/
gem sources -l
```
-#### Use in the project
+#### Use in Project
```ruby
-# Configure project-level mirroring in Gemfile
+# Configure project-level mirror in Gemfile
source 'https://xget.xi-xu.me/rubygems/'
gem 'rails', '~> 7.0.0'
@@ -1286,15 +1286,15 @@ bundle config mirror.https://rubygems.org https://xget.xi-xu.me/rubygems/
bundle install
```
-### R package management acceleration
+### R Package Acceleration
-#### Configure R Using Xget CRAN Mirror
+#### Configure R to Use Xget CRAN Mirror
```r
-# Temporarily use Xget CRAN image in R
+# Temporarily use Xget CRAN mirror in R
install.packages("ggplot2", repos = "https://xget.xi-xu.me/cran/")
-# Global configuration CRAN image
+# Globally configure CRAN mirror
options(repos = c(CRAN = "https://xget.xi-xu.me/cran/"))
# Verify configuration
@@ -1304,7 +1304,7 @@ getOption("repos")
#### Configure in .Rprofile
```r
-# Configure global mirroring in the .Rprofile file in the user's home directory
+# Configure global mirror in .Rprofile file in user home directory
options(repos = c(
CRAN = "https://xget.xi-xu.me/cran/",
BioCsoft = "https://bioconductor.org/packages/release/bioc",
@@ -1312,29 +1312,29 @@ options(repos = c(
BioCexp = "https://bioconductor.org/packages/release/data/experiment"
))
-# Set up download method
+# Set download method
options(download.file.method = "libcurl")
```
-#### Use in the project
+#### Use in Project
```r
-# Specify the image in the project's renv.lock or script
+# Specify mirror in project's renv.lock or script
renv::init()
renv::settings$repos.override(c(CRAN = "https://xget.xi-xu.me/cran/"))
-# Installation package
+# Install packages
install.packages(c("dplyr", "ggplot2", "tidyr"))
-# Or use the pak package manager
+# Or use pak package manager
pak::pkg_install("tidyverse", repos = "https://xget.xi-xu.me/cran/")
```
```bash
-# Install packages using R scripts on the command line
+# Install packages using R script in command line
Rscript -e "options(repos = c(CRAN = 'https://xget.xi-xu.me/cran/')); install.packages('ggplot2')"
-# Bulk installation package
+# Batch install packages
Rscript -e "
options(repos = c(CRAN = 'https://xget.xi-xu.me/cran/'))
packages <- c('dplyr', 'ggplot2', 'tidyr', 'readr')
@@ -1342,27 +1342,27 @@ install.packages(packages)
"
```
-### Perl package management acceleration
+### Perl Package Acceleration
-#### Configure CPAN to use Xget mirroring
+#### Configure CPAN to Use Xget Mirror
```bash
-# Configure CPAN to use Xget mirroring
+# Configure CPAN to use Xget mirror
cpan o conf urllist push https://xget.xi-xu.me/cpan/
cpan o conf commit
-# Or directly edit the configuration file ~/.cpan/CPAN/MyConfig.pm
-# Add to:
+# Or directly edit configuration file ~/.cpan/CPAN/MyConfig.pm
+# Add:
# 'urllist' => [q[https://xget.xi-xu.me/cpan/]],
```
-#### Use cpanm to install modules
+#### Use cpanm to Install Modules
```bash
-# Install cpanm (if not)
+# Install cpanm (if not available)
curl -L https://cpanmin.us | perl - --sudo App::cpanminus
-# Install the module using Xget mirror
+# Install modules using Xget mirror
cpanm --mirror https://xget.xi-xu.me/cpan/ DBI
cpanm --mirror https://xget.xi-xu.me/cpan/ Mojolicious
@@ -1370,7 +1370,7 @@ cpanm --mirror https://xget.xi-xu.me/cpan/ Mojolicious
cpanm --mirror https://xget.xi-xu.me/cpan/ --installdeps .
```
-#### Use in the project
+#### Use in Project
```perl
# List dependencies in cpanfile
@@ -1378,44 +1378,44 @@ requires 'DBI';
requires 'Mojolicious';
requires 'JSON';
-# Then use Xget mirror to install
+# Then install using Xget mirror
cpanm --mirror https://xget.xi-xu.me/cpan/ --installdeps .
```
-### TeX/LaTeX Package Management Acceleration
+### TeX/LaTeX Package Acceleration
-#### Configure TeX Live with Xget CTAN mirroring
+#### Configure TeX Live to Use Xget CTAN Mirror
```bash
-# Configure tlmgr to use Xget CTAN mirroring
+# Configure tlmgr to use Xget CTAN mirror
tlmgr option repository https://xget.xi-xu.me/ctan/systems/texlive/tlnet
# Update package database
tlmgr update --self --all
-# Installation package
+# Install packages
tlmgr install beamer
tlmgr install tikz
```
-#### Configuring MiKTeX to use Xget mirroring
+#### Configure MiKTeX to Use Xget Mirror
```bash
-# Windows MiKTeX Configuration
+# Windows MiKTeX configuration
mpm --set-repository=https://xget.xi-xu.me/ctan/systems/win32/miktex
# Update package database
mpm --update-db
-# Installation package
+# Install packages
mpm --install=beamer
mpm --install=pgf
```
-#### Use in the project
+#### Use in Project
```bash
-# LaTeX document automatically installs missing packages when compiling
+# Automatically install missing packages during LaTeX document compilation
pdflatex --shell-escape document.tex
# Or manually install specific packages
@@ -1424,16 +1424,16 @@ tlmgr install subcaption
tlmgr install algorithm2e
```
-### Go module acceleration
+### Go Module Acceleration
-#### Configure Go to use Xget proxy
+#### Configure Go to Use Xget Proxy
```bash
-# Configure Go module agent
+# Configure Go module proxy
export GOPROXY=https://xget.xi-xu.me/golang,direct
export GOSUMDB=off
-# Or permanent configuration
+# Or permanently configure
go env -w GOPROXY=https://xget.xi-xu.me/golang,direct
go env -w GOSUMDB=off
@@ -1441,7 +1441,7 @@ go env -w GOSUMDB=off
go env GOPROXY
```
-#### Use in the project
+#### Use in Project
```bash
# Download dependencies
@@ -1450,13 +1450,13 @@ go mod download
# Update dependencies
go get -u ./...
-# Clean the module cache
+# Clean module cache
go clean -modcache
```
-### NuGet Package Management Acceleration
+### NuGet Package Acceleration
-#### Configure NuGet to use Xget mirroring
+#### Configure NuGet to Use Xget Mirror
```bash
# Add Xget package source
@@ -1465,7 +1465,7 @@ dotnet nuget add source https://xget.xi-xu.me/nuget/v3/index.json -n xget
# List package sources
dotnet nuget list source
-# Use in a project
+# Use in project
dotnet restore --source https://xget.xi-xu.me/nuget/v3/index.json
```
@@ -1481,12 +1481,12 @@ dotnet restore --source https://xget.xi-xu.me/nuget/v3/index.json
```
-### Rust package management acceleration
+### Rust Package Acceleration
-#### Configure Cargo using Xget mirroring
+#### Configure Cargo to Use Xget Mirror
```bash
-# Configure Cargo to use Xget image (in ~/.cargo/config.toml)
+# Configure Cargo to use Xget mirror (in ~/.cargo/config.toml)
mkdir -p ~/.cargo
cat >> ~/.cargo/config.toml << EOF
[source.crates-io]
@@ -1500,10 +1500,10 @@ EOF
cargo search serde
```
-#### Use in the project
+#### Use in Project
```toml
-# Dependencies can be used normally in Cargo.toml
+# Can use dependencies normally in Cargo.toml
[dependencies]
serde = "1.0"
tokio = "1.0"
@@ -1517,16 +1517,16 @@ cargo build
# Update dependencies
cargo update
-# Add new dependencies
+# Add new dependency
cargo add clap
```
-### PHP package management acceleration
+### PHP Package Acceleration
-#### Configure Composer to use Xget mirroring
+#### Configure Composer to Use Xget Mirror
```bash
-# Global configuration Composer image
+# Globally configure Composer mirror
composer config -g repo.packagist composer https://xget.xi-xu.me/packagist/
# Project-level configuration
@@ -1553,19 +1553,19 @@ composer config -l
}
```
-### Linux distribution acceleration
+### Linux Distribution Acceleration
-#### Debian/Ubuntu APT configuration
+#### Debian/Ubuntu APT Configuration
```bash
-# Back up the original source list
+# Backup original source list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
-# Configure Debian Image
+# Configure Debian mirror
echo "deb https://xget.xi-xu.me/debian/debian bookworm main" | sudo tee /etc/apt/sources.list
echo "deb https://xget.xi-xu.me/debian/debian-security bookworm-security main" | sudo tee -a /etc/apt/sources.list
-# Configure Ubuntu mirroring
+# Configure Ubuntu mirror
echo "deb https://xget.xi-xu.me/ubuntu/ubuntu jammy main restricted universe multiverse" | sudo tee /etc/apt/sources.list
echo "deb https://xget.xi-xu.me/ubuntu/ubuntu jammy-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
@@ -1576,7 +1576,7 @@ sudo apt update
#### Fedora DNF Configuration
```bash
-# Configure Fedora Image
+# Configure Fedora mirror
sudo sed -i 's|^metalink=|#metalink=|g' /etc/yum.repos.d/fedora*.repo
sudo sed -i 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://xget.xi-xu.me/fedora/pub/fedora/linux|g' /etc/yum.repos.d/fedora*.repo
@@ -1584,10 +1584,10 @@ sudo sed -i 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https:
sudo dnf makecache
```
-#### Rocky Linux DNF configuration
+#### Rocky Linux DNF Configuration
```bash
-# Configure Rocky Linux Image
+# Configure Rocky Linux mirror
sudo sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/rocky*.repo
sudo sed -i 's|^#baseurl=http://dl.rockylinux.org|baseurl=https://xget.xi-xu.me/rocky|g' /etc/yum.repos.d/rocky*.repo
@@ -1595,18 +1595,18 @@ sudo sed -i 's|^#baseurl=http://dl.rockylinux.org|baseurl=https://xget.xi-xu.me/
sudo dnf makecache
```
-#### openSUSE Zypper configuration
+#### openSUSE Zypper Configuration
```bash
-# Configure openSUSE Leap image
+# Configure openSUSE Leap mirror
sudo zypper mr -d repo-oss
sudo zypper ar -f https://xget.xi-xu.me/opensuse/distribution/leap/15.5/repo/oss/ repo-oss-xget
-# Configure openSUSE Tumbleweed image
+# Configure openSUSE Tumbleweed mirror
sudo zypper mr -d repo-oss
sudo zypper ar -f https://xget.xi-xu.me/opensuse/tumbleweed/repo/oss/ repo-oss-xget
-# Refresh the software source
+# Refresh software sources
sudo zypper refresh
# Verify configuration
@@ -1616,10 +1616,10 @@ sudo zypper lr -u
#### Arch Linux Pacman Configuration
```bash
-# Back up the original image list
+# Backup original mirror list
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
-# Configure Arch Linux Mirroring
+# Configure Arch Linux mirror
echo 'Server = https://xget.xi-xu.me/arch/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist
# Update package database
@@ -1628,25 +1628,25 @@ sudo pacman -Sy
### Academic Resource Acceleration
-#### arXiv paper download
+#### arXiv Paper Download
```bash
# Download arXiv paper PDF
wget https://xget.xi-xu.me/arxiv/pdf/2301.07041.pdf
-# Download the paper source code
+# Download paper source
curl -L -O https://xget.xi-xu.me/arxiv/e-print/2301.07041
-# Download multiple papers in batches
+# Batch download multiple papers
for id in 2301.07041 2302.13971 2303.08774; do
wget https://xget.xi-xu.me/arxiv/pdf/${id}.pdf
done
```
-#### Use in academic tools
+#### Use in Academic Tools
```python
-# Accelerate downloads with arXiv in Python
+# Use arXiv accelerated download in Python
import requests
def download_arxiv_paper(arxiv_id, output_path):
@@ -1660,55 +1660,55 @@ def download_arxiv_paper(arxiv_id, output_path):
else:
print(f"Failed to download {arxiv_id}")
-# Download the paper
+# Download paper
download_arxiv_paper("2301.07041", "attention_is_all_you_need.pdf")
```
### F-Droid Repository Mirror
-#### Configure the F-Droid Client to Use the Xget Mirror
+#### Configure F-Droid Client to Use Xget Mirror
-1. Enter **Settings** in the F-Droid app → **Repository**
-2. Click **+** and enter the repository URL: `https://xget.xi-xu.me/fdroid/repo`
-3. Click **Add** and then click **Add mirror**
+1. In F-Droid app, go to **Settings** → **Repositories**
+2. Click **+** and enter repository URL: `https://xget.xi-xu.me/fdroid/repo`
+3. Click **Add** then click **Add Mirror**
#### Supported F-Droid Services
```url
-# F-Droid App APK Download
-https://xget.xi-xu.me/fdroid/repo/[package-name]_[version].apk
+# F-Droid app APK download
+https://xget.xi-xu.me/fdroid/repo/[package-name]_[version-code].apk
# F-Droid repository index
https://xget.xi-xu.me/fdroid/repo/index-v1.jar
-# F-Droid app icon
-https://xget.xi-xu.me/fdroid/repo/icons-640/[package-name].[version].png
+# F-Droid app icons
+https://xget.xi-xu.me/fdroid/repo/icons-640/[package-name].[version-code].png
-# F-Droid API Interface
+# F-Droid API endpoints
https://xget.xi-xu.me/fdroid/api/v1/packages/[package-name]
```
-#### Example Usage
+#### Usage Examples
```bash
-# Download the F-Droid Client APK directly
+# Directly download F-Droid client APK
wget https://xget.xi-xu.me/fdroid/repo/org.fdroid.fdroid_1016050.apk
-# Download other open source applications
+# Download other open source apps
curl -L -O https://xget.xi-xu.me/fdroid/repo/org.mozilla.fennec_fdroid_1014000.apk
-# Get application information
+# Get app information
curl https://xget.xi-xu.me/fdroid/api/v1/packages/org.fdroid.fdroid
```
-#### Batch Application Management
+#### Batch App Management
```bash
-# Create an application download script
+# Create app download script
cat > download_fdroid_apps.sh << 'EOF'
-# !/bin/bash
+#!/bin/bash
-# Define the list of applications to download
+# Define list of apps to download
apps=(
"org.fdroid.fdroid_1016050.apk"
"org.mozilla.fennec_fdroid_1014000.apk"
@@ -1716,16 +1716,16 @@ apps=(
"org.videolan.vlc_13050399.apk"
)
-# Create a download directory
+# Create download directory
mkdir -p fdroid_apps
-# Download the application in batches
+# Batch download apps
for app in "${apps[@]}"; do
echo "Downloading: $app"
wget -P fdroid_apps "https://xget.xi-xu.me/fdroid/repo/$app"
done
-echo "All applications downloaded!"
+echo "All apps downloaded!"
EOF
chmod +x download_fdroid_apps.sh
@@ -1734,10 +1734,10 @@ chmod +x download_fdroid_apps.sh
#### Developer Integration
-For Android developers, you can integrate F-Droid images in build scripts:
+For Android developers, F-Droid mirror can be integrated into build scripts:
```gradle
-// Configure F-Droid dependency checking in build.gradle
+// Configure F-Droid dependency check in build.gradle
task checkFDroidAvailability {
doLast {
def fdroidUrl = "https://xget.xi-xu.me/fdroid/api/v1/packages/${project.name}"
@@ -1746,10 +1746,10 @@ task checkFDroidAvailability {
connection.requestMethod = 'GET'
def responseCode = connection.responseCode
if (responseCode == 200) {
- println("App available on F-Droid: $fdroidUrl")
+ println "App available on F-Droid: $fdroidUrl"
}
} catch (Exception e) {
- println("Failed to check F-Droid availability: ${e.message}")
+ println "Error checking F-Droid availability: ${e.message}"
}
}
}
@@ -1757,53 +1757,53 @@ task checkFDroidAvailability {
### Jenkins Plugin Download
-#### Accelerate Jenkins Plugin Downloads and Updates with Xget
+#### Use Xget to Accelerate Jenkins Plugin Download and Update
-Supports Jenkins update center and plug-in downloads, and is compatible with the configuration methods of domestic mirror sources such as Tsinghua mirroring.
+Supports Jenkins update center and plugin downloads, compatible with configuration methods of domestic mirrors like Tsinghua mirror.
#### Jenkins Update Center Configuration
-##### Method 1: Configure in the Jenkins Web Interface
+##### Method 1: Configure in Jenkins Web Interface
-1. Log in to the Jenkins Management Interface
-2. Enter **Manage Jenkins** → **Plugins** → **Advanced**
+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`
-4. Click **Submit** to save the configuration
+4. Click **Submit** to save configuration
-##### Method 2: Modify the Configuration File
+##### Method 2: Modify Configuration File
```bash
-# Modify update center configuration files on Jenkins server
+# Modify update center configuration file on Jenkins server
# Default location: $JENKINS_HOME/hudson.model.UpdateCenter.xml
sudo nano /var/lib/jenkins/hudson.model.UpdateCenter.xml
-# Change the URL to:
+# Change URL to:
# https://xget.xi-xu.me/jenkins/update-center.json
-# Restart Jenkins Service
+# Restart Jenkins service
sudo systemctl restart jenkins
```
#### Supported Jenkins Services
```url
-# Jenkins Update Center JSON
+# Jenkins update center JSON
https://xget.xi-xu.me/jenkins/update-center.json
-# Jenkins Update Center (actual JSON format)
+# Jenkins update center (actual JSON format)
https://xget.xi-xu.me/jenkins/update-center.actual.json
# Jenkins plugin download
https://xget.xi-xu.me/jenkins/download/plugins/[plugin-name]/[version]/[plugin-name].hpi
-# Experimental Plugin Update Center
+# Experimental plugin update center
https://xget.xi-xu.me/jenkins/experimental/update-center.json
```
-#### Example Usage
+#### Usage Examples
```bash
-# Download the Maven plugin
+# Download Maven plugin
wget https://xget.xi-xu.me/jenkins/download/plugins/maven-plugin/3.27/maven-plugin.hpi
# Download Git plugin
@@ -1812,11 +1812,11 @@ curl -L -O https://xget.xi-xu.me/jenkins/download/plugins/git/5.2.1/git.hpi
# Get update center information
curl https://xget.xi-xu.me/jenkins/update-center.json
-# Batch download of commonly used plug-ins
+# Batch download common plugins
cat > download_jenkins_plugins.sh << 'EOF'
-# !/bin/bash
+#!/bin/bash
-# Define a list of plugins to download
+# Define list of plugins to download
plugins=(
"git:5.2.1"
"maven-plugin:3.27"
@@ -1825,10 +1825,10 @@ plugins=(
"docker-workflow:563.vd5d2e5c4007f"
)
-# Create a plug-in download directory
+# Create plugin download directory
mkdir -p jenkins_plugins
-# Batch download plug-in
+# Batch download plugins
for plugin in "${plugins[@]}"; do
name=$(echo $plugin | cut -d: -f1)
version=$(echo $plugin | cut -d: -f2)
@@ -1845,24 +1845,24 @@ chmod +x download_jenkins_plugins.sh
#### Offline Jenkins Deployment
-For Jenkins deployments without network environments:
+For Jenkins deployment in offline environments:
```bash
-# 1. Download the Jenkins core file
+# 1. Download Jenkins core file
wget https://xget.xi-xu.me/jenkins/war/jenkins.war
-# 2. Create plug-in packaging scripts
+# 2. Create plugin packaging script
cat > prepare_jenkins_offline.sh << 'EOF'
-# !/bin/bash
+#!/bin/bash
-# Create an offline deployment directory structure
+# Create offline deployment directory structure
mkdir -p jenkins_offline/{plugins,update_center}
-# Download Update Center Configuration
+# Download update center configuration
curl -o jenkins_offline/update_center/update-center.json \
https://xget.xi-xu.me/jenkins/update-center.json
-# List of essential plugins
+# Essential plugins list
essential_plugins=(
"ant:475.vf34069fef73c"
"build-timeout:1.31"
@@ -1882,7 +1882,7 @@ essential_plugins=(
"ws-cleanup:0.45"
)
-# Download all the essential plugins
+# Download all essential plugins
for plugin in "${essential_plugins[@]}"; do
name=$(echo $plugin | cut -d: -f1)
version=$(echo $plugin | cut -d: -f2)
@@ -1891,26 +1891,26 @@ for plugin in "${essential_plugins[@]}"; do
"https://xget.xi-xu.me/jenkins/download/plugins/$name/$version/$name.hpi"
done
-# Creation deployment instructions
+# Create deployment instructions
cat > jenkins_offline/deploy_instructions.md << 'DEPLOY'
# Jenkins Offline Deployment Instructions
-1. Copy jenkins.war to the target server
+1. Copy jenkins.war to target server
2. Start Jenkins: java -jar jenkins.war
-3. Copy the .hpi files in the plugins/ directory to $JENKINS_HOME/plugins/
+3. Copy .hpi files from plugins/ directory to $JENKINS_HOME/plugins/
4. Restart Jenkins
DEPLOY
-echo "Offline deployment bundle ready!"
+echo "Offline deployment package prepared!"
EOF
chmod +x prepare_jenkins_offline.sh
./prepare_jenkins_offline.sh
```
-#### Use in the project
+#### Use in Project
-##### Plugin Checks in Jenkinsfile
+##### Plugin Check in Jenkinsfile
```groovy
pipeline {
@@ -1929,7 +1929,7 @@ pipeline {
echo "Maven plugin available: ${pluginUrl}"
}
} catch (Exception e) {
- error "Maven plugin unavailable: ${e.message}"
+ error "Maven plugin not available: ${e.message}"
}
}
}
@@ -1952,13 +1952,13 @@ pipeline {
```python
import openai
-# OpenAI API using Xget
+# Use Xget's OpenAI API
client = openai.OpenAI(
api_key="your-api-key",
base_url="https://xget.xi-xu.me/ip/openai/v1" # Use Xget
)
-# Chat completed
+# Chat completion
response = client.chat.completions.create(
model="gpt-4",
messages=[
@@ -1974,13 +1974,13 @@ print(response.choices[0].message.content)
```python
import anthropic
-# Anthropic API using Xget
+# Use Xget's Anthropic API
client = anthropic.Anthropic(
api_key="your-api-key",
base_url="https://xget.xi-xu.me/ip/anthropic" # Use Xget
)
-# Create a message
+# Create message
message = client.messages.create(
model="claude-3-sonnet-20240229",
max_tokens=1000,
@@ -1997,10 +1997,10 @@ print(message.content)
```python
import google.generativeai as genai
-# Configure API keys
+# Configure API key
genai.configure(api_key="your-api-key")
-# Using custom transfer configuration Xget
+# Use custom transport to configure Xget
import requests
class XgetTransport:
@@ -2008,20 +2008,20 @@ class XgetTransport:
self.base_url = base_url
def request(self, method, url, **kwargs):
- # Forward the request to Xget
+ # Forward request to Xget
accelerated_url = url.replace("https://generativelanguage.googleapis.com",
"https://xget.xi-xu.me/ip/gemini")
return requests.request(method, accelerated_url, **kwargs)
-# Create a model instance
+# Create model instance
model = genai.GenerativeModel('gemini-pro')
# Generate content
-response = model.generate_content("Write a short introduction to artificial intelligence")
+response = model.generate_content("Write a brief introduction about artificial intelligence")
print(response.text)
```
-#### Multi-provider unified interface
+#### Multi-Provider Unified Interface
```python
import requests
@@ -2029,20 +2029,20 @@ import json
def call_ai_api(provider, endpoint, data, api_key):
"""
- Unified AI API helper that supports multiple providers
+ Unified AI API calling function, supports multiple providers
"""
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
- # Acceleration URL with Xget
+ # Use Xget's accelerated URL
url = f"https://xget.xi-xu.me/ip/{provider}/{endpoint}"
response = requests.post(url, headers=headers, json=data)
return response.json()
-# Example of usage
+# Usage example
providers = {
"openai": {
"endpoint": "v1/chat/completions",
@@ -2069,7 +2069,7 @@ providers = {
}
}
-# Looping calls to different providers
+# Loop through different providers
for provider, config in providers.items():
try:
result = call_ai_api(
@@ -2086,7 +2086,7 @@ for provider, config in providers.items():
#### Use in JavaScript/Node.js
```javascript
-// OpenAI API Acceleration
+// OpenAI API acceleration
import OpenAI from 'openai';
const openai = new OpenAI({
@@ -2122,7 +2122,7 @@ async function chatWithClaude() {
}
```
-#### Environment variable configuration
+#### Environment Variable Configuration
```bash
# Configure in .env file
@@ -2134,25 +2134,25 @@ MISTRAL_AI_BASE_URL=https://xget.xi-xu.me/ip/mistralai
GROQ_BASE_URL=https://xget.xi-xu.me/ip/groq
```
-Then use in the code:
+Then use in code:
```python
import os
from openai import OpenAI
-# Read configuration from environment variable
+# Read configuration from environment variables
client = OpenAI(
api_key=os.getenv("OPENAI_API_KEY"),
- base_url=os.getenv("OPENAI_BASE_URL") # Automatically use Xget
+ base_url=os.getenv("OPENAI_BASE_URL") # Automatically uses Xget
)
```
### Container Image Acceleration
-#### Docker configuration
+#### Docker Configuration
```bash
-# Configure Docker to use Xget mirror acceleration
+# Configure Docker to use Xget image acceleration
# Edit /etc/docker/daemon.json (Linux) or ~/.docker/daemon.json (macOS/Windows)
{
"registry-mirrors": [
@@ -2162,7 +2162,7 @@ client = OpenAI(
# Restart Docker service
sudo systemctl restart docker # Linux
-# Or restart the service in Docker Desktop
+# Or restart service in Docker Desktop
# Verify configuration
docker info | grep -A 10 "Registry Mirrors"
@@ -2171,20 +2171,20 @@ docker info | grep -A 10 "Registry Mirrors"
#### Pull Images Directly
```bash
-# Pull the GitHub container registry image
+# Pull GitHub Container Registry images
docker pull xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
-# Pull Google Container Registry Image
+# Pull Google Container Registry images
docker pull xget.xi-xu.me/cr/gcr/distroless/base:latest
-# Pull the Microsoft Container Registry Image
+# Pull Microsoft Container Registry images
docker pull xget.xi-xu.me/cr/mcr/dotnet/runtime:8.0
```
-#### Kubernetes deployment configuration
+#### Kubernetes Deployment Configuration
```yaml
-# deployment.yaml - Mirror using Xget
+# deployment.yaml - Use Xget's images
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -2213,7 +2213,7 @@ spec:
#### Docker Compose Configuration
```yaml
-# docker-compose.yml - Accelerate image using Xget
+# docker-compose.yml - Use Xget accelerated images
version: '3.8'
services:
web:
@@ -2240,10 +2240,10 @@ volumes:
mssql_data:
```
-#### Dockerfile optimization
+#### Dockerfile Optimization
```dockerfile
-# Use Xget to accelerate basic images in Dockerfile
+# Use Xget accelerated base images in Dockerfile
FROM xget.xi-xu.me/cr/ghcr/nodejs/node:18-alpine AS builder
WORKDIR /app
@@ -2257,7 +2257,7 @@ RUN npm run build
FROM xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
COPY --from=builder /app/dist /usr/share/nginx/html
-# .NET image using Microsoft Container Registry
+# Use Microsoft Container Registry's .NET image
FROM xget.xi-xu.me/cr/mcr/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
COPY --from=builder /app/publish .
@@ -2267,7 +2267,7 @@ ENTRYPOINT ["dotnet", "MyApp.dll"]
#### CI/CD Integration
```yaml
-# GitHub Actions - Accelerate container building with Xget
+# GitHub Actions - Use Xget to accelerate container builds
name: Build and Deploy
on: [push]
@@ -2279,13 +2279,13 @@ jobs:
- name: Build with accelerated base images
run: |
- # Use Xget's basic image when building
+ # Build using Xget's base images
docker build -t myapp:latest \
- --build-arg BASE_IMAGE=xget.xi-xu.me/cr/ghcr/nodejs/node:18-alpine.
+ --build-arg BASE_IMAGE=xget.xi-xu.me/cr/ghcr/nodejs/node:18-alpine .
- name: Test with accelerated images
run: |
- # Testing with accelerated image
+ # Test using accelerated images
docker run --rm \
xget.xi-xu.me/cr/mcr/dotnet/runtime:8.0 \
dotnet --version
@@ -2294,13 +2294,13 @@ jobs:
#### Podman Configuration
```bash
-# Configure Podman to use Xget mirror acceleration
+# Configure Podman to use Xget image acceleration
# Edit /etc/containers/registries.conf
[[registry]]
prefix = "ghcr.io"
location = "xget.xi-xu.me/cr/ghcr"
-# Or pull it directly
+# Or pull directly
podman pull xget.xi-xu.me/cr/ghcr/alpine/alpine:latest
podman pull xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
```
@@ -2308,7 +2308,7 @@ podman pull xget.xi-xu.me/cr/ghcr/nginxinc/nginx-unprivileged:latest
#### containerd Configuration
```toml
-# Configure containerd using Xget
+# Configure containerd to use Xget
# Edit /etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."ghcr.io"]
@@ -2324,23 +2324,12 @@ sudo systemctl restart containerd
## 🚀 Deployment
-### Cloudflare Workers
-
-[](https://deploy.workers.cloudflare.com/?url=https://github.com/xixu-me/Xget)
-
-**Xget is designed and optimized for Cloudflare Workers to deliver the best performance and experience:
-
-- **💰 Cost Advantage**: In most cases, it is free in addition to the fee of registering a domain name.
-- **🚀 Highest performance**: Global edge nodes, fastest response speed
-- **🔧 Simple maintenance**: No server management required, automatic expansion and update
-- **🛡️ Safe and reliable**: Built-in DDoS protection and security features
-
-#### Deployment Steps
+### Deployment Steps
1. **Fork this repository**:
Click the Fork button in the upper right corner of the GitHub page
-2. **Get Cloudflare Credentials**:
+2. **Get Cloudflare credentials**:
- Visit [Cloudflare Dashboard](https://dash.cloudflare.com/) → My Profile → API Tokens
- Create an API Token with "Edit Cloudflare Workers" permission
- Note your Account ID (visible on the right side of the Workers page)
@@ -2351,64 +2340,64 @@ sudo systemctl restart containerd
- `CLOUDFLARE_API_TOKEN`: Your API Token
- `CLOUDFLARE_ACCOUNT_ID`: Your Account ID
-4. **Trigger Deployment**:
+4. **Trigger deployment**:
- Pushing code to the `main` branch will automatically trigger deployment
- - Changes only to documentation files (`.md`), `LICENSE`, `.gitignore`, etc. won't trigger deployment
- - You can also manually trigger deployment from the GitHub Actions page
+ - 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 name** (optional):
- Bind your custom domain name in the Cloudflare Workers console
+5. **Bind custom domain** (optional):
+ Bind your custom domain in the Cloudflare Workers console
-Once the deployment is complete, your Xget service will be available at the following address:
+After deployment completes, your Xget service will be available at:
-- Worker domain name: `your-worker-name.your-subdomain.workers.dev`
-- Custom domain name: `your-domain.com` (if bound)
+- Worker domain: `your-worker-name.your-subdomain.workers.dev`
+- Custom domain: `your-domain.com` (if bound)
-#### Environment variable configuration
+### Environment Variable Configuration
-You can set the following environment variables in the Cloudflare Workers console to customize the configuration:
+You can set the following environment variables in the Cloudflare Workers console to customize configuration:
-- `TIMEOUT_SECONDS`: Request timeout time (default: 30)
-- `MAX_RETRIES`: Maximum number of retries (default: 3)
+- `TIMEOUT_SECONDS`: Request timeout (default: 30)
+- `MAX_RETRIES`: Maximum retry count (default: 3)
- `RETRY_DELAY_MS`: Retry delay time (default: 1000)
-- `CACHE_DURATION`: cache duration (default: 1800)
-- `ALLOWED_METHODS`: Allowed HTTP methods (default: GET, HEAD)
-- `ALLOWED_ORIGINS`: Allowed CORS source (default: *)
+- `CACHE_DURATION`: Cache duration (default: 1800)
+- `ALLOWED_METHODS`: Allowed HTTP methods (default: GET,HEAD)
+- `ALLOWED_ORIGINS`: Allowed CORS origins (default: *)
- `MAX_PATH_LENGTH`: Maximum path length (default: 2048)
## 🔧 Configuration
### Configuration Parameters
-You can customize the configuration by modifying `src/config/index.js`:
+You can customize configuration by modifying `src/config/index.js`:
```javascript
export const CONFIG = {
TIMEOUT_SECONDS: 30, // Request timeout (seconds)
- MAX_RETRIES: 3, // Maximum number of retries
- RETRY_DELAY_MS: 1000, // Retry delay (ms)
+ 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 (POST enabled dynamically for Git operations)
+ 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 Tips
+### Performance Tuning Recommendations
-- **Cache Optimization**: Adjust `CACHE_DURATION` according to usage mode, frequently updated repositories can be appropriately reduced
-- **Timeout setting**: When network conditions are poor, you can add appropriately `TIMEOUT_SECONDS`
-- **Retry policy**: `MAX_RETRIES` and `RETRY_DELAY_MS` can be added 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 a New Platform
+### Adding New Platforms
-To add support for the new platform, edit `src/config/platforms.js`:
+To add support for new platforms, edit `src/config/platforms.js`:
```javascript
export const PLATFORMS = {
- // Existing platform...
+ // Existing platforms...
// New platform example
custom: {
@@ -2420,31 +2409,31 @@ export const PLATFORMS = {
## 🚧 Development
-1. **Repository settings**
+1. **Repository Setup**
```bash
git clone https://github.com/xixu-me/Xget.git
cd Xget
npm install
- npx wrangler login # First-time login
+ npx wrangler login # First time use
```
2. **Local Development**
```bash
- npm run dev # Start the dev server (http://localhost:8787)
- npm run test:run # Run the full test suite
- npm run test:coverage # Generate code coverage report
- npm run lint # Lint the codebase
- npm run format # Format the code
+ npm run dev # Start development server (http://localhost:8787)
+ npm run test:run # Run complete test suite
+ npm run test:coverage # Generate test coverage report
+ npm run lint # Code linting
+ npm run format # Code formatting
npm run deploy # Deploy to production
```
-## 🧪 Test
+## 🧪 Testing
-The repository contains 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.
-### Full Test Suite
+### Complete Testing
```bash
# Install test dependencies
@@ -2462,37 +2451,37 @@ npm run test:watch
### Test Coverage
-- **Unit Test**: Core functions, platform configuration, performance monitoring
-- **Integration Test**: End-to-end process, platform integration, Git protocol
-- **Security Test**: Input verification, security header, permission control
-- **Performance Test**: Response time, memory usage, concurrent processing
+- **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
## 🔍 Troubleshooting
-### FAQ
+### Common Issues
-**Q: Didn’t the download speed significantly improve?**
-A: Check whether the source file is already cached on the CDN edge node. The first access may be slow, and subsequent access will be significantly improved.
+**Q: 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 operation failed?**
-A: Confirm that the correct URL format is used and that the 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: Is it inaccessible after deployment?**
-A: Check whether the Cloudflare Workers domain name is correctly bound and confirm that the `wrangler.toml` configuration is correct.
+**Q: Cannot access after deployment?**
+A: Check if Cloudflare Workers domain is correctly bound, confirm `wrangler.toml` configuration is correct.
-**Q: A 400 error occurred?**
-A: Check the URL path format to confirm that the platform prefix is used correctly.
+**Q: Getting 400 error?**
+A: Check URL path format, confirm platform prefix is correctly used.
### Performance Monitoring
-Returns performance metrics in response header:
+Performance metrics are returned in response headers:
-- `X-Performance-Metrics`: Contains time-consuming statistics for each phase of the request
-- `X-Cache-Status`: Show cache hit status
+- `X-Performance-Metrics`: Contains timing statistics for request stages
+- `X-Cache-Status`: Shows cache hit status
### Log Debugging
-In a development environment, you can view detailed logs through the Cloudflare Workers console:
+In development environment, you can view detailed logs through Cloudflare Workers console:
```bash
npx wrangler dev --log-level debug
@@ -2500,25 +2489,25 @@ npx wrangler dev --log-level debug
## ⚠️ Disclaimer
-- **Legal and Compliant Use**: This repository is designed to accelerate legal public resource access (such as file downloads, Git operations, AI inference APIs, container image pulling and package management). Please strictly abide by the laws and regulations of the jurisdiction you are in and the terms of service and use agreements of the relevant platforms. Any use of any behavior that exceeds the scope of legally disclosed resources shall be borne by the user at their sole responsibility.
-- **Non-relatedness and liability**: Any fork, secondary development, redistribution or derivative version based on this repository shall be independently responsible for its maintainers; the author, maintainer and contributor of this repository shall not bear any legal or joint liability for their actions or consequences, nor shall it constitute employment, cooperation, agency, endorsement or warranty relationship
-- **No Warranty and Limitation of Liability**: To the maximum extent permitted by applicable law, this Repository is provided as “AS IS” and the author, maintainer and contributor do not provide any warranties of express or implied (including but not limited to merchantability, fitness for a particular purpose and non-infringement), nor are they liable for any direct or indirect losses, loss of data, business interruption or other consequences arising from the use of this Repository
-- **User's obligation**: Users should evaluate and control the risks of use on their own, ensure that their actions and purposes are legal, compliant and do not infringe on the rights and interests of third parties, and do not use this repository for illegal, infringing or malicious purposes in any form.
-- **Third-party platforms and rate limits**: Please comply with the terms of service, API usage restrictions and rate control of GitHub, GitLab, Gitea, Codeberg, SourceForge, Hugging Face, major package management platforms and container registry, etc., to avoid excessive load on the source platform
-- **Intellectual Property and Content Compliance**: Ensure that content accessed or distributed through this repository complies with relevant copyright and licensing requirements; for copyrighted content, please comply with its license agreement and terms of use
-- **Data and Security**: This repository adopts a log-free architecture and does not store, record or analyze user requested data. However, Internet transmission has inherent risks. It is recommended to scan downloaded files safely, especially executable files and scripts, and handle sensitive information with caution
-- **Support and Maintenance**: This repository is an open source, community-driven work, and the authors and contributors do not assume the obligation to provide support, repair or continuous maintenance; the merged external contribution does not constitute a commitment or endorsement of its purpose, effect, or results.
-- **Denotation and Name Use**: No cooperation, endorsement or warranty shall be implied in any scenario. External display or publicity involving the name of the repository, the author's name or logo shall comply with applicable laws and the usage specifications of the name/logo
-- **Update and Applicable**: This disclaimer may be updated with changes in the repository or legal environment without notice; when you use, copy, distribute or modify this repository, you are deemed to have read and agree to the latest version of this disclaimer.
+- **Legal and Compliant Use**: This repository is intended to accelerate access to legal public resources (such as file downloads, Git operations, AI inference APIs, container image pulls, and package management). Please strictly comply with the laws and regulations of your jurisdiction as well as the terms of service and usage agreements of relevant platforms. Any use beyond legal public resources is the user's own legal responsibility
+- **Non-Affiliation and Self-Responsibility**: Any fork, secondary development, redistribution, or derivative version based on this repository is independently responsible by its maintainer; the authors, maintainers, and contributors of this repository bear no legal or joint liability for their actions or consequences, nor does it constitute employment, cooperation, agency, endorsement, or guarantee
+- **No Warranty and Limitation of Liability**: To the maximum extent permitted by applicable law, this repository is provided "AS IS", and the authors, maintainers, and contributors provide no express or implied warranties (including but not limited to merchantability, fitness for a particular purpose, and non-infringement), nor are they responsible for any direct or indirect losses, data loss, business interruption, or other consequences caused by the use of this repository
+- **User Obligations**: Users should independently evaluate and control usage risks, ensuring their actions and purposes are legal, compliant, and do not infringe third-party rights, and not use this repository for illegal, infringing, or malicious purposes in any form
+- **Third-Party Platforms and Rate Limits**: Please comply with the terms of service, API usage limits, and rate controls of platforms such as GitHub, GitLab, Gitea, Codeberg, SourceForge, Hugging Face, various package management platforms, and container registries to avoid excessive load on source platforms
+- **Intellectual Property and Content Compliance**: Ensure that content accessed or distributed through this repository complies with relevant copyright and licensing requirements; for copyrighted content, please comply with its licensing agreements and terms of use
+- **Data and Security**: This repository adopts a no-log architecture and does not store, record, or analyze user request data. However, internet transmission has inherent risks. It is recommended to perform security scans on downloaded files, especially executable files and scripts, and handle sensitive information carefully
+- **Support and Maintenance**: This repository is an open source, community-driven work. Authors and contributors are not obligated to provide support, fixes, or continuous maintenance; merged external contributions do not constitute commitments or endorsements for their purposes, effects, or results
+- **Representation and Name Use**: Do not imply cooperation, endorsement, or guarantee from authors or contributors in any scenario. External display or promotion involving the repository name, author name, or logos should comply with applicable laws and common name/logo usage norms
+- **Updates and Applicability**: This disclaimer may be updated as the repository or legal environment changes without separate notice; by using, copying, distributing, or modifying this repository, you are deemed to have read and agreed to the latest version of this disclaimer
-## 🤝 Contribution
+## 🤝 Contributing
-We welcome contributions in all forms!Please see the [Contribution 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. **Reporting issues**: Use [issue template](https://github.com/xixu-me/Xget/issues/new/choose) to report a bug or make a feature request
-2. **Commit code**: fork repository, create feature branches, submit pull request
-3. **Improve documentation**: Fix errors, add examples, and improve instructions
-4. **Test Feedback**: Test and provide feedback in different environments
+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
## 🌟 Star History
@@ -2534,17 +2523,19 @@ We welcome contributions in all forms!Please see the [Contribution Guide] (CONTR
- **Author**: [Xi Xu](https://xi-xu.me)
- **Email**: [Contact Email](mailto:i@xi-xu.me)
-- **Sponsored**: [Sponsored URL](https://xi-xu.me/#sponsorships)
+- **Sponsor**: [Sponsor URL](https://xi-xu.me/#sponsorships)
## 📝 License
-This repository is under a GPL-3.0 license - view the [LICENSE](LICENSE) file for details.
+Copyright © Xi Xu.
+
+This repository is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details.
---
-**If this repository is helpful to you, consider giving it a ⭐star!**
+**If this repository helps you, please consider giving it a ⭐ star!**
Made with ❤️ by [Xi Xu](https://xi-xu.me)
diff --git a/README.md b/README.md
index 30cba61..18c1f84 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@
[](#ai-推理提供商)
[](#容器注册表)
-超高性能、安全的一站式开发者资源加速引擎,其性能远超传统加速器,提供跨多个平台的统一高效的加速体验,涵盖代码储存库、包管理、AI 推理 API、容器镜像、模型及数据集等。
+面向开发者资源的超高性能、安全、一体化加速引擎,其性能显著优于传统解决方案,为代码存储库、软件包注册表、AI 推理 API、容器镜像、模型、数据集及更多资源提供统一且高效的加速。
技术深度解析文章已发布:**[《深入剖析 Xget:一个高性能、多协议、高安全性的开发者资源加速引擎》](https://blog.xi-xu.me/2025/10/07/deep-dive-into-xget-technology.html)**。
@@ -2334,18 +2334,7 @@ sudo systemctl restart containerd
## 🚀 部署
-### Cloudflare Workers
-
-[](https://deploy.workers.cloudflare.com/?url=https://github.com/xixu-me/Xget)
-
-**Xget 专为 Cloudflare Workers 设计并优化**,提供最佳的性能和体验:
-
-- **💰 成本优势**:除了注册域名的费用外,在大多数情况下是免费的
-- **🚀 性能最高**:全球边缘节点,响应速度最快
-- **🔧 维护简单**:无需服务器管理,自动扩展和更新
-- **🛡️ 安全可靠**:内置 DDoS 防护和安全特性
-
-#### 部署步骤
+### 部署步骤
1. **fork 本存储库**:
点击 GitHub 页面右上角的 Fork 按钮
@@ -2374,7 +2363,7 @@ sudo systemctl restart containerd
- Worker 域名:`your-worker-name.your-subdomain.workers.dev`
- 自定义域名:`your-domain.com`(如果已绑定)
-#### 环境变量配置
+### 环境变量配置
你可以在 Cloudflare Workers 控制台中设置以下环境变量来自定义配置:
@@ -2548,6 +2537,8 @@ npx wrangler dev --log-level debug
## 📝 许可证
+版权所有 © Xi Xu。
+
本存储库采用 GPL-3.0 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情。
---
diff --git a/scripts/test.js b/scripts/test.js
deleted file mode 100644
index 618852f..0000000
--- a/scripts/test.js
+++ /dev/null
@@ -1,320 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Test runner script with additional utilities
- */
-
-import { spawn } from 'child_process';
-import { existsSync, mkdirSync, writeFileSync } from 'fs';
-import { dirname, join } from 'path';
-import { fileURLToPath } from 'url';
-
-const __filename = fileURLToPath(import.meta.url);
-const __dirname = dirname(__filename);
-const rootDir = join(__dirname, '..');
-
-// Test configuration
-const TEST_CONFIG = {
- timeout: 30000,
- coverage: {
- threshold: 80,
- formats: ['text', 'html', 'lcov', 'json']
- },
- reporters: ['default', 'json'],
- environments: ['node', 'workers']
-};
-
-/**
- * Main test runner
- */
-async function main() {
- const args = process.argv.slice(2);
- const command = args[0] || 'run';
-
- console.log('🧪 Xget Test Runner');
- console.log('==================');
-
- try {
- switch (command) {
- case 'run':
- await runTests(args.slice(1));
- break;
- case 'watch':
- await watchTests(args.slice(1));
- break;
- case 'coverage':
- await runCoverage(args.slice(1));
- break;
- case 'bench':
- await runBenchmarks(args.slice(1));
- break;
- case 'lint':
- await runLinting();
- break;
- case 'format':
- await runFormatting();
- break;
- case 'ci':
- await runCITests();
- break;
- case 'setup':
- await setupTestEnvironment();
- break;
- case 'clean':
- await cleanTestArtifacts();
- break;
- default:
- showHelp();
- }
- } catch (error) {
- console.error('❌ Test runner failed:', error.message);
- process.exit(1);
- }
-}
-
-/**
- * Run tests
- */
-async function runTests(args = []) {
- console.log('🏃 Running tests...');
-
- const vitestArgs = ['run', '--config', 'vitest.config.js', ...args];
-
- await runCommand('npx', ['vitest', ...vitestArgs]);
-}
-
-/**
- * Watch tests
- */
-async function watchTests(args = []) {
- console.log('👀 Watching tests...');
-
- const vitestArgs = ['--config', 'vitest.config.js', '--watch', ...args];
-
- await runCommand('npx', ['vitest', ...vitestArgs]);
-}
-
-/**
- * Run coverage
- */
-async function runCoverage(args = []) {
- console.log('📊 Generating coverage report...');
-
- const vitestArgs = ['run', '--config', 'vitest.config.js', '--coverage', ...args];
-
- await runCommand('npx', ['vitest', ...vitestArgs]);
-
- console.log('📈 Coverage report generated in ./coverage/');
-
- // Generate coverage summary
- await generateCoverageSummary();
-}
-
-/**
- * Run benchmarks
- */
-async function runBenchmarks(args = []) {
- console.log('⚡ Running performance benchmarks...');
-
- const vitestArgs = ['bench', '--config', 'vitest.config.js', ...args];
-
- await runCommand('npx', ['vitest', ...vitestArgs]);
-}
-
-/**
- * Run linting
- */
-async function runLinting() {
- console.log('🔍 Running ESLint...');
-
- await runCommand('npx', ['eslint', 'src/', 'test/', '--ext', '.js']);
-
- console.log('✅ Linting completed');
-}
-
-/**
- * Run formatting
- */
-async function runFormatting() {
- console.log('💅 Running Prettier...');
-
- await runCommand('npx', ['prettier', '--write', 'src/', 'test/', '*.js', '*.json', '*.md']);
-
- console.log('✅ Formatting completed');
-}
-
-/**
- * Run CI tests
- */
-async function runCITests() {
- console.log('🤖 Running CI test suite...');
-
- // Run linting
- await runLinting();
-
- // Check formatting
- console.log('📝 Checking code formatting...');
- await runCommand('npx', ['prettier', '--check', 'src/', 'test/', '*.js', '*.json', '*.md']);
-
- // Run tests with coverage
- await runCoverage(['--reporter=json', '--reporter=text']);
-
- // Run benchmarks
- await runBenchmarks(['--reporter=json']);
-
- console.log('✅ CI test suite completed');
-}
-
-/**
- * Setup test environment
- */
-async function setupTestEnvironment() {
- console.log('🔧 Setting up test environment...');
-
- // Create necessary directories
- const dirs = ['coverage', 'test/tmp', 'test/logs'];
- dirs.forEach(dir => {
- const fullPath = join(rootDir, dir);
- if (!existsSync(fullPath)) {
- mkdirSync(fullPath, { recursive: true });
- console.log(`📁 Created directory: ${dir}`);
- }
- });
-
- // Create test configuration file
- const testConfig = {
- ...TEST_CONFIG,
- timestamp: new Date().toISOString(),
- version: process.env.npm_package_version || '1.0.0'
- };
-
- writeFileSync(join(rootDir, 'test/config.json'), JSON.stringify(testConfig, null, 2));
-
- console.log('✅ Test environment setup completed');
-}
-
-/**
- * Clean test artifacts
- */
-async function cleanTestArtifacts() {
- console.log('🧹 Cleaning test artifacts...');
-
- const { rmSync } = await import('fs');
- const artifactDirs = ['coverage', 'test/tmp', 'test/logs'];
-
- artifactDirs.forEach(dir => {
- const fullPath = join(rootDir, dir);
- if (existsSync(fullPath)) {
- rmSync(fullPath, { recursive: true, force: true });
- console.log(`🗑️ Removed: ${dir}`);
- }
- });
-
- console.log('✅ Cleanup completed');
-}
-
-/**
- * Generate coverage summary
- */
-async function generateCoverageSummary() {
- const coverageFile = join(rootDir, 'coverage/coverage-summary.json');
-
- if (existsSync(coverageFile)) {
- const { readFileSync } = await import('fs');
- const coverage = JSON.parse(readFileSync(coverageFile, 'utf8'));
-
- console.log('\n📊 Coverage Summary:');
- console.log('===================');
-
- const total = coverage.total;
- console.log(`Lines: ${total.lines.pct}% (${total.lines.covered}/${total.lines.total})`);
- console.log(
- `Functions: ${total.functions.pct}% (${total.functions.covered}/${total.functions.total})`
- );
- console.log(
- `Branches: ${total.branches.pct}% (${total.branches.covered}/${total.branches.total})`
- );
- console.log(
- `Statements: ${total.statements.pct}% (${total.statements.covered}/${total.statements.total})`
- );
-
- // Check if coverage meets threshold
- const threshold = TEST_CONFIG.coverage.threshold;
- const meetsThreshold = [
- total.lines.pct >= threshold,
- total.functions.pct >= threshold,
- total.branches.pct >= threshold,
- total.statements.pct >= threshold
- ].every(Boolean);
-
- if (meetsThreshold) {
- console.log(`\n✅ Coverage meets threshold (${threshold}%)`);
- } else {
- console.log(`\n⚠️ Coverage below threshold (${threshold}%)`);
- }
- }
-}
-
-/**
- * Run command with proper error handling
- */
-function runCommand(command, args = [], options = {}) {
- return new Promise((resolve, reject) => {
- const child = spawn(command, args, {
- stdio: 'inherit',
- cwd: rootDir,
- ...options
- });
-
- child.on('close', code => {
- if (code === 0) {
- resolve();
- } else {
- reject(new Error(`Command failed with exit code ${code}`));
- }
- });
-
- child.on('error', error => {
- reject(error);
- });
- });
-}
-
-/**
- * Show help information
- */
-function showHelp() {
- console.log(`
-Usage: node scripts/test.js [options]
-
-Commands:
- run [args] Run tests once (default)
- watch [args] Run tests in watch mode
- coverage Generate coverage report
- bench Run performance benchmarks
- lint Run ESLint
- format Run Prettier
- ci Run full CI test suite
- setup Setup test environment
- clean Clean test artifacts
- help Show this help
-
-Examples:
- node scripts/test.js run
- node scripts/test.js watch --grep "GitHub"
- node scripts/test.js coverage
- node scripts/test.js ci
-
-Environment Variables:
- VERBOSE_TESTS=true Enable verbose test output
- TEST_TIMEOUT=30000 Set test timeout (ms)
- NODE_ENV=test Set environment to test
-`);
-}
-
-// Run if called directly
-if (import.meta.url === `file://${process.argv[1]}`) {
- main().catch(console.error);
-}
-
-export { main, runBenchmarks, runCoverage, runTests };