add configs

This commit is contained in:
Shelikhoo 2024-09-14 22:33:01 +01:00
parent 0a31af1df3
commit 3a005e484f
No known key found for this signature in database
GPG Key ID: 4C9764E9FE80A3DC
5 changed files with 1039 additions and 0 deletions

View File

@ -0,0 +1,828 @@
// emmm~ v2ray jsonv5 使DNS
//
// v2ray run -c configv5-example.json -format=jsonv5
{
"log": {
"access": {
"type": "Console",
"level": "Info"
},
"error": {
"type": "Console",
"level": "Info"
}
/*
// 使
"access": {
"type": "Console",
"level": "Info"
},
"error": {
"type": "Console",
"level": "Info"
}
//
//
// 使
"access": {
"type": "File",
"level": "Debug",
"path": "logaccess.log"
},
"error": {
"type": "File",
"level": "Debug",
"path": "logerror.log"
}
//
//
// type: "None" | "Console" | "File"
// "None"
// "Console"
// "File"
//
//
// path: string
// "/tmp/v2ray/_error.log" (Linux) "C:\\Temp\\v2ray\\_error.log" (Windows)
//
//
// level: "Debug" | "Info" | "Warning" | "Error" | "None"
// "Warning"
// "Debug" "Info"
// "Info"V2Ray 使 "Warning"
// "Warning"V2Ray V2Ray "Error"
// "Error"V2Ray
// "None"
"access": {
"type": "File",
"level": "Error",
"path": "/var/log/v2ray/logaccess.log"
},
"error": {
"type": "File",
"level": "Info",
"path": "/var/log/v2ray/logerror.log"
}
*/
},
"dns": {
"staticHosts": [
{
"type": "Full",
"domain": "services.gfe.nvidia.com",
"ip": [
"127.0.0.1"
]
},
{
"type": "Full",
"domain": "dns.google",
"ip": [
"8.8.8.8",
"8.8.4.4"
]
},
{
"type": "Full",
"domain": "cloudflare.com",
"ip": [
"1.1.1.1",
"1.0.0.1"
]
},
{
"type": "Full",
"domain": "cloudflare.com",
"proxiedDomain": "api.v2fly.org"
}
],
"nameServer": [
{
"address": {
"address": "8.8.8.8"
}
},
{
"address": {
"address": "1.1.1.1"
}
},
{
"address": {
"address": "tcp+local://8.8.8.8:53"
}
},
{
"address": {
"address": "https://dns.google/dns-query"
}
},
{
"address": {
"address": "localhost"
},
"prioritizedDomain": [
{
"type": "Subdomain",
"domain": ".cn"
},
{
"type": "Subdomain",
"domain": "weibo.cn"
},
{
"type": "Keyword",
"domain": "baidu"
},
{
"type": "Keyword",
"domain": "sohu"
},
{
"type": "Keyword",
"domain": "citic"
},
{
"type": "Keyword",
"domain": "xn--"
},
{
"type": "Keyword",
"domain": "unicom"
},
{
"type": "Regex",
"domain": "^[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.(com\\.cn|net\\.cn|org\\.cn|edu\\.cn|gov\\.cn|cn)$"
}
]
},
{
"address": {
"address": "local://233.5.5.5"
},
"prioritizedDomain": [
{
"type": "Subdomain",
"domain": ".cn"
},
{
"type": "Subdomain",
"domain": "weibo.cn"
},
{
"type": "Keyword",
"domain": "baidu"
},
{
"type": "Keyword",
"domain": "sohu"
},
{
"type": "Keyword",
"domain": "citic"
},
{
"type": "Keyword",
"domain": "xn--"
},
{
"type": "Keyword",
"domain": "unicom"
},
{
"type": "Regex",
"domain": "^[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.(com\\.cn|net\\.cn|org\\.cn|edu\\.cn|gov\\.cn|cn)$"
}
]
},
{
"address": {
"address": "local://119.29.29.29",
"port": 53
},
"skipFallback": false,
"prioritizedDomain": [
{
"type": "Subdomain",
"domain": ".cn"
},
{
"type": "Subdomain",
"domain": "weibo.cn"
},
{
"type": "Keyword",
"domain": "baidu"
},
{
"type": "Keyword",
"domain": "sohu"
},
{
"type": "Keyword",
"domain": "citic"
},
{
"type": "Keyword",
"domain": "xn--"
},
{
"type": "Keyword",
"domain": "unicom"
},
{
"type": "Regex",
"domain": "^[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.(com\\.cn|net\\.cn|org\\.cn|edu\\.cn|gov\\.cn|cn)$"
}
]
/*
"expectIPs": [{"code": "cn"}]
*/
},
{
"address": {
// "network": "udp",
"address": "1.1.1.1",
"port": 53
},
"clientIp": "1.1.1.1",
"skipFallback": false,
"prioritizedDomain": [
{
"type": "Subdomain",
"domain": "youtube.com"
},
{
"type": "Keyword",
"domain": "google"
}
]
/*
"expectIPs": [
{
"countryCode": "cn",
"cidr": [
{
"ipAddr": "119.29.0.0",
"prefix": 16
}
],
"inverseMatch": true
},
{
"filePath": "geoip.dat",
"code": "private"
}
]
*/
},
{
"address": {
"address": "119.29.29.29"
}
},
{
"address": {
"address": "https://1.1.1.1/dns-query"
// "port": 53
},
"clientIp": "1.1.1.1",
"skipFallback": true,
// prioritizedDomain
// type: "Full" | "Subdomain" | "Keyword" | "Regex"
//
//
// domain: string
// 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
//
//
"prioritizedDomain": [
{
"type": "Subdomain",
"domain": "youotube.com"
},
{
"type": "Keyword",
"domain": "gooogle"
}
],
/*
"ExpectIPs": [
{
"cidr": [
{
"ipAddr": "119.29.0.0",
"prefix": 16
}
],
"inverseMatch": true
},
{
"filePath": "geoip.dat",
"code": "private"
}
],
*/
"fakeDns": {
"pools": [
{
"ipPool": "198.18.0.0/15",
"lruSize": 65535
},
{
"ipPool": "fc00::/18",
"lruSize": 65535
}
]
},
"tag": "CloudFlareDNS",
"queryStrategy": "USE_IP4",
"cacheStrategy": "CacheEnabled",
"fallbackStrategy": "Enabled"
}
],
"fakeDns": {
"pools": [
{
"ipPool": "198.18.0.0/15",
"lruSize": 65535
},
{
"ipPool": "fc00::/18",
"lruSize": 65535
}
]
},
// "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+ )
"tag": "dns"
},
"inbounds": [
{
"tag": "socks",
"protocol": "socks",
"settings": {
"udpEnabled": true,
"address": "127.0.0.1",
"packetEncoding": "Packet"
},
"port": 7830,
"listen": "127.0.0.1"
},
{
"tag": "http",
"protocol": "http",
"settings": {},
"port": 7831,
"listen": "127.0.0.1"
}
],
"outbounds": [
{
"tag": "proxy", // xray vmess + ws +tls v2ray ./v2ray tls certChainHash --cert .crt
"protocol": "vmess",
"settings": {
"address": "0.0.0.0",
"port": 100000,
"uuid": "0000000-0000000-0000000-0000000-0000000"
},
"streamSettings": {
"transport": "ws",
"transportSettings": {
"path": "/0000000000000000000000000000"
},
"security": "tls",
"securitySettings": {
"serverName": "0000000.com",
"allow_insecure_if_pinned_peer_certificate": true,
"pinned_peer_certificate_chain_sha256": [
"00000000000000"
]
}
}
},
{
"tag": "hysteria2", // h2_h2
"protocol": "hysteria2",
"settings": {
"server": [
{
"address": "0.0.0.0",
"port": 100000
}
]
},
"streamSettings": {
"security": "tls",
"securitySettings": {
"allow_insecure_if_pinned_peer_certificate": true,
"pinned_peer_certificate_chain_sha256": [
"000000000000000000000"
],
"server_name": "00000000000000.com"
},
"transport": "hysteria2",
"transportSettings": {
"congestion": {
"type": "bbr"
},
"password": "000000000000000000000",
"use_udp_extension": true
}
}
},
{
"tag": "vmess+ws",
"protocol": "vmess",
"settings": {
"address": "0.0.0.0",
"port": 100000,
"uuid": "0000000-0000000-0000000-0000000-0000000"
},
"streamSettings": {
"transport": "ws",
"transportSettings": {
"path": "/000000000000000000000"
}
}
},
{
"tag": "vmess+ws+tls",
"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"
}
}
},
{
"tag": "vmess+tls+hy2",
"protocol": "vmess",
"settings": {
"address": "0.0.0.0",
"port": 100000,
"uuid": "0000000-0000000-0000000-0000000-0000000"
},
"streamSettings": {
"security": "tls",
"securitySettings": {
"server_name": "0000000000000.com",
"allow_insecure_if_pinned_peer_certificate": true,
"pinned_peer_certificate_chain_sha256": [
"000000000000000000000000000000000000000000"
]
},
"transport": "hysteria2",
"transportSettings": {
"congestion": {
"type": "bbr"
},
"password": "000000000000000000000000000000000000000000",
"use_udp_extension": true
}
}
},
{
"tag": "shadowsocks",
"protocol": "shadowsocks",
"settings": {
"address": "0.0.0.0",
"method": "aes-256-gcm",
"port": "100000",
"password": "000000000000000000000000000000000000000000"
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {}
},
{
"tag": "block",
"protocol": "blackhole"
}
],
//
//
// GeoIP
// cidr
//
// code: string
// filePath: string
//
// inverseMatch : true | false
//
// CIDRObject
// ipAddr: string
// prefix: number
//
// GeoDomain
// domain : DomainObject
// code: string
// filePath: string
//
// DomainObject
// type : "Plain" | "Regex" | "RootDomain" | "Full"
// Plain sina.com sina.comsina.com.cnsina.company www.sina.com sina.cn
// Regex \.goo.*\.com$ www.google.comfonts.googleapis.com google.com
// RootDomain v2ray.com www.v2ray.comv2ray.com xv2ray.com
// Full v2ray.com v2ray.com www.v2ray.com
//
//
"router": {
"domainStrategy": "IpIfNonMatch", // AsIs | UseIp | IpIfNonMatch | IpOnDemand
"rule": [
{
"tag": "block", // bittorrent
"domainMatcher": "mph", // protocol
"protocol": [
"bittorrent"
]
},
{
"tag": "block", // 广 + 广
"domainMatcher": "mph", // domain
"domain": [
{
"type": "Full",
"value": "discovery.razerapi.com"
},
{
"type": "Full",
"value": "services.gfe.nvidia.com"
},
{
"type": "Plain",
"value": "googleads"
},
{
"type": "Plain",
"value": "wlmonitor"
}
]
},
{
"tag": "block", // geosite广
"domainMatcher": "mph", // domain
"geoDomain": [
{
"code": "category-httpdns",
"filePath": "geosite.dat"
},
{
"code": "category-ads-all",
"filePath": "geosite.dat"
}
]
},
// shanoaice https://github.com/v2fly/v2ray-core/issues/2518
// domain geoDomain ip-cidr geoip
// domain geoDomain GeoDomain Domain
// geoip inverseMatch geoDomain
// domainMatcher RuleObject service.router v4 domainMatcher RuleObject override
{
"tag": "block", // geosite + domain 广
"domainMatcher": "mph", // domain
"geoDomain": [
{
"code": "category-httpdns",
"filePath": "geosite.dat"
},
{
"code": "category-ads-all",
"filePath": "geosite.dat"
},
{
"domain": [
{
"type": "Full",
"value": "discovery.razerapi.com"
},
{
"type": "Full",
"value": "services.gfe.nvidia.com"
},
{
"type": "Plain",
"value": "googleads"
},
{
"type": "Plain",
"value": "wlmonitor"
}
]
}
]
},
{
"tag": "proxy", // +
"domainMatcher": "mph", // domain
"domain": [
{
"type": "RootDomain",
"value": "linux.do"
},
{
"type": "RootDomain",
"value": "v2ex.com"
},
{
"type": "Plain",
"value": "youtube"
},
{
"type": "Plain",
"value": "google"
}
]
},
{
"tag": "proxy", // geosite
"domainMatcher": "mph", // domain
"geoDomain": [
{
"code": "google",
"filePath": "geosite.dat"
},
{
"code": "tld-!cn",
"filePath": "geosite.dat"
}
]
},
{
"tag": "proxy", // cidr cidr geoip prefix CIDR IP IP32
"domainMatcher": "mph", // geoip
"geoip": [
{
"code": "google"
},
{
"cidr": [
{
"ipAddr": "8.8.4.4",
"prefix": 32
},
{
"ipAddr": "8.8.8.8",
"prefix": 32
},
{
"ipAddr": "1.1.1.1"
}
]
}
]
},
{
"tag": "proxy", // geoip + geoip
"domainMatcher": "mph", // geoip
"geoip": [
{
"code": "google",
"filePath": "geoip.dat"
},
{
"code": "telegram",
"filePath": "geoip.dat"
},
{
"inverseMatch": true,
"code": "cn",
"filePath": "geoip.dat"
}
]
},
{
"tag": "direct", // +
"domainMatcher": "mph", // domain
"domain": [
{
"type": "RootDomain",
"value": "bilibili.com"
},
{
"type": "RootDomain",
"value": "ixigua.com"
},
{
"type": "Plain",
"value": "moutai"
},
{
"type": "Plain",
"value": "tracker"
}
]
},
{
"tag": "direct", // geosite
"domainMatcher": "mph", // geoDomain
"geoDomain": [
{
"code": "cn",
"filePath": "geosite.dat"
},
{
"code": "tld-cn",
"filePath": "geosite.dat"
}
]
},
{
"tag": "direct", // cidr cidr geoip prefix CIDR IP IP32
"domainMatcher": "mph", // geoip
"geoip": [
{
"code": "private"
},
{
"cidr": [
{
"ipAddr": "233.5.5.5",
"prefix": 32
},
{
"ipAddr": "119.29.29.29",
"prefix": 32
},
{
"ipAddr": "114.114.114.114"
}
]
}
]
},
{
"tag": "direct", // geoip
"domainMatcher": "mph", // geoip
"geoip": [
{
"code": "private",
"filePath": "geoip.dat"
},
{
"code": "cn",
"filePath": "geoip.dat"
}
]
}
/*
{
"tag": "proxy",
"portList": "53,443,1000-2000" // portList
},
{
"tag": "proxy",
"networks": "tcp,udp" // networks
},
{
"tag": "direct",
"domainMatcher": "mph", // sourceGeoip
"sourceGeoip": [
{
"code": "cn",
"filePath": "geoip.dat"
}
]
},
{
"tag": "proxy",
"sourcePortList": "53,443,1000-2000" // sourcePortList
},
{
"tag": "direct",
"domainMatcher": "mph", // protocol
"protocol": [
"bittorrent"
]
}
*/
],
"balancingRule": []
},
"services": {}
}

