update community contributed v5 template

This commit is contained in:
Shelikhoo
2024-10-01 19:44:32 +01:00
parent e670afb793
commit ff0566338b
6 changed files with 835 additions and 14 deletions

View File

@@ -0,0 +1,95 @@
{
"log": {
"error": {
"level": "Debug",
"type": "Console"
},
"access": {
"type": "None"
}
},
"outbounds": [
{
"tag": "deny",
"protocol": "blackhole"
},
{
"tag": "ooo_1",
"protocol": "shadowsocks",
"settings": {
"address": "1.1.1.1",
"method": "aes-256-gcm",
"port": "10000",
"password": "cbc0566c-9674-4818-bc79-e42509e0696d"
}
},
{
"tag": "ooo_2",
"protocol": "shadowsocks",
"settings": {
"address": "1.1.1.1",
"method": "aes-256-gcm",
"port": "10000",
"password": "cbc0566c-9674-4818-bc79-e42509e0696d"
}
},
{
"tag": "ooo_3",
"protocol": "shadowsocks",
"settings": {
"address": "1.1.1.1",
"method": "aes-256-gcm",
"port": "10000",
"password": "cbc0566c-9674-4818-bc79-e42509e0696d"
}
},
{
"tag": "direct",
"protocol": "freedom"
}
],
"router": {
"domainStrategy": "AsIs",
"rule": [
{
"balancingTag": "balancerout",
"inboundTag": [
"user-in"
]
}
],
"balancingRule": [
{
"tag": "balancerout",
"outbound_selector": [
"ooo_"
],
"strategy": "random", // "random" | "leastping" | "leastload",随机性,最低延迟,最低负荷;
"fallbackTag": "direct"
}
]
},
"inbounds": [
{
"tag": "user-in",
"protocol": "socks",
"settings": {
"udpEnabled": true,
"address": "127.0.0.1",
"packetEncoding": "Packet"
},
"port": 7830,
"listen": "127.0.0.1"
}
],
"services": {
"backgroundObservatory": {
// 关于这里的详细设置与不同,参考 configv5-example.json 配置文件,有详细的介绍。
"subject_selector": [
"ooo_"
],
"probe_interval": 5000000000, // 10000000000, "10s"
"probeUrl": "http://www.gstatic.com/generate_204"
}
}
}

View File

