155 Commits
Author SHA1 Message Date
xixu-me f4ea8dc4a3 Add Rust crates.io support and path transformation
Added Rust crates.io platform support in the documentation and platforms config. Implemented special path transformation logic for crates.io API endpoints in transformPath. Added tests to verify correct path transformation for various crates.io API routes.
2025-07-31 13:23:30 +08:00
xixu-me 4f44a12477 Add arXiv platform support and documentation
Added arXiv as a supported platform in the platforms configuration and updated the README with usage instructions, badge, and examples for accelerating arXiv paper downloads.
2025-07-28 21:30:53 +08:00
xixu-me 2f742aeed9 Add support for more package and OS platforms
Expanded documentation and platform config to include RubyGems, Go modules, NuGet, Packagist, and major Linux distributions (Debian, Ubuntu, Fedora, Rocky Linux, Arch Linux). Updated README with usage instructions and examples for these new platforms.
2025-07-28 20:27:09 +08:00
xixu-me c6f1d28dfc Add Maven and Gradle support and documentation
Added Maven and Gradle badges, usage instructions, and conversion examples to the README. Updated platforms.js to include Maven and Gradle platform URLs for enhanced package management support.
2025-07-28 19:54:44 +08:00
xixu-me 307a1a26a0 Add Gitea, Codeberg, and SourceForge platform support
Extended platform support by adding Gitea, Codeberg, and SourceForge to the configuration and documentation. Updated tests to cover new platforms and their path transformations, and enhanced README with usage examples and badges for the new platforms.
2025-07-28 18:49:06 +08:00
xixu-me e3351bc821 Remove Docker Hub specific support and code
Eliminated Docker Hub-specific configuration, path/scope transforms, and related documentation. Deleted src/config/docker.js and its tests, removed Docker Hub from supported platforms, and refactored code to use generic container registry logic. This simplifies the codebase by dropping special handling for Docker Hub library images.
2025-07-28 17:24:03 +08:00
xixu-me 340d1c0d11 Update imports and Docker request handling logic
Changed import statements to use explicit .js extensions for ES module compatibility. Updated Docker request detection to include '/cr/' paths and improved logic to avoid duplicating '/v2' prefix when constructing target paths.
2025-07-28 17:18:46 +08:00
xixu-me 543fa8cd59 Add Docker Hub support with path and scope handling
Introduces Docker Hub-specific configuration and utilities, including path and scope transformation for library images. Updates the main logic to handle Docker Hub authentication and path rewriting. Adds tests for Docker Hub path, scope, and authentication header parsing. Updates documentation to reflect Docker Hub support and usage examples.
2025-07-28 17:04:07 +08:00
xixu-me 4ae9138694 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 6d0fc73d20 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 2a1f5c820c 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 10c58ba9ef 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 ca6593cb4c 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 d9757874ec 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 1d1dcc424b 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 a13f580a6a 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 23b96614fc 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 fab0d3ae23 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 3f98c87645 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 42fa8ff5e1 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 89c26d96e6 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 211cac33f8 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 2b99a51eb1 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 dcf43e314a 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 8e74ff247f 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 9e2548302a 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 3c614887a1 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 605308e1ce 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 88d1139fc5 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 1f1749d2ef 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 c861ce0f42 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 987b4bb92e 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 0778cf6f03 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 6a3658d7ca 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 e10f718195 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
xixu-me b47e8c4438 Refactor config and update homepage styles
Refactored src/config/index.js to export a structured CONFIG object with application and security settings, and moved platform definitions to a separate import. Updated src/homepage.js to improve and align styles, enhance section structure, and synchronize UI/UX with the new config and design direction.
2025-07-22 19:56:00 +08:00
xixu-me 08c472bd71 Add modern homepage HTML generator for Xget
Replaces previous config export with a new `generateHomepage` function that returns a complete, modern, Chinese-language HTML homepage for Xget. The page includes sections for features, supported platforms, usage examples, a URL converter, and responsive design, with embedded CSS and JavaScript for interactivity.
2025-07-22 19:54:56 +08:00
xixu-me 2c625772ac Add modern homepage and serve it at root path
Introduces a new `generateHomepage` function in `src/homepage.js` that returns a modern HTML homepage for Xget, featuring a URL converter and platform information. Updates the root path handler in `src/index.js` to serve this homepage directly instead of redirecting to an external site. Adjusts tests in `test/index.spec.js` to validate the new homepage content and response headers.
2025-07-22 19:33:33 +08:00
xixu-me faaa03eade Improve Git protocol request and header handling
Expanded detection of Git requests by checking for Git-specific content types and improved user agent checks. Updated header handling to copy all headers for Git operations, ensuring better protocol compliance, and preserved all upstream response headers for Git requests. Also fixed parsing of platform from URL and improved body handling for POST requests.
2025-07-22 12:32:37 +08:00
xixu-me 116611fc6d Improve Git request handling and error responses
Refactors Git request processing to set the correct Content-Type and include the Git-Protocol header. Enhances retry logic by avoiding retries on client errors (4xx), adds security headers to error responses, and improves error handling for timeouts and upstream server errors.
2025-07-22 12:19:54 +08:00
xixu-me 08ab6d315f Add Git operation support and improve request handling
Introduces detection and special handling for Git operations, allowing POST requests for Git endpoints and bypassing cache for such requests. Adjusts headers and response logic to ensure compatibility with Git clients. Updates tests to cover Git and regular file download scenarios, and refines security method validation.
2025-07-21 14:35:01 +08:00
xixu-me 1827e0a1ef Remove Kaggle support from documentation and config
Kaggle references have been removed from the README and the platforms configuration. This reflects the discontinuation of Kaggle proxy support in the project. Also adds a Dependabot configuration for GitHub Actions updates.
2025-07-09 14:43:41 +08:00
xixu-me 8959b3acf6 Update platforms.js 2024-11-03 22:57:21 +08:00
xixu-me 3ed70a8cd8 Update platforms.js 2024-11-02 19:32:27 +08:00
xixu-me 5395a89fd5 Update index.js 2024-11-02 01:33:09 +08:00
xixu-me 85e31f90bf Update index.js 2024-11-01 21:05:05 +08:00
xixu-me 7d97e00464 Update platforms.js 2024-11-01 20:41:45 +08:00
xixu-me 16a0cd41be Update index.js 2024-11-01 20:31:10 +08:00
xixu-me 55be802e79 Update index.js 2024-11-01 20:01:21 +08:00
xixu-me 82d58b1c7e Update platforms.js 2024-11-01 20:01:19 +08:00