Browse Source

initial commit

pull/1/head
Gavin 1 year ago
commit
45f0844ab0
14 changed files with 366 additions and 0 deletions
  1. +238
    -0
      Cfw/parsers.yaml
  2. BIN
      Icons/Apple.png
  3. BIN
      Icons/HK.png
  4. BIN
      Icons/JP.png
  5. BIN
      Icons/List.png
  6. BIN
      Icons/Proxy.png
  7. +1
    -0
      Icons/README.md
  8. BIN
      Icons/SG.png
  9. BIN
      Icons/TW.png
  10. BIN
      Icons/US.png
  11. +21
    -0
      LICENSE
  12. +87
    -0
      Qx/quantumult.conf
  13. +4
    -0
      README.md
  14. +15
    -0
      filter/YT.list

+ 238
- 0
Cfw/parsers.yaml View File

@ -0,0 +1,238 @@
parsers: # array
- reg: ^.*$
# 删除服务商提供的策略组和规则
code: |
module.exports.parse = (raw, { yaml }) => {
const rawObj = yaml.parse(raw)
const groups = []
const rules = []
return yaml.stringify({ ...rawObj, 'proxy-groups': groups, rules })
}
# 建立自己的配置
yaml:
prepend-proxy-groups: # 建立策略组
- name: 🪄 代理模式
type: select
proxies:
- 绕过大陆丨黑名单(GFWlist) # 黑名单模式,意为「只有命中规则的网络流量,才使用代理」
- 绕过大陆丨白名单(Whitelist) # 白名单模式,意为「没有命中规则的网络流量,统统使用代理」
- name: 🇭🇰 香港节点
type: url-test
url: http://www.gstatic.com/generate_204
interval: 60
- name: 🇸🇬 新加坡节点
type: url-test
url: http://www.gstatic.com/generate_204
interval: 60
- name: 🇺🇸 米国节点
type: url-test
url: http://www.gstatic.com/generate_204
interval: 60
- name: 🇯🇵 霓虹节点
type: url-test
url: http://www.gstatic.com/generate_204
interval: 60
- name: 🇰🇷 韩国节点
type: url-test
url: http://www.gstatic.com/generate_204
interval: 60
- name: 🇹🇼 宝岛节点
type: url-test
url: http://www.gstatic.com/generate_204
interval: 60
- name: 🚧 广告拦截
type: select
proxies:
- DIRECT
- REJECT
- PROXY
- name: 绕过大陆丨黑名单(GFWlist)
type: url-test
url: http://www.gstatic.com/generate_204
interval: 86400
proxies:
- DIRECT
- name: 绕过大陆丨白名单(Whitelist)
type: url-test
url: http://www.gstatic.com/generate_204
interval: 60
proxies:
- PROXY
- name: PROXY
type: select
proxies:
- 🇭🇰 香港节点
- 🇸🇬 新加坡节点
- 🇺🇸 米国节点
- 🇯🇵 霓虹节点
- 🇰🇷 韩国节点
- 🇹🇼 宝岛节点
- name: Social Media
type: select
proxies:
- 🇸🇬 新加坡节点
- 🇺🇸 米国节点
- 🇯🇵 霓虹节点
- 🇰🇷 韩国节点
# 策略组示例
# - name: 分组名
# type: select # 手动选点
# url-test # 自动选择延迟最低的节点
# fallback # 节点故障时自动切换下一个
# laod-balance # 均衡使用分组内的节点
# url: http://www.gstatic.com/generate_204 # 测试地址 非select类型分组必要
# interval: 300 # 自动测试间隔时间,单位秒 非select类型分组必要
# tolerance: 50 # 允许的偏差,节点之间延迟差小于该值不切换 非必要
# proxies:
# - 节点名称或其他分组套娃
commands:
- proxy-groups.🇭🇰 香港节点.proxies=[]proxyNames|^(.*)((?=.*港)(?=.*IPLC))|(HK香港)+(.*)$ # 向指定策略组添加订阅中的节点名,可使用正则过滤
- proxy-groups.🇸🇬 新加坡节点.proxies=[]proxyNames|^(.*)((?=.*新加坡)(?=.*高级)(?=.*IEPL))|(SG新加坡)+(.*)$
- proxy-groups.🇺🇸 米国节点.proxies=[]proxyNames|^(.*)((?=.*美国)(?=.*IEPL))|(US美国)+(.*)$
- proxy-groups.🇯🇵 霓虹节点.proxies=[]proxyNames|^(.*)((?=.*日本)(?=.*IEPL))|(JP日本)+(.*)$
- proxy-groups.🇰🇷 韩国节点.proxies=[]proxyNames|^(.*)((?=.*韩国)(?=.*游戏))|(KR韩国)+(.*)$
- proxy-groups.🇹🇼 宝岛节点.proxies=[]proxyNames|^(.*)((?=.*台湾)(?=.*游戏))|(TW台湾)+(.*)$
# - proxy-groups.🇭🇰 香港节点.proxies.0+DIRECT # 向指定分组第一个位置添加一个 DIRECT 节点名
# 一些可能用到的正则过滤节点示例,使分组更细致
# []proxyNames|a # 包含a
# []proxyNames|^(.*)(a|b)+(.*)$ # 包含a或b
# []proxyNames|^(?=.*a)(?=.*b).*$ # 包含a和b
# []proxyNames|^((?!b).)*a((?!b).)*$ # 包含a且不包含b
# []proxyNames|^((?!b|c).)*a((?!b|c).)*$ # 包含a且不包含b或c
# 添加规则
prepend-rules: # 规则由上往下遍历,如上面规则已经命中,则不再往下处理
- RULE-SET,applications,DIRECT
- DOMAIN,clash.razord.top,DIRECT
- DOMAIN,yacd.haishan.me,DIRECT
- DOMAIN-SUFFIX,gvw.asia,DIRECT
- DOMAIN-SUFFIX,tiktok.com,Social Media
- DST-PORT,22,DIRECT
- RULE-SET,private,DIRECT
- RULE-SET,reject,🚧 广告拦截
- RULE-SET,icloud,DIRECT #
- RULE-SET,apple,DIRECT # 这三个为国内可直连地址,如果希望走代理改为PROXY
- RULE-SET,google,DIRECT #
- RULE-SET,tld-not-cn,PROXY
- RULE-SET,gfw,PROXY
- RULE-SET,greatfire,PROXY
- RULE-SET,telegramcidr,PROXY
- RULE-SET,lancidr,DIRECT
- RULE-SET,cncidr,DIRECT
- GEOIP,,DIRECT
- GEOIP,CN,DIRECT
- RULE-SET,direct,DIRECT
- RULE-SET,proxy,🪄 代理模式
- MATCH,🪄 代理模式 # 规则之外的
# 添加规则集
mix-rule-providers:
reject: # 广告域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt"
path: ./ruleset/reject.yaml
interval: 86400
icloud: # iCloud 域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/icloud.txt"
path: ./ruleset/icloud.yaml
interval: 86400
apple: # Apple 在中国大陆可直连的域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt"
path: ./ruleset/apple.yaml
interval: 86400
google: # Google 在中国大陆可直连的域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/google.txt"
path: ./ruleset/google.yaml
interval: 86400
proxy: # 代理域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt"
path: ./ruleset/proxy.yaml
interval: 86400
direct: # 直连域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/direct.txt"
path: ./ruleset/direct.yaml
interval: 86400
private: # 私有网络专用域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt"
path: ./ruleset/private.yaml
interval: 86400
gfw: # GFWList 域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/gfw.txt"
path: ./ruleset/gfw.yaml
interval: 86400
greatfire: # GreatFire 域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/greatfire.txt"
path: ./ruleset/greatfire.yaml
interval: 86400
tld-not-cn: # 非中国大陆使用的顶级域名列表
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt"
path: ./ruleset/tld-not-cn.yaml
interval: 86400
telegramcidr: # Telegram 使用的 IP 地址列表
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt"
path: ./ruleset/telegramcidr.yaml
interval: 86400
cncidr: # 中国大陆 IP 地址列表
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt"
path: ./ruleset/cncidr.yaml
interval: 86400
lancidr: # 局域网 IP 及保留 IP 地址列表
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt"
path: ./ruleset/lancidr.yaml
interval: 86400
applications: # 需要直连的常见软件列表
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt"
path: ./ruleset/applications.yaml
interval: 86400