@@ -1,3 +1,57 @@
/*
I'm a Dune fan, so let me be your Maud Dib and guide you through the v2ray config for V5.
Updateds Logs
v2fly/v2ray-core v5.19.0 services
2024.9.**
dns.staticHosts
DNS
DNS expectIPs
DNS
Inbounds Outbounds
dokodemo
streamSettings.securitySettings { nextProtocoldisableSystemRoot }
MuxMux TCP TCP Mux.CoolMux TCP 使 Mux Mux
dns-out
loopback
balancer
DNS
proxySettings
balancingRule
balancingRule balancingRule
V2Ray V2Ray
dns-out
dokodemo-door
balancer xray v2ray V4 v2ray V5
balancingRule
v2ray WebSocket maxEarlyData
commander services.commander
services services.policy.level.timeout
Tun sniffingSettings destinationOverride Tun sniffing configdestOverrideservices使raw jsonInboundConfigdestOverridedestinationOverride
balancerTag tag balancerTag
services
outboundTag balancerTag outbound
访
V2Ray
使 Shadowsocks V2Ray(VMess)
使
使 streamSettings TLS HTTP TCP
proxy vmess+wsvmess+ws 访 proxy IP proxy
-> proxy -> vmess+ws -> vmess+ws -> proxy ->
backgroundObservatory burstObservatory
*/
// emmm~ 本配置只是作为 v2ray jsonv5 写法的参考尝试尽量把各个功能配置写法展现出来如果日常使用请先自行精简。DNS 、路由)
// 修复了上一个版本的问题完善一些功能DNS 地址、IP 语法导致匹配问题freedom 协议的功能完善,流量嗅探等等
// 启动命令
@@ -82,6 +136,20 @@
},
"dns": {
"staticHosts": [
//
//
// type: "Full" | "Subdomain" | "Keyword" | "Regex"
// domain: string与 type 所对应的 domain 值。以下为 type 与domain 的对应关系:
// Full当此域名完整匹配目标域名时该规则生效。例如 v2ray.com 匹配 v2ray.com 但不匹配 www.v2ray.com。
// Regex当 domain 所表示的正则表达式匹配目标域名时,该规则生效。例如 \.goo.*\.com$ 匹配 www.google.com、fonts.googleapis.com但不匹配 google.com。
// Subdomain (推荐):当此域名是目标域名或其子域名时,该规则生效。例如 v2ray.com 匹配 www.v2ray.com、v2ray.com但不匹配 xv2ray.com。
// Keyword当此字符串匹配目标域名中任意部分该规则生效。比如 sina.com 可以匹配 sina.com、sina.com.cn、www.sina.com 和 www.sina.company但不匹配 sina.cn。
// 与 domain 匹配后返回的是:
// ip匹配的域名所映射的 IP 地址列表。
// proxiedDomain如指定 proxiedDomain匹配的域名将直接使用该域名的查询结果类似于 CNAME。
// 如果同时指定了 ip 和 proxiedDomain将优先生效 proxiedDomain。
//
//
{
"type": "Full",
"domain": "services.gfe.nvidia.com",
@@ -122,6 +190,8 @@
// "https+local://223.5.5.5/dns-query"
// "https+local://a.b.c.d:8443/my-dns-query"
// "quic+local://dns.adguard.com"
// localhost使用本机预设的 DNS 配置
// FakeDNS使用 V2Ray 内建的 FakeDNS 服务器。
//
//
"nameServer": [
@@ -386,22 +456,34 @@
},
// "clientIp": "1.2.3.4", // 此功能需要 DNS 服务器支持 EDNS Client Subnet用于 DNS 查询时通知 DNS 服务器,客户端所在的地理位置(不能是私有 IP 地址)。不建议全局通知 "1.2.3.4",会导致返回为空。
"domainMatcher": "mph",
"queryStrategy": "USE_IP4",
"cacheStrategy": "CacheEnabled",
"disableCache": false,
"fallbackStrategy": "Enabled",
"disableFallback": false,
// "disableFallbackIfMatch": false, // (v5.2.0+ 弃用)
"queryStrategy": "USE_IP4", // "USE_IP" | "USE_IP4" | "USE_IP6"
"cacheStrategy": "CacheEnabled", // "CacheEnabled" | "CacheDisabled"
"disableCache": false, // bool默认为 false
"fallbackStrategy": "Enabled", // "Enabled" | "Disabled" | "DisabledIfAnyMatch"DNS 回退fallback查询策略。默认为 Enabled即启用 DNS 回退fallback查询。Disabled 为禁用 DNS 回退fallback查询。DisabledIfAnyMatch 为在 DNS 服务器的优先匹配域名列表命中时禁用 DNS 回退fallback查询。
"disableFallback": false, // bool禁用 DNS 回退fallback查询。默认为 false即为不禁用。详情见 DNS 处理流程。 (v5.2.0+ 弃用)
// "disableFallbackIfMatch": false, // bool禁用在 DNS 服务器的优先匹配域名列表命中时执行 DNS 回退fallback查询。 (v5.2.0+ 弃用)
"tag": "dns"
},
"inbounds": [
/*
Inbounds
{
"listen": "",
"port": "",
"protocol": "vmess",
"settings": {},
"sniffing": {},
"streamSettings": {},
"tag": ""
}
*/
{
"tag": "socks",
"protocol": "socks",
"settings": {
"udpEnabled": true,
"address": "127.0.0.1",
"packetEncoding": "Packet"
"packetEncoding": "Packet" // Packet 模式适合于实时性要求高的应用:如 VoIP、在线游戏等。需要保证连接稳定的应用如远程桌面、文件传输等。需要穿透 NAT 的应用:如 P2P 应用。None 模式适合于:对连接稳定性要求不高的应用。需要灵活配置路由路径的应用。
},
"port": 7830,
"listen": "127.0.0.1",
@@ -428,9 +510,113 @@
],
"metadataOnly": true
}
},
{
"tag": "dokodemo-door",
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1",
"port": 65535,
"networks": [
"tcp,udp"
],
"followRedirect": false // 当值为 true 时Dokodemo door 会识别出由 iptables 转发而来的数据,并转发到相应的目标地址。
},
"port": 19829,
"listen": "127.0.0.1",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"metadataOnly": true
},
"streamSettings": {
"sockopt": {
"tproxy": "tproxy"
}
}
},
{
"tag": "commander",
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1",
"port": 65535,
"networks": [
"tcp"
]
},
"port": 19629,
"listen": "127.0.0.1"
}
],
"outbounds": [
/*
{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"address": "1.1.1.1",
"port": 10000,
"uuid": "adc27dd2-e7f9-41e8-a01d-2573e257564f"
},
"streamSettings": {
"transport": "ws", // 传输层协议名称mKCP、TCP、WebSocket、gRPC、QUIC、meek、httpupgrade、Hysteria2
"transportSettings": { // 传输层协议设置
"path": "/ws"
},
"security": "tls", // 传输层安全协议TLSuTLSnonexray 还有 reality。uTLS 仅在 TCP 和 WebSocket 中支持。
"securitySettings": { // 传输层安全协议设定
"serverName": "你的域名.com", // 指定服务器端证书的域名,在连接由 IP 建立时有用。当目标连接由域名指定时,比如在 Socks 入站时接收到了域名,或者由 Sniffing 功能探测出了域名,这个域名会自动用于 serverName无须手动配置。
"next_protocol": ["h2", "http/1.1"], // h2 会出错,一个字符串数组,指定了 TLS 握手时指定的 ALPN 数值。默认值为 ["h2", "http/1.1"]。
"disable_system_root": false, // 是否禁用操作系统自带的 CA 证书。默认值为 false。当值为 true 时V2Ray 只会使用 certificates 中指定的证书进行 TLS 握手。当值为 false 时V2Ray 只会使用操作系统自带的 CA 证书进行 TLS 握手。
"allow_insecure_if_pinned_peer_certificate": true, // 此选项将在 pinnedPeerCertificateChainSha256 被设置时禁用 TLS 证书验证。如果 pinnedPeerCertificateChainSha256 没有被设置,本选项会被忽略。
"pinned_peer_certificate_chain_sha256": [ // 使用 Base64 标准编码格式表示的远程服务器的证书链的SHA256散列值。在设置后远程服务器的证书链的散列值必须为列表中的数值之一。此数值可以通过以下命令生成 ./v2ray tls certChainHash --cert <cert.pem> (v5.18.0+)
"qwertyuiomnbgvc/x="
]
}
},
"proxySettings": {
"tag": "链式代理节点的 tag", // 当指定另一个出站连接的标识时,此出站连接发出的数据,将被转发至所指定的出站连接发出。
"transportLayer": true // 是否启用传输层转发支持。在启用后,此出站连接的传输层协议将保持生效(如果传输层协议支持)。如果不启用此选项, 在转发时传输层协议将失效,只能使用默认的 TCP 传输协议。
},
"sendThrough": "1.2.3.4", // 用于发送数据的 IP 地址,当主机有多个 IP 地址时有效,默认值为 "0.0.0.0"。
"mux": {
"domainStrategy": "AsIs", // [ "AsIs" | "UseIP" | "UseIP4" | "UseIP6" ]
"enabled": true,
"concurrency": 8 // 最大并发连接数。最小值 1最大值 1024默认值 8。如果填负数如 -1则不加载 Mux 模块。此数值表示了一个 TCP 连接上最多承载的 Mux 连接数量。当客户端发出了 8 个 TCP 请求,而 concurrency=8 时V2Ray 只会发出一条实际的连接,客户端的 8 个请求全部由这条连接传输。
}
}
//
"streamSettings": {
{
"mark": 0, // 一个整数。当其值非零时,在出站连接上标记 SO_MARK。仅适用于 Linux 系统。需要 CAP_NET_ADMIN 权限。
"tcpFastOpen": false, // 是否启用 TCP Fast Open。当其值为 true 时,强制开启 TFO当其值为 false 时,强制关闭 TFO当此项不存在时使用系统默认设置。可用于入站出站连接。
"tcpFastOpenQueueLength": 4096, // number 入站连接的 TCP Fast Open 队列长度,默认值为 4096仅在 Linux 中可用。
"tproxy": "off", // 是否开启透明代理(仅适用于 Linux。"redirect":使用 Redirect 模式的透明代理。支持 TCP 和 UDP 连接。"tproxy":使用 TProxy 模式的透明代理。支持 TCP 和 UDP 连接。"off":关闭透明代理。透明代理需要 Root 或 CAP_NET_ADMIN 权限。当 Dokodemo-door 中指定了 followRedirect且 sockopt.tproxy 为空时sockopt.tproxy 的值会被设为 "redirect"。
"tcpKeepAliveInterval": 0, // TCP 保持活跃的数据包的发送间隔,以秒为单位(仅适用于 Linux。0 代表保持默认值。
"bindToDevice": "eth0", // 将连接绑定到指定的网络设备Linux: v5.0.6+, Windows/Darwin: v5.2.0+)。
"mptcp": false // 是否启用多路径TCP仅适用于Linux。true 打开 MPTCP 。如果另一端的主机不支持 MPTCPMPTCP 将回退为普通 TCP。
}
}
*/
/*
Outbounds
{
"protocol": "vmess",
"proxySettings": {},
"sendThrough": "1.2.3.4",
"settings": {},
"streamSettings": {},
"mux": {
"concurrency": 8,
"enabled": false
},
"tag": "demo"
}
*/
{
"tag": "proxy", // 运行在 xray 的 vmess + ws +tls ,需要通过 v2ray 固定不安全的证书。 ./v2ray tls certChainHash --cert 证书.crt
"protocol": "vmess",
@@ -454,8 +640,29 @@
}
}
},
// 一个链式代理案例,注意:落地 IP 还是 proxy 的,容易造成理解错误,代理链设置后,只要能访问,就是成功了。
{
"tag": "hysteria2", // h2_h2
"tag": "proxy_链式代理",
"protocol": "vmess",
"settings": {
"address": "1.1.1.1",
"port": 10000,
"uuid": "adc27dd2-e7f9-41e8-a01d-2573e257564f"
},
"streamSettings": {
"transport": "ws",
"transportSettings": {
"path": "/ws"
}
},
"proxySettings": {
"tag": "UDA_hysteria2",
"transportLayer": true
}
}
// 负载均衡配置开始,这里提供两种方案,一个本地 outbounds 中的节点通过筛选进行负载均衡,另一个为订阅管理器筛选。同时如果多个节点,类似下面的案例的话,建议把节点 tag 使用固定的开头方便筛选。
{
"tag": "UDA_hysteria2", // h2_h2
"protocol": "hysteria2",
"settings": {
"server": [
@@ -485,7 +692,7 @@
}
},
{
"tag": "vmess+ws",
"tag": "UDA_vmess+ws",
"protocol": "vmess",
"settings": {
"address": "0.0.0.0",
@@ -500,7 +707,7 @@
}
},
{
"tag": "vmess+ws+tls",
"tag": "UDA_vmess+ws+tls",
"protocol": "vmess",
"settings": {
"address": "0.0.0.0",
@@ -523,7 +730,7 @@
}
},
{
"tag": "vmess+tls+hy2",
"tag": "UDA_vmess+tls+hy2",
"protocol": "vmess",
"settings": {
"address": "0.0.0.0",
@@ -550,7 +757,47 @@
}
},
{
"tag": "shadowsocks",
"tag": "balancer_shadowsocks",
"protocol": "shadowsocks",
"settings": {
"address": "0.0.0.0",
"method": "aes-256-gcm",
"port": "100000",
"password": "000000000000000000000000000000000000000000"
}
},
{
"tag": "balancer_shadowsocks",
"protocol": "shadowsocks",
"settings": {
"address": "0.0.0.0",
"method": "aes-256-gcm",
"port": "100000",
"password": "000000000000000000000000000000000000000000"
}
},
{
"tag": "balancer_shadowsocks",
"protocol": "shadowsocks",
"settings": {
"address": "0.0.0.0",
"method": "aes-256-gcm",
"port": "100000",
"password": "000000000000000000000000000000000000000000"
}
},
{
"tag": "balancer_shadowsocks",
"protocol": "shadowsocks",
"settings": {
"address": "0.0.0.0",
"method": "aes-256-gcm",
"port": "100000",
"password": "000000000000000000000000000000000000000000"
}
},
{
"tag": "balancer_shadowsocks",
"protocol": "shadowsocks",
"settings": {
"address": "0.0.0.0",
@@ -569,9 +816,24 @@
"concurrency": 8
}
},
{
"tag": "dns-out",
"protocol": "dns",
"settings": {},
"proxySettings": {
"tag": "proxy"
}
},
{
"tag": "block",
"protocol": "blackhole"
},
{
"tag": "loopback-out",
"protocol": "loopback",
"settings": {
"inboundTag": "loopback-in"
}
}
],
//
@@ -601,9 +863,55 @@
// Full完整匹配模式当域名完整匹配目标域名时该规则生效。例如 v2ray.com 匹配 v2ray.com 但不匹配 www.v2ray.com。
//
//
/*
// 常规 balancer 对应的路由模块
{
"balancingTag": "balancer",
"networks": "tcp,udp"
}
// 订阅管理器对应的路由模块
{
"balancingTag": "subscriptions",
"networks": "tcp,udp"
},
{
"tag": "commander",
"inboundTag": [
"commander"
]
}
*/
/*
{
// "tag": "proxy",
"balancingTag": "subscriptions",
"inboundTag": [
"http"
]
},
{
// "tag": "proxy",
"balancingTag": "balancerout",
"inboundTag": [
"socks"
]
},
{
"tag": "commander",
"inboundTag": [
"commander"
]
},
*/
"router": {
"domainStrategy": "IpIfNonMatch", // AsIs | UseIp | IpIfNonMatch | IpOnDemand
"rule": [
{
"tag": "dns-out", // 防火墙重定向类型透明代理时的 dns 劫持
"domainMatcher": "mph",
"portList": "53",
"networks": "udp"
},
{
"tag": "block", // 网络流量类型 bittorrent 直连
"domainMatcher": "mph", // protocol
@@ -688,6 +996,8 @@
},
{
"tag": "proxy", // 根域名匹配模式代理 + 关键词匹配代理
// 对应一个负载均衡器的标识。balancerTag 和 outboundTag 须二选一。当同时指定时outboundTag 生效。
"balancingTag": "balancerout",
"domainMatcher": "mph", // domain
"domain": [
{
@@ -873,7 +1183,178 @@
}
*/
],
"balancingRule": []
"balancingRule": [
// random 不需要添加 backgroundObservatory 或者 burstObservatory 配置项。
// leastPing 根据连接观测结果选择延迟最小的匹配到的出站代理,需要添加 backgroundObservatory 配置项。
// leastLoad 根据连接观测结果选择最稳定的出站代理,需要添加 burstObservatory 配置项。
// 订阅管理器对应的 balancingRule 模块;
{
"tag": "ShellPersonal",
"outbound_selector": [
"shellpersonal_"
],
"strategy": "random", // "random" | "leastping" | "leastload",进行负载均衡的策略类型,当没有匹配到任何规则时,流量默认由第一个 outbound 发出。random 默认值。随机选择匹配到的出站代理。roundRobin 按顺序选择匹配到的出站代理(V5 不支持这个参数)。leastPing 根据连接观测结果选择延迟最小的匹配到的出站代理。需要添加 observatory 配置项。leastLoad 根据连接观测结果选择最稳定的出站代理。需要添加 burstObservatory 配置项。
"fallbackTag": "proxy" // 如果负载均衡器无法选出合适的 outbound则使用这个配置项指定的 outbound。
},
{
"tag": "PersonalShell",
"outbound_selector": [
"personalshell_"
],
"strategy": "random",
"fallbackTag": "proxy"
},
// 常规 balancingRule 模块;
{
"tag": "UDAOUT",
"outbound_selector": [
"UDA_"
],
"strategy": "leastload"
},
{
"tag": "balancerout",
"outbound_selector": [
"balancer_"
],
"strategy": "leastping"
}
]
},
"services": {}
"services": {
// ✦✦✦ 连接观测组件 ✦✦✦
// 连接观测组件使用 HTTPing 的方式探测出站代理的连接状态。观测结果可以被其他组件使用,如负载均衡器。目前有 backgroundObservatory (后台连接观测)和 burstObservatory (并发连接观测)两种。按需选择其中之一就行。
// 连接状态观测配置负载均衡功能需要搭配该模块才行V4 没有类似的配置搭配leastping 和 leastload 这两个策略是需要配置连接观测来决定路由策略的。
"backgroundObservatory": { // 后台连接观测服务,通过定时指定的出站连接建立连接来确定出站代理的状态。
"subject_selector": [ // 用于 leastping一个字符串数组其中每一个字符串将用于和出站协议标识的前缀匹配。在以下几个出站协议标识中[ "a", "ab", "c", "ba" ]"subjectSelector": ["a"] 将匹配到 [ "a", "ab" ]。
"UDA_",
"balancer_"
],
"probe_interval": 5000000000, // "5s",发起探测的间隔。每经过这个时间,就会对一个服务器进行服务器状态检测。时间格式为数字+单位,比如"10s", "2h45m",支持的时间单位有 ns, us, ms, s, m, h 分别对应纳秒、微秒、毫秒、秒、分、时。
// 如果默写节点设置后无法负载均衡,可能在于那些节点无法 PING 通 probeUrl 的地址,采用了最终默认的出站策略。修改下面 probeUrl 的地址,或者直接删掉采用官方默认的参数即可。
"probeUrl": "http://www.qualcomm.cn/generate_204" // 用于检测连接状态的网址。默认会使用内构的连接状态检测地址。✦✦✦ 此目标地址的服务器可以推断出您使用了本程序。如果您使用了第三方提供的服务器,该服务器的运营商可能基于此信息作出不利于您的决定,如展示更多验证码,拒绝服务或封禁您的帐号。✦✦✦
},
"burstObservatory": { // 并发连接观测服务,用于 leastLoad 根据连接观测结果选择最稳定的出站代理。
"subjectSelector": [ // 用于 leastload一个字符串数组其中每一个字符串将用于和出站协议标识的前缀匹配。在以下几个出站协议标识中[ "a", "ab", "c", "ba" ]"subjectSelector": ["a"] 将匹配到 [ "a", "ab" ]。
"UDA_",
"balancer_"
],
"pingConfig": {
"timeout": 5000000000, // "5000ms" // Ping 超时时间, 时间格式为数字+单位,比如"10s", "2h45m"。。
"interval": 60000000000, // "60s" // 在指定时间内探测全部匹配的出站代理,每个出站代理探测 sampling + 1 次。时间格式为数字 + 单位,比如 "10s", "2h45m",支持的时间单位有 ns, us, ms, s, m, h 分别对应纳秒、微秒、毫秒、秒、分、时。
"connectivity": "http://www.msftncsi.com/ncsi.txt", // 连接检查 URL用于检测本地网络连通性的网址空字符串表示不检测本地网络连通性。
"samplingCount": 20, // 保留的最近 Ping 结果的数量。
"destination": "http://www.gstatic.com/generate_204" // 用于探测出站代理连接状态的网址。这个网址应该返回 HTTP 204 成功状态码。
}
},
"subscription": {
// 订阅管理器自动刷新出站信息并将它们转换为出站实例。 (v5.13.0+)
// 订阅源的地址,目前有两种收到支持的发地址。
// HTTP(S) 地址 : 通过 HTTP(S) 即 「超文本传输协议」或 「超文本传输安全协议」下载订阅文档。
// DataURL : 链接本身即为订阅文档。文档类型需为 "application/vnd.v2ray.subscription-singular" 才会被接受。
/*
The default time to fetch subscription document again. This time is not strictly honored.
Subscription Manager will
1. Check ImportSources from time to time to download subscription documents
2. Parse subscription documents with Subscription Container parsing components. The subscription documents will then be converted into individual server definitions.
3. Try to parse the server definitions as standardized outbound format one by one, if fails, try to convert the document into outbound format with Subscription Converter.
4. Compare the successfully converted server definition set with the servers already instanced as outbounds, and apply the difference. Only the modified server will have their Outbound Handlers recreated.
*/
"imports": [
{
"name": "ShellPersonal", // 机场提供的订阅
"url": "",
"tag_prefix": "shellpersonal_subscription", // 创建的订阅的出站实例前缀。
"importUsingTag": "proxy", // 指定下载订阅文档的出站代理标志。
"default_expire_seconds": 3600 // 默认的订阅过期时间。
},
{
"name": "PersonalShell", // 自建的订阅
"url": "",
"tag_prefix": "personalshell_subscription",
"importUsingTag": "proxy",
"default_expire_seconds": 3600
}
]
},
"stats": {},
"policy": {
"system": {
"stats": {
"inboundUplink": false,
"inboundDownlink": false,
"outboundUplink": false,
"outboundDownlink": false
}
},
"level": {
"0": {
"timeout": {
/*
"handshake": 4,
"connectionIdle": 300,
"uplinkOnly": 2,
"downlinkOnly": 5
*/
},
"stats": {
"userUplink": false,
"userDownlink": false
},
"buffer": {
"connection": -1
}
}
}
},
// 浏览器转发模块
// 对此 浏览器转发browser dialer应运而生。用户在自己的浏览器中打开一个页面至 localhost:8080这个页面利用原生 JS 充当 Xray 的网络栈,与代理服务端建立 TLSHTTP 连接。
// https://xtls.github.io/config/features/browser_dialer.html
"browser": {
"listenAddr": "127.0.0.1",
"listenPort": 4837
},
"commander": {
"tag": "commander",
"name": [
"observatory"
]
}
/*
// 虚拟网卡模式,仅 Linux amd64 and arm64 支持。
// 目前仅支持 amd64 以及 arm64 架构下的 Linux 操作系统Tun 是一个接受网络层数据包的服务,输入进入操作系统 tun 接口的数据包会被转换为一般数据流被传出代理处理。 (v5.9.0+)
// 该功能已经实际测试运行成功。
"tun": {
"name": "tun0",
"mtu": 1500, // tun 网络适配器的最大传输单元。建议设置为 1500。
"tag": "tun", // 生成的流量的入站流量标签。
"ips": [
{
"ip": [192, 18, 0, 1],
"prefix": 24
}
],
"routes": [
{
"ip": [0, 0, 0, 0],
"prefix": 0
}
],
"enablePromiscuousMode": true, // 是否开启混杂模式。建议设置为 true。
"enableSpoofing": true, // 是否开启 IP 欺骗。建议设置为 true。
"packetEncoding": "None", // ["None" | "Packet"]UDP 包的编码方式,默认为 None。当此值为 None 时UDP 连接将根据其目标地址(地址和端口映射)被分成流。当此值为 Packet 时,来自单个源连接的 UDP 连接将被编码为 UDP 数据包地址连接,并通过受支持的出站作为端点独立映射 UDP 连接恢复到其原始形式。这种 UDP 行为也被称为 FullCone 或 NAT1。
"sniffingSettings": { // tun 入站连接的流量探测设置。流量探测允许路由根据连接的内容和元数据转发连接。v5.11.0+
"enabled": true,
"destinationOverride": [
"http",
"tls",
"quic",
"fakedns",
"fakedns+others"
],
"metadataOnly": true
}
}
*/
}
}

View File

@@ -0,0 +1,110 @@
{
"log": {
"error": {
"level": "Debug",
"type": "Console"
},
"access": {
"type": "None"
}
},
"outbounds": [
{
"tag": "deny",
"protocol": "blackhole"
},
{
"tag": "direct",
"protocol": "freedom"
}
],
"router": {
"domainStrategy": "AsIs",
"rule": [
{
"balancingTag": "subscriptions",
"inboundTag": [
"user-in"
]
},
{
"tag": "commander",
"inboundTag": [
"commander"
]
}
],
"balancingRule": [
{
"tag": "subscriptions",
"outbound_selector": [
"subscription_"
],
"strategy": "leastping"
}
]
},
"inbounds": [
{
"tag": "user-in",
"protocol": "socks",
"settings": {
"udpEnabled": true,
"address": "127.0.0.1",
"packetEncoding": "Packet"
},
"port": 19828,
"listen": "99.99.99.99"
},
{
"tag": "commander",
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1",
"port": 65535,
"networks": ["tcp"]
},
"port": 19829,
"listen": "127.0.0.1"
}
],
"services": {
"backgroundObservatory": {
"subject_selector": [
"subscription_"
],
"probe_interval": 5000000000
},
"subscription": {
"imports": [
{
"name": "AAA",
"url": "",
"tag_prefix": "subscription_aaa",
"importUsingTag": "direct",
"default_expire_seconds": 3600
},
{
"name": "BBB",
"url": "",
"tag_prefix": "subscription_bbb",
"importUsingTag": "direct",
"default_expire_seconds": 3600
},
{
"name": "CCC",
"url": "",
"tag_prefix": "subscription_ccc",
"importUsingTag": "direct",
"default_expire_seconds": 3600
}
]
},
"commander": {
"tag": "commander",
"name": [
"observatory"
]
}
}
}

