mirror of
				https://github.com/Loyalsoldier/clash-rules.git
				synced 2025-11-03 17:46:58 +08:00 
			
		
		
		
	Add Telegram CIDR
This commit is contained in:
		
							
								
								
									
										8
									
								
								.github/workflows/run.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/run.yml
									
									
									
									
										vendored
									
									
								
							@@ -26,6 +26,7 @@ jobs:
 | 
			
		||||
          echo "felixonmars_apple=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf" >> $GITHUB_ENV
 | 
			
		||||
          echo "felixonmars_google=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf" >> $GITHUB_ENV
 | 
			
		||||
          echo "ipipnet_chinaiplist=https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt" >> $GITHUB_ENV
 | 
			
		||||
          echo "telegram_cidr=https://core.telegram.org/resources/cidr.txt" >> $GITHUB_ENV
 | 
			
		||||
        shell: bash
 | 
			
		||||
 | 
			
		||||
      - name: Checkout the "hidden" branch
 | 
			
		||||
@@ -83,10 +84,15 @@ jobs:
 | 
			
		||||
          echo "payload:" > cncidr.txt
 | 
			
		||||
          curl -sSL ${ipipnet_chinaiplist} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print "  - |$1|\n"' | sed "s/|/'/g" >> cncidr.txt
 | 
			
		||||
 | 
			
		||||
      - name: Generate telegramcidr.txt file
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "payload:" > telegramcidr.txt
 | 
			
		||||
          curl -sSL ${telegram_cidr} | perl -ne '/(.+\/\d+)/ && print "  - |$1|\n"' | sed "s/|/'/g" >> telegramcidr.txt
 | 
			
		||||
 | 
			
		||||
      - name: Move files to publish directory
 | 
			
		||||
        run: |
 | 
			
		||||
          mkdir -p publish
 | 
			
		||||
          install -p {apple,icloud,google,proxy,direct,reject,gfw,greatfire,tld-not-cn,cncidr,lancidr}.txt ./publish/
 | 
			
		||||
          install -p {apple,icloud,google,proxy,direct,reject,gfw,greatfire,tld-not-cn,cncidr,lancidr,telegramcidr}.txt ./publish/
 | 
			
		||||
 | 
			
		||||
      - name: Release and upload assets
 | 
			
		||||
        uses: softprops/action-gh-release@v1
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user