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

[pull] master from FQrabbit:master #6

Merged
merged 48 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
267c8ca
Updated at Mon Aug 28 02:22:20 UTC 2023
github-actions[bot] Aug 28, 2023
d628a1c
chore(deps): Add Dependabot configuration file
chise0713 Sep 7, 2023
63df141
Chore: bump actions/checkout from 3 to 4
chise0713 Sep 7, 2023
2913f86
Fix: wrong `curl` argument.
chise0713 Sep 7, 2023
89f64ac
Add: different GEOIP provider https://github.com/0x2E/someip
chise0713 Sep 7, 2023
7cec34a
Add: echo "Hash=$hash" to output
chise0713 Sep 7, 2023
f732330
Chore: Delete unnecessary files, merge them into workflow
chise0713 Sep 7, 2023
56c6396
Updated at Thu Sep 7 14:19:27 UTC 2023 (Source: https://github.com/0…
github-actions[bot] Sep 7, 2023
4423a3c
Chore: Add judgement for workflow run in `GitHub Push`
chise0713 Sep 7, 2023
8e5ebac
docs: Update README to reflect latest code.
chise0713 Sep 7, 2023
1dbf1ed
Fix: Wrong GITHUB_ENV name
chise0713 Sep 7, 2023
c9fca18
Docs: fix wrong URL
chise0713 Sep 7, 2023
b1ab89f
chore: Organize workflow and scripts
chise0713 Sep 8, 2023
058a1c4
refactor: Improve GitHub Push condition
chise0713 Sep 8, 2023
51200bf
Updated at Sat Sep 16 02:20:17 UTC 2023
github-actions[bot] Sep 16, 2023
f56c149
Updated at Fri Sep 22 02:23:17 UTC 2023
github-actions[bot] Sep 22, 2023
86aca57
Updated at Sun Oct 1 02:28:39 UTC 2023
github-actions[bot] Oct 1, 2023
de6da35
Updated at Fri Oct 13 02:27:40 UTC 2023
github-actions[bot] Oct 13, 2023
1ff00c1
Updated at Sun Oct 22 02:26:03 UTC 2023
github-actions[bot] Oct 22, 2023
1708624
Updated at Wed Oct 25 02:23:01 UTC 2023
github-actions[bot] Oct 25, 2023
ba56ed4
Change `TZ` variable to Asia/Shanghai
chise0713 Oct 26, 2023
68f0b71
Updated at Sat Oct 28 02:20:58 UTC 2023
github-actions[bot] Oct 28, 2023
f0ac9b2
Merge pull request #553 from chise0713/master
NormanBB Oct 29, 2023
ee31d89
Docs: fix wrong url
chise0713 Oct 29, 2023
b66a8ff
Merge pull request #555 from chise0713/master
NormanBB Oct 30, 2023
574bd9a
Updated at Tue Oct 31 10:24:18 CST 2023
github-actions[bot] Oct 31, 2023
a25fc24
Updated at Mon Nov 13 10:28:09 CST 2023
github-actions[bot] Nov 13, 2023
0e0960d
Updated at Sun Nov 19 10:31:28 CST 2023
github-actions[bot] Nov 19, 2023
2bca3c6
Updated at Sun Nov 19 10:31:29 CST 2023
github-actions[bot] Nov 19, 2023
6da82a8
Template: Optimize
chise0713 Nov 23, 2023
8b3ad37
Merge pull request #557 from chise0713/master
NormanBB Nov 25, 2023
59792db
Updated at Mon Dec 4 10:31:08 CST 2023
github-actions[bot] Dec 4, 2023
3d518d9
Updated at Fri Dec 22 10:28:02 CST 2023
github-actions[bot] Dec 22, 2023
7b82f7a
Updated at Mon Dec 25 10:29:30 CST 2023
github-actions[bot] Dec 25, 2023
ea4df0d
Updated at Sun Dec 31 10:30:11 CST 2023
github-actions[bot] Dec 31, 2023
221a47a
添加 星露谷物语、致命公司 游戏规则 (#560)
izumiChan16 Jan 3, 2024
feef908
更新 Apex uu规则,删除局域网网段。更新OW规则 (#561)
izumiChan16 Jan 7, 2024
0e91bc0
Chore: github-action[bot] commit with signing (#562)
chise0713 Jan 8, 2024
cc84ee1
Update at Sat Jan 13 10:30:31 CST 2024
github-actions[bot] Jan 13, 2024
0b403cd
Update Apex.rules and add tools/merge.py (#563)
Xqing-hup Jan 13, 2024
8c04880
Apex 日服 (#564)
Xqing-hup Jan 15, 2024
9ab0764
Update at Fri Jan 19 10:33:09 CST 2024
github-actions[bot] Jan 19, 2024
2f60fcb
Update at Mon Jan 22 10:19:22 CST 2024
github-actions[bot] Jan 22, 2024
83b988d
Update at Sun Jan 28 10:12:37 CST 2024
github-actions[bot] Jan 28, 2024
507d63a
Update at Sun Feb 4 10:13:42 CST 2024
github-actions[bot] Feb 4, 2024
da80887
Update at Wed Feb 7 10:10:38 CST 2024
github-actions[bot] Feb 7, 2024
501ff69
Update at Sat Feb 10 10:09:27 CST 2024
github-actions[bot] Feb 10, 2024
a6cfd54
Update at Fri Feb 16 10:11:27 CST 2024
github-actions[bot] Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/----------.md

This file was deleted.

30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE/------.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/new_rule_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 请求新增规则
description: 请求新增规则的想法
body:
- type: checkboxes
id: terms
attributes:
label: 欢迎
options:
- label: 若未使用自动抓ip工具,且在issue中说明已使用的,此issue将会被忽略或关闭。
required: true
- label: 请使用[自动抓IP工具](https://github.com/oooldtoy/SSTAP_ip_crawl_tool)来帮助我们编写规则,并详细写明游戏细节,如哪个服,哪个版本。
required: true
- type: input
attributes:
label: 名称
description: 请将需要增加游戏\程序名字填入此区域
validations:
required: true
- type: input
attributes:
label: 运行环境
description: 该游戏\程序的运行环境
validations:
required: true
- type: input
attributes:
label: 代理部分
description: 该游戏\程序哪部分需要代理
validations:
required: true
- type: textarea
attributes:
label: 特殊情况
description: 如果还有特殊想说明的请在这里描述.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/rule_bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 规则失效以及其他错误
description: 创建报告以帮助我们改进
body:
- type: input
attributes:
label: 问题描述
description: 简单清晰的说一下问题的描述.
validations:
required: true
- type: input
attributes:
label: 从哪里开始出现这个问题
description: |-
例如
``某游戏的登陆页面``、
``内置的网页``、
``游戏房间内部``、
``商店页面`` 等
validations:
required: true
- type: textarea
attributes:
label: 截图
description: 如果可以,请添加截图以帮助解释您的问题.
- type: textarea
attributes:
label: 运行环境
description: |-
请说明当前的运行环境
例如:
``操作系统``
``网络环境``(如 运营商等
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/.github"
schedule:
interval: "daily"
timezone: "Asia/Hong_Kong"
time: "06:00"
pull-request-branch-name:
separator: "-"
148 changes: 117 additions & 31 deletions .github/workflows/updategeoip-cn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update China IP list and generate BypassCN.rule
name: Update China IP

on:
workflow_dispatch:
Expand All @@ -7,43 +7,129 @@ on:
- cron: '0 2 */3 * *'

jobs:
build:
name: Generate BypassCN.rule
prepare:
name: Set up
runs-on: ubuntu-latest
steps:

- name: Check out code into directory
uses: actions/checkout@v3

- name: Run the updategeoip-cn.sh
run: ./tools/updategeoip-cn.sh
shell: bash
- name: Check out code into directory
uses: actions/checkout@v4

- name: Git Add BypassCNandLan.rules
- name: Git config
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git fetch
cp ./BypassCNandLan.rules ./rules/BypassCNandLan.rules
git add ./rules/BypassCNandLan.rules
if ! git commit -am "Updated at $(date)"; then
curl -oL ./ https://github.com/FQrabbit/SSTap-Rule/raw/master/rules/BypassCNandLan.rules
hash1=$(sha256sum "./BypassCNandLan.rules" | awk '{print $1}')
hash2=$(sha256sum "./rules/BypassCNandLan.rules" | awk '{print $1}')
if [ "$hash1" == "$hash2" ]; then
echo "Hashes match. The files are identical."
echo "Upstream not updated"
else
echo "Hashes do not match. The files are different."
echo "ERROR! Upstream updated! There's something went WRONG!"
exit 1
fi
git fetch --unshallow
shell: bash

- name: Save Cache
uses: actions/cache/save@v3
with:
path: ./
key: restore-${{ github.sha }}-${{ github.run_number }}

rules:
name: Generate rules
runs-on: ubuntu-latest
needs: prepare
steps:

- name: Restore Cache
uses: actions/cache/restore@v3
with:
path: ./
key: restore-

- name: Get CIDR field
run: |
echo "#BypassCNandLan,绕过大陆和局域网,1,1,1,0,0,0," >> BypassCNandLan.rules

curl https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/CN-ip-cidr.txt >> BypassCNandLan.rules

sed -i '2{/^$/d;}' BypassCNandLan.rules
echo 10.0.0.0/8 >> BypassCNandLan.rules
echo 172.16.0.0/12 >> BypassCNandLan.rules
echo 192.168.0.0/16 >> BypassCNandLan.rules
shell: bash

- name: Compare New file and Old file
run: |
hash1=$(sha256sum "./BypassCNandLan.rules" | awk '{print $1}')
hash2=$(sha256sum "./rules/BypassCNandLan.rules" | awk '{print $1}')
echo -e "hash1=$hash1\nhash2=$hash2"
if [ "$hash1" == "$hash2" ]; then
echo "Hashes match. The files are identical."
echo "Upstream not updated"
echo "STATUS=1" >> $GITHUB_ENV
exit 0
else
echo "Hashes do not match. The files are different."
echo "Upstream updated."
echo "STATUS=0" >> $GITHUB_ENV
cp ./BypassCNandLan.rules ./rules/BypassCNandLan.rules
echo "MESSAGE=\"Update at $(TZ=Asia/Shanghai date)\"" >> $GITHUB_ENV
fi
shell: bash

- uses: planetscale/ghcommit-action@v0.1.6
if: env.STATUS == '0'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
commit_message: "${{ env.MESSAGE }}"
repo: ${{ github.repository }}
branch: ${{ github.head_ref || github.ref_name }}
file_pattern: './rules/BypassCNandLan.rules'

someip:
name: Generate rules (someip)
runs-on: ubuntu-latest
needs: prepare
steps:

- name: Restore Cache
uses: actions/cache/restore@v3
with:
path: ./
key: restore-


- name: GitHub Push
uses: ad-m/github-push-action@v0.6.0
- name: Get CIDR field
run: |
echo "#BypassCNandLan,绕过大陆和局域网someip,1,1,1,0,0,0," >> BypassCNandLan_someip.rules

curl https://raw.githubusercontent.com/0x2E/someip/build/cidr.txt >> BypassCNandLan_someip.rules

sed -i '2{/^$/d;}' BypassCNandLan_someip.rules
echo 10.0.0.0/8 >> BypassCNandLan_someip.rules
echo 172.16.0.0/12 >> BypassCNandLan_someip.rules
echo 192.168.0.0/16 >> BypassCNandLan_someip.rules
shell: bash

- name: Compare New file and Old file
run: |
hash1=$(sha256sum "./BypassCNandLan_someip.rules" | awk '{print $1}')
hash2=$(sha256sum "./rules/BypassCNandLan_someip.rules" | awk '{print $1}')
echo -e "hash1=$hash1\nhash2=$hash2"
if [ "$hash1" == "$hash2" ]; then
echo "Hashes match. The files are identical."
echo "Upstream not updated"
echo "STATUS=1" >> $GITHUB_ENV
exit 0
else
echo "Hashes do not match. The files are different."
echo "Upstream updated."
echo "STATUS=0" >> $GITHUB_ENV
cp ./BypassCNandLan_someip.rules ./rules/BypassCNandLan_someip.rules
echo "MESSAGE=\"Update at $(TZ=Asia/Shanghai date)\"" >> $GITHUB_ENV
fi
shell: bash

- uses: planetscale/ghcommit-action@v0.1.6
if: env.STATUS == '0'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
commit_message: "${{ env.MESSAGE }}"
repo: ${{ github.repository }}
branch: ${{ github.head_ref || github.ref_name }}
file_pattern: './rules/BypassCNandLan_someip.rules'
8 changes: 8 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# 更新日志 Change Log

### 2024年1月3日

By @izumiChan16

新增 `Stardew Valley,星露谷物语` 游戏规则

新增 `Lethal Company,致命公司` 游戏规则

### 2023年8月11日

By @zhangdiming
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@

在这里会不定时的更新各个游戏的路由表规则,你只要下载所需的规则或规则包导入对应文件夹即可使用。

## 关于两个GEOIP源
[GEOIPCN.1](rules/BypassCNandLan.rules?raw=true) || [GEOIPCN.2](rules/BypassCNandLan_someip.rules?raw=true)

- GEOIPCN.1 是[Hackl0us/GeoIP2-CN](https://github.com/Hackl0us/GeoIP2-CN)的完整版本
- GEOIPCN.2 而是[0x2E/someip](https://github.com/0x2E/someip)的简化版本
两者在使用上一般不会有什么差距。
如果追求最小错误率请选择GEOIPCN.1,最求最高效率请选择GEOIPCN.2

## 规则使用方法

- [点我进入规则包下载页面](https://github.com/FQrabbit/SSTap-Rule/releases)
Expand Down
Loading