View File

@@ -0,0 +1,51 @@
{
"outbounds": [
// v2ray 支持的订阅格式就是 V5 配置中的出站格式,不过 TAG 有些不同,需要注意且区分不同 TagName 的值,目前支持的格式还有限,在逐步适配中。
// metadata.TagName 要区分
// hysteria2 和 trojan 协议暂时无法解析
// 实际场景应用中,因为 v2ray 订阅解析器的问题,不能有注释,否则会无法解析
// 同样实际场景应用中,因为 v2ray 订阅解析器的问题mux 无法被解析造成无法订阅到
{
"protocol": "vmess",
"settings": {
"address": "0.0.0.0",
"port": 100000,
"uuid": "0000000-0000000-0000000-0000000-0000000"
},
"streamSettings": {
"transport": "ws",
"transportSettings": {
"path": "/000000000000000000000"
}
},
"metadata": {
"TagName": "AAA_vmess+ws"
}
},
{
"protocol": "vmess",
"settings": {
"address": "0.0.0.0",
"port": 100000,
"uuid": "0000000-0000000-0000000-0000000-0000000"
},
"streamSettings": {
"security": "tls",
"securitySettings": {
"allow_insecure_if_pinned_peer_certificate": true,
"pinned_peer_certificate_chain_sha256": [
"000000000000000000000000000000000000000000"
],
"server_name": "000000000000000000000.com"
},
"transport": "ws",
"transportSettings": {
"path": "/000000000000000000000000000000000000000000"
}
},
"metadata": {
"TagName": "AAA_vmess+ws+tls"
}
}
]
}

View File

@@ -0,0 +1,49 @@
// 关于 ws 的 EarlyData 配置xray 或者其他内核中,可以在 path 中添加 ?ed=2560 启动v2ray 直接这样设置不可以,需要通过 maxEarlyData 单独设置。
// v2ray 内核与 v2ray 内核之间ws 的 EarlyData 传递必须使用 maxEarlyData 传递,但是 v2ray 内核与其他,比如 xray、sing-box 之间ws 的 EarlyData 传递只能通过 ?ed=2560 传递,不可混淆。
{
"log": {
"access": {
"type": "None"
},
"error": {
"level": "Debug",
"type": "Console"
}
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 7830,
"protocol": "socks",
"settings": {
"address": "127.0.0.1",
"packetEncoding": "Packet",
"udpEnabled": true
}
},
{
"listen": "127.0.0.1",
"port": 7831,
"protocol": "http",
"settings": {}
}
],
"outbounds": [
{
"protocol": "vmess",
"settings": {
"address": "1.1.1.1",
"port": 10000,
"uuid": "adc27dd2-e7f9-41e8-a01d-2573e257564f"
},
"streamSettings": {
"transport": "ws",
"transportSettings": {
"path": "/ws",
"maxEarlyData": "4096"
}
},
"tag": "proxy"
}
]
}

View File

@@ -0,0 +1,35 @@
{
"log": {
"access": {
"type": "None"
},
"error": {
"level": "Debug",
"type": "Console"
}
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 10000,
"protocol": "vmess",
"settings": {
"users": [
"adc27dd2-e7f9-41e8-a01d-2573e257564f"
]
},
"streamSettings": {
"transport": "ws",
"transportSettings": {
"path": "/ws",
"maxEarlyData": "4096"
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}