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客户端之一,非常推荐!
2021/06/30 09:22:26 [Warning] [1798521622] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: failed to find an available destination > common/retry: [dial tcp 23.105.212.125:443: i/o timeout dial tcp 23.105.212.125:443: operation was canceled] > common/retry: all retry attempts failed
昨天开始就没办法科学上网了,打开ssh看了也完全没问题,重装了也不行,伪装站倒是好好的能上去,请问是怎么回事呢
443端口被墙了,换一个
我直接用cloudflare转发了,现在nic.ua的dns好像还没换过来,我等明天再看看吧,谢谢大佬
大佬现在调好了吗?443端口被禁了
换8443
怎么换端口?
重新运行一键脚本
我也有这个 问题 process outbound traffic > proxy/vless/outbound: failed to find an available destination > common/retry: [dial tcp 23.105.212.125:443: i/o timeout dial tcp 23.105.212.125:443: operation was canceled] >
你怎么解决的?
端口被墙了,换一个
您好,我的问题是从剪切板导入链接,测试服务真链接延迟有100ms,但是进行Google搜索还是不行,也不是时间问题,请大神指教
应该是节点挂了
没有,节点在手机的小火箭上可以正常使用,找不到原因,可以留个您的qq或者微信跟您联系嘛
仔细检查一下配置吧
您好,我的手机用流量可以连接外网但是换成wifi或者用电脑连接就不行,请问是怎么回事呢?有什么办法吗?谢谢
换VPs或者换宽带
配置成功
[VLESS] 140.83.32.8+单独ws协议(140***8:2265)
启动服务(2021/9/6 9:28:23)…
Xray 1.4.2 (Xray, Penetrates Everything.) Custom (go1.16.2 windows/amd64)
A unified platform for anti-censorship.
2021/09/06 09:28:23 [Info] infra/conf/serial: Reading config: D:\Program Files (x86)\v2rayN\config.json
2021/09/06 09:28:23 [Warning] core: Xray 1.4.2 started
2021/09/06 09:28:42 127.0.0.1:54323 accepted //safebrowsing.googleapis.com:443 [http -> proxy]
2021/09/06 09:28:43 [Warning] [3159315758] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: connection ends > proxy/vless/outbound: failed to write A request payload > transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://140.XXX.XXX.8:2265/n): > tls: first record does not look like a TLS handshake
2021/09/06 09:28:43 127.0.0.1:52881 accepted //safebrowsing.googleapis.com:443 [http -> proxy]
2021/09/06 09:28:43 [Warning] [324996120] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: connection ends > proxy/vless/outbound: failed to write A request payload > transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://140.83.32.8:2265/n): > tls: first record does not look like a TLS handshake
2021/09/06 09:28:44 tcp:127.0.0.1:52380 rejected proxy/socks: unknown Socks version: 67
单独ws协议就不要配置tls
v2ray启动失败,请检查日志或查看端口是否被占用!
日志如下:
Sep 12 15:50:03 awesome-drum-1.localdomain v2ray[2192]: github.com/v2fly/v2ray-core/v4/main/main.go:139 +0xb1
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: v2ray.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: Unit v2ray.service entered failed state.
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: v2ray.service failed.
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: v2ray.service holdoff time over, scheduling restart.
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: Stopped V2ray Service.
— Subject: Unit v2ray.service has finished shutting down
— Defined-By: systemd
— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
—
— Unit v2ray.service has finished shutting down.
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: start request repeated too quickly for v2ray.service
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: Failed to start V2ray Service.
— Subject: Unit v2ray.service has failed
— Defined-By: systemd
— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
—
— Unit v2ray.service has failed.
—
— The result is failed.
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: Unit v2ray.service entered failed state.
Sep 12 15:50:03 awesome-drum-1.localdomain systemd[1]: v2ray.service failed.
服务器内存多大?如果是512的内存,先卸载,然后重新运行一件脚本安装最新的
你好,1G的内存,重新运行还是不行
而且已经关闭防火墙
看起来是参数有问题,卸载重装,运行脚本的时候不要输入特殊字符
vps的问题换vultr就行了
一直提示:找不到Core,下载地址: https://github.com/XTLS/Xray-core/releases
但我在参数设置里已经设置了core的类型为X_ray的类型了。为什么还一直报错。
下载带有core的客户端
解决不了这个问题 我换端口了服务器xray的config文件 还是一样
断流了 不知道为什么?
我试过几台服务器不同公司的 都是这个问题 我要快疯了 请帮个忙大哥
感谢你!
2021/10/02 01:32:10 127.0.0.1:8293 accepted //pagead2.googlesyndication.com:443 [http -> proxy]
2021/10/02 01:32:10 [Warning] [2290314596] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: failed to find an available destination > common/retry: [dial tcp xxxx:1453: operation was canceled] > common/retry: all retry attempts failed
xray config file :
{
“log”: {
“loglevel”: “none”
},
“inbounds”: [
{
“port”: 1453,
“protocol”: “vless”,
“settings”: {
“clients”: [
{
“id”: “e24979c6-bf65-4fcc-9c01-11d0fe7c1b25”,
“flow”: “xtls-rprx-direct”
}
],
“decryption”: “none”,
“fallbacks”: [
{
“path”: “/8738855”,
“dest”: “@/dev/shm/xray/ws.sock”
},
{
“alpn”: “h2”,
“dest”: “/dev/shm/nginx_unixsocket/h2.sock”
},
{
“dest”: “/dev/shm/nginx_unixsocket/default.sock”
}
]
},
“streamSettings”: {
“network”: “tcp”,
“security”: “xtls”,
“xtlsSettings”: {
“alpn”: [
“h2”,
“http/1.1”
],
“minVersion”: “1.2”,
“cipherSuites”: “TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256”,
“certificates”: [
{
“certificateFile”: “/usr/local/nginx/certs/1.xxxx.com.cer”,
“keyFile”: “/usr/local/nginx/certs/1.xxxx.com.key”,
“ocspStapling”: 3600
}
]
}
}
},
{
“listen”: “@/dev/shm/xray/ws.sock”,
“protocol”: “vless”,
“settings”: {
“clients”: [
无法上网!!!!
配置成功
[Vmess] 🇭🇰 YouTube梦歌-香港 2(18***33:9999)
启动服务(2021/10/2 18:53:34)…
Xray 1.4.0 (Xray, Penetrates Everything.) Custom (go1.16.2 windows/386)
A unified platform for anti-censorship.
2021/10/02 18:53:34 [Info] infra/conf/serial: Reading config: C:\Users\JIA-PC\Downloads\v2rayN-v4.20\v2rayN-Core\config.json
2021/10/02 18:53:34 [Warning] core: Xray 1.4.0 started
2021/10/02 18:53:42 127.0.0.1:60946 accepted http://www.pixiv.net/ [http >> proxy]
配置错了,或者节点挂了
用山东的卡可以上网,用广东的卡就不行,我也换了伪装,不知道怎么回事
不同线路情况下这是正常的,要么换个服务器
手机测试报错:io:read/write on closed pipe
这种情况是怎么回事呢,本来用得好好的,网上查了下说要同步时间,需要安装ntpdate同步时间吗?还是其他什么方式解决呢?谢谢回答
2021/11/02 22:27:42 127.0.0.1:56641 accepted //www.so.com:443 [http -> proxy]
2021/11/02 22:27:46 127.0.0.1:56644 accepted http://c.skconf.f.360.cn/commonquery [http -> proxy]
2021/11/02 22:27:48 [Warning] [3791673532] proxy/http: failed to read response from c.skconf.f.360.cn > io: read/write on closed pipe
节点挂了
感谢提供攻略文章。快乐用起了软件。截图描述很清晰
你好,请问下日志显示如下这个是什么问题
可以正常科学上网,主要是想搞懂这个是什么问题
恳请大大能够解答一下,非常感谢!!!
2021/11/11 19:57:33 [Warning] [1634313844] 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:61741: wsasend: An established connection was aborted by the software in your host machine.
2021/11/11 19:57:33 [Warning] [3119713754] 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:61740: wsasend: An established connection was aborted by the software in your host machine.
节点挂了
节点挂了那应该也无法科学上网了吧,这个是我自建的服务器,仅此一个节点,日志提示上述警告,但是可以正常翻墙
能用就不用管
好吧,非常感谢你的回答!感谢
[Warning] [1678995465] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: failed to find an available destination > common/retry: [dial tcp 65.49.213.56:443: connectex: No connection could be made because the target machine actively refused it.] > common/retry: all retry attempts failed
[Warning] [1368022971] proxy/http: failed to read response from clientservices.googleapis.com > io: read/write on closed pipe
节点挂了,或者服务器上的软件没运行
订阅用不了啊
那是订阅链接有问题
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时间和本地时间是一致的,不晓得为啥
配置错了或者没放行端口
我也报这个,你的问题解决了没
谢谢大佬,配置成功了!vultr的服务器,namesilo的域名,V2ray-VMESS+WS+TLS,教程也太详细了!感谢🙇
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等不同方式 重启服务后继续 但往往走着走着又会出现类似错误
应该是服务器内存小,服务端程序挂了
配置成功
[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
已解决
请问如何解决得这个证书问题呀