V2Ray一键安装脚本 233boy大神版本-单用户

V2Ray一键安装教程。V2Ray是近几年十分流行的网络工具,其功能强大,用途不限于突破防火墙,但因其能有效翻墙而广为人知。V2Ray有如下大放异彩的特点:

  • 开源。V2RayProject V的核心工具,源代码开源;
  • 多协议支持。传输层支持TCP、mKCP、WebSocket等,上层协议支持Socks、Shadowsocks、以及自定义的VMess等;
  • 多入口和多出口。V2Ray可同时支持多个入站和出站协议,每个协议独立工作;
  • 多平台支持。原生支持Windows、Linux、MacOS三大常用平台,安卓、iOS两大移动平台有丰富的第三方工具;
  • 隐蔽性。V2Ray流量可伪装成网页流量,更难被检测和干扰。

与另一个知名的翻墙工具Shadowsocks(R)相比,V2ray和SSR区别在于:

  1. V2Ray是一个框架/平台,而Shadowsocks(R)是一个代理工具;
  2. V2Ray功能强大配置复杂,Shadowsocks(R)简单易用;
  3. V2Ray性能更好,协议支持更完善。

一句话总结:V2Ray更好更强大,但更难上手和用好。

因v2ray原开发者长期不上线,社区为了维护方便创建了v2fly,v2fly的官网是 https://www.v2fly.org。大名鼎鼎的v2ray白话文、一键安装脚本等都出自v2fly。目前v2ray项目主要由v2fly推动,v2fly的代码更新也会合并到v2ray项目库中,一般可以认为v2ray和v2fly是同一个组织。

关于233

说起V2Ray一键脚本就不得不说233boy大神的 V2Ray 一键安装脚本 & 管理脚本,这是至今最出名,也是功能最强大的V2Ray一键搭建脚本,但这是单用户的一键脚本。

V2Ray一键安装脚本 By 233boy 项目Github官网:点击访问

(1)233V2Ray一键脚本功能特点

  • 支持 V2Ray 多数传输协议
  • 支持 WebSocket + TLS / HTTP/2
  • 支持 动态端口 (WebSocket + TLS,Socks5, HTTP/2 除外)
  • 支持 屏蔽广告
  • 支持 配置 Shadowsocks
  • 支持 下载客户端配置文件 (不用 Xshell 也可以下载)
  • 客户端配置文件同时支持 SOCKS 和 HTTP
  • 支持 生成 V2Ray 配置二维码链接 (仅适用部分客户端)
  • 支持 生成 V2Ray 配置信息链接
  • 支持 生成 Shadowsocks 配置二维码链接
  • 支持修改 V2Ray 传输协议
  • 支持修改 V2Ray 端口
  • 支持修改 动态端口
  • 支持修改 用户ID
  • 支持修改 TLS 域名
  • 支持修改 Shadowsocks 端口
  • 支持修改 Shadowsocks 密码
  • 支持修改 Shadowsocks 加密协议
  • 自动启用 BBR 优化 (如果内核支持)
  • 集成可选安装 BBR (by teddysun.com)
  • 集成可选安装 锐速 (by moeclub.org)
  • 一键 查看运行状态 / 查看配置信息 / 启动 / 停止 / 重启 / 更新 / 卸载 / 等等…
  • 人性化向导 & 纯净安装 & 卸载彻底

准备

1. 在搭建之前你需要一台国外服务器! 为什么需要一台服务器请参考这里。如何选择优质的服务器请参考什么是VPS?应该如何选择? (注意:这里推荐使用 Ubuntu 22 在购买选择系统的过程中选择Ubuntu 22系统);

2. 服务器购买之后 需要通过SSH客户端连接服务器,以便操作你购买的远程服务器 Windows系统请参考 Bitvise连接Linux服务器教程,mac用户请参考 Mac电脑连接Linux教程

3.如果你觉得搭建流程太麻烦,可以考虑Justmysocks的代理服务,可以免去搭建流程,速度和性价比也不错。just-my-socks购买和使用教程

如果你觉得自己搭建太麻烦 你可以使用推荐的机场,无需自己搭建

V2Ray一键安装 环境

时间要求:

V2Ray的连接对时间准确度要求较高,服务器端与客户端时间误差不能超过2分钟。

一般来说,服务器的时间是比较准确的,只要服务器的时间与所在时区时间一致,V2ray会自适应时差。我们只要保证本地V2Ray客户端设备的分钟数,与服务器的分钟数保持一致即可。简单方法:

SSH连接VPS服务器,输入date回车,会返回服务器时间。然后调整客户端设备的分钟数,两者保持一致. 如果搭建好之后出现上不了网问题 请参考科学上网常见问题

V2Ray一键安装脚本

1,安装脚本命令

链接远程服务器后按照如下命令按照V2Ray服务。系统支持:Ubuntu,Debian,CentOS,推荐使用 Ubuntu 22,谨慎使用 CentOS,脚本可能无法正常运行!

bash <(wget -qO- -o- https://git.io/v2ray.sh)

2.执行链接,显示如下表示安装成功

为方便你快速使用,脚本在安装完成后会自动创建一个 VMess-TCP 配置。

此时你可以复制 URL 到相关软件 (例如 v2rayN) 去测试一下是否正常使用。

如果无法正常使用,请尝试使用 v2ray add ss 添加一个 SS 来再测试一下

(注意:安装成功后会有一个服务器端口需要打开,每次安装都不一样,这里是14686, 你需要在服务器后台打开此端口 tcp 协议才能正常使用)

3.如上图所示,V2Ray 配置信息,有连接的详细信息,也有v2ray的vmess协议的快速导入连接

如果你使用过 V2Ray 某些客户端,那么现在也可以测试一下配置了。

(备注,可能某些 V2Ray 客户端的选项或描述略有不同,但事实上,上面的 V2Ray 配置信息已经足够详细,由于客户端的不同,请对号入座。)

导入到V2ray 软件如下:
表示导入成功:

客户端的具体配置请看:V2Ray客户端配置

v2ray客户端全集

V2rayN windows使用教程

v2rayNG Android配置教程

Shadowrocket配置V2Ray教程

4.测试连接是否通畅

如果出现延迟数字 就表明节点可以使用 如果出现链接超时等问题一般有两种原因,一是无法连接上端口,二是客户端内核支持有问题。

1.如果你的 VPS 有外部防火墙,请确保你已经开放了端口。 测试端口是否能连接上:https://ping.sx/check-port
Target 写你的 VPS IPPort 写 V2Ray 的端口,然后点击 Check,如果 REACHABILITY 显示 Timeout,那是无法连接上端口 (提醒:你可以使用命令 v2ray ip 查看 VPS IP)

这时候有两种办法:

(1)关闭防火墙,执行如下命令: 

systemctl stop firewalld; systemctl disable firewalld; ufw disable 

关闭防火墙之后再测试一下端口是否通,如果不通,你可能还有外部防火墙没关,必须要能连接上端口才能正常使用。 如果 REACHABILITY 显示 Reachable 那就是能连接上端口,那就继续! 如果 REACHABILITY 显示 Timeout那就是端口还是不能访问,这个时候您需要到服务器商后台手动操作关闭防火墙!或者放开端口

(2)打开v2ray端口 (打开端口教程
执行命令:

1: sudo firewall-cmd --permanent --add-port=你的端口/tcp
2: sudo firewall-cmd --reload

如果 REACHABILITY 显示 Reachable 那就是能连接上端口,那就继续! 如果 REACHABILITY 显示 Timeout那就是端口还是不能访问,这个时候您需要到服务器商后台手动操作关闭防火墙!

2.内核问题

提醒,默认安装的 V2Ray 内核为最新版本

如果无法使用,可能是你客户端的内核太旧

请尝试使用不同的客户端进行测试;比如 v2rayN;v2rayNG 等

请尝试设置 VMessAEAD,某些客户端会有相关选项

某些客户端得把 额外id(alterid) 填写为 0;比如垃圾苹果那边的东西

解决方案一,请尝试将服务器端的内核版本降级

使用 v2ray update core 4.45.2 降级即可

解决方案二,升级客户端内核

备注,请尽量将客户端内核和服务器端内核保持一致!内核版本低于 5 可能会出现莫名其妙的问题

如何安装BBR/锐速

如果你的服务器系统,还没有安装BBR/锐速,那么可以利用脚本自带功能进行安装,成功安装后,可以为网络加速提高使用体验。

1.SSH连接VPS服务器,输入以下命令运行:

v2ray bbr

2.出现下图界面时,输入数字1安装BBR

V2Ray 管理面板

现在可以尝试一下输入 v2ray 回车,即可管理 V2Ray

快速管理 V2Ray

v2ray info 查看 V2Ray 配置信息
v2ray config 修改 V2Ray 配置
v2ray link 生成 V2Ray 配置文件链接
v2ray infolink 生成 V2Ray 配置信息链接
v2ray qr 生成 V2Ray 配置二维码链接
v2ray ss 修改 Shadowsocks 配置
v2ray ssinfo 查看 Shadowsocks 配置信息
v2ray ssqr 生成 Shadowsocks 配置二维码链接
v2ray status 查看 V2Ray 运行状态
v2ray start 启动 V2Ray
v2ray stop 停止 V2Ray
v2ray restart 重启 V2Ray
v2ray log 查看 V2Ray 运行日志
v2ray update 更新 V2Ray
v2ray update.sh 更新 V2Ray 管理脚本
v2ray uninstall 卸载 V2Ray

优化 V2Ray

由于本人的脚本在 Debian9 系统会自动开启 BBR 优化加速了,所以不需要再安装 BBR 优化了,
如果你还是觉得网络比较慢的话,你可以尝试使用含有 mKCP 的传输协议,这个 mKCP 的东东,简单一点说就像 Kcptun 一样加速,并且还能进行伪装 (可选),但是由于 mKCP 是使用 UDP 协议的,也许运营商会限速得更加厉害,网络变得更加慢。但不管怎么样,你都可以随时尝试一下。
服务器输入 v2ray config 回车,然后选择 修改 V2Ray 传输协议,再接着选择 mKCP 相关的传输协议即可
如果你是使用其他商家的 VPS 并且是按照此教程流程来安装 V2Ray 的话,那么你可以输入 v2ray bbr 回车,然后选择安装 BBR 或者 锐速 来优化 V2Ray
只是还想再啰嗦一下,如果你是使用国际大厂的 VPS,并且是按照此教程流程来安装 V2Ray 的话,请自行在安全组 (防火墙) 开放端口和 UDP 协议 (如果你要使用含有 mKCP 的传输协议)

WebSocket + TLS

实现 WebSocket + TLS 超级无敌简单,前提是要拥有一个能正常解析的域名 (并且知道怎么解析域名)
服务器输入 v2ray config 回车,然后选择 修改 V2Ray 传输协议,再选择 WebSocket + TLS,即是输入 4,接着输入你的域名,然后我都懒得说了,脚本都那么简单明了,我还瞎BB干嘛…
哈哈…可能有不少人在折腾 V2Ray 实现 WS + TLS 的时候真的是搞到很蛋痛咯,有些人的教程可能说得不是很清楚,或者是直接忽略小白萌新这些亲爱的用户,嗯,小白们好好加油吧,请尽量多学一些基础知识,别总是做伸手党,对于毫无交集的陌生人,人家并没有任何义务要帮你的啊
偷偷跟你说…使用 WebSocket + TLS 会有断流的问题
多说一句,不要被某些人带节奏,WS + TLS 并不是 V2Ray 的神级配置,该墙还是会墙,墙你不需要理由
备注一下啦,这里我没写怎么教你注册域名啦,怎么解析域名啦,如果你真的想要使用 WebSocket + TLS,那就 自己谷歌摸索一下,其实好简单的啦!
我本人并没有在使用 WS + TLS (WebSocket + TLS),我用 TCP,就是用一键脚本全程回车的那种懒人

HTTP/2

实现 HTTP/2 (h2) 也超级无敌简单,和 WebSocket + TLS 一样,也就是只要一个域名就够
服务器输入 v2ray config 回车,然后选择 修改 V2Ray 传输协议,再选择 HTTP/2,即是输入 16,然后………看上面的 WebSocket + TLS 的相关。
备注一下,HTTP/2 相比 WS + TLS (WebSocket + TLS) ,在浏览网页时有一些优势。速度是差不多的啦

搬瓦工 VPS 速度慢

由于本教程使用了 搬瓦工 VPS 做为教程的一部分,那么相信有些新接触 VPS 的同学可能会是按照教程使用了 搬瓦工 VPS 翻墙。
如果你觉得搬瓦工 VPS 速度慢,你可以尝试修改一下端口,服务器输入 v2ray config ,,然后选择 修改 V2Ray 端口 即可,建议使用常见的端口,比如说 443,当然,为了更加安全隐蔽,你可以直接尝试使用 WebSocket + TLS 或者 HTTP/2 协议,但是使用这两个协议对于没有接触过 域名 的同学相对来说会是比较困难的。
搬瓦工 VPS 速度慢的一个主要原因可能会是因为端口限速,如果你已经修改端口为 443,速度还是慢的话,我建议你尝试使用 mKCP 协议。

其他一件脚本

除了V2ray以外,还有其它一些常用的代理工具,比如Shadowsocks/V2ray/Trojan/WireGuard等,

具体搭建流程可以参考:

SSR一键安装脚本使用教程

V2ray一键安装脚本使用教程

Trojan一键安装脚本使用教程

WireGuard一键安装脚本使用教程

26 Comments

  1. The next time I learn a weblog, I hope that it doesnt disappoint me as a lot as this one. I imply, I know it was my option to read, but I actually thought youd have something interesting to say. All I hear is a bunch of whining about one thing that you could fix in the event you werent too busy searching for attention.

  2. Hello! I just would like to give a huge thumbs up for the great info you have here on this post. I will be coming back to your blog for more soon.

  3. Good day! This is my first visit to your blog! We are a group of volunteers and starting a new project in a community in the same niche. Your blog provided us beneficial information to work on. You have done a extraordinary job!

  4. whoah this weblog is fantastic i like studying your articles. Keep up the good paintings! You know, many persons are searching around for this information, you could aid them greatly.

  5. Great write-up, I¦m regular visitor of one¦s blog, maintain up the excellent operate, and It’s going to be a regular visitor for a lengthy time.

  6. Oh my goodness! an amazing article dude. Thank you Nevertheless I’m experiencing challenge with ur rss . Don’t know why Unable to subscribe to it. Is there anybody getting similar rss problem? Anyone who knows kindly respond. Thnkx

  7. I think this is one of the most important info for me. And i’m glad reading your article. But wanna remark on few general things, The site style is great, the articles is really nice : D. Good job, cheers

  8. Please let me know if you’re looking for a article writer for your weblog. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some articles for your blog in exchange for a link back to mine. Please send me an email if interested. Many thanks!

  9. Nice post. I was checking constantly this blog and I am impressed! Very helpful info particularly the last part 🙂 I care for such information a lot. I was seeking this certain information for a long time. Thank you and best of luck.

  10. I got what you mean , thankyou for posting.Woh I am happy to find this website through google. “I would rather be a coward than brave because people hurt you when you are brave.” by E. M. Forster.

  11. Together with every thing that seems to be developing throughout this specific area, a significant percentage of points of view happen to be relatively exciting. Even so, I am sorry, but I can not subscribe to your entire plan, all be it exhilarating none the less. It appears to us that your opinions are generally not totally rationalized and in reality you are yourself not thoroughly confident of the point. In any case I did enjoy reading it.

  12. Whats Going down i am new to this, I stumbled upon this I’ve found It positively helpful and it has helped me out loads. I’m hoping to give a contribution & aid different users like its aided me. Good job.

  13. 371

    It’s a pity yyou don’t havve a donate button! I’d certainly donbate tto this exzcellent blog!
    I suppise for now i’ll settke for bookmarkibg and adding
    your RSS feed to my Googlke account. I look forard tto fresh updates and will shnare this sijte with mmy Facebook
    group. Talk soon!

  14. Sinply want to say our article is ass astonishing.
    Thhe clarity in your poat is just great and i ccan assume
    yyou are ann expert oon this subject.Finne with your permission alloww me tto
    grab your feed too keep updatred witfh forthcoming post.
    Thnks a million andd plezse carry onn tthe gratifying work.

  15. 062

    It iss really a nihe and hewlpful piece of info.
    I am satisfied that you jusst shared this helpful informatiln with us.
    Pleasse stzy uus informed lke this. Thaqnk yoou
    ffor sharing.

  16. I like the helpful information you provide in your articles. I will bookmark your weblog and check again here regularly. I’m quite certain I’ll learn lots of new stuff right here! Good luck for the next!

  17. Hiya! Quifk queston that’s totally off topic.
    Do you now howw to mqke yur site mobile friendly? My ssite looks wweird wwhen browsing
    frrom my iphone4. I’m tying too fid a theme or pligin that
    might bbe ablee tto fiix thjis problem. If
    yyou have aany suggestions, ploease share. Appreciate it!

发表回复