v2rayN主界面

V2rayN 4.12配置教程

V2rayN是一个基于V2ray核心的Windows客户端,功能强大且支持多种协议。V2rayN 4.0版本开始取消PAC模式,给许多用户使用上带来困难。鉴于此,本文介绍最新V2rayN 4.12正式版的配置教程,让你能顺利切换PAC模式和全局模式。

V2rayN 4.12配置教程

老规矩,使用V2rayN实现科学上网的前提条件是:

  1. 已有V2ray节点,请参考 v2ray一键脚本/Xray一键脚本获取科学上网服务端信息
  2. 到这个页面 V2Ray windows客户端下载 下载V2rayN并解压。V2rayN是绿色软件,解压后直接能用,不需要安装。

首先. 进入解压后的V2rayN-core目录,双击”v2rayN”文件,程序启动后会最小化到右下角的托盘(桌面右下角,显示时间输入法那块)。双击蓝色的V字小图标,打开V2rayN的主界面:

v2rayN主界面

v2rayN主界面

接下来,如果用了VLESS或者XTLS技术,请更换为Xray内核,否则可能无法正常连接到节点!操作为:点击“设置” -> “参数设置” -> “V2rayN设置” -> “Core类型”,选择“Xray_core”,然后点击确定:

v2rayN切换Xray内核

v2rayN切换Xray内核

接着添加新的V2ray节点:点击界面上方的“服务器”,按照自己节点类型选择,注意VMess服务器和VLESS服务器是不同的

v2ray添加新服务器

v2ray添加新服务器

这里以我们以手动VLESS服务器为例进行说明,根据V2ray节点信息填写地址、端口、用户ID等、流控等信息。VLESS协议不需要额外id(alterID),所以不需要填写。反过来说如果你看到要填写额外ID,说明服务器类型选错了!

底层传输安全那里,建议跳过证书验证为false,证书过期或者上不了外网再改成true。SNI填写伪装域名,也就是保持和伪装域名那里填的一样就可以了:

v2rayN添加VLESS服务器

v2rayN添加VLESS服务器

配置好后点击确定,主界面出现了节点的简要信息。可以双击节点那一行再次出来上面的配置界面修改配置,也可以点击右键删除、移动该节点:

V2rayN添加了节点界面

V2rayN添加了节点界面

配置好节点后需要设置系统代理才能让浏览器访问外网,操作为:右下角托盘找到v2rayN图标,在图标上点击右键,找到“系统代理” ,点击“自动配置系统代理”,此时图标会变成红色:

v2rayN设置系统代理

v2rayN设置系统代理

默认v2rayN是全局代理,也就是不管访问什么网站,都是走节点流量。大部分网友之前用v2rayN都是PAC模式,v2rayN 4.0版本开始取消了PAC,因此需要下面的操作来代替PAC:

主界面点击“设置” -> “路由设置” -> “基础功能” -> “一键导入基础规则”,然后点击“确定”:

V2rayN设置PAC模式

V2rayN设置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日志

V2rayN报病毒

由于一些原因,V2rayN在Windows上可能会报病毒导致无法正常使用:

windows提示v2rayN病毒

windows提示v2rayN病毒

如果不放心V2rayN,可以换其他客户端,比如 Clash for Windows,或者试试从官网下载的版本。但一般来说这都是Windows的误报,添加到例外即可。操作为:点击右下角托盘的Windows安全中心 -> “病毒和威胁防护” -> “保护历史记录” -> “已隔离威胁” -> “操作”,点击“还原”。如果V2rayN界面里还是提示病毒,找到同一个界面,操作点击“允许”:

还原病毒提示

还原病毒提示

总结

尽管移除了PAC模式,但V2rayN还是Windows上最好用的V2ray、trojan客户端之一,非常推荐!

参考

V2rayN配置教程

Clash for Windows配置V2ray教程

《V2rayN 4.12配置教程》上有327条评论

  1. 大神您好,再请教下,我又试了,电脑连手机5G网,然后再用客户端就可以成功。然后连家里路由器,就不行了。请问这是为什么?

  2. 大佬,电脑时间和手机时间是一致的,然后配置也是直接手机导出来的,win7电脑可以,win11不行内外网都上不了
    配置成功
    [VMess] 香港(103***115:443)
    Microsoft Windows NT 10.0.22621.0 – 64
    启动服务(2024/05/02 15:57:31)…
    Xray 1.8.10 (Xray, Penetrates Everything.) 07ed094 (go1.22.1 windows/amd64)
    A unified platform for anti-censorship.
    2024/05/02 15:57:32 Using default config: D:\梯子\guiConfigs\config.json
    2024/05/02 15:57:32 [Info] infra/conf/serial: Reading config: D:\梯子\guiConfigs\config.json
    2024/05/02 15:57:32 [Warning] core: Xray 1.8.10 started
    2024/05/02 15:57:33 系统代理设置改变ForcedClear
    2024/05/02 15:57:33 127.0.0.1:63907 accepted //www.google.com:443 [http -> proxy]
    2024/05/02 15:57:33 当前服务的真连接延迟: -1 ms
    2024/05/02 15:57:36 系统代理设置改变ForcedChange
    2024/05/02 15:57:39 127.0.0.1:63914 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:39 127.0.0.1:63916 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:39 127.0.0.1:63917 accepted //pss.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:39 127.0.0.1:63918 accepted //ms.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:39 127.0.0.1:63922 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:39 127.0.0.1:63923 accepted //ms.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:39 127.0.0.1:63924 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:39 127.0.0.1:63925 accepted //pss.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:40 127.0.0.1:63930 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:40 127.0.0.1:63934 accepted //ms.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:40 127.0.0.1:63932 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:40 127.0.0.1:63933 accepted //pss.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:40 127.0.0.1:63938 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:40 127.0.0.1:63939 accepted //pss.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:40 127.0.0.1:63942 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:40 127.0.0.1:63943 accepted //ms.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:41 127.0.0.1:63946 accepted //content-autofill.googleapis.com:443 [http -> proxy]
    2024/05/02 15:57:41 127.0.0.1:63948 accepted //content-autofill.googleapis.com:443 [http -> proxy]
    2024/05/02 15:57:46 127.0.0.1:63951 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:46 127.0.0.1:63953 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:46 127.0.0.1:63954 accepted //pss.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:46 127.0.0.1:63955 accepted //ms.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:46 127.0.0.1:63963 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:46 127.0.0.1:63960 accepted //ms.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:46 127.0.0.1:63962 accepted //pss.bdstatic.com:443 [http -> proxy]
    2024/05/02 15:57:46 127.0.0.1:63961 accepted //www.baidu.com:443 [http -> proxy]
    2024/05/02 15:57:48 127.0.0.1:63969 accepted //content-autofill.googleapis.com:443 [http -> proxy]
    2024/05/02 15:57:48 127.0.0.1:63971 accepted //content-autofill.googleapis.com:443 [http -> proxy]
    2024/05/02 15:57:51 127.0.0.1:63973 accepted //content-autofill.googleapis.com:443 [http -> proxy]
    2024/05/02 15:57:51 127.0.0.1:63975 accepted //content-autofill.googleapis.com:443 [http -> proxy]

  3. 16:35:35 Using default config: C:\Users\Lojure\Desktop\v2rayN-Core\guiConfigs\config.json
    2024/05/07 16:35:35 [Info] infra/conf/serial: Reading config: C:\Users\Lojure\Desktop\v2rayN-Core\guiConfigs\config.json
    2024/05/07 16:35:35 [Warning] core: Xray 1.8.11 started
    2024/05/07 16:35:36 系统代理设置改变ForcedChange
    2024/05/07 16:35:36 127.0.0.1:64484 accepted //www.google.com:443 [http -> proxy]
    2024/05/07 16:35:38 当前服务的真连接延迟: -1 ms

  4. 2024/05/07 16:51:19 系统代理设置改变ForcedChange
    配置成功
    [VMess] JP2 – 日本2(scijp2***net:443)
    Microsoft Windows NT 10.0.19045.0 – 64
    启动服务(2024/05/07 16:51:19)…
    在文件夹 (C:\Users\Lojure\Desktop\v2rayN-Core\bin\Xray) 下未找到Core文件 (文件名:xray, wxray),请下载后放入文件夹,下载地址: https://github.com/XTLS/Xray-core/releases
    2024/05/07 16:51:19 系统代理设置改变ForcedChange
    2024/05/07 16:51:31 当前服务的真连接延迟: -1 ms

    那这个是缺少那个文件吗?

      1. 配置成功
        [VMess] JP1 – 日本1(scijp1***net:443)
        Microsoft Windows NT 10.0.19045.0 – 64
        启动服务(2024/05/07 17:06:33)…
        Xray 1.8.10 (Xray, Penetrates Everything.) 07ed094 (go1.22.1 windows/amd64)
        A unified platform for anti-censorship.
        2024/05/07 17:06:33 Using default config: C:\Users\Lojure\Desktop\v2rayN-With-Core\guiConfigs\config.json
        2024/05/07 17:06:33 [Info] infra/conf/serial: Reading config: C:\Users\Lojure\Desktop\v2rayN-With-Core\guiConfigs\config.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.
        2024/05/07 17:06:33 Using default config: C:\Users\Lojure\Desktop\v2rayN-With-Core\guiConfigs\config.json
        2024/05/07 17:06:34 系统代理设置改变ForcedChange

        还是无法打开网页

  5. 大神,你好!所有的设置都没问题,也可以ping通,但是显示 当前服务器真连接延迟-1,是什么问题呢?

  6. 2024/06/15 16:35:12 系统代理设置改变ForcedChange
    配置成功
    [VMess] new(8***6:2053)
    Microsoft Windows NT 10.0.22631.0 – 64
    启动服务(2024/06/15 16:35:12)…
    Xray 1.8.0 (Xray, Penetrates Everything.) Custom (go1.20.2 windows/amd64)
    2024/06/15 16:35:12 Using default config: D:\软件安装包\wangchao.info_v2rayN-With-Core\v2rayN-With-Core\guiConfigs\config.json
    A unified platform for anti-censorship.
    2024/06/15 16:35:12 [Info] infra/conf/serial: Reading config: D:\软件安装包\wangchao.info_v2rayN-With-Core\v2rayN-With-Core\guiConfigs\config.json
    2024/06/15 16:35:13 [Warning] core: Xray 1.8.0 started
    2024/06/15 16:35:13 系统代理设置改变ForcedChange
    2024/06/15 16:35:13 127.0.0.1:53310 accepted //www.google.com:443 [http -> proxy]
    2024/06/15 16:35:14 127.0.0.1:53312 accepted http://27.150.183.4:9001/static/libs/ext/common.js?v=1718440506548 [http -> direct]
    2024/06/15 16:35:14 127.0.0.1:53314 accepted http://27.150.183.4:9001/static/libs/layui/lay/modules/util.js?v=1718440506548 [http -> direct]
    2024/06/15 16:35:17 127.0.0.1:53316 accepted http://27.150.183.4:9001/static/libs/ext/tab.js?v=1718440506548 [http -> direct]
    2024/06/15 16:35:23 127.0.0.1:53318 accepted http://cdn-file.apkevery.com/cms/project_94/cfg_center/mod_list.js?t=2024061516:35 [http -> direct]
    2024/06/15 16:35:23 当前服务的真连接延迟: -1 ms

  7. 2024/06/18 10:06:40 tcp:127.0.0.1:59375 accepted tcp:api-feedback.meitu.com:443 [proxy]
    2024/06/18 10:06:50 tcp:127.0.0.1:59388 accepted tcp:api-feedback.meitu.com:443 [proxy]
    2024/06/18 10:07:00 tcp:127.0.0.1:59405 accepted tcp:api-feedback.meitu.com:443 [proxy]
    2024/06/18 10:07:02 [Warning] [1324090135] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: failed to find an available destination > v2ray.com/core/common/retry: [v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://120.195.181.165:13245/v2ray): > dial tcp 120.195.181.165:13245: i/o timeout] > v2ray.com/core/common/retry: all retry attempts failed
    2024/06/18 10:07:10 tcp:127.0.0.1:59427 accepted tcp:api-feedback.meitu.com:443 [proxy]
    2024/06/18 10:07:10 tcp:127.0.0.1:59430 accepted tcp:clientservices.googleapis.com:80 [proxy]
    2024/06/18 10:07:34 [Warning] [1505959148] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: failed to find an available destination > v2ray.com/core/common/retry: [v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://120.195.181.165:13245/v2ray): > dial tcp 120.195.181.165:13245: i/o timeout] > v2ray.com/core/common/retry: all retry attempts failed

  8. 2024/07/01 13:31:33 [Warning] [2940014834] 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:12983: wsasend: An established connection was aborted by the software in your host machine.
    2024/07/01 13:31:33 [Warning] [3458555932] 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:12984: wsasend: An established connection was aborted by the software in your host machine.
    2024/07/01 13:31:34 [Warning] [1540299461] 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:12991: wsasend: An established connection was aborted by the software in your host machine.
    2024/07/01 13:31:34 [Warning] [2029167666] 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:12992: wsasend: An established connection was aborted by the software in your host machine.
    2024/07/01 13:32:28 127.0.0.1:13026 accepted //cn.bing.com:443 [http -> direct]
    2024/07/01 13:32:37 127.0.0.1:13028 accepted //149.154.167.43:443 [http -> proxy]
    2024/07/01 13:32:37 127.0.0.1:13029 accepted http://149.154.167.43:80/api [http -> proxy]
    2024/07/01 13:32:38 [Warning] [3797011743] 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:13029: wsasend: An established connection was aborted by the software in your host machine.
    2024/07/01 13:32:51 127.0.0.1:13032 accepted //i.ytimg.com:443 [http -> proxy]
    2024/07/01 13:33:25 127.0.0.1:13058 accepted http://149.154.175.59:80/api [http -> proxy]
    2024/07/01 13:33:25 127.0.0.1:13059 accepted http://149.154.175.50:80/api [http -> proxy]
    2024/07/01 13:33:25 127.0.0.1:13056 accepted //149.154.175.59:443 [http -> proxy]
    2024/07/01 13:33:25 127.0.0.1:13057 accepted //149.154.175.50:443 [http -> proxy]
    2024/07/01 13:33:27 [Warning] [2392859913] 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:13059: wsasend: An established connection was aborted by the software in your host machine.
    2024/07/01 13:33:27 [Warning] [1807228751] 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:13058: wsasend: An established connection was aborted by the software in your host machine.

  9. 大佬, 请问我用电脑的v2RayN粘贴多个节点之后只有hy2的能识别进去, vmess的都没加进去是为啥

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注