Your commit message
This commit is contained in:
BIN
v2ray示例/旁路由-透明代理/Xray透明代理配置/geoip.dat
Normal file
BIN
v2ray示例/旁路由-透明代理/Xray透明代理配置/geoip.dat
Normal file
Binary file not shown.
40452
v2ray示例/旁路由-透明代理/Xray透明代理配置/geosite.dat
Normal file
40452
v2ray示例/旁路由-透明代理/Xray透明代理配置/geosite.dat
Normal file
File diff suppressed because one or more lines are too long
191
v2ray示例/旁路由-透明代理/Xray透明代理配置/v2ray透明代理配置-2.json
Normal file
191
v2ray示例/旁路由-透明代理/Xray透明代理配置/v2ray透明代理配置-2.json
Normal file
@@ -0,0 +1,191 @@
|
||||
// https://guide.v2fly.org/app/tproxy.html#%E4%B8%BA-v2ray-%E9%85%8D%E7%BD%AE%E9%80%8F%E6%98%8E%E4%BB%A3%E7%90%86%E7%9A%84%E5%85%A5%E7%AB%99%E5%92%8C-dns-%E5%88%86%E6%B5%81
|
||||
{
|
||||
"inbounds": [
|
||||
{
|
||||
"tag":"transparent",
|
||||
"port": 12345,
|
||||
"protocol": "dokodemo-door",
|
||||
"settings": {
|
||||
"network": "tcp,udp",
|
||||
"followRedirect": true
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"tproxy": "tproxy", // 透明代理使用 TPROXY 方式
|
||||
"mark":255
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"port": 1080,
|
||||
"protocol": "socks", // 入口协议为 SOCKS 5
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": ["http", "tls"]
|
||||
},
|
||||
"settings": {
|
||||
"auth": "noauth"
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"tag": "proxy",
|
||||
"protocol": "vmess", // 代理服务器
|
||||
"settings": {
|
||||
"vnext": [
|
||||
...
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"mark": 255
|
||||
}
|
||||
},
|
||||
"mux": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "direct",
|
||||
"protocol": "freedom",
|
||||
"settings": {
|
||||
"domainStrategy": "UseIP"
|
||||
},
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"mark": 255
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "block",
|
||||
"protocol": "blackhole",
|
||||
"settings": {
|
||||
"response": {
|
||||
"type": "http"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "dns-out",
|
||||
"protocol": "dns",
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"mark": 255
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dns": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "223.5.5.5", //中国大陆域名使用阿里的 DNS
|
||||
"port": 53,
|
||||
"domains": [
|
||||
"geosite:cn",
|
||||
"ntp.org", // NTP 服务器
|
||||
"$myserver.address" // 此处改为你 VPS 的域名
|
||||
]
|
||||
},
|
||||
{
|
||||
"address": "114.114.114.114", //中国大陆域名使用 114 的 DNS (备用)
|
||||
"port": 53,
|
||||
"domains": [
|
||||
"geosite:cn",
|
||||
"ntp.org", // NTP 服务器
|
||||
"$myserver.address" // 此处改为你 VPS 的域名
|
||||
]
|
||||
},
|
||||
{
|
||||
"address": "8.8.8.8", //非中国大陆域名使用 Google 的 DNS
|
||||
"port": 53,
|
||||
"domains": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
},
|
||||
{
|
||||
"address": "1.1.1.1", //非中国大陆域名使用 Cloudflare 的 DNS
|
||||
"port": 53,
|
||||
"domains": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"routing": {
|
||||
"domainStrategy": "IPOnDemand",
|
||||
"rules": [
|
||||
{ // 劫持 53 端口 UDP 流量,使用 V2Ray 的 DNS
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"transparent"
|
||||
],
|
||||
"port": 53,
|
||||
"network": "udp",
|
||||
"outboundTag": "dns-out"
|
||||
},
|
||||
{ // 直连 123 端口 UDP 流量(NTP 协议)
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"transparent"
|
||||
],
|
||||
"port": 123,
|
||||
"network": "udp",
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
// 设置 DNS 配置中的国内 DNS 服务器地址直连,以达到 DNS 分流目的
|
||||
"223.5.5.5",
|
||||
"114.114.114.114"
|
||||
],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
// 设置 DNS 配置中的国外 DNS 服务器地址走代理,以达到 DNS 分流目的
|
||||
"8.8.8.8",
|
||||
"1.1.1.1"
|
||||
],
|
||||
"outboundTag": "proxy" // 改为你自己代理的出站 tag
|
||||
},
|
||||
{ // 广告拦截
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"geosite:category-ads-all"
|
||||
],
|
||||
"outboundTag": "block"
|
||||
},
|
||||
{ // BT 流量直连
|
||||
"type": "field",
|
||||
"protocol":["bittorrent"],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{ // 直连中国大陆主流网站 ip 和 保留 ip
|
||||
"type": "field",
|
||||
"ip": [
|
||||
"geoip:private",
|
||||
"geoip:cn"
|
||||
],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
{ // 直连中国大陆主流网站域名
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
],
|
||||
"outboundTag": "direct"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
150
v2ray示例/旁路由-透明代理/Xray透明代理配置/xray透明代理配置-1.json
Normal file
150
v2ray示例/旁路由-透明代理/Xray透明代理配置/xray透明代理配置-1.json
Normal file
@@ -0,0 +1,150 @@
|
||||
// 为了更好的分流体验,请替换默认路由规则文件为 Loyalsoldier/v2ray-rules-dat,否则 Xray-core 将无法加载本配置。
|
||||
//
|
||||
//sudo curl -oL /usr/local/share/xray/geoip.dat https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat
|
||||
//sudo curl -oL /usr/local/share/xray/geosite.dat https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat
|
||||
|
||||
// https://xtls.github.io/document/level-2/tproxy.html#xray-%E9%85%8D%E7%BD%AE
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning",
|
||||
"error": "/var/log/xray/error.log",
|
||||
"access": "/var/log/xray/access.log"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"tag": "all-in",
|
||||
"port": 12345,
|
||||
"protocol": "dokodemo-door",
|
||||
"settings": {
|
||||
"network": "tcp,udp",
|
||||
"followRedirect": true
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": ["http", "tls"]
|
||||
},
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"tproxy": "tproxy"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"tag": "direct",
|
||||
"protocol": "freedom",
|
||||
"settings": {
|
||||
"domainStrategy": "UseIPv4"
|
||||
},
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"mark": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "proxy",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "服务端域名",
|
||||
"port": 443,
|
||||
"users": [
|
||||
{
|
||||
"id": "UUID",
|
||||
"flow": "xtls-rprx-splice",
|
||||
"encryption": "none"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"sockopt": {
|
||||
"mark": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "block",
|
||||
"protocol": "blackhole",
|
||||
"settings": {
|
||||
"response": {
|
||||
"type": "http"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "dns-out",
|
||||
"protocol": "dns",
|
||||
"settings": {
|
||||
"address": "8.8.8.8"
|
||||
},
|
||||
"proxySettings": {
|
||||
"tag": "proxy"
|
||||
},
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"mark": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dns": {
|
||||
"hosts": {
|
||||
"服务端域名": "服务端 IP"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"address": "119.29.29.29",
|
||||
"port": 53,
|
||||
"domains": ["geosite:cn"],
|
||||
"expectIPs": ["geoip:cn"]
|
||||
},
|
||||
{
|
||||
"address": "223.5.5.5",
|
||||
"port": 53,
|
||||
"domains": ["geosite:cn"],
|
||||
"expectIPs": ["geoip:cn"]
|
||||
},
|
||||
"8.8.8.8",
|
||||
"1.1.1.1",
|
||||
"https+local://doh.dns.sb/dns-query"
|
||||
]
|
||||
},
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"inboundTag": ["all-in"],
|
||||
"port": 53,
|
||||
"outboundTag": "dns-out"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"ip": ["8.8.8.8", "1.1.1.1"],
|
||||
"outboundTag": "proxy"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"domain": ["geosite:category-ads-all"],
|
||||
"outboundTag": "block"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"domain": ["geosite:geolocation-!cn"],
|
||||
"outboundTag": "proxy"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"ip": ["geoip:telegram"],
|
||||
"outboundTag": "proxy"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"tag": "proxy",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "43.154.83.213",
|
||||
"port": 29999,
|
||||
"users": [
|
||||
{
|
||||
"id": "fc903f5d-a007-482b-928c-570da9a851f9",
|
||||
"alterId": 0,
|
||||
"email": "192.168.11.19@qq.com",
|
||||
"security": "auto",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-direct"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"xtlsSettings": {
|
||||
"serverName": "tencent-hk-11.17.107421.xyz",
|
||||
"allowInsecure": true,
|
||||
"rejectUnknownSni": false,
|
||||
"alpn": [
|
||||
"h2",
|
||||
"http/1.1"
|
||||
],
|
||||
"minVersion": "1.2",
|
||||
"maxVersion": "1.3"
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
25
v2ray示例/旁路由-透明代理/Xray透明代理配置/更新geoip的脚本.sh
Normal file
25
v2ray示例/旁路由-透明代理/Xray透明代理配置/更新geoip的脚本.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
LogPath=/var/log/xray/geoip_update.log
|
||||
|
||||
|
||||
rm -rf /usr/local/share/xray/geosite.dat
|
||||
rm -rf /usr/local/share/xray/geoip.dat
|
||||
echo "current time is $(date), start to update geo ip for xray" >> $LogPath
|
||||
|
||||
curl --connect-timeout 5 -s -o /dev/null https://www.google.com
|
||||
if [[ $? -eq 0 ]];then
|
||||
echo "start to download from github !"
|
||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -O /usr/local/share/xray/geosite.dat
|
||||
|
||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat -O /usr/local/share/xray/geoip.dat
|
||||
else
|
||||
echo "start to download from jsdelivr !"
|
||||
wget https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat -O /usr/local/share/xray/geosite.dat
|
||||
|
||||
wget https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat -O /usr/local/share/xray/geoip.dat
|
||||
fi
|
||||
|
||||
|
||||
echo "start to restrat xray !" >> $LogPath
|
||||
systemctl restart xray
|
||||
40
v2ray示例/旁路由-透明代理/Xray透明代理配置/香港Xray节点.json
Normal file
40
v2ray示例/旁路由-透明代理/Xray透明代理配置/香港Xray节点.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"tag": "proxy",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "43.154.83.213",
|
||||
"port": 29999,
|
||||
"users": [
|
||||
{
|
||||
"id": "fc903f5d-a007-482b-928c-570da9a851f9",
|
||||
"alterId": 0,
|
||||
"email": "192.168.11.19@qq.com",
|
||||
"security": "auto",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-direct"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"xtlsSettings": {
|
||||
"serverName": "tencent-hk-11.17.107421.xyz",
|
||||
"allowInsecure": true,
|
||||
"rejectUnknownSni": false,
|
||||
"alpn": [
|
||||
"h2",
|
||||
"http/1.1"
|
||||
],
|
||||
"minVersion": "1.2",
|
||||
"maxVersion": "1.3"
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user