常用域名路由分流配置文件汇总|解锁奈飞、动画疯、迪士尼|ipv4/ipv6分流

linux admin 2个月前 (05-21) 254次浏览 0个评论

群里有小伙伴询问路由分流的配置文件写法,我来将个人常用的分流配置简单汇总下。我这里只包含outbounds和routing部分,配置文件中的参数不要照抄,请根据自己的实际情况自行替换。

#分流1 
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "VPS1",
      "protocol": "shadowsocks",
      "settings": {
        "servers": [
          {
            "address": "8.8.8.8",
            "method": "aes-128-gcm",
            "ota": false,
            "password": "passwd",
            "port": 7899
          }
        ]
      }
    }
  ],
  "routing": {
    "rules": [
      {
        "type": "field",
        "outboundTag": "VPS1",
        "domain": ["geosite:netflix","geosite:google","geosite:youtube","geosite:disney","geosite:bahamut"]
      }
    ]
  }

#分流2  
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "VPS1",
      "protocol": "socks",
      "settings": {
        "servers": [
          {
            "address": "8.8.8.8",
            "ota": false,
            "port": 7899,
            "users": [
              {
                "user": "admin",
                "pass": "passwd"
              }
            ]
          }
        ]
      }
    }
  ],
  "routing": {
    "rules": [
      {
        "type": "field",
        "outboundTag": "VPS1",
        "domain": ["geosite:netflix","geosite:google","geosite:youtube","geosite:disney","geosite:bahamut"]
      }
    ]
  }

#任意门
	{
      "port": 30784,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "8.8.8.8",
        "port": 7899,
        "network": "tcp,udp"
      }
    }

#转发
  "outbounds": [
    {
      "tag": "VPS1",
      "protocol": "shadowsocks",
      "settings": {
        "servers": [
          {
            "address": "8.8.8.8",
            "method": "aes-128-gcm",
            "ota": false,
            "password": "passwd",
            "port": 7899
          }
        ]
      }
    }
  ],
  "routing": {
    "rules": [ ]
  }

#转发2
  "outbounds": [
    {
      "tag": "VPS1",
      "protocol": "socks",
      "settings": {
        "servers": [
          {
            "address": "8.8.8.8",
            "ota": false,
            "port": 7899,
            "users": [
              {
                "user": "admin",
                "pass": "passwd"
              }
            ]
          }
        ]
      }
    }
  ],
  "routing": {
    "rules": [
      
    ]
  }

#IPV4
	"outbounds": [
    {
      "tag":"IP4_out",
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "UseIPv4"
      }
    }
	]

#IPV6
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag":"IP6_out",
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "UseIPv6"
      }
    }
  ],
  "routing": {
    "rules": [
      {
        "type": "field",
        "outboundTag": "IP6_out",
        "domain": ["geosite:netflix","geosite:google","geosite:youtube","geosite:disney","geosite:bahamut"]
      }
    ]
  }

#DNS分流1
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {"domainStrategy": "UseIP"}
    }
  ],
  "routing": {
    "rules": [ ]
  },
  "dns": {
    "servers": [
      "8.8.8.8",
      {
        "address": "11.11.11.11",
        "port": 53,
        "domains": ["geosite:netflix","geosite:google","geosite:youtube","geosite:disney","geosite:bahamut"]
      }
    ]
  }

#屏蔽cn
"outbounds": [
    {
      "protocol": "freedom",
      "settings": {},
	  "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
"routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api"
      },
      {
        "type": "field",
        "outboundTag": "blocked",
        "domain": [
          "geosite:cn"
        ]
      },
      {
        "type": "field",
        "outboundTag": "blocked",
        "ip": [
          "geoip:cn"
        ]
      },
      {
        "type": "field",
        "outboundTag": "blocked",
        "ip": [
          "geoip:private"
        ]
      },
      {
        "type": "field",
        "outboundTag": "blocked",
        "protocol": [
          "bittorrent"
        ]
      }
    ]
  }

#对外开放 v2ray 的 DNS 服务
{
    "inbounds": [
        {
            "tag": "dns-in",
            "port": 53,
            "protocol": "dokodemo-door",
            "settings": {
                "address": "8.8.8.8",
                "port": 53,
                "network": "tcp,udp",
                "userLevel": 1
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "dns",
            "tag": "dns-out"
        }
    ],
    "routing": {
        "rules": [
            {
                "type": "field",
                "inboundTag": [
                    "dns-in"
                ],
                "outboundTag": "dns-out"
            }
        ]
    }
}

 

 


VPS小白 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址