mirror of
https://github.com/v2board/v2board.git
synced 2024-11-13 11:09:11 +08:00
Merge branch 'dev' of https://github.com/v2board/v2board into dev
This commit is contained in:
commit
f81ecbea5d
@ -50,6 +50,9 @@ class ClientController extends Controller
|
|||||||
if (strpos($flag, 'shadowrocket') !== false) {
|
if (strpos($flag, 'shadowrocket') !== false) {
|
||||||
die($this->shadowrocket($user, $servers));
|
die($this->shadowrocket($user, $servers));
|
||||||
}
|
}
|
||||||
|
if (strpos($flag, 'shadowsocks') !== false) {
|
||||||
|
die($this->shaodowsocksSIP008($user, $servers));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
die($this->origin($user, $servers));
|
die($this->origin($user, $servers));
|
||||||
}
|
}
|
||||||
@ -135,6 +138,25 @@ class ClientController extends Controller
|
|||||||
return base64_encode($uri);
|
return base64_encode($uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function shaodowsocksSIP008($user, $servers = [])
|
||||||
|
{
|
||||||
|
$configs = [];
|
||||||
|
$subs = [];
|
||||||
|
$subs['servers'] = [];
|
||||||
|
|
||||||
|
foreach ($servers as $item) {
|
||||||
|
if ($item['type'] === 'shadowsocks') {
|
||||||
|
array_push($configs, URLSchemes::buildShadowsocksSIP008($item, $user));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$subs['version'] = 1;
|
||||||
|
$subs['remark'] = config('v2board.app_name', 'V2Board');
|
||||||
|
$subs['servers'] = array_merge($subs['servers'] ? $subs['servers'] : [], $configs);
|
||||||
|
|
||||||
|
return json_encode($subs, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
|
||||||
|
}
|
||||||
|
|
||||||
private function surge($user, $servers = [])
|
private function surge($user, $servers = [])
|
||||||
{
|
{
|
||||||
$proxies = '';
|
$proxies = '';
|
||||||
|
@ -17,6 +17,18 @@ class URLSchemes
|
|||||||
return "ss://{$str}@{$server['host']}:{$server['port']}#{$name}\r\n";
|
return "ss://{$str}@{$server['host']}:{$server['port']}#{$name}\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function buildShadowsocksSIP008($server, User $user)
|
||||||
|
{
|
||||||
|
$config = [
|
||||||
|
"id" => $server['id'],
|
||||||
|
"remark" => $server['name'],
|
||||||
|
"server" => $server['host'],
|
||||||
|
"server_port" => $server['port'],
|
||||||
|
"password" => $user['uuid'],
|
||||||
|
"method" => $server['cipher']
|
||||||
|
];
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
public static function buildVmess($server, User $user)
|
public static function buildVmess($server, User $user)
|
||||||
{
|
{
|
||||||
|
@ -1,21 +1,35 @@
|
|||||||
port: 7890
|
# port: 7890
|
||||||
socks-port: 7891
|
# socks-port: 7891
|
||||||
allow-lan: false
|
# redir-port: 7892
|
||||||
|
# tproxy-port: 7893
|
||||||
|
mixed-port: 7890
|
||||||
|
allow-lan: true
|
||||||
mode: rule
|
mode: rule
|
||||||
log-level: info
|
log-level: info
|
||||||
external-controller: 127.0.0.1:9090
|
external-controller: 127.0.0.1:9090
|
||||||
experimental:
|
|
||||||
ignore-resolve-fail: true
|
|
||||||
dns:
|
dns:
|
||||||
enable: true
|
enable: true
|
||||||
|
# listen: 0.0.0.0:53
|
||||||
ipv6: false
|
ipv6: false
|
||||||
enhanced-mode: redir-host
|
|
||||||
nameserver:
|
default-nameserver:
|
||||||
- 1.2.4.8
|
|
||||||
- 223.5.5.5
|
- 223.5.5.5
|
||||||
|
- 119.29.29.29
|
||||||
|
enhanced-mode: redir-host
|
||||||
|
fake-ip-range: 198.18.0.1/16
|
||||||
|
use-hosts: true
|
||||||
|
nameserver:
|
||||||
|
- https://dns.alidns.com/dns-query
|
||||||
|
- https://doh.pub/dns-query
|
||||||
fallback:
|
fallback:
|
||||||
- tls://1.0.0.1:853
|
- tls://1.0.0.1:853
|
||||||
- tls://dns.google:853
|
- https://dns.google/dns-query
|
||||||
|
fallback-filter:
|
||||||
|
geoip: true
|
||||||
|
ipcidr:
|
||||||
|
- 240.0.0.0/4
|
||||||
|
|
||||||
proxies:
|
proxies:
|
||||||
|
|
||||||
proxy-groups:
|
proxy-groups:
|
||||||
@ -24,34 +38,44 @@ proxy-groups:
|
|||||||
- { name: "故障转移", type: fallback, proxies: [], url: "http://www.gstatic.com/generate_204", interval: 7200 }
|
- { name: "故障转移", type: fallback, proxies: [], url: "http://www.gstatic.com/generate_204", interval: 7200 }
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
# 自定义规则
|
||||||
|
## 您可以在此处插入您补充的自定义规则(请注意保持缩进)
|
||||||
|
|
||||||
# Apple
|
# Apple
|
||||||
- DOMAIN,safebrowsing.urlsec.qq.com,DIRECT # 如果您并不信任此服务提供商或防止其下载消耗过多带宽资源,可以进入 Safari 设置,关闭 Fraudulent Website Warning 功能,并使用 REJECT 策略。
|
- DOMAIN,safebrowsing.urlsec.qq.com,DIRECT # 如果您并不信任此服务提供商或防止其下载消耗过多带宽资源,可以进入 Safari 设置,关闭 Fraudulent Website Warning 功能,并使用 REJECT 策略。
|
||||||
- DOMAIN,safebrowsing.googleapis.com,DIRECT # 如果您并不信任此服务提供商或防止其下载消耗过多带宽资源,可以进入 Safari 设置,关闭 Fraudulent Website Warning 功能,并使用 REJECT 策略。
|
- DOMAIN,safebrowsing.googleapis.com,DIRECT # 如果您并不信任此服务提供商或防止其下载消耗过多带宽资源,可以进入 Safari 设置,关闭 Fraudulent Website Warning 功能,并使用 REJECT 策略。
|
||||||
- DOMAIN,ocsp.apple.com,$app_name
|
- DOMAIN,developer.apple.com,$app_name
|
||||||
- DOMAIN-SUFFIX,digicert.com,$app_name
|
- DOMAIN-SUFFIX,digicert.com,$app_name
|
||||||
- DOMAIN-SUFFIX,entrust.net,$app_name
|
- DOMAIN,ocsp.apple.com,$app_name
|
||||||
|
- DOMAIN,ocsp.comodoca.com,$app_name
|
||||||
|
- DOMAIN,ocsp.usertrust.com,$app_name
|
||||||
|
- DOMAIN,ocsp.sectigo.com,$app_name
|
||||||
- DOMAIN,ocsp.verisign.net,$app_name
|
- DOMAIN,ocsp.verisign.net,$app_name
|
||||||
- DOMAIN-SUFFIX,apps.apple.com,$app_name
|
- DOMAIN-SUFFIX,apple-dns.net,$app_name
|
||||||
|
- DOMAIN,testflight.apple.com,$app_name
|
||||||
|
- DOMAIN,sandbox.itunes.apple.com,$app_name
|
||||||
- DOMAIN,itunes.apple.com,$app_name
|
- DOMAIN,itunes.apple.com,$app_name
|
||||||
|
- DOMAIN-SUFFIX,apps.apple.com,$app_name
|
||||||
- DOMAIN-SUFFIX,blobstore.apple.com,$app_name
|
- DOMAIN-SUFFIX,blobstore.apple.com,$app_name
|
||||||
- DOMAIN-SUFFIX,music.apple.com,DIRECT
|
- DOMAIN,cvws.icloud-content.com,$app_name
|
||||||
- DOMAIN-SUFFIX,mzstatic.com,DIRECT
|
- DOMAIN-SUFFIX,mzstatic.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,itunes.apple.com,DIRECT
|
- DOMAIN-SUFFIX,itunes.apple.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,icloud.com,DIRECT
|
- DOMAIN-SUFFIX,icloud.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,icloud-content.com,DIRECT
|
- DOMAIN-SUFFIX,icloud-content.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,me.com,DIRECT
|
- DOMAIN-SUFFIX,me.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,mzstatic.com,DIRECT
|
|
||||||
- DOMAIN-SUFFIX,akadns.net,DIRECT
|
|
||||||
- DOMAIN-SUFFIX,aaplimg.com,DIRECT
|
- DOMAIN-SUFFIX,aaplimg.com,DIRECT
|
||||||
|
- DOMAIN-SUFFIX,cdn20.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,cdn-apple.com,DIRECT
|
- DOMAIN-SUFFIX,cdn-apple.com,DIRECT
|
||||||
|
- DOMAIN-SUFFIX,akadns.net,DIRECT
|
||||||
|
- DOMAIN-SUFFIX,akamaiedge.net,DIRECT
|
||||||
|
- DOMAIN-SUFFIX,edgekey.net,DIRECT
|
||||||
|
- DOMAIN-SUFFIX,mwcloudcdn.com,DIRECT
|
||||||
|
- DOMAIN-SUFFIX,mwcname.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,apple.com,DIRECT
|
- DOMAIN-SUFFIX,apple.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,apple-cloudkit.com,DIRECT
|
- DOMAIN-SUFFIX,apple-cloudkit.com,DIRECT
|
||||||
|
- DOMAIN-SUFFIX,apple-mapkit.com,DIRECT
|
||||||
# - DOMAIN,e.crashlytics.com,REJECT //注释此选项有助于大多数App开发者分析崩溃信息;如果您拒绝一切崩溃数据统计、搜集,请取消 # 注释。
|
# - DOMAIN,e.crashlytics.com,REJECT //注释此选项有助于大多数App开发者分析崩溃信息;如果您拒绝一切崩溃数据统计、搜集,请取消 # 注释。
|
||||||
|
|
||||||
|
|
||||||
# 自定义规则
|
|
||||||
## 您可以在此处插入您补充的自定义规则(请注意保持缩进)
|
|
||||||
|
|
||||||
# 国内网站
|
# 国内网站
|
||||||
- DOMAIN-SUFFIX,cn,DIRECT
|
- DOMAIN-SUFFIX,cn,DIRECT
|
||||||
- DOMAIN-KEYWORD,-cn,DIRECT
|
- DOMAIN-KEYWORD,-cn,DIRECT
|
||||||
@ -65,7 +89,6 @@ rules:
|
|||||||
- DOMAIN-SUFFIX,acfun.tv,DIRECT
|
- DOMAIN-SUFFIX,acfun.tv,DIRECT
|
||||||
- DOMAIN-SUFFIX,air-matters.com,DIRECT
|
- DOMAIN-SUFFIX,air-matters.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,aixifan.com,DIRECT
|
- DOMAIN-SUFFIX,aixifan.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,akamaized.net,DIRECT
|
|
||||||
- DOMAIN-KEYWORD,alicdn,DIRECT
|
- DOMAIN-KEYWORD,alicdn,DIRECT
|
||||||
- DOMAIN-KEYWORD,alipay,DIRECT
|
- DOMAIN-KEYWORD,alipay,DIRECT
|
||||||
- DOMAIN-KEYWORD,taobao,DIRECT
|
- DOMAIN-KEYWORD,taobao,DIRECT
|
||||||
@ -97,7 +120,6 @@ rules:
|
|||||||
- DOMAIN-SUFFIX,godic.net,DIRECT
|
- DOMAIN-SUFFIX,godic.net,DIRECT
|
||||||
- DOMAIN-SUFFIX,gtimg.com,DIRECT
|
- DOMAIN-SUFFIX,gtimg.com,DIRECT
|
||||||
- DOMAIN,cdn.hockeyapp.net,DIRECT
|
- DOMAIN,cdn.hockeyapp.net,DIRECT
|
||||||
- DOMAIN-SUFFIX,hdslb.com,DIRECT
|
|
||||||
- DOMAIN-SUFFIX,hongxiu.com,DIRECT
|
- DOMAIN-SUFFIX,hongxiu.com,DIRECT
|
||||||
- DOMAIN-SUFFIX,hxcdn.net,DIRECT
|
- DOMAIN-SUFFIX,hxcdn.net,DIRECT
|
||||||
- DOMAIN-SUFFIX,iciba.com,DIRECT
|
- DOMAIN-SUFFIX,iciba.com,DIRECT
|
||||||
@ -209,21 +231,24 @@ rules:
|
|||||||
- DOMAIN-KEYWORD,adsrvmedia,REJECT
|
- DOMAIN-KEYWORD,adsrvmedia,REJECT
|
||||||
- DOMAIN-KEYWORD,adwords,REJECT
|
- DOMAIN-KEYWORD,adwords,REJECT
|
||||||
- DOMAIN-KEYWORD,adservice,REJECT
|
- DOMAIN-KEYWORD,adservice,REJECT
|
||||||
|
- DOMAIN-SUFFIX,appsflyer.com,REJECT
|
||||||
- DOMAIN-KEYWORD,domob,REJECT
|
- DOMAIN-KEYWORD,domob,REJECT
|
||||||
|
- DOMAIN-SUFFIX,doubleclick.net,REJECT
|
||||||
- DOMAIN-KEYWORD,duomeng,REJECT
|
- DOMAIN-KEYWORD,duomeng,REJECT
|
||||||
- DOMAIN-KEYWORD,dwtrack,REJECT
|
- DOMAIN-KEYWORD,dwtrack,REJECT
|
||||||
- DOMAIN-KEYWORD,guanggao,REJECT
|
- DOMAIN-KEYWORD,guanggao,REJECT
|
||||||
- DOMAIN-KEYWORD,lianmeng,REJECT
|
- DOMAIN-KEYWORD,lianmeng,REJECT
|
||||||
- DOMAIN-SUFFIX,mmstat.com,REJECT
|
- DOMAIN-SUFFIX,mmstat.com,REJECT
|
||||||
|
- DOMAIN-KEYWORD,mopub,REJECT
|
||||||
- DOMAIN-KEYWORD,omgmta,REJECT
|
- DOMAIN-KEYWORD,omgmta,REJECT
|
||||||
- DOMAIN-KEYWORD,openx,REJECT
|
- DOMAIN-KEYWORD,openx,REJECT
|
||||||
- DOMAIN-KEYWORD,partnerad,REJECT
|
- DOMAIN-KEYWORD,partnerad,REJECT
|
||||||
- DOMAIN-KEYWORD,pingfore,REJECT
|
- DOMAIN-KEYWORD,pingfore,REJECT
|
||||||
- DOMAIN-KEYWORD,supersonicads,REJECT
|
- DOMAIN-KEYWORD,supersonicads,REJECT
|
||||||
- DOMAIN-KEYWORD,tracking,REJECT
|
|
||||||
- DOMAIN-KEYWORD,uedas,REJECT
|
- DOMAIN-KEYWORD,uedas,REJECT
|
||||||
- DOMAIN-KEYWORD,umeng,REJECT
|
- DOMAIN-KEYWORD,umeng,REJECT
|
||||||
- DOMAIN-KEYWORD,usage,REJECT
|
- DOMAIN-KEYWORD,usage,REJECT
|
||||||
|
- DOMAIN-SUFFIX,vungle.com,REJECT
|
||||||
- DOMAIN-KEYWORD,wlmonitor,REJECT
|
- DOMAIN-KEYWORD,wlmonitor,REJECT
|
||||||
- DOMAIN-KEYWORD,zjtoolbar,REJECT
|
- DOMAIN-KEYWORD,zjtoolbar,REJECT
|
||||||
|
|
||||||
@ -232,6 +257,7 @@ rules:
|
|||||||
- DOMAIN-SUFFIX,abpchina.org,$app_name
|
- DOMAIN-SUFFIX,abpchina.org,$app_name
|
||||||
- DOMAIN-SUFFIX,adblockplus.org,$app_name
|
- DOMAIN-SUFFIX,adblockplus.org,$app_name
|
||||||
- DOMAIN-SUFFIX,adobe.com,$app_name
|
- DOMAIN-SUFFIX,adobe.com,$app_name
|
||||||
|
- DOMAIN-SUFFIX,akamaized.net,$app_name
|
||||||
- DOMAIN-SUFFIX,alfredapp.com,$app_name
|
- DOMAIN-SUFFIX,alfredapp.com,$app_name
|
||||||
- DOMAIN-SUFFIX,amplitude.com,$app_name
|
- DOMAIN-SUFFIX,amplitude.com,$app_name
|
||||||
- DOMAIN-SUFFIX,ampproject.org,$app_name
|
- DOMAIN-SUFFIX,ampproject.org,$app_name
|
||||||
@ -499,18 +525,18 @@ rules:
|
|||||||
# Telegram
|
# Telegram
|
||||||
- DOMAIN-SUFFIX,telegra.ph,$app_name
|
- DOMAIN-SUFFIX,telegra.ph,$app_name
|
||||||
- DOMAIN-SUFFIX,telegram.org,$app_name
|
- DOMAIN-SUFFIX,telegram.org,$app_name
|
||||||
|
|
||||||
- IP-CIDR,91.108.4.0/22,$app_name,no-resolve
|
- IP-CIDR,91.108.4.0/22,$app_name,no-resolve
|
||||||
- IP-CIDR,91.108.8.0/22,$app_name,no-resolve
|
- IP-CIDR,91.108.8.0/21,$app_name,no-resolve
|
||||||
- IP-CIDR,91.108.12.0/22,$app_name,no-resolve
|
|
||||||
- IP-CIDR,91.108.16.0/22,$app_name,no-resolve
|
- IP-CIDR,91.108.16.0/22,$app_name,no-resolve
|
||||||
- IP-CIDR,91.108.56.0/22,$app_name,no-resolve
|
- IP-CIDR,91.108.56.0/22,$app_name,no-resolve
|
||||||
- IP-CIDR,149.154.160.0/22,$app_name,no-resolve
|
- IP-CIDR,149.154.160.0/20,$app_name,no-resolve
|
||||||
- IP-CIDR,149.154.164.0/22,$app_name,no-resolve
|
- IP-CIDR6,2001:67c:4e8::/48,$app_name,no-resolve
|
||||||
- IP-CIDR,149.154.168.0/22,$app_name,no-resolve
|
- IP-CIDR6,2001:b28:f23d::/48,$app_name,no-resolve
|
||||||
- IP-CIDR,149.154.172.0/22,$app_name,no-resolve
|
- IP-CIDR6,2001:b28:f23f::/48,$app_name,no-resolve
|
||||||
|
|
||||||
# LAN
|
# LAN
|
||||||
|
- DOMAIN,injections.adguard.org,DIRECT
|
||||||
|
- DOMAIN,local.adguard.org,DIRECT
|
||||||
- DOMAIN-SUFFIX,local,DIRECT
|
- DOMAIN-SUFFIX,local,DIRECT
|
||||||
- IP-CIDR,127.0.0.0/8,DIRECT
|
- IP-CIDR,127.0.0.0/8,DIRECT
|
||||||
- IP-CIDR,172.16.0.0/12,DIRECT
|
- IP-CIDR,172.16.0.0/12,DIRECT
|
||||||
@ -518,6 +544,8 @@ rules:
|
|||||||
- IP-CIDR,10.0.0.0/8,DIRECT
|
- IP-CIDR,10.0.0.0/8,DIRECT
|
||||||
- IP-CIDR,17.0.0.0/8,DIRECT
|
- IP-CIDR,17.0.0.0/8,DIRECT
|
||||||
- IP-CIDR,100.64.0.0/10,DIRECT
|
- IP-CIDR,100.64.0.0/10,DIRECT
|
||||||
|
- IP-CIDR,224.0.0.0/4,DIRECT
|
||||||
|
- IP-CIDR6,fe80::/10,DIRECT
|
||||||
|
|
||||||
# 最终规则
|
# 最终规则
|
||||||
- GEOIP,CN,DIRECT
|
- GEOIP,CN,DIRECT
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
[General]
|
[General]
|
||||||
loglevel = notify
|
loglevel = notify
|
||||||
interface = 127.0.0.1
|
interface = 127.0.0.1
|
||||||
skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16, 192.88.99.0/24, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 240.0.0.0/4, 255.255.255.255/32
|
skip-proxy = localhost, *.local, injections.adguard.org, local.adguard.org, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16, 192.88.99.0/24, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 240.0.0.0/4, 255.255.255.255/32
|
||||||
ipv6 = false
|
ipv6 = true
|
||||||
dns-server = 1.2.4.8, 114.114.114.114, 223.5.5.5, 8.8.8.8, system
|
dns-server = 1.2.4.8, 114.114.114.114, 223.5.5.5, 119.29.29.29
|
||||||
exclude-simple-hostnames = true
|
exclude-simple-hostnames = true
|
||||||
enhanced-mode-by-rule = true
|
enhanced-mode-by-rule = true
|
||||||
|
|
||||||
@ -39,24 +39,38 @@ DOMAIN-SUFFIX,appspot.com,Proxy,force-remote-dns
|
|||||||
DOMAIN-KEYWORD,google,Proxy,force-remote-dns
|
DOMAIN-KEYWORD,google,Proxy,force-remote-dns
|
||||||
|
|
||||||
# Apple
|
# Apple
|
||||||
DOMAIN,ocsp.apple.com,Proxy
|
DOMAIN,safebrowsing.urlsec.qq.com,DIRECT
|
||||||
|
DOMAIN,safebrowsing.googleapis.com,DIRECT
|
||||||
|
DOMAIN,developer.apple.com,Proxy
|
||||||
DOMAIN-SUFFIX,digicert.com,Proxy
|
DOMAIN-SUFFIX,digicert.com,Proxy
|
||||||
DOMAIN-SUFFIX,entrust.net,Proxy
|
DOMAIN,ocsp.apple.com,Proxy
|
||||||
|
DOMAIN,ocsp.comodoca.com,Proxy
|
||||||
|
DOMAIN,ocsp.usertrust.com,Proxy
|
||||||
|
DOMAIN,ocsp.sectigo.com,Proxy
|
||||||
DOMAIN,ocsp.verisign.net,Proxy
|
DOMAIN,ocsp.verisign.net,Proxy
|
||||||
DOMAIN,itunes.apple.com,Proxy,force-remote-dns
|
DOMAIN-SUFFIX,apple-dns.net,Proxy
|
||||||
DOMAIN-SUFFIX,apps.apple.com,Proxy,force-remote-dns
|
DOMAIN,testflight.apple.com,Proxy
|
||||||
|
DOMAIN,sandbox.itunes.apple.com,Proxy
|
||||||
|
DOMAIN,itunes.apple.com,Proxy
|
||||||
|
DOMAIN-SUFFIX,apps.apple.com,Proxy
|
||||||
DOMAIN-SUFFIX,blobstore.apple.com,Proxy
|
DOMAIN-SUFFIX,blobstore.apple.com,Proxy
|
||||||
DOMAIN-SUFFIX,music.apple.com,DIRECT,force-remote-dns
|
DOMAIN,cvws.icloud-content.com,Proxy
|
||||||
DOMAIN-SUFFIX,mzstatic.com,DIRECT
|
DOMAIN-SUFFIX,mzstatic.com,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,itunes.apple.com,DIRECT
|
DOMAIN-SUFFIX,itunes.apple.com,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,icloud.com,DIRECT
|
DOMAIN-SUFFIX,icloud.com,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,icloud-content.com,DIRECT
|
DOMAIN-SUFFIX,icloud-content.com,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,me.com,DIRECT
|
DOMAIN-SUFFIX,me.com,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,akadns.net,DIRECT
|
DOMAIN-SUFFIX,aaplimg.com,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,aaplimg.com,DIRECT
|
DOMAIN-SUFFIX,cdn20.com,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,cdn-apple.com,DIRECT
|
DOMAIN-SUFFIX,cdn-apple.com,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,apple.com,DIRECT
|
DOMAIN-SUFFIX,akadns.net,DIRECT,force-remote-dns
|
||||||
DOMAIN-SUFFIX,apple-cloudkit.com,DIRECT
|
DOMAIN-SUFFIX,akamaiedge.net,DIRECT,force-remote-dns
|
||||||
|
DOMAIN-SUFFIX,edgekey.net,DIRECT,force-remote-dns
|
||||||
|
DOMAIN-SUFFIX,mwcloudcdn.com,DIRECT,force-remote-dns
|
||||||
|
DOMAIN-SUFFIX,mwcname.com,DIRECT,force-remote-dns
|
||||||
|
DOMAIN-SUFFIX,apple.com,DIRECT,force-remote-dns
|
||||||
|
DOMAIN-SUFFIX,apple-cloudkit.com,DIRECT,force-remote-dns
|
||||||
|
DOMAIN-SUFFIX,apple-mapkit.com,DIRECT,force-remote-dns
|
||||||
|
|
||||||
# 国内网站
|
# 国内网站
|
||||||
DOMAIN-SUFFIX,cn,DIRECT
|
DOMAIN-SUFFIX,cn,DIRECT
|
||||||
@ -71,7 +85,6 @@ DOMAIN-SUFFIX,36kr.com,DIRECT
|
|||||||
DOMAIN-SUFFIX,acfun.tv,DIRECT
|
DOMAIN-SUFFIX,acfun.tv,DIRECT
|
||||||
DOMAIN-SUFFIX,air-matters.com,DIRECT
|
DOMAIN-SUFFIX,air-matters.com,DIRECT
|
||||||
DOMAIN-SUFFIX,aixifan.com,DIRECT
|
DOMAIN-SUFFIX,aixifan.com,DIRECT
|
||||||
DOMAIN-SUFFIX,akamaized.net,DIRECT
|
|
||||||
DOMAIN-KEYWORD,alicdn,DIRECT
|
DOMAIN-KEYWORD,alicdn,DIRECT
|
||||||
DOMAIN-KEYWORD,alipay,DIRECT
|
DOMAIN-KEYWORD,alipay,DIRECT
|
||||||
DOMAIN-KEYWORD,taobao,DIRECT
|
DOMAIN-KEYWORD,taobao,DIRECT
|
||||||
@ -190,7 +203,7 @@ DOMAIN-SUFFIX,zhimg.com,DIRECT
|
|||||||
DOMAIN-SUFFIX,zimuzu.tv,DIRECT
|
DOMAIN-SUFFIX,zimuzu.tv,DIRECT
|
||||||
DOMAIN-SUFFIX,zoho.com,DIRECT
|
DOMAIN-SUFFIX,zoho.com,DIRECT
|
||||||
|
|
||||||
# 抗 DNS 污染
|
# 抗 DNS 污染
|
||||||
DOMAIN-KEYWORD,amazon,Proxy
|
DOMAIN-KEYWORD,amazon,Proxy
|
||||||
DOMAIN-KEYWORD,gmail,Proxy
|
DOMAIN-KEYWORD,gmail,Proxy
|
||||||
DOMAIN-KEYWORD,youtube,Proxy
|
DOMAIN-KEYWORD,youtube,Proxy
|
||||||
@ -213,12 +226,15 @@ DOMAIN-KEYWORD,adsmogo,REJECT
|
|||||||
DOMAIN-KEYWORD,adsrvmedia,REJECT
|
DOMAIN-KEYWORD,adsrvmedia,REJECT
|
||||||
DOMAIN-KEYWORD,adwords,REJECT
|
DOMAIN-KEYWORD,adwords,REJECT
|
||||||
DOMAIN-KEYWORD,adservice,REJECT
|
DOMAIN-KEYWORD,adservice,REJECT
|
||||||
|
DOMAIN-SUFFIX,appsflyer.com,REJECT
|
||||||
DOMAIN-KEYWORD,domob,REJECT
|
DOMAIN-KEYWORD,domob,REJECT
|
||||||
|
DOMAIN-SUFFIX,doubleclick.net,REJECT
|
||||||
DOMAIN-KEYWORD,duomeng,REJECT
|
DOMAIN-KEYWORD,duomeng,REJECT
|
||||||
DOMAIN-KEYWORD,dwtrack,REJECT
|
DOMAIN-KEYWORD,dwtrack,REJECT
|
||||||
DOMAIN-KEYWORD,guanggao,REJECT
|
DOMAIN-KEYWORD,guanggao,REJECT
|
||||||
DOMAIN-KEYWORD,lianmeng,REJECT
|
DOMAIN-KEYWORD,lianmeng,REJECT
|
||||||
DOMAIN-SUFFIX,mmstat.com,REJECT
|
DOMAIN-SUFFIX,mmstat.com,REJECT
|
||||||
|
DOMAIN-KEYWORD,mopub,REJECT
|
||||||
DOMAIN-KEYWORD,omgmta,REJECT
|
DOMAIN-KEYWORD,omgmta,REJECT
|
||||||
DOMAIN-KEYWORD,openx,REJECT
|
DOMAIN-KEYWORD,openx,REJECT
|
||||||
DOMAIN-KEYWORD,partnerad,REJECT
|
DOMAIN-KEYWORD,partnerad,REJECT
|
||||||
@ -227,6 +243,7 @@ DOMAIN-KEYWORD,supersonicads,REJECT
|
|||||||
DOMAIN-KEYWORD,uedas,REJECT
|
DOMAIN-KEYWORD,uedas,REJECT
|
||||||
DOMAIN-KEYWORD,umeng,REJECT
|
DOMAIN-KEYWORD,umeng,REJECT
|
||||||
DOMAIN-KEYWORD,usage,REJECT
|
DOMAIN-KEYWORD,usage,REJECT
|
||||||
|
DOMAIN-SUFFIX,vungle.com,REJECT
|
||||||
DOMAIN-KEYWORD,wlmonitor,REJECT
|
DOMAIN-KEYWORD,wlmonitor,REJECT
|
||||||
DOMAIN-KEYWORD,zjtoolbar,REJECT
|
DOMAIN-KEYWORD,zjtoolbar,REJECT
|
||||||
|
|
||||||
@ -235,6 +252,7 @@ DOMAIN-SUFFIX,9to5mac.com,Proxy
|
|||||||
DOMAIN-SUFFIX,abpchina.org,Proxy
|
DOMAIN-SUFFIX,abpchina.org,Proxy
|
||||||
DOMAIN-SUFFIX,adblockplus.org,Proxy
|
DOMAIN-SUFFIX,adblockplus.org,Proxy
|
||||||
DOMAIN-SUFFIX,adobe.com,Proxy
|
DOMAIN-SUFFIX,adobe.com,Proxy
|
||||||
|
DOMAIN-SUFFIX,akamaized.net,Proxy
|
||||||
DOMAIN-SUFFIX,alfredapp.com,Proxy
|
DOMAIN-SUFFIX,alfredapp.com,Proxy
|
||||||
DOMAIN-SUFFIX,amplitude.com,Proxy
|
DOMAIN-SUFFIX,amplitude.com,Proxy
|
||||||
DOMAIN-SUFFIX,ampproject.org,Proxy
|
DOMAIN-SUFFIX,ampproject.org,Proxy
|
||||||
@ -499,16 +517,14 @@ DOMAIN-SUFFIX,ytimg.com,Proxy
|
|||||||
# Telegram
|
# Telegram
|
||||||
DOMAIN-SUFFIX,telegra.ph,Proxy
|
DOMAIN-SUFFIX,telegra.ph,Proxy
|
||||||
DOMAIN-SUFFIX,telegram.org,Proxy
|
DOMAIN-SUFFIX,telegram.org,Proxy
|
||||||
|
IP-CIDR,91.108.4.0/22,Proxy,no-resolve
|
||||||
IP-CIDR,91.108.4.0/22,Proxy
|
IP-CIDR,91.108.8.0/21,Proxy,no-resolve
|
||||||
IP-CIDR,91.108.8.0/22,Proxy
|
IP-CIDR,91.108.16.0/22,Proxy,no-resolve
|
||||||
IP-CIDR,91.108.12.0/22,Proxy
|
IP-CIDR,91.108.56.0/22,Proxy,no-resolve
|
||||||
IP-CIDR,91.108.16.0/22,Proxy
|
IP-CIDR,149.154.160.0/20,Proxy,no-resolve
|
||||||
IP-CIDR,91.108.56.0/22,Proxy
|
IP-CIDR6,2001:67c:4e8::/48,Proxy,no-resolve
|
||||||
IP-CIDR,149.154.160.0/22,Proxy
|
IP-CIDR6,2001:b28:f23d::/48,Proxy,no-resolve
|
||||||
IP-CIDR,149.154.164.0/22,Proxy
|
IP-CIDR6,2001:b28:f23f::/48,Proxy,no-resolve
|
||||||
IP-CIDR,149.154.168.0/22,Proxy
|
|
||||||
IP-CIDR,149.154.172.0/22,Proxy
|
|
||||||
|
|
||||||
# LAN
|
# LAN
|
||||||
DOMAIN-SUFFIX,local,DIRECT
|
DOMAIN-SUFFIX,local,DIRECT
|
||||||
@ -518,6 +534,8 @@ IP-CIDR,192.168.0.0/16,DIRECT
|
|||||||
IP-CIDR,10.0.0.0/8,DIRECT
|
IP-CIDR,10.0.0.0/8,DIRECT
|
||||||
IP-CIDR,17.0.0.0/8,DIRECT
|
IP-CIDR,17.0.0.0/8,DIRECT
|
||||||
IP-CIDR,100.64.0.0/10,DIRECT
|
IP-CIDR,100.64.0.0/10,DIRECT
|
||||||
|
IP-CIDR,224.0.0.0/4,DIRECT
|
||||||
|
IP-CIDR6,fe80::/10,DIRECT
|
||||||
|
|
||||||
# 最终规则
|
# 最终规则
|
||||||
GEOIP,CN,DIRECT
|
GEOIP,CN,DIRECT
|
||||||
|
@ -1,26 +1,33 @@
|
|||||||
#!MANAGED-CONFIG $subs_link interval=43200 strict=true
|
#!MANAGED-CONFIG $subs_link interval=43200 strict=true
|
||||||
|
# Surge 的规则配置手册: https://manual.nssurge.com/
|
||||||
|
|
||||||
[General]
|
[General]
|
||||||
loglevel = notify
|
loglevel = notify
|
||||||
dns-server = 1.2.4.8, 114.114.114.114, 223.5.5.5, 8.8.8.8, system
|
# 从 Surge iOS 4 / Surge Mac 3.3.0 起,工具开始支持 DoH
|
||||||
|
doh-server = https://dns.alidns.com/dns-query
|
||||||
|
# https://13800000000.rubyfish.cn/, https://doh.360.cn/dns-query, https://dns.google/dns-query
|
||||||
|
dns-server = 223.5.5.5, 114.114.114.114, 119.29.29.29
|
||||||
tun-excluded-routes = 0.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16, 192.88.99.0/24, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 255.255.255.255/32
|
tun-excluded-routes = 0.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16, 192.88.99.0/24, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 255.255.255.255/32
|
||||||
skip-proxy = localhost, *.local, captive.apple.com, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16, 192.88.99.0/24, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 240.0.0.0/4, 255.255.255.255/32
|
skip-proxy = localhost, *.local, injections.adguard.org, local.adguard.org, captive.apple.com, guzzoni.apple.com, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16, 192.88.99.0/24, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 240.0.0.0/4, 255.255.255.255/32
|
||||||
|
|
||||||
|
wifi-assist = true
|
||||||
allow-wifi-access = true
|
allow-wifi-access = true
|
||||||
wifi-access-http-port = 6152
|
wifi-access-http-port = 6152
|
||||||
wifi-access-socks5-port = 6153
|
wifi-access-socks5-port = 6153
|
||||||
http-listen = 0.0.0.0:6152
|
http-listen = 0.0.0.0:6152
|
||||||
socks5-listen = 0.0.0.0:6153
|
socks5-listen = 0.0.0.0:6153
|
||||||
|
|
||||||
test-timeout = 4
|
|
||||||
network-framework = false
|
|
||||||
proxy-test-url = http://www.gstatic.com/generate_204
|
|
||||||
|
|
||||||
external-controller-access = surgepasswd@0.0.0.0:6170
|
external-controller-access = surgepasswd@0.0.0.0:6170
|
||||||
exclude-simple-hostnames = true
|
|
||||||
ipv6 = false
|
|
||||||
replica = false
|
replica = false
|
||||||
|
|
||||||
|
tls-provider = openssl
|
||||||
|
network-framework = false
|
||||||
|
exclude-simple-hostnames = true
|
||||||
|
ipv6 = true
|
||||||
|
|
||||||
|
test-timeout = 4
|
||||||
|
proxy-test-url = http://www.gstatic.com/generate_204
|
||||||
|
|
||||||
[Replica]
|
[Replica]
|
||||||
hide-apple-request = true
|
hide-apple-request = true
|
||||||
hide-crashlytics-request = true
|
hide-crashlytics-request = true
|
||||||
@ -29,6 +36,8 @@ hide-udp = false
|
|||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Surge 的几种策略配置规范,请参考 https://manual.nssurge.com/policy/proxy.html
|
# Surge 的几种策略配置规范,请参考 https://manual.nssurge.com/policy/proxy.html
|
||||||
|
# 不同的代理策略有*很多*可选参数,请参考上方连接的 Parameters 一段,根据需求自行添加参数。
|
||||||
|
#
|
||||||
# Surge 现已支持 UDP 转发功能,请参考: https://trello.com/c/ugOMxD3u/53-udp-%E8%BD%AC%E5%8F%91
|
# Surge 现已支持 UDP 转发功能,请参考: https://trello.com/c/ugOMxD3u/53-udp-%E8%BD%AC%E5%8F%91
|
||||||
# Surge 现已支持 TCP-Fast-Open 技术,请参考: https://trello.com/c/ij65BU6Q/48-tcp-fast-open-troubleshooting-guide
|
# Surge 现已支持 TCP-Fast-Open 技术,请参考: https://trello.com/c/ij65BU6Q/48-tcp-fast-open-troubleshooting-guide
|
||||||
# Surge 现已支持 ss-libev 的全部加密方式和混淆,请参考: https://trello.com/c/BTr0vG1O/47-ss-libev-%E7%9A%84%E6%94%AF%E6%8C%81%E6%83%85%E5%86%B5
|
# Surge 现已支持 ss-libev 的全部加密方式和混淆,请参考: https://trello.com/c/BTr0vG1O/47-ss-libev-%E7%9A%84%E6%94%AF%E6%8C%81%E6%83%85%E5%86%B5
|
||||||
@ -47,13 +56,13 @@ fallback = fallback, $proxy_group, url=http://www.gstatic.com/generate_204, inte
|
|||||||
## 您可以在此处插入自定义规则
|
## 您可以在此处插入自定义规则
|
||||||
|
|
||||||
# 实用规则片段集
|
# 实用规则片段集
|
||||||
# RULE-SET,SYSTEM,DIRECT
|
# RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Surge/Basic/Apple-News.list,Proxy
|
||||||
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Basic/Apple-proxy.list,Proxy
|
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Surge/Basic/Apple-proxy.list,Proxy
|
||||||
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Basic/Apple-direct.list,DIRECT
|
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Surge/Basic/Apple-direct.list,DIRECT,force-remote-dns
|
||||||
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Basic/CN.list,DIRECT
|
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Surge/Basic/CN.list,DIRECT
|
||||||
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Basic/common-ad-keyword.list,REJECT-TINYGIF
|
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Surge/Basic/common-ad-keyword.list,REJECT-TINYGIF
|
||||||
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Basic/foreign.list,Proxy
|
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Surge/Basic/foreign.list,Proxy
|
||||||
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/App/social/Telegram.list,Proxy
|
RULE-SET,https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Surge/App/social/Telegram.list,Proxy
|
||||||
RULE-SET,LAN,DIRECT
|
RULE-SET,LAN,DIRECT
|
||||||
|
|
||||||
# 最终规则
|
# 最终规则
|
||||||
|
Loading…
Reference in New Issue
Block a user