前言
随着ChatGPT等服务的流行,越来越多人希望访问ChatGPT。然而,一般用户不具备自建节点的能力,若使用迷雾通、一元机场等IP不干净的节点(体现在验证码多、无法访问Netflix和ChatGPT等),则处处受阻。现在,我将尽量以技术小白也能听懂的白话介绍WGCF和Sing-Box,利用它就可以“全局代理化”那些不支持全局代理的翻墙服务,还能进行后置代理。
第一节:全局化迷雾通
众所周知,迷雾通新版本不支持全局代理。只能通过系统代理的方式代理浏览器,若相关应用程序不遵循系统代理,则你的IP就泄露了。若没有访问ChatGPT的要求,实现该节内容就能做到足够的匿名(网络层面),配合正确配置的沙盒、虚拟机,即便是国产软件也难以获得你的真实IP。该方法亦可用于游戏加速,因为大部分游戏亦不遵循系统代理。
第一步我们需要下载sing-box。sing-box可以自行编译,也能下载二进制文件。二进制文件请前往GitHub下载对应操作系统的版本,如64位Windows就下载windows-amd64.zip。GitHub Release
编译安装参照Sing-Box官方文档,Google就可以搜到。本文不介绍过多技术,一般下载二进制文件(即exe)即可,若对二进制文件不放心的用户才需要编译。
来到了第二步。你应该已经下载或编译完Sing-Box了,得到的是一个exe,将它放入空目录中(称为工作环境),以管理员身份打开终端(Win+X键可找到该选项),进入该目录(复制该目录的绝对路径,输入cd+路径,如目录为C:\sing-box,指令就是cd C:\sing-box),待命。接下来创建配置文件,请使用你喜欢的文本编辑器新建一个文档,扩展名为json(如果不会改文件扩展名请Google解决),完整粘贴代码格内所有内容
配置文件,假设你想全局化迷雾通。
{
"dns": {
"servers": [
{
"tag": "dot",
"address": "tls://1.1.1.1"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"rules": [
{
"geosite": "category-ads-all",
"server": "block",
"disable_cache": true
}
],
"strategy": "prefer_ipv4"
},
"inbounds": [
{
"type": "tun",
"interface_name": "singbox_tun",
"inet4_address": "172.19.0.1/30",
"inet6_address": "fdfe:dcba:9876::1/126",
"mtu": 9000,
"auto_route": true,
"strict_route": true,
"stack": "system",
"endpoint_independent_nat": false,
"sniff": true
}
],
"outbounds": [
{
"type": "socks",
"tag": "proxy",
"udp_fragment": true,
"server": "127.0.0.1",
"server_port": 9909
},
{
"type": "block",
"tag": "block"
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "dns",
"tag": "dns_out"
}
],
"route": {
"auto_detect_interface": true,
"rules": [
{
"protocol": "dns",
"outbound": "dns_out"
},
{
"process_name": [ "geph4-client.exe","gephgui-wry.exe"],
"outbound": "direct"
}
],
"final": "proxy"
}
}
然后保存。我假设你保存的配置命名为geph.json。还记得刚刚让你打开终端待命吗?现在可以使用终端了。输入./sing-box.exe run -c geph.json ,回车后即可开启tun全局模式。你可以禁用系统代理了!
第二节,WGCF“洗白”迷雾通,使其可访问ChatGPT
当上节内容完成后,并成功联网,你可以进入第二节。下载WGCF,把可执行文件(EXE)解压进上节所述的工作目录,将wgcf_2.2.15_windows_amd64.exe改名为wgcf.exe使得指令更简洁。同样使用终端,输入 ./wgcf.exe register ,同意ToS后输入./wgcf generate ,注意务必在上节的“全局代理”开启情况下执行!执行结束后,工作目录下应出现wgcf-profile.conf。打开该文件,我们只需要复制其中:private_key = xxxxxx 的xxxxxx部分内容。使用我提供的新配置文件,保存为geph-wgcf.json,并自行复制private_key后的私钥字段替换配置里的“替换该字段”字段。
{
"dns": {
"servers": [
{
"tag": "dot",
"address": "tls://1.1.1.1"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"rules": [
{
"geosite": "category-ads-all",
"server": "block",
"disable_cache": true
}
],
"strategy": "prefer_ipv4"
},
"inbounds": [
{
"type": "tun",
"interface_name": "singbox_tun",
"inet4_address": "172.19.0.1/30",
"inet6_address": "fdfe:dcba:9876::1/126",
"mtu": 9000,
"auto_route": true,
"strict_route": true,
"stack": "gVisor",
"endpoint_independent_nat": false,
"sniff": true
}
],
"outbounds": [
{
"type": "socks",
"tag": "proxy",
"udp_fragment": true,
"server": "127.0.0.1",
"server_port": 9909
},
{
"type": "wireguard",
"tag": "wireguard-out",
"server": "162.159.192.1",
"server_port": 2408,
"system_interface": false,
"interface_name": "wg0",
"local_address": [
"10.0.0.2/32"
],
"private_key": "替换该字段",
"peer_public_key": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=",
"workers": 4,
"mtu": 1420,
"detour": "proxy"
},
{
"type": "block",
"tag": "block"
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "dns",
"tag": "dns_out"
}
],
"route": {
"auto_detect_interface": true,
"rules": [
{
"protocol": "dns",
"outbound": "dns_out"
},
{
"process_name": [ "geph4-client.exe","gephgui-wry.exe"],
"outbound": "direct"
}
],
"final": "wireguard-out"
}
}
随后用第一节的方法重新启动sing-box,假设该配置文件保存为geph-wgcf.json:./sing-box run -c geph-wgcf.json
理论上您应该可以通过warp访问网络了。路径将是:本地网络->迷雾通网桥->迷雾通出口->WARP->目标网站,经过了三个代理节点。