https://github.com/yaoyinying/anyrelay-targetrename
GitHub Actions (GHA) workflow designed to automate the conversion of node subscriptions into relay targets.
https://github.com/yaoyinying/anyrelay-targetrename
Last synced: 4 months ago
JSON representation
GitHub Actions (GHA) workflow designed to automate the conversion of node subscriptions into relay targets.
- Host: GitHub
- URL: https://github.com/yaoyinying/anyrelay-targetrename
- Owner: YaoYinYing
- Created: 2025-05-05T03:40:42.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-25T05:43:05.000Z (5 months ago)
- Last Synced: 2025-06-02T08:35:09.295Z (4 months ago)
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AnyRelay-TargetRename
This GitHub Actions (GHA) workflow is designed to convert a given subscription into relay targets by renaming them according to the [AnyRelay](https://github.com/YaoYinYing/AnyRelay) naming pattern and store them in a private Gist.
> \[!WARNING]
> This project is intended for learning, research, and security testing purposes only. It provides a tool for security researchers, academics, and technology enthusiasts to better understand network privacy and practice communication technology.> \[!CAUTION]
> As `AnyRelay` is designed for zero-trust and privacy, I strongly advise against using any nodes or subscriptions that do not explicitly guarantee privacy. Additionally, it is recommended to use self-hosted subconverter instances and frontend to keep the subscription link secure.## Legality
Users must comply with all applicable local laws and regulations when downloading and using this project. The user is responsible for ensuring that their actions comply with the laws, regulations, and other legal requirements in their region.
## Prerequisites
Before using the workflow, ensure you have the following:
1. A **valid node subscription**.
2. A **substitution string** for the nodes, where each substitution must be quoted. For example:
```text
`美国@RelayTarget-美国``尼日利亚@RelayTarget-尼日利亚``土耳其@RelayTarget-土耳其``印度@RelayTarget-印度``巴西@RelayTarget-巴西``阿联酋@RelayTarget-阿联酋``俄罗斯@RelayTarget-俄罗斯``巴基斯坦@RelayTarget-巴基斯坦``缅甸@RelayTarget-缅甸``菲律宾@RelayTarget-菲律宾``柬埔寨@RelayTarget-柬埔寨`
```3. A **subconverter backend**. See [Subconverter](https://github.com/tindy2013/subconverter).
4. A **subconverter frontend** to compose the converted URL based on the above information. See [sub-web-modify](https://github.com/youshandefeiyang/sub-web-modify).
5. A **private Gist** containing a file named `clash.yaml`.
6. A **GitHub Personal Access Token (PAT)** with the `gist` scope.
## Usage
Follow these steps to execute the workflow:
1. **Fork the repository**.
2. **Set up the prerequisites** as described above.
3. **Configure the required secrets** (explained below).
4. Trigger the workflow manually via the `workflow_dispatch` event.
5. After the workflow completes, **copy the raw URL of the updated Gist file** and use it as the relay target input for the [AnyRelay project](https://github.com/YaoYinYing/AnyRelay).
6. **Schedule the workflow** if you need it to run periodically. Adjust the `on:schedule:cron` field in the workflow file to customize the refresh schedule for node data on Gist.## Setting Up the Secrets
To run the workflow, configure the following secrets in your GitHub repository's **Settings > Secrets**:
| **Name** | **Value** | **Description** |
| ------------------- | ---------------------------------- | ---------------------------------------------------------------------- |
| `GIST_ID` | `` | The Gist ID of the `clash.yaml` file (from your private Gist). |
| `GIST_PAT` | `` | The GitHub Personal Access Token with `gist` scope. |
| `RELAY_TARGETS_URL` | `` | The URL generated by the subconverter frontend. |
| `USER_AGENT` | `mihomo.party/v1.7.3 (clash.meta)` | The user agent string used by `wget` to fetch the Clash configuration. |Ensure all secrets are configured correctly before triggering the workflow.
### Disclaimer
1. **Purpose**: The author emphasizes that this project is intended solely for legal, ethical, and educational purposes.
2. **Illegal Use**: The author does not endorse or support the illegal use of this project. Any use of this project for unlawful or unethical activities will be strongly condemned.
3. **User Responsibility**: The author is not responsible for any illegal activities carried out by individuals or groups using this project. Any consequences arising from the user's actions are their sole responsibility.
4. **Liability**: The author is not liable for any direct or indirect damages resulting from the use of this project.
5. **Acceptance of Terms**: By using this project, users acknowledge and agree to all terms outlined in this disclaimer. If the user does not agree, they should immediately cease using the project.
6. **Updates**: The author reserves the right to update this disclaimer at any time without prior notice. The most current version of the disclaimer will be available on the project’s GitHub page.