Update README.md

This commit is contained in:
xixu-me committed 2024-10-10 23:29:27 +08:00
1 parent aa87f219f3
commit dd07797b11
1 file changed
+143 -8
+143 -8
View File
@@ -1,10 +1,145 @@
# MCG - MCG Configuration Generator
# MCG - MCG is for Configuration Generation
| Via | URL |
| --- | --- |
| GitHub Raw | [https://raw.githubusercontent.com/xixu-me/MCG/refs/heads/main/script.js](https://raw.githubusercontent.com/xixu-me/MCG/refs/heads/main/script.js) |
| jsDelivr | [https://cdn.jsdelivr.net/gh/xixu-me/MCG@main/script.js](https://cdn.jsdelivr.net/gh/xixu-me/MCG@main/script.js) |
| jsDelivr on Cloudflare | [https://testingcf.jsdelivr.net/gh/xixu-me/MCG@main/script.js](https://testingcf.jsdelivr.net/gh/xixu-me/MCG@main/script.js) |
| GitHub Proxy | [https://ghp.ci/https://raw.githubusercontent.com/xixu-me/MCG/refs/heads/main/script.js](https://ghp.ci/https://raw.githubusercontent.com/xixu-me/MCG/refs/heads/main/script.js) |
## Overview
***Note: This repository is for learning and research purposes only. Any content in this repository shall not be used for other purposes that violate the laws, regulations or relevant provisions of the country/region/organization, etc. Otherwise, the consequences will be borne by the individual or organization using it and have nothing to do with this repository.***
**MCG** is a JavaScript-based tool that simplifies and optimizes the configuration of the ***M***ulti-function network tool—a cross-platform, rule-based utility for managing network and application traffic. It provides extensive support for advanced features and custom configurations.
## Key Features
- **Customizable Icon Sets**: Import icon sets from a CDN to visually represent services and locations.
- **Flexible Service Configuration**: Easily add, remove, or modify services, including custom names and icons.
- **Location Filters**: Use country-specific filters and custom icons for detailed location configuration.
- **Advanced DNS Management**:
- Supports Chinese and international nameservers.
- Configurable DNS settings including fake IP, filtering, and custom policies.
- **Proxy Group Management**:
- Various proxy group types (e.g., Auto, Fallback, Load Balancing).
- Automatic grouping for services and locations.
- **Intelligent Routing Rules**:
- Rule-based routing for diverse services and applications.
- Integration with popular rule providers.
- **Seamless Rule Provider Integration**: Set up and maintain rule providers automatically with regular updates.
- **Extensible Architecture**: Add new services, locations, or modify existing configurations easily.
- **Performance Optimization**: Includes lazy loading, configurable health checks, and optimized rule updates.
- **Customizable TUN Mode**: Configure TUN mode for improved compatibility and performance.
- **Privacy and Ad-Blocking**: Integrated rules for blocking ads and trackers.
- **Automatic Updates**: Enable auto-updates for GeoIP and GeoSite data.
- **Compatibility**: Supports the ***M***ulti-functional network tool clients, enhancing standard configurations.
## Installation & URLs
Choose one of the following URLs to import the MCG script:
| Source | URL |
| ------------------------- | --- |
| **GitHub Raw** | [https://raw.githubusercontent.com/xixu-me/MCG/refs/heads/main/script.js](https://raw.githubusercontent.com/xixu-me/MCG/refs/heads/main/script.js) |
| **jsDelivr** | [https://cdn.jsdelivr.net/gh/xixu-me/MCG@main/script.js](https://cdn.jsdelivr.net/gh/xixu-me/MCG@main/script.js) |
| **jsDelivr on Cloudflare**| [https://testingcf.jsdelivr.net/gh/xixu-me/MCG@main/script.js](https://testingcf.jsdelivr.net/gh/xixu-me/MCG@main/script.js) |
| **GitHub Proxy** | [https://ghp.ci/https://raw.githubusercontent.com/xixu-me/MCG/refs/heads/main/script.js](https://ghp.ci/https://raw.githubusercontent.com/xixu-me/MCG/refs/heads/main/script.js) |
## Usage Guide
Follow these steps to use MCG:
### 1. Prepare Base Configuration
Start with a valid ***M***ulti-function network tool configuration file containing at least one proxy or proxy provider, typically generated by importing a subscription URL into your client.
### 2. Import MCG Script
- **For M.P.**:
1. Go to "Override" in the sidebar and import the MCG script.
2. Edit and save the override if needed.
3. In "Subscription Management," select the subscription to modify, and set the MCG script as the override.
- **For Other Clients (e.g., C.V.R.)**:
1. Navigate to the configuration page.
2. Add the MCG script content into the configuration editor.
3. Save and enable the script.
### 3. Apply and Update Configuration
- For **M.P.**, changes apply automatically after importing the script.
- For other clients, manually update or reload the configuration if necessary.
### 4. Verify the Configuration
Check your client’s execution log to ensure the MCG script is applied successfully.
**Note**: The MCG script will override specific parts of your configuration (e.g., DNS settings, proxy groups).
## Customization Guide
MCG is highly customizable. Below are some key areas you can modify:
### 1. **Icon Set URL**
Change the `ICON_SET_URL` constant to use a different icon set.
### 2. **Services**
Modify the `services` array to add or remove services:
```javascript
{
name: "NewService",
alias: "New Service",
icon: `${ICON_SET_URL}new_service_icon.png`,
}
```
### 3. **Locations**
Customize the `locations` array to define geographical locations:
- `name`: Location name.
- `filter`: Regex pattern for matching.
- `icon`: URL of the location icon.
### 4. **General Configuration**
Adjust `generalConfig` settings like:
- `allow-lan`: Set to `true` for LAN access.
- `log-level`: Set logging level (`info`, `debug`).
- `ipv6`: Enable/disable IPv6 support.
### 5. **DNS Settings**
Modify the `dns` object to change nameservers and DNS policies.
### 6. **Proxy Groups**
Create or modify proxy groups in the `proxyGroups` array.
### 7. **Routing Rules**
Customize the `rules` array for traffic management.
### 8. **Rule Providers**
Add or modify custom rule providers in the `ruleProviders` object.
For detailed documentation, refer to the official ***M***ulti-function network tool documentation.
## Requirements
- A valid configuration file with at least one proxy or proxy provider defined.
- A compatible client that supports JavaScript overrides.
## Disclaimer
1. This repository is strictly for educational and research purposes.
2. Use at your own risk. The repository assumes no responsibility for potential issues.
3. No guarantee of accuracy, completeness, or reliability.
4. Not liable for data loss or damages.
5. Ensure compliance with relevant licenses and legal regulations.
6. No endorsement of third-party hardware/software.
7. User modifications are their own responsibility.
8. Terms may change at any time. By using this content, you agree to these terms.
## License
Copyright © 2024 [Xi Xu](https://xi-xu.me). All rights reserved.
Licensed under the [GPL-3.0](https://github.com/xixu-me/MCG/blob/main/LICENSE) license.