V2rayN是一个基于V2ray核心的Windows客户端,功能强大且支持多种协议。V2rayN 4.0版本开始取消PAC模式,给许多用户使用上带来困难。鉴于此,本文介绍最新V2rayN 4.12正式版的配置教程,让你能顺利切换PAC模式和全局模式。
V2rayN 4.12配置教程
老规矩,使用V2rayN实现科学上网的前提条件是:
- 已有V2ray节点,请参考 v2ray一键脚本/Xray一键脚本 或 获取科学上网服务端信息;
- 到这个页面 V2Ray windows客户端下载 下载V2rayN并解压。V2rayN是绿色软件,解压后直接能用,不需要安装。
首先. 进入解压后的V2rayN-core目录,双击”v2rayN”文件,程序启动后会最小化到右下角的托盘(桌面右下角,显示时间输入法那块)。双击蓝色的V字小图标,打开V2rayN的主界面:
接下来,如果用了VLESS或者XTLS技术,请更换为Xray内核,否则可能无法正常连接到节点!操作为:点击“设置” -> “参数设置” -> “V2rayN设置” -> “Core类型”,选择“Xray_core”,然后点击确定:
接着添加新的V2ray节点:点击界面上方的“服务器”,按照自己节点类型选择,注意VMess服务器和VLESS服务器是不同的!
这里以我们以手动VLESS服务器为例进行说明,根据V2ray节点信息填写地址、端口、用户ID等、流控等信息。VLESS协议不需要额外id(alterID),所以不需要填写。反过来说如果你看到要填写额外ID,说明服务器类型选错了!
底层传输安全那里,建议跳过证书验证为false,证书过期或者上不了外网再改成true。SNI填写伪装域名,也就是保持和伪装域名那里填的一样就可以了:
配置好后点击确定,主界面出现了节点的简要信息。可以双击节点那一行再次出来上面的配置界面修改配置,也可以点击右键删除、移动该节点:
配置好节点后需要设置系统代理才能让浏览器访问外网,操作为:右下角托盘找到v2rayN图标,在图标上点击右键,找到“系统代理” ,点击“自动配置系统代理”,此时图标会变成红色:
默认v2rayN是全局代理,也就是不管访问什么网站,都是走节点流量。大部分网友之前用v2rayN都是PAC模式,v2rayN 4.0版本开始取消了PAC,因此需要下面的操作来代替PAC:
主界面点击“设置” -> “路由设置” -> “基础功能” -> “一键导入基础规则”,然后点击“确定”:
域名策略一般建议选“IPIfNotMatch”或者“ASIS”,也可以按照需求选其他的
接下来访问百度、淘宝等国外网站都是直连,不会再走代理了。如果想让某个网站走代理而不是直连,那么在上图中“代理的Domain或IP”的左边加一行:domain:网站域名
,例如添加本站走代理:domain:v2xtls.org,然后点击“确定”。
想换成所有网站都走代理又该怎么操作呢?方法也很简单:上图中“直连的Domain或IP”,把左边和右边输入框的行都清空,然后点击“确定”。
V2ray节点没挂,你配置又没问题的话,接下来应该能愉快的上外网了。
如果不想上外网了,右下角托盘找到v2rayN图标,在图标上点击右键,找到“系统代理” ,点击“清除系统代理”
注意:如果看完上面的教程还是没搞懂新版V2rayN怎么用,建议下载3.29版本:https://v2xtls.org/download.php?filename=/v2/windows/v2rayN-v3.29.zip,然后按照 V2rayN配置教程 操作。
查看V2rayN日志
配置好后不能上外网,请先参考 PC端科学上网常见问题,不能解决再复制V2rayN日志错误信息,然后在本教程下面留言。
V2rayN的日志在主界面下面的黑框框里,不能上外网的话一般会输出类似下面的日志:
V2rayN报病毒
由于一些原因,V2rayN在Windows上可能会报病毒导致无法正常使用:
如果不放心V2rayN,可以换其他客户端,比如 Clash for Windows,或者试试从官网下载的版本。但一般来说这都是Windows的误报,添加到例外即可。操作为:点击右下角托盘的Windows安全中心 -> “病毒和威胁防护” -> “保护历史记录” -> “已隔离威胁” -> “操作”,点击“还原”。如果V2rayN界面里还是提示病毒,找到同一个界面,操作点击“允许”:
总结
尽管移除了PAC模式,但V2rayN还是Windows上最好用的V2ray、trojan客户端之一,非常推荐!
[VLESS] 233boy-tcp-38.244.3.49(38***49:36094)
v2rayN – V7.13.6 – X64 | E:\xlxz\v2rayN-v7.13.6\v2rayN-windows-64\ | E:\xlxz\v2rayN-v7.13.6\v2rayN-windows-64\v2rayN.exe | Microsoft Windows NT 6.1.7601 Service Pack 1
启动服务 (2025/08/18 10:41:48)…
Exception 0xc0000005 0x8 0x0 0x0
PC=0x0
runtime.asmstdcall(0x400)
runtime/sys_windows_amd64.s:76 +0x89 fp=0x25f740 sp=0x25f720 pc=0x1412fe9
rax 0x0
rbx 0x2ec5758
rcx 0x2f0fba8
rdx 0x20
rdi 0x7fffffdd000
rsi 0x25f938
rbp 0x25f880
rsp 0x25f718
r8 0x2ec5460
r9 0x2f0f46b
r10 0x0
r11 0x246
r12 0x25f998
r13 0xc000004000
r14 0x2ec37a0
r15 0x3
rip 0x0
rflags 0x10246
cs 0x33
fs 0x53
gs 0x2b
运行 Core 失败,请查看提示信息
这个信息看不出什么来,要不换一个core试试?
大佬,这个是什么问题
2025/7/18 12:59:56 系统代理设置改变
2025/07/18 13:00:55 [Warning] [1333695688] proxy/http: failed to read response from ipv6.msftconnecttest.com > unexpected EOF
2025/07/18 13:00:55 [Warning] [1333695688] app/proxyman/inbound: connection ends > proxy/http: connection ends > proxy/http: failed to write response > write tcp 127.0.0.1:10809->127.0.0.1:50951: wsasend: An existing connection was forcibly closed by the remote host.
2025/07/18 13:00:56 [Warning] [2288596460] proxy/http: failed to read response from http://www.msftconnecttest.com > unexpected EOF
2025/07/18 13:00:56 [Warning] [2288596460] app/proxyman/inbound: connection ends > proxy/http: connection ends > proxy/http: failed to write response > write tcp 127.0.0.1:10809->127.0.0.1:50965: wsasend: An existing connection was forcibly closed by the remote host.
2025/07/18 13:00:56 [Warning] [2004477686] proxy/http: failed to read response from ipv6.msftconnecttest.com > unexpected EOF
2025/07/18 13:00:56 [Warning] [2004477686] app/proxyman/inbound: connection ends > proxy/http: connection ends > proxy/http: failed to write response > write tcp 127.0.0.1:10809->127.0.0.1:50968: wsasend: An existing connection was forcibly closed by the remote host.
节点挂了或者配置有问题,如果手机上能用,应该是配置错误或者其他软件干扰了,可以试试重启电脑
Xray 25.1.1 (Xray, Penetrates Everything.) e80ca67 (go1.23.4 windows/amd64)
A unified platform for anti-censorship.
2025/06/17 16:30:13 [Info] infra/conf/serial: Reading config: &{Name:config.json Format:json}
Failed to start: app/proxyman/inbound: failed to listen TCP on 10808 > transport/internet: failed to listen on address: 127.0.0.1:10808 > transport/internet/tcp: failed to listen TCP on 127.0.0.1:10808 > listen tcp 127.0.0.1:10808: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
运行 Core 失败,请查看提示信息
2025/06/17 16:30:15 当前延迟: 213 ms,(US) 23.224.33.72
[VLESS] 测试2(23***72:443)
v2rayN – V7.10.5 – X64 | C:\Users\11611\Downloads\v2rayN-v7.10.5\v2rayN-windows-64-SelfContained\ | C:\Users\11611\Downloads\v2rayN-v7.10.5\v2rayN-windows-64-SelfContained\v2rayN.exe | Microsoft Windows NT 10.0.22631.0
启动服务(2025/06/17 16:30:29)…
Xray 25.1.1 (Xray, Penetrates Everything.) e80ca67 (go1.23.4 windows/amd64)
A unified platform for anti-censorship.
2025/06/17 16:30:29 [Info] infra/conf/serial: Reading config: &{Name:config.json Format:json}
[VLESS] 测试2(23***72:443)
Failed to start: app/proxyman/inbound: failed to listen TCP on 10808 > transport/internet: failed to listen on address: 127.0.0.1:10808 > transport/internet/tcp: failed to listen TCP on 127.0.0.1:10808 > listen tcp 127.0.0.1:10808: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
2025/06/17 16:30:34 当前延迟: 212 ms,(US) 23.224.33.72
其它软件干扰了v2rayN的运行,重启电脑,先打开v2rayN再打开qq等软件
Xray 25.1.1 (Xray, Penetrates Everything.) e80ca67 (go1.23.4 windows/amd64)
A unified platform for anti-censorship.
2025/06/17 20:46:59 [Info] infra/conf/serial: Reading config: &{Name:config.json Format:json}
2025/06/17 20:47:01 [Warning] core: Xray 25.1.1 started
[VLESS] 测试2(23***72:443)
2025/06/17 20:47:02 [Warning] [2507836847] app/proxyman/inbound: connection ends > proxy/http: failed to read http request > malformed HTTP request “\x00”
2025/06/17 20:47:02 from tcp:127.0.0.1:58140 accepted tcp:www.google.com:443 [socks >> proxy]
2025/06/17 20:47:04 [Warning] [959509747] app/proxyman/inbound: connection ends > proxy/http: failed to read http request > malformed HTTP request “\x00”
2025/06/17 20:47:04 from tcp:127.0.0.1:58160 accepted tcp:api.ip.sb:443 [socks >> proxy]
2025/06/17 20:47:04 当前延迟: 216 ms,(US) 23.224.33.72
重启后,运行是这样的
节点配置有问题或者节点挂了
大神好,我现在是配置家里面第二台电脑,第一台已经用了很久了,今天这个第二台一直按照步骤搞不定,麻烦您看下这个报错,谢谢!一直用的V2rayN
启动服务 (2025/05/18 20:37:33)…
Xray 25.1.1 (Xray, Penetrates Everything.) e80ca67 (go1.23.4 windows/amd64)
A unified platform for anti-censorship.
2025/05/18 20:37:33 [Info] infra/conf/serial: Reading config: &{Name:config.json Format:json}
[VMess] c44s3.portablesubmarines.com(198***5:9000)
2025/05/18 20:37:33 [Warning] core: Xray 25.1.1 started
2025/05/18 20:37:34 [Warning] [2454598336] app/proxyman/inbound: connection ends > proxy/http: failed to read http request > malformed HTTP request “\x00”
2025/05/18 20:37:34 from tcp:127.0.0.1:57705 accepted tcp:www.google.com:443 [socks -> proxy]
建议直接拷贝第一台电脑的v2rayn文件夹到第二台上直接用
6.55版本配置跟教程不太一样,配置之后客户端报错。。
启动服务(2025/03/14 01:12:55)…
Xray 1.8.16 (Xray, Penetrates Everything.) 9432a60 (go1.22.4 windows/amd64)
A unified platform for anti-censorship.
2025/03/14 01:12:55 Using default config: C:\software\v2rayN-v6.55\v2rayN-With-Core\guiConfigs\config.json
2025/03/14 01:12:55 [Info] infra/conf/serial: Reading config: C:\software\v2rayN-v6.55\v2rayN-With-Core\guiConfigs\config.json
Failed to start: main: failed to load config files: [C:\software\v2rayN-v6.55\v2rayN-With-Core\guiConfigs\config.json] > infra/conf: Failed to build REALITY config. > infra/conf: empty “fingerprint”
2025/03/14 01:12:55 Using default config: C:\software\v2rayN-v6.55\v2rayN-With-Core\guiConfigs\config.json
2025/03/14 01:12:55 系统代理设置改变 – ForcedClear
2025/03/14 01:13:02 当前服务的真连接延迟: -1 ms
footprint或者指纹那里选一个,比如chrome或者firefox