BIN
Icons/Apple.png View File

Before After
Width: 144  |  Height: 144  |  Size: 12 KB

BIN
Icons/HK.png View File

Before After
Width: 144  |  Height: 144  |  Size: 12 KB

BIN
Icons/JP.png View File

Before After
Width: 144  |  Height: 144  |  Size: 8.8 KB

BIN
Icons/List.png View File

Before After
Width: 144  |  Height: 144  |  Size: 11 KB

BIN
Icons/Proxy.png View File

Before After
Width: 144  |  Height: 144  |  Size: 13 KB

+ 1
- 0
Icons/README.md View File

@ -0,0 +1 @@

BIN
Icons/SG.png View File

Before After
Width: 144  |  Height: 144  |  Size: 9.4 KB

BIN
Icons/TW.png View File

Before After
Width: 144  |  Height: 144  |  Size: 11 KB

BIN
Icons/US.png View File

Before After
Width: 144  |  Height: 144  |  Size: 12 KB

+ 21
- 0
LICENSE View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Linke
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 87
- 0
Qx/quantumult.conf View File

@ -0,0 +1,87 @@
[general]
server_check_url=http://cp.cloudflare.com/generate_204
dns_exclusion_list=*.cmpassport.com, *.jegotrip.com.cn, *.icitymobile.mobi, id6.me
geo_location_checker=http://ip-api.com/json/?lang=zh-CN, https://raw.githubusercontent.com/Orz-3/Orz-3/master/QuantumultX/IP.js
resource_parser_url=https://fastly.jsdelivr.net/gh/KOP-XIAO/QuantumultX@master/Scripts/resource-parser.js
excluded_routes=239.255.255.250/32
udp_whitelist=1-442, 444-65535
[dns]
no-ipv6
server=119.29.29.29
address=/mtalk.google.com/108.177.125.188
server=/dl.google.com/119.29.29.29
server=/dl.l.google.com/119.29.29.29
server=/update.googleapis.com/119.29.29.29
server=/*.dl.playstation.net/119.29.29.29
server=/amplifi.lan/system
server=/router.synology.com/system
server=/sila.razer.com/system
server=/router.asus.com/system
server=/routerlogin.net/system
server=/orbilogin.com/system
server=/www.LinksysSmartWiFi.com/system
server=/LinksysSmartWiFi.com/system
server=/myrouter.local/system
server=/www.miwifi.com/system
server=/miwifi.com/system
server=/mediarouter.home/system
server=/tplogin.cn/system
server=/tplinklogin.net/system
server=/melogin.cn/system
server=/falogin.cn/system
[policy]
static=全球加速, 香港节点, 台湾节点, 霓虹节点, 狮城节点, 米国节点, proxy, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/Global.png
static=苹果服务, direct, 香港节点, 台湾节点, 米国节点, 霓虹节点, 狮城节点, proxy, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/Apple.png
static=黑白名单, 全球加速, direct, 香港节点, 台湾节点, 霓虹节点, 狮城节点, 米国节点, proxy, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/Final.png
url-latency-benchmark=香港节点, server-tag-regex=^(.*)((?=.*港)(?=.*IPLC))|(HK香港)+(.*)$, check-interval=600, tolerance=0, alive-checking=false, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/HK.png
url-latency-benchmark=台湾节点, server-tag-regex=^(.*)((?=.*台湾)(?=.*IEPL))|(TW台湾)+(.*)$, check-interval=600, tolerance=0, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/TW.png
url-latency-benchmark=霓虹节点, server-tag-regex=^(.*)((?=.*日本)(?=.*IEPL))|(JP日本)+(.*)$, check-interval=600, tolerance=0, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/JP.png
url-latency-benchmark=狮城节点, server-tag-regex=^(.*)((?=.*新加坡)(?=.*高级)(?=.*IEPL))|(SG新加坡)+(.*)$, check-interval=600, tolerance=0, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/SG.png
url-latency-benchmark=米国节点, server-tag-regex=^(.*)((?=.*美国)(?=.*高级))|(US美国)+(.*)$,check-interval=600, tolerance=0, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/US.png
[server_remote]
[filter_remote]
https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/Video/TikTok.list, tag=海外抖音, force-policy=狮城节点, update-interval=172800, opt-parser=true, enabled=false
https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Extra/Google/GoogleVoice.list, tag=Google Voice, force-policy=米国节点, update-interval=172800, opt-parser=true, enabled=false
https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Global.list, tag=全球加速, force-policy=全球加速, update-interval=172800, opt-parser=true, enabled=false
https://raw.githubusercontent.com/Gavinin/science_internet/main/filter/YT.list, tag=YoutubeUS, force-policy=米国节点, update-interval=172800, opt-parser=true, enabled=false
https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Extra/Apple/Apple.list, tag=苹果服务, force-policy=苹果服务, update-interval=172800, opt-parser=true, enabled=true
https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/China.list, tag=国内网站, force-policy=direct, update-interval=172800, opt-parser=true, enabled=true
[rewrite_remote]
#https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/config/QX.snippet, tag=Sub Store, update-interval=172800, opt-parser=false, enabled=false
#https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.quanx.conf, tag=BoxJs, update-interval=172800, opt-parser=false, enabled=false
#https://raw.githubusercontent.com/Orz-3/QuantumultX/master/TikTok.conf, tag=Tiktok解锁, update-interval=172800, opt-parser=false, enabled=false
https://raw.githubusercontent.com/DivineEngine/Profiles/master/Quantumult/Rewrite/Block/YouTubeAds.conf, tag=YouTube去广告, update-interval=172800, opt-parser=false, enabled=true
#https://raw.githubusercontent.com/app2smile/rules/master/module/bilibili-qx.conf, tag=Bilibili去广告, update-interval=172800, opt-parser=false, enabled=false
[server_local]
[filter_local]
host-suffix, ocsp.pki.goog, 全球加速
host-suffix, local, direct
ip-cidr, 192.168.0.0/16, direct
ip-cidr, 10.0.0.0/8, direct
ip-cidr, 172.16.0.0/12, direct
ip-cidr, 127.0.0.0/8, direct
ip-cidr, 100.64.0.0/10, direct
ip-cidr, 224.0.0.0/4, direct
ip6-cidr, fe80::/10, direct
ip-cidr, 203.107.1.1/24, reject
ip-cidr, 183.240.197.130/32, direct
final, 黑白名单
[rewrite_local]
^https?://(www.)?google.co.uk url 302 https://www.google.com.hk
[task_local]
[http_backend]
[mitm]
skip_validating_cert = true

+ 4
- 0
README.md View File

@ -0,0 +1,4 @@
# science_internet
个人自用规则,因使用而产生的任何后果,本人不承担任何法律责任。
参考了Orz-3的脚本
地址:https://github.com/Orz-3/QuantumultX

+ 15
- 0
filter/YT.list View File

@ -0,0 +1,15 @@
#YouTube
USER-AGENT,com.google.ios.youtube*
USER-AGENT,YouTube*
DOMAIN-SUFFIX,googlevideo.com
DOMAIN-SUFFIX,withyoutube.com
DOMAIN-SUFFIX,youtu.be
DOMAIN-SUFFIX,youtube.com
DOMAIN-SUFFIX,youtubeeducation.com
DOMAIN-SUFFIX,youtubegaming.com
DOMAIN-SUFFIX,youtubekids.com
DOMAIN-SUFFIX,youtube-nocookie.com
DOMAIN-SUFFIX,yt.be
DOMAIN-SUFFIX,ytimg.com
DOMAIN,youtubei.googleapis.com
DOMAIN,yt3.ggpht.com

Loading…
Cancel
Save