第一次翻墙? 如何搭建你的第一个V2Ray梯子 【保姆级教程】

第一次翻墙? 如何搭建你的第一个V2Ray梯子 【保姆级教程】

具体流程

1. 购买VPS

便宜的小鸡一

如果你仅用于自用翻墙梯子,512MB内存够用了。

如果你还想多玩几个花样,比如,你自己的博客Blog,离线下载器Aria2,电报机器人Telegram bot,影视站Emby…… 最好内存买大一点。因为如果内存吃紧的话,程序会出现异常。

2. 申请域名

试试 申请Freenom免费域名

还可以试试 申请免费.dev .app域名

3. SSH终端工具

PC: 推荐使用 Xshell(官方中文 免费 用邮箱注册一个Free For HomeLicense就行)
iOS: Termius (App Strore)
Android: JuiceSSH (官方网站changelog)

4. 搭建梯子

V2Ray 梯子 VLESS + WebSocket + TLS + Caddy v2 伪装反代网站

5. 翻墙客户端

Windows V2RayN (GitHub)
iOS Shadowrocket (App Store)
Android V2RayNG (APKMirror)

==========
不同节点的Youtube视频播放测试










操作过程:

* 以下描述Windows环境下的操作。手机上的操作原理和步骤是一样,稍微变通一下。用到的脚本命令是一样的。

0. 用SSH终端工具登录你的VPS

Xshell 入门使用说明

00. 下载翻墙客户端 

Windows V2RayN 官方下载位置 https://github.com/2dust/v2rayN/releases/latest 选择 v2rayN-Core.zip下载即可。

如果 GitHub 被墙,需要在墙内搜索安装文件。如果担心墙内的文件不安全,我们可以用vps下载,然后再从vps下载到本地。
SSH工具上输入 wget 下载链接,类似如下命令:

wget https://github.com/2dust/v2rayN/releases/download/5.23/v2rayN-Core.zip

然后再输入 sz 文件名,把下载的文件取回本地,类似如下命令:

sz v2rayN-Core.zip

取决于本地与VPS之间的速度,可能需要不少时间。

如果sz不顺利,老是断,可以换用支持断点续传的SFTP

Xshell可以很方便的点击 "传输新建文件" New File Transfer

把文件拖到本地(左侧)即可.

解压,运行v2rayN.exe


1. 搭建TCP协议的V2Ray

SSH工具里安装v2ray依次输入以下命令,回车。

