Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chalsh 非mihomo核心不能识别telegram规则集的ip-asn规则。 #1439

Open
dante2046 opened this issue Dec 9, 2024 · 1 comment
Open

Comments

@dante2046
Copy link

dante2046 commented Dec 9, 2024

不提供任何关于客户端的配置、使用等帮助,此类问题请通过搜索引擎解决,相关Issues将直接关闭甚至删除。

规则仅是特定服务域名和IP地址的集合,请使用中华人民共和国合法的网络出入口信道访问相关服务。


反馈前请先确认:

  1. 请勿涉及政治、成人等敏感或非法内容
  2. 分流规则的更新需要等待次日凌晨生效
  3. 仅接受规则引起异常的反馈
  4. 已自行抓包明确引起异常的规则
  5. 不规范填写的Issue可能不会得到任何回复

规则名称:Telegram

规则链接:https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Telegram/Telegram.yaml https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Telegram/Telegram.list https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Clash/Telegram/Telegram_No_Resolve.yaml

异常规则:- IP-ASN,********

问题描述:clash跑路核并不支持这个类型的规则

抓包截图:(相关抓包工具的截图。)

调整方案:另外生成一份没有ip-asn的规则集

@Zephyruswang
Copy link

之前我也提过,但是没解决,最后自己fork了一份,然后在fork的仓库添加一个workflow自动每天同步并剔除IP-ASN规则,下面是简略步骤。

1.点击fork,复制一份属于你仓库
2.点进刚刚fork的仓库,点击action,点击new workflow
Image

3.点击set up a workflow yourself

Image

4.下面的代码粘贴进去

name: Sync Fork and Modify Content

on:
  workflow_dispatch:
  schedule:
    - cron: '0 16 * * *'  # Runs at 16:00 UTC every day, which is 00:00 UTC+8

jobs:
  sync-and-modify:
    runs-on: ubuntu-latest

    steps:
      # Step 1: Checkout your repository
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0  # Ensures history is fetched

      # Step 2: Configure Git
      - name: Configure Git
        run: |
          git config user.name 'GitHub Action'
          git config user.email '[email protected]'

      # Step 3: Add the upstream repository
      - name: Add Upstream Remote
        run: git remote add upstream https://github.com/blackmatrix7/ios_rule_script.git

      # Step 4: Fetch the latest changes from the upstream repository
      - name: Fetch Upstream
        run: |
          git fetch upstream
          git checkout master

      # Step 5: Merge changes from upstream, favoring their changes in conflicts
      - name: Merge Upstream Changes
        run: git merge upstream/master --strategy-option theirs

      # Step 6: Modify files
      - name: Modify Files Excluding Markdown Files
        run: |
          find rule/Clash -type f ! -name "*.md" -exec sed -i '/IP-ASN/d' {} \;

      # Step 7: Check for changes and commit if any
      - name: Commit and Push Changes
        run: |
          if [ -n "$(git status --porcelain)" ]; then
            git add .
            git commit -m "Sync from upstream and modify files"
            git push origin master
          else
            echo "No changes to commit"
          fi

5.点击commit

Image

6.开始运行workflow

Image

然后就能看到任务开始运行了,之后每天的固定时间会自动执行一次

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants