Skip to content

Commit

Permalink
初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
xOS committed Mar 14, 2022
0 parents commit afb5e31
Show file tree
Hide file tree
Showing 1,399 changed files with 237,273 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'

# Maintain dependencies for npm
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
73 changes: 73 additions & 0 deletions .github/workflows/AdRules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: AdRules

on:
workflow_dispatch:
push:
branches:
- "Her"
paths-ignore:
- "LICENSE"
- "*.md"
- "**/*.md"
- ".*"
- "node_modules"
schedule:
- cron: 0 */24 * * *

jobs:
Update:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [14]

steps:
- name: Fetch repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: yarn install, update
run: |
yarn install
yarn update-adrules
- name: Merge and Rules and remove duplicates
run: |
curl -LR -o RuleSet/AdRules/anti-ad.txt "https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-surge2.txt"
curl -LR -o RuleSet/AdRules/uBlack.list "https://raw.githubusercontent.com/dallaslu/penzai-list/main/Surge.txt"
awk 'FNR==1{print ""}{print}' RuleSet/AdRules/*.list > RuleSet/AdRules/Merge.txt
awk '!seen[$0]++' RuleSet/AdRules/Merge.txt > RuleSet/AdRules/Merge.list
grep -v -f RuleSet/AdRules/Bypass.list RuleSet/AdRules/Merge.list | sed '/^$/d' > RuleSet/AdRule.list
rm -rf RuleSet/AdRules/Merge.txt
rm -rf RuleSet/AdRules/Merge.list
- name: Download ChinaIPs.list
run: |
curl -LR -o RuleSet/ChinaIPs.txt "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/ChinaIPs/ChinaIPs.list"
awk 'FNR==1{print ""}{print}' RuleSet/ChinaIPs.txt | grep -v "#" | sed '/^$/d' > RuleSet/ChinaIPs.list
rm -rf RuleSet/ChinaIPs.txt
- name: commit, push
uses: EndBug/add-and-commit@v9
with:
add: "-A"
author_name: 佩佩
author_email: admin@nange.cn
message: "Update AdRules"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/Country.mmdb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update GeoIPs

on:
workflow_dispatch:
push:
branches:
- "Her"
paths-ignore:
- "LICENSE"
- "*.md"
- "**/*.md"
- ".*"
- "node_modules"
#schedule:
# - cron: 0 */24 * * *
jobs:
Update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Get GeoIPs
run: |
cd $GITHUB_WORKSPACE
cd GeoIP
wget -N --no-check-certificate https://raw.githubusercontent.com/xOS/GeoIPs/release/Country.mmdb
wget -N --no-check-certificate https://raw.githubusercontent.com/xOS/Country.mmdb/release/Country-lite.mmdb
wget -N --no-check-certificate https://raw.githubusercontent.com/xOS/GeoIPs/release/Country-only-cn-private.mmdb
wget -N --no-check-certificate https://raw.githubusercontent.com/xOS/GeoIPs/release/geoip.dat
wget -N --no-check-certificate https://raw.githubusercontent.com/xOS/GeoIPs/release/geoip-only-cn-private.dat
- name: Add & Commit
uses: EndBug/add-and-commit@v9
with:
author_name: 翠花
author_email: admin@nange.cn
message: "Update Country.mmdb"
add: "-A"
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
node_modules
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
semi: false,
singleQuote: true,
trailingComma: 'all',
jsxBracketSameLine: true,
}
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hub.qste.com
Loading

0 comments on commit afb5e31

Please sign in to comment.