apt update 
apt install -y curl 
bash <(curl -L https://github.com/crazypeace/V2ray_Vmess_TCP/raw/main/install.sh)

* 注意第3条命令很长,其实是一条命令。 

 得到一段以 vmess:// 开头的文字,类似如下:

2.a 翻墙, 全局模式

鼠标选择上一步骤的这段vmess://开头的文字,注意把所有带颜色的都复制进去,包括开头的 vmess://。右键复制,注意Ctrl+C是复制不了的。

运行v2rayN.exe

v2rayN中,点击 服务器 - 从剪贴板导入 。

右键右下角的v2rayN图标,菜单选择 系统代理 - 自动配置系统代理

右键右下角的v2rayN图标,菜单选择 路由 - 全局

点击“重启服务”

2.b 申请 Freenom 免费域名

确保你使用了“全局模式”,浏览器打开 ipip.net ,注意地理位置,是美国的哪个州哪个城市。

打开freenom.com,输入你想申请的域名,检查一下。如果显示“不可用”那么你需要换一个域名。
点击“现在获取”,右上角会出现加入购物车的提示,点击“完成”。

默认是申请3个月免费,你可以选择12个月免费。点击“Continue”

填写你的邮箱地址,点击“Verify My Email Address”。实际上是注册一个Freenom的账户。

你会收到一个Freenom发来的邮件,点击邮件中的链接验证你的邮箱地址。

Freenom会要求你填写个人信息,可以找一个美国人的假信息 https://www.haoweichi.com/
注意城市和你的翻墙IP所在的城市一致。(还记得 ipip.net 查询到的IP地理位置吗?)






如果一切顺利的话,你会在Freenom查到属于你自己的域名。

3. 将域名添加到CloudflareDNS解析

打开 https://www.cloudflare.com/ 注册一个账户
选择添加站点,输入你申请的域名



选择免费计划

等待一会儿,然后手动添加DNS解析
点击“添加记录”,“名称”中输入@,IPv4地址输入VPS的公网IP(还记得VPS发来的邮件吗?)代理状态那里要点一下图标,从橙色的云朵“已代理”变成灰色的云朵“仅限DNS”,点击“保存”。

点击“继续”。

在接下来的页面中,注意两项“名称服务器”的信息。

点击“完成”。

FreenomMy Domains页面,点击“Manage Domain”

点击“Management Tools”-“Nameservers”

点击“Use custom nameservers”,在下面填写 Cloudflare 提供的 名称服务器 信息。点击“Change Nameservers”


登录Cloudflare,看看你的域名状态,如果是下面这样“待处理的名称服务器更新”,你还需要等待。如果名称服务器切换成功,Cloudflare会给你发邮件的,请关注你的邮箱。

如果状态为绿色的对勾,那么说明名称服务器切换生效了。点击它,我们继续修改一些设置。

点击“SSL/TLS”,切换到“完全”。

===================
===================搭建Vmess+TCP模式日志示例

root@nash:~# bash <(curl -L https://github.com/crazypeace/V2ray_Vmess_TCP/raw/main/install.sh)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
                     _ ___                  
 ___ ___ __ __ ___ _| |  _|___ __ __   _ ___
|-_ |_  |  |  |-_ | _ |   |- _|  |  |_| |_  |
|___|___|  _  |___|___|_|_|___|  _  |___|___|
        |_____|               |_____|       
此脚本仅兼容于Debian 10+系统如果你的系统不符合,Ctrl+C退出脚本
可以去 https://github.com/crazypeace/V2ray_Vmess_TCP 查看脚本整体思路和关键命令以便针对你自己的系统做出调整.
有问题加群 https://t.me/+D8aqonnCR3s1NTRl
----------------------------------------------------------------
100  8418  100  8418    0     0  15502      0 --:--:-- --:--:-- --:--:-- 15502

Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:4 http://security.debian.org/debian-security bullseye-security/main Sources [124 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [153 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main Translation-en [95.4 kB]
Fetched 455 kB in 0s (1398 kB/s)                              
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
curl is already the newest version (7.74.0-1.3+deb11u1).
jq is already the newest version (1.6-2.1).
sudo is already the newest version (1.9.5p2-3).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

当前系统时间-UTC
Tue May 31 06:16:12 UTC 2022
当前系统时间-上海时区
2022-05-31 14:16:12

安装V2ray最新版本
----------------------------------------------------------------
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21647  100 21647    0     0   603k      0 --:--:-- --:--:-- --:--:--  603k
info: Installing V2Ray v4.45.0 for x86_64
Downloading V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v4.45.0/v2ray-linux-64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13.1M  100 13.1M    0     0  13.6M      0 --:--:-- --:--:-- --:--:-- 23.9M
Downloading verification file for V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v4.45.0/v2ray-linux-64.zip.dgst
info: Extract the V2Ray package to /tmp/tmp.vWaU1XRqEa and prepare it for installation.
info: Systemd service files have been installed successfully!
warning: The following are the actual parameters for the v2ray service startup.
warning: Please make sure the configuration file path is correctly set.
# /etc/systemd/system/v2ray.service
[Unit]
Description=V2Ray Service
Documentation=https://www.v2fly.org/
After=network.target nss-lookup.target

[Service]
User=nobody
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json
Restart=on-failure
RestartPreventExitStatus=23

[Install]
WantedBy=multi-user.target

# /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf
# In case you have a good reason to do so, duplicate this file in the same directory and make your customizes there.
# Or all changes you made will be lost!  # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
[Service]
ExecStart=
ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json

installed: /usr/local/bin/v2ray
installed: /usr/local/bin/v2ctl
installed: /usr/local/share/v2ray/geoip.dat
installed: /usr/local/share/v2ray/geosite.dat
installed: /etc/systemd/system/v2ray.service
installed: /etc/systemd/system/[email protected]
removed: /tmp/tmp.vWaU1XRqEa
info: V2Ray v4.45.0 is installed.
You may need to execute a command to remove dependent software: apt purge curl unzip
Please execute the command: systemctl enable v2ray; systemctl start v2ray

打开BBR
----------------------------------------------------------------

 

配置 Vmess_TCP 模式
----------------------------------------------------------------
请输入 V2RayID
(默认ID: 948408f2-ce7d-4db4-b59f-15041e737005):


 V2RayID = 948408f2-ce7d-4db4-b59f-15041e737005
----------------------------------------------------------------

请输入 V2Ray 端口 [1-65535]
(默认端口44657):


 V2Ray 端口 = 44657
----------------------------------------------------------------


配置 /usr/local/etc/v2ray/config.json
----------------------------------------------------------------

重启 V2Ray
----------------------------------------------------------------


---------- V2Ray 配置信息 -------------

 地址 (Address) = 45.88.178.183

 端口 (Port) = 44657

 用户ID (User ID / UUID) = 948408f2-ce7d-4db4-b59f-15041e737005

 额外ID (Alter Id) = 0

 传输协议 (Network) = tcp

 伪装类型 (header type) = none

---------- V2Ray Vmess URL ----------

 vmess://ICAgIHsgICAgInYiOiAiMiIsICAgICJwcyI6ICJWbWVzc19UQ1BfNDUuODguMTc4LjE4MyIsICAgICJhZGQiOiAiNDUuODguMTc4LjE4MyIsICAgICJwb3J0IjogIjQ0NjU3IiwgICAgImlkIjogIjk0ODQwOGYyLWNlN2QtNGRiNC1iNTlmLTE1MDQxZTczNzAwNSIsICAgICJhaWQiOiAiMCIsICAgICJuZXQiOiAidGNwIiwgICAgInR5cGUiOiAibm9uZSIsICAgICJob3N0IjogIiIsICAgICJwYXRoIjogIiIsICAgICJ0bHMiOiAiIiAgICB9

---------- END -------------

root@nash:~#


网友留言(1 条)

  1. ǝɔ∀ǝdʎz∀ɹɔ
    ǝɔ∀ǝdʎz∀ɹɔ 回复Ta
    source: https://zelikk.blogspot.com/2022/05/first-time-fuckgfw-from-inside-of-gfw.html

发表评论