第一次翻墙 用 VPS 的境外 IP 申请 Freenom 免费域名 添加 Cloudflare 的 DNS 解析
本文针对 第一次翻墙 的情况,你手里除了刚买到的 VPS,没有任何其它资源。搭 Websocket + TLS 模式需要域名,希望从 Freenom 申请一个。1. SSH
0. 用
vps 下载,然后再从 vps 下载到本地。
在 SSH 工具上输入 wget 下载链接,类似如下命令:
然后再输入 sz 文件名,把下载的文件取回本地,类似如下命令:
取决于本地与 VPS 之间的速度,可能需要不少时间。

1. 搭建
3. 将域名添加到
===================
本文内容包括:
1. 搭建
2. 翻墙成功后,用全局模式申请 Freenom 免费域名
3. 将域名添加到
事先声明:
Freenom
如果你不管搜什么都显示域名不能买,
或者域名显示能买但是一点就显示不能买了,
或者点了域名但是不显示在购物车,购物车为 0,
或者进到购物车里下一步购买总是失败,
或者购买流程走到最后告诉你失败……
或者域名显示能买但是一点就显示不能买了,
或者点了域名但是不显示在购物车,购物车为
或者进到购物车里下一步购买总是失败,
或者购买流程走到最后告诉你失败……
都是常见的失败结果。
你可以再换个通信地址试试。
如果怎么都不行,那就是不行。请考虑买个便宜的域名吧,xyz
https://zelikk.blogspot.com/2022/03/namesilo-domain-1-usd.html
前提条件:
1. SSH 终端工具
iOS: Termius (App Strore)
Android: JuiceSSH (官方网站 changelog)
2. 翻墙客户端
Windows V2RayN (GitHub)
iOS Shadowrocket (App Store)
Android V2RayNG (APKMirror)
操作过程:
* 以下描述 Windows 环境下的操作。
手机上的操作原理和步骤是一样,稍微变通一下。用到的脚本命令是一样的。
0. 用 SSH 终端工具登录你的 VPS
00. 下载翻墙客户端
如果 GitHub 被墙,需要在墙内搜索安装文件。
如果担心墙内的文件不安全,我们可以用在
wget https://github.com/2dust/v2rayN/releases/download/5.23/v2rayN-Core.zip
sz v2rayN-Core.zip

如果
Xshell
把文件拖到本地
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)
* 注意第
2.a 翻墙, 全局模式
运行
在
右键右下角的
右键右下角的
点击
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 查到属于你自己的域名。



打开
点击

默认是申请


你会收到一个
Freenom



如果一切顺利的话,你会在


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

选择免费计划

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

点击 “继续”。

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

点击 “完成”。
在 Freenom 的 My 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/v2ray@.service
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:~#
评论
发表评论