View File

@ -0,0 +1,61 @@
{
"log": {
"error": {
"level": "Debug",
"type": "Console"
},
"access": {
"type": "None"
}
},
"outbounds": [
{
"protocol": "hysteria2",
"settings": {
"server": [
{
"address": "",
"port": 23443
}
]
},
"streamSettings": {
"transport": "hysteria2",
"transportSettings": {
"password": "52ox2wx75d7j8qk63e6qaayx9p2pllfv9asn",
"congestion": {
"type": "bbr"
},
"use_udp_extension": true
},
"security": "tls",
"securitySettings": {
"server_name": "doubleclick.net",
"allow_insecure_if_pinned_peer_certificate": true,
"pinned_peer_certificate_chain_sha256": [
"ZDc/ImNDWn5xyFxcKuorq/k44/V/4rww2NlUFOlQWmY="
]
}
}
}
],
"inbounds": [
{
"protocol": "socks",
"settings": {
"udpEnabled": true,
"address": "127.0.0.1",
"packetEncoding": "Packet"
},
"port": 34479,
"listen": "127.0.0.1"
},
{
"protocol": "http",
"settings": {
},
"port": 34480,
"listen": "127.0.0.1"
}
]
}

View File

@ -0,0 +1,44 @@
{
"log": {
"access": {
"type": "None"
},
"error": {
"level": "Debug",
"type": "Console"
}
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 100000,
"protocol": "hysteria2",
"settings": {},
"streamSettings": {
"security": "tls",
"securitySettings": {
"certificate": [
{
"certificate_file": "0000000.pem",
"key_file": "0000000.key",
"usage": "ENCIPHERMENT"
}
]
},
"transport": "hysteria2",
"transportSettings": {
"congestion": {
"type": "bbr"
},
"password": "000000000000000000000",
"use_udp_extension": true
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}

View File

@ -0,0 +1,58 @@
{
"log": {
"error": {
"level": "Debug",
"type": "Console"
},
"access": {
"type": "None"
}
},
"outbounds": [
{
"protocol": "vmess",
"settings": {
"address": "",
"port": 23454,
"uuid": "934d4533-a99b-4d9e-981f-2d7b9497f088"
},
"streamSettings": {
"transport": "hysteria2",
"transportSettings": {
"password": "52ox2wx75d7j8qk63e6qaayx9p2pllfv9asn",
"congestion": {
"type": "bbr"
},
"use_udp_extension": true
},
"security": "tls",
"securitySettings": {
"server_name": "doubleclick.net",
"allow_insecure_if_pinned_peer_certificate": true,
"pinned_peer_certificate_chain_sha256": [
"ZDc/ImNDWn5xyFxcKuorq/k44/V/4rww2NlUFOlQWmY="
]
}
}
}
],
"inbounds": [
{
"protocol": "socks",
"settings": {
"udpEnabled": true,
"address": "127.0.0.1",
"packetEncoding": "Packet"
},
"port": 34479,
"listen": "127.0.0.1"
},
{
"protocol": "http",
"settings": {
},
"port": 34480,
"listen": "127.0.0.1"
}
]
}

View File

@ -0,0 +1,48 @@
{
"log": {
"access": {
"type": "None"
},
"error": {
"level": "Debug",
"type": "Console"
}
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 100000,
"protocol": "vmess",
"settings": {
"users": [
"0000000-0000000-0000000-0000000-0000000"
]
},
"streamSettings": {
"security": "tls",
"securitySettings": {
"certificate": [
{
"certificate_file": "000000000000000000000.pem",
"key_file": "000000000000000000000.key",
"usage": "ENCIPHERMENT"
}
]
},
"transport": "hysteria2",
"transportSettings": {
"congestion": {
"type": "bbr"
},
"password": "000000000000000000000000000000000000000000",
"use_udp_extension": true
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}