v2rayN主界面

V2rayN 4.12配置教程

本文转载自:https://v2raytech.com/v2rayn-4-12-config-tutorial/,如文中内容有错误请到原文查看原始版(最新版)

使用过程中遇到问题,欢迎到 网络跳越论坛 或 tg群组https://t.me/hijkclub 交流,或关注Youtube频道:网络跳越

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:v2raytech.com,然后点击“确定”。

想换成所有网站都走代理又该怎么操作呢?方法也很简单:上图中“直连的Domain或IP”,把左边和右边输入框的行都清空,然后点击“确定”。

V2ray节点没挂,你配置又没问题的话,接下来应该能愉快的上外网了。

如果不想上外网了,右下角托盘找到v2rayN图标,在图标上点击右键,找到“系统代理” ,点击“清除系统代理”

注意:如果看完上面的教程还是没搞懂新版V2rayN怎么用,建议下载3.29版本:https://netfiles.pw/download.php?filename=/v2/windows/v2rayN-v3.29.zip,然后按照 V2rayN配置教程 操作。

查看V2rayN日志

配置好后不能上外网,请先参考 PC端科学上网常见问题,不能解决再复制V2rayN日志错误信息,然后在本教程下面留言,或者到 网络跳越论坛 或 tg群组https://t.me/hijkclub 交流。

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配置教程》上有185条评论

  1. 2022/01/04 18:05:20 [Warning] [2888501809] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > proxy/vmess/outbound: failed to read header > proxy/vmess/encoding: failed to read response header > EOF
    安装好了报这个错误,vps时间和本地时间是一致的,不晓得为啥

  2. 谢谢大佬,配置成功了!vultr的服务器,namesilo的域名,V2ray-VMESS+WS+TLS,教程也太详细了!感谢🙇‍

  3. proxy/http: failed to read response from ntbst-4 > io: read/write on closed pipe
    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:59661: wsasend: An existing connection was forcibly closed by the remote host.
    我也是跑一段流量后出现这个错误
    可以通过在客户端切换 TCP WS XLTS等不同方式 重启服务后继续 但往往走着走着又会出现类似错误

  4. 配置成功
    [Vmess] bamboo(***org:9998)
    启动服务(2022/2/17 0:45:50)…
    V2Ray 4.42.2 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.17.1 windows/386)
    A unified platform for anti-censorship.
    2022/02/17 00:45:50 [Info] main/jsonem: Reading config: D:\V2ray\v2rayN-Core\config.json
    2022/02/17 00:45:50 [Warning] V2Ray 4.42.2 started
    2022/02/17 00:48:47 127.0.0.1:60498 accepted http://config.pinyin.sogou.com/api/popup/lotus.php?h=C7F1D03DF9375A8CD6E0FF12023AE0C6&v=11.3.0.5218&r=0000_sogou_pinyin_113a&ppversion=3.5.0.2333 [proxy]
    2022/02/17 00:48:47 127.0.0.1:60500 accepted http://ping.pinyin.sogou.com/pingback_bubble.gif?h=C7F1D03DF9375A8CD6E0FF12023AE0C6&v=11.3.0.5218&r=0000_sogou_pinyin_113a&passport=&ppversion=3.5.0.2333&bb_type=Query_period [proxy]
    2022/02/17 00:48:52 [Warning] [3904327600] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://bamboo-os.org:9998/ray): > x509: certificate has expired or is not yet valid: ] > common/retry: all retry attempts failed

  5. 大佬好,我想想问问配置成功为什么还是没法上外网啊。

    2022/03/06 09:31:54 [Warning] [263030738] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [dial tcp 137.220.37.183:8080: connectex: No connection could be made because the target machine actively refused it.] > common/retry: all retry attempts failed

  6. Clash for Mac 和Clash for windows 用同样的配置文件,Mac可以,windows不行,有这种情况吗?
    V2ray-VMESS+WS+TLS

  7. 2022/04/09 16:07:09 [Warning] [3782246457] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://www.liyanrufreedom.xyz/ray): > read tcp 192.168.1.103:53578->95.179.203.121:443: wsarecv: An existing connection was forcibly closed by the remote host. transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://www.liyanrufreedom.xyz/ray): > read tcp 192.168.1.103:53579->95.179.203.121:443: wsarecv: An existing connection was forcibly closed by the remote host. transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://www.liyanrufreedom.xyz/ray): > read tcp 192.168.1.103:53580->95.179.203.121:443: wsarecv: An existing connection was forcibly closed by the remote host. transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://www.liyanrufreedom.xyz/ray): > read tcp 192.168.1.103:53581->95.179.203.121:443: wsarecv: An existing connection was forcibly closed by the remote host. transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://www.liyanrufreedom.xyz/ray): > read tcp 192.168.1.103:53582->95.179.203.121:443: wsarecv: An existing connection was forcibly closed by the remote host.] > common/retry: all retry attempts failed

        1. 非常感谢大佬,我这个vps重新配置的时候出现了“域名未能正确解析到当前的vps的ip上”应该是被强了,我重新换一个服务器。

  8. 帮我看看是什么原因 一一检查了配置没啥问题
    [Warning] [2828099491] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://[2001:19f0:6001:5c44:5400:3ff:fef8:3904]/vn8WXwKED): > dial tcp [2001:19f0:6001:5c44:5400:3ff:fef8:3904]:443: connectex: A socket operation was attempted to an unreachable network. transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://[2001:19f0:6001:5c44:5400:3ff:fef8:3904]/vn8WXwKED): > dial tcp [2001:19f0:6001:5c44:5400:3ff:fef8:3904]:443: operation was canceled] > common/retry: all retry attempts failed

  9. 2022/05/06 23:34:22 127.0.0.1:12398 accepted //login.live.com:443 [proxy]
    2022/05/06 23:34:28 [Warning] [2231149504] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: failed to find an available destination > common/retry: [transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://104.18.83.185/7u8rf4P): > remote error: tls: handshake failure] > common/retry: all retry attempts failed
    2022/05/06 23:34:28 127.0.0.1:12404 accepted //login.live.com:443 [proxy]
    2022/05/06 23:34:30 127.0.0.1:12406 accepted //login.live.com:443 [proxy]
    2022/05/06 23:34:31 [Warning] [1494466809] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: failed to find an available destination > common/retry: [transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://104.18.83.185/7u8rf4P): > dial tcp 104.18.83.185:443: operation was canceled] > common/retry: all retry attempts failed
    2022/05/06 23:34:32 127.0.0.1:12409 accepted //edge.microsoft.com:443 [proxy]

  10. 配置成功
    [Vmess] test(2001:19f0:6001:16a5:5400:03ff:fefc:3867:443)
    启动服务(2022/5/12 0:00:33)…
    Xray 1.4.5 (Xray, Penetrates Everything.) Custom (go1.17.1 windows/386)
    A unified platform for anti-censorship.
    2022/05/12 00:00:34 [Info] infra/conf/serial: Reading config: D:\v2rayN-v4.32\v2rayN-Core\config.json
    2022/05/12 00:00:34 [Warning] core: Xray 1.4.5 started
    2022/05/12 00:00:42 127.0.0.1:65183 accepted //array813.prod.do.dsp.mp.microsoft.com:443 [http -> proxy]
    2022/05/12 00:00:44 [Warning] [2783662969] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [dial tcp [2001:19f0:6001:16a5:5400:3ff:fefc:3867]:443: connectex: A socket operation was attempted to an unreachable network.] > common/retry: all retry attempts failed
    大佬帮忙看看是什么原因呀,谢谢

发表评论

您的电子邮箱地址不会被公开。