Browse Source

update community contributed v5 template

master
Shelikhoo 2 months ago
parent
commit
ff0566338b
No known key found for this signature in database
GPG Key ID: 4C9764E9FE80A3DC
  1. 95
      v5/Balancing/v2ray_balancing.json
  2. 509
      v5/General/configv5-example.json
  3. 110
      v5/Subscription/subscription.json
  4. 51
      v5/Subscription/subscription_subs
  5. 49
      v5/VMess-Websocket_EarlyData-TLS/vmess-ws-EarlyData_client.json
  6. 35
      v5/VMess-Websocket_EarlyData-TLS/vmess-ws-EarlyData_server.json

95
v5/Balancing/v2ray_balancing.json

@ -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"
}
}
}

509
v5/General/configv5-example.json

@ -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.comfonts.googleapis.com google.com
// Subdomain () v2ray.com www.v2ray.comv2ray.com xv2ray.com
// Keyword sina.com sina.comsina.com.cnwww.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 退fallbackDisabled DNS 退fallbackDisabledIfAnyMatch 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", // mKCPTCPWebSocketgRPCQUICmeekhttpupgradeHysteria2
"transportSettings": { //
"path": "/ws"
},
"security": "tls", // TLSuTLSnonexray realityuTLS 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 Linux0
"bindToDevice": "eth0", // Linux: v5.0.6+, Windows/Darwin: v5.2.0+
"mptcp": false // TCPLinuxtrue 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": "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": "hysteria2", // h2_h2
"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
}
}
*/
}
}

110
v5/Subscription/subscription.json

@ -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"
]
}
}
}

51
v5/Subscription/subscription_subs

@ -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"
}
}
]
}

49
v5/VMess-Websocket_EarlyData-TLS/vmess-ws-EarlyData_client.json

@ -0,0 +1,49 @@
// ws EarlyData xray path ?ed=2560 v2ray maxEarlyData
// v2ray v2ray ws EarlyData 使 maxEarlyData v2ray xraysing-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"
}
]
}

35
v5/VMess-Websocket_EarlyData-TLS/vmess-ws-EarlyData_server.json

@ -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"
}
]
}
Loading…
Cancel
Save