Featured image of post [免费科学上网-7] Xui+Reality下Socks5分流设置

[免费科学上网-7] Xui+Reality下Socks5分流设置

Socks5分流,解锁ChatGPT访问限制(移动端,PC端)

Youtube上观看

前期准备:

一台已经安装好Ubuntu 22的VPS

第一步:安装X-UI

一、登录VPS

SSH客户端(FinalShell):https://www.hostbuf.com/t/988.html

二、安装x-ui

Github链接:https://github.com/FranzKafkaYu/x-ui

1
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)

三、添加一条Reality链接

第二步:安装WARP分流脚本

运行WARP解锁脚本

安装脚本:

Github链接:https://github.com/fscarmen/unlock_warp

1
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

配置命令:

1
warp [option] [lisence]

安装步骤

1、输入安装脚本

warp 001.webp

2、选择简体中文

warp 002.webp

3、选择第13项

warp 012.webp

4、安装Coudflare账户类型,这里可以任选一个。这里我们选warp+,如果您有自己的warp+账户,可以输入自己的licerse。

warp 013.webp

warp 014.webp

5、wireproxy安装完成后输入warp,看看是否安装成功

warp 015.webp

6、如果看到warp free wireproxy 已开启,sokcs5:127.0.0.1:40000说明安装成功

warp 016.webp

6、输入0,退出脚本

warp 017.webp

第三步:修改X-UI配置

通过对xui中模板配置,将指定网站分流到 socks5,实现移动端访问ChatGPT。

下面给出了分布设置代码及完整设置代码,完整代码中已经集成了openai分流设置。如果是按照上面步骤安装的脚本,直接复制粘贴完整代码到X-UI的配置项中即可完成配置。操作步骤查看下面的第4项。

出站流量设置

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//"outbounds"中添加下面代码(注意使用英文逗号):
    {
      "tag": "warp",
      "protocol": "socks",
      "settings": {
        "servers": [
          {
            "address": "127.0.0.1",
            "port": 40000
          }
        ]
      }
    },
    {
			"tag":"WARP-socks5-v4",
			"protocol":"freedom",
			"settings":{
        "domainStrategy":"UseIPv4"
        },
        "proxySettings":{
            "tag":"warp"
        }
			}

路由设置

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
//"routing"的"rules"中添加下面代码(注意使用英文逗号):
    "rules": [
			  {
	        "type": "field",
	        "outboundTag": "WARP-socks5-v4",
	        "domain": [
	          "geosite:openai",
	          "geosite:disney"
	        ]
	      }
      ]

完整代码

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
{
  "api": {
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ],
    "tag": "api"
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 62789,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "127.0.0.1"
      },
      "tag": "api"
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "warp",
      "protocol": "socks",
      "settings": {
        "servers": [
          {
            "address": "127.0.0.1",
            "port": 40000
          }
        ]
      }
    },
    {
	"tag":"WARP-socks5-v4",
	"protocol":"freedom",
	"settings":{
        "domainStrategy":"UseIPv4"
        },
        "proxySettings":{
            "tag":"warp"
        }
	},
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "handshake": 10,
        "connIdle": 100,
        "uplinkOnly": 2,
        "downlinkOnly": 3,
        "statsUserUplink": true,
        "statsUserDownlink": true,
        "bufferSize": 10240
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true
    }
  },
  "routing": {
    "rules": [
		  {
        "type": "field",
        "outboundTag": "WARP-socks5-v4",
        "domain": [
          "geosite:openai",
          "geosite:disney"
        ]
      },
      {
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "type": "field"
      },
      {
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked",
        "type": "field"
      },
      {
        "outboundTag": "blocked",
        "protocol": [
          "bittorrent"
        ],
        "type": "field"
      }
    ]
  },
  "stats": {}
}

操作步骤

登录X-UI控制面板

复制完整代码

warp 018.webp

清空源代码

setting -》Xray Config

warp 022.webp

粘贴代码

warp 019.webp

保存

warp 020.webp

重启X-UI面板

warp 021.webp

使用 Hugo 构建
主题 StackJimmy 设计