Commit Graph
127 Commits
Author SHA1 Message Date
xixu-me 8dc7f3c293 Update README.en.md 2025-07-26 08:27:33 +08:00
xixu-me aa1a885ecb Update README.en.md 2025-07-26 08:26:19 +08:00
xixu-me 66d48af353 Update README.md 2025-07-26 08:19:48 +08:00
xixu-me 0ff39eb835 Update README.md 2025-07-26 08:15:15 +08:00
xixu-me e3e6b9f0e6 Update README.md 2025-07-26 08:13:03 +08:00
xixu-me 972c560bf8 Disable workers_dev in wrangler.toml
Set workers_dev to false in wrangler.toml to prevent deployment to the workers.dev subdomain. This change is likely for production or custom domain deployment.
2025-07-25 21:32:54 +08:00
xixu-me 9b8703c79c Add English documentation and cross-link in README
Added README.en.md with comprehensive English documentation for Xget. Updated README.md to include a link to the English version for improved accessibility.
2025-07-25 20:08:45 +08:00
xixu-me 5fa143a245 Fix code block formatting in README
Corrected misplaced code block delimiters and added missing bash code block for containerd restart instructions.
2025-07-25 19:49:11 +08:00
xixu-me f9ffdf54e1 Add distroless base image pull command to README
Added instructions for pulling the distroless base image from Google Container Registry using the registry mirror. This helps users quickly access the image via the documented mirror.
2025-07-25 19:48:18 +08:00
xixu-me 7e2fc46e88 Refactor container registry support and docs
Updated README to clarify container registry usage and examples, including new supported registries and configuration instructions. Removed NVIDIA NGC from supported registries in code and tests. Standardized test cases and examples to use 'nginxinc/nginx-unprivileged' for container registry paths, improving consistency across documentation and tests.
2025-07-25 19:47:44 +08:00
xixu-me ba5b728b2f Remove Docker Hub registry support and references
Eliminates support for Docker Hub ('cr-docker') from platform configuration, request handling logic, and all related tests. Updates terminology and test cases to use other container registries (e.g., GHCR) and removes Docker-specific path and scope transformations. This simplifies container registry support and focuses on currently supported platforms.
2025-07-25 19:02:40 +08:00
xixu-me 46288a92da Refactor Docker registry request handling
Simplifies Docker authentication and registry path handling by removing redundant logic and enforcing /cr/ prefix for Docker registry requests. Updates allowed HTTP methods for Git and Docker, streamlines DockerHub library image path transformation, and improves unauthorized response handling.
2025-07-25 18:07:00 +08:00
xixu-me af22287f2f Refactor Docker authentication handling logic
Moves Docker authentication handling to the beginning of request processing for priority and clarity. Improves error handling and response formatting for Docker auth endpoint, and removes duplicate logic from later in the function.
2025-07-25 17:53:42 +08:00
xixu-me 61f0d21439 Improve Docker registry proxy authentication and routing
Enhances Docker registry proxy logic to better handle authentication challenges, support DELETE method, and improve path transformations for Docker Hub library images. Adds more robust handling for /v2/auth endpoint, upstream authentication checks, and anonymous token fetching for public repositories. Also refines error messaging and routing for Docker requests.
2025-07-25 17:27:50 +08:00
xixu-me 9cc2baee1e Refactor Docker registry 401 authentication handling
Simplifies and improves handling of 401 Unauthorized responses for Docker registry requests by passing through the authentication challenge with a modified WWW-Authenticate header, allowing the Docker client to handle authentication. Removes token fetching logic and ensures relevant headers are preserved in the response.
2025-07-25 16:52:02 +08:00
xixu-me c0a5f43f4c Refactor Docker registry authentication handling
Simplifies unauthorized response structure and updates the service name in the WWW-Authenticate header. Refactors Docker registry path handling to require /cr/ prefix for all requests, removes special handling for /v2/auth, and improves token fetching logic for public repositories. Unauthorized errors now return a more helpful message when authentication fails.
2025-07-25 16:37:56 +08:00
xixu-me a723f1b18f Improve Docker registry and auth endpoint handling
Adds special handling for the Docker /v2/auth endpoint, allowing requests without the /cr/ prefix. Refines anonymous token retrieval for Docker Hub public images and ensures proper scope extraction for manifests and blobs. If anonymous access fails, the original authentication challenge is passed through instead of returning a custom unauthorized response.
2025-07-25 16:31:12 +08:00
xixu-me 7a619e0edc Improve Docker registry authentication handling
Enhanced the unauthorized response to include proper headers and JSON error details. Added logic to attempt anonymous token retrieval for public Docker images and retry requests with the token if available, improving support for unauthenticated access.
2025-07-25 16:24:17 +08:00
xixu-me 7355cd3fce Improve Docker registry path validation
Updates Docker request handling to allow both /cr/ and /v2/cr/ prefixes, and clarifies path normalization for Docker registry API consistency.
2025-07-25 16:14:31 +08:00
xixu-me 3e3eab5867 Add Docker registry proxy support and tests
Implements Docker registry request detection, authentication handling, and proxy logic in src/index.js. Adds comprehensive tests for Docker registry support, including API version checks, URL transformation, authentication, HTTP methods, error handling, header preservation, and platform support in test/docker-registry.test.js.
2025-07-25 16:08:02 +08:00
xixu-me f755f9ebbc Pass 401 challenge for Docker authentication
When handling Docker authentication, the 401 challenge response is now passed through to the client to support proper authentication flows.
2025-07-25 15:07:56 +08:00
xixu-me 3661da22c7 Add Docker request handling to proxy logic
Introduces detection and special handling for Docker API requests, including protocol compliance and header management. Docker requests are now proxied similarly to Git operations, with caching and header logic adjusted to avoid interfering with protocol-sensitive requests.
2025-07-25 14:54:19 +08:00
xixu-me a6d7991c35 Refactor platform config and error handling logic
Removes transformPath from CONFIG and imports it directly where needed. Updates platform configuration to use a simpler mapping. Improves error handling by checking for Error instances before accessing message properties.
2025-07-25 14:28:27 +08:00
xixu-me df16d0806a Refactor platform config and unify path transformation
Simplifies PLATFORMS to map platform keys to base URLs and introduces a unified transformPath function for path normalization. Updates usage in src/index.js and refactors tests to validate the new structure and container registry support.
2025-07-25 14:16:26 +08:00
xixu-me 2104ffa96e Reformat config files to use spaces and single quotes
Updated tsconfig.json and vitest.config.js to use consistent 2-space indentation and single quotes for strings, improving code style and readability.
2025-07-25 12:05:35 +08:00
xixu-me 78ebc49a4b Refactor ESLint config for improved readability
Reformatted the ESLint configuration file to use consistent array/object formatting and removed unnecessary quotes from rule names. No functional changes were made; this improves maintainability and clarity. Other config files had only minor formatting updates.
2025-07-25 12:01:29 +08:00
xixu-me 782fb3492d Merge branch 'main' of https://github.com/xixu-me/Xget 2025-07-25 09:36:06 +08:00
xixu-me b147ea7052 Add npm registry URL rewriting and improve formatting
Introduces logic to rewrite npm registry tarball URLs in JSON responses to route through the proxy endpoint, ensuring package names are preserved. Also improves code formatting and consistency across source and test files, and adds related test cases for npm URL rewriting.
2025-07-25 09:36:03 +08:00
xixu-me b93bfa4434 Update README.md 2025-07-25 08:40:45 +08:00
xixu-me 31e25a1c6f Update multi-platform integration section in README
Simplified and unified the description of multi-platform integration features in the README. The new wording emphasizes one-stop mirroring, intelligent recognition, and a consistent acceleration experience across platforms.
2025-07-24 22:40:48 +08:00
xixu-me b264c9d713 Update documentation for clarity and formatting
Improved wording, formatting, and badge order in README.md to better highlight Xget's features and advantages. Fixed spacing and link formatting in CONTRIBUTING.md and test/README.md for consistency and readability.
2025-07-24 22:24:31 +08:00
xixu-me f252782cca Merge pull request #3 from xixu-me/dependabot/npm_and_yarn/npm_and_yarn-b315956786
Bump the npm_and_yarn group across 1 directory with 2 updates
2025-07-24 21:56:46 +08:00
dependabot[bot] 51ea334452 Bump the npm_and_yarn group across 1 directory with 2 updates
---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: wrangler
  dependency-version: 4.26.0
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-24 13:54:50 +00:00
xixu-me 38833f4c3a Update documentation to use '存储库' instead of '项目'
Replaced occurrences of '项目' (project) with '存储库' (repository) across issue templates, contributing guide, and README for consistency and clarity. Updated badges, usage examples, and contribution instructions to reflect this terminology change. No functional code changes were made.
2025-07-24 21:53:48 +08:00
xixu-me da0b518900 Update test tooling and scripts, add tsconfig.json
Modernizes test and lint scripts in package.json to use Vitest, Prettier, and ESLint directly. Updates devDependencies to latest versions. Adds a tsconfig.json for type checking and editor support. Improves test mocking in performance.test.js and updates documentation in README.md to reflect new test commands. Cleans up unused options in vitest.config.js.
2025-07-24 21:28:47 +08:00
xixu-me b34e490e6c Migrate issue templates to YAML and add contribution docs
Replaced Markdown issue templates with structured YAML templates for bug reports, feature requests, performance issues, deployment help, and platform support. Added .prettierrc.json and .prettierignore for code formatting, a detailed CONTRIBUTING.md, and a pull request template. Updated CODE_OF_CONDUCT.md and README.md to reference new contribution guidelines. Added ESLint config, test scripts, and initial test files to improve project maintainability and onboarding.
2025-07-24 21:05:13 +08:00
xixu-me 8ad628aafd Remove Dependabot and deploy workflow configs
Deleted .github/dependabot.yml and .github/workflows/deploy.yml to disable automated dependency updates and deployment to Cloudflare Workers.
2025-07-24 20:06:12 +08:00
xixu-me 6d30820daa Prioritize specific platform paths in detection logic
Platforms are now sorted by path length in descending order before matching, ensuring that more specific paths (e.g., conda/community) are matched before general ones (e.g., conda). This prevents incorrect platform detection when similar prefixes exist.
2025-07-24 20:04:21 +08:00
xixu-me dc40cacf81 Redirect invalid platforms to GitHub repo
Requests to the root path or with invalid/missing platforms now redirect to the GitHub repository instead of returning a 400 error. This improves user experience by guiding users to the project homepage for more information.
2025-07-24 19:50:36 +08:00
xixu-me cef0e26ed8 Add PyPI files proxy support and URL rewriting
Introduces a new 'pypi-files' platform configuration for proxying files from files.pythonhosted.org. Updates platform detection logic for better flexibility and rewrites PyPI simple index HTML responses to route file URLs through the proxy.
2025-07-24 19:27:28 +08:00
xixu-me 57c02eb179 Create SECURITY.md 2025-07-24 15:33:17 +08:00
xixu-me 4115f931a3 Update PyPI URLs to use pypi.org domain
Changed all references from files.pythonhosted.org to pypi.org in both the README and the PyPI platform configuration. This aligns documentation and configuration with the current official PyPI domain.
2025-07-24 15:32:47 +08:00
xixu-me 0cb8351f9a Refactor and streamline README usage instructions
Updated the conda mirror table to include both default and community channels. Removed redundant direct download and batch download code examples for npm, PyPI, and conda, consolidating usage instructions. Moved and streamlined CI/CD and Docker integration examples, and clarified configuration steps for npm, pip, and conda mirrors. This makes the README more concise and focused on configuration and integration.
2025-07-24 15:12:17 +08:00
xixu-me 11076bb7ea Refactor conda channel support and update docs
Added explicit support for conda community channels in platform config and request handling. Updated README with improved conda usage instructions, new .condarc and environment.yml examples, and clarified download/configuration steps. Removed Vitest test dependencies and test files from the project.
2025-07-24 14:49:21 +08:00
xixu-me 613253c1ad Add conda platform support and update documentation
Added conda registry configuration to the platforms config and updated the README to document conda support, including usage examples, URL conversion, and configuration for conda and mamba. This enhances the service by enabling accelerated downloads and proxying for Anaconda and Miniconda packages.
2025-07-24 11:56:49 +08:00
xixu-me 5296a2c4b9 Add PyPI support to documentation and platform config
Extended the README with instructions and examples for accelerating PyPI (Python package) downloads and pip configuration. Added PyPI platform configuration to src/config/platforms.js to enable proxying of files.pythonhosted.org URLs.
2025-07-24 11:51:01 +08:00
xixu-me 535f07a993 Add npm registry support and documentation
Added npm registry as a supported platform in the codebase and updated the README with usage instructions, examples, and configuration details for npm package acceleration. This enhances the tool's capabilities to accelerate npm package downloads and metadata retrieval.
2025-07-24 11:46:47 +08:00
xixu-me a2fe270445 Redirect root path to GitHub repository
Replaces serving the homepage for the root path with a 302 redirect to the project's GitHub repository. Simplifies the logic and improves user navigation.
2025-07-23 16:59:17 +08:00
xixu-me fc95a5128b Update homepage URL in request handler
Changed the HOME_PAGE_URL from the GitHub Pages site to the main GitHub repository URL in the root path handler.
2025-07-23 16:32:43 +08:00
xixu-me 9f119f21c3 Serve external homepage and remove local homepage
Replaces the local homepage HTML with a redirect to an external static homepage at https://xixu-me.github.io/Xget-page/. Removes the now-unused homepage.js file and updates tests to reflect the new homepage behavior.
2025-07-22 21:49:06 +08:00