跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 分享下V2RAY的config.json配置,如何只代理GITHUB
未分類
10 4 月 2020

分享下V2RAY的config.json配置,如何只代理GITHUB

rogerxu 大佬有话说 : 2020-3-18 08:40:19

分享下V2RAY的config.json配置,如何只代理GITHUB

本帖最后由 rogerxu 于 2020-3-18 08:44 编辑

昨天得到大佬帮助,帮解决了github单独代理的设置问题。
后来自己再琢磨了下,现在将心得总结到这里。
{
"log": {
    "loglevel": "warning",
    "access": "D:\v2ray\access.log",
    "error": "D:\v2ray\error.log"
},
"inbounds": [
    {
      "port": 1080,
      "protocol": "socks",
      "settings": {
      "auth": "noauth"
      }
      "tag": "special"
    }
],
"inbounds": [
    {
      "port": 1081,
      "protocol": "socks",
      "settings": {
      "auth": "noauth"
      }
      "tag": "ladder"
    }
],
"outbounds": [
    {
            "tag": "viaserver"
      "protocol": "vmess", // 出口协议
      "settings": {
      "vnext": [
          {
            "address": "serveraddr.com", // 服务器 IP 地址
            "port": 16823,// 服务器端口
            "users": [
            {
                "id": "b831381d-6324-4d53-ad4f-8cda48b30811",// 用户 ID,须与服务器端配置相同
                "alterId": 64
            }
            ]
          }
      ]
      }
    },
    {
            "tag": "direct"
      "protocol": "freedom",
      "settings": {}
    },
    {
            "tag": "block"
      "protocol": "blackhole",
      "settings": {}
    }
],
"routing": {
    "rules": [
      {
      "domain": [
          "domain:google.com",
          "geosite:github"
      ],
      "inboundTag": [
          "special"
      ],
      "outboundTag": "direct",
      "type": "field"
      },
      {
      "inboundTag": [
          "ladder"
      ],
      "outboundTag": "direct",
      "type": "field"
      },      
    ]
}
}

上面的代码,
1、定义了两个入站端口,1080和1081,直接是SOCKS代理,相信VMESS协议大家都会自己配的,分别叫“spacial”和“ladder”的名字。
2、定义了三个出站端方式:direct直连,block堵塞,viaserver走另一个服务器做踏板。
3、关键是routing里面定义了对special这个入口,并且要访问的域名是google和github的,就推到direct出口。对ladder这个入口的数据全推到viaserver出口。

xiao 大佬有话说 : 2020-3-18 08:41:09

V2这辈子只会一键yc022t
我哪知道啊,紫薯布丁

rogerxu 大佬有话说 : 2020-3-18 08:41:33

本帖最后由 rogerxu 于 2020-3-18 08:44 编辑

domain:google.com这里没用geosite,因为如果用geosite就将google的所有域名包括有图比都加进去了

hasamol7468 大佬有话说 : 2020-3-18 08:41:54

本帖最后由 hasamol7468 于 2020-3-18 08:45 编辑

:lol ​做​路​由 ​指​定​入​口​按​路​由​规​则​确​定​走​不​走 ​​​​
通过路由规则 还可以可以实现某一类ip或域名的请求 指定出入口 比方说前置代理与中转

hcyme 大佬有话说 : 2020-3-18 08:42:21

学习方法和政策

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具