通过cdn流量伪装防止防火墙封ip和端口
2023年12月8日...大约 3 分钟
通过cdn流量伪装防止防火墙封ip和端口
边缘计算系统构建
将域名绑定到CDN上
1.登录CDN网站,找到增加域名选项
2.点击添加域名
3.选择Free计划
4.临时添加一条记录,让CDN去验证域名合法性
5.复制新生成的两个ns服务器备用
6.登录域名服务厂商,找到域名管理处,修改ns服务器为CloudFlare服务器
7.等待全球DNS记录刷新,在CloudFlare见到此页面为 ns服务器绑定成功
节点增加
在Server端安装x-ui
输入以下代码自动安装x-ui服务器
bash <(curl -Ls https://raw.githubusercontent.com/chenyue168881/x-ui/master/install.sh)
1.登录服务器并确认配置
内存大于500M,硬盘大于5G
2.运行脚本并安装x-ui,看到如下图为安装成功
如果出现 -bash: curl: command not found
运行
apt-get update
apt-get install curl -y
安装成功
3.修改x-ui web密码
apt-get install sqlite3 -y && \
sqlite3 /etc/x-ui/x-ui.db <<EOF
select * from users where id=1;
update users set username='chenyue' where id = 1;
update users set password='ac147258@' where id = 1;
select * from users where id=1;
.q
EOF
出现这个界面为运行成功
4.登录web界面
url类似于 http://xxx.xxx.xxx.xxx:54321/
在CDN上增加域名
打开此界面,点击增加A记录
如图配置,获得的域名应该是 example-1111.456987.top
指向 45.91.82.122
并通过cf
伪装所有流量
如下图为成功配置
测试网站 ping.chinaz.com
生成加密证书(已生成)
泛解析
以下正式用于*.456987.top, 456987.top 有效期15年)
crt.pem(公钥)
-----BEGIN CERTIFICATE-----
MIIEoDCCA4igAwIBAgIUZa0sSNhVpNZglPxxhKF1+M3ANSUwDQYJKoZIhvcNAQEL
BQAwgYsxCzAJBgNVBAYTAlVTMRkwFwYDVQQKExBDbG91ZEZsYXJlLCBJbmMuMTQw
MgYDVQQLEytDbG91ZEZsYXJlIE9yaWdpbiBTU0wgQ2VydGlmaWNhdGUgQXV0aG9y
aXR5MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MB4XDTIyMDgxOTEyNTQw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KBgQDez49/oEfCXDBLKxrL
IKASiT/A5N87Rl1ymX0rhNHGTF0VsRhVIteXNjF/jv49OHxooFNmlE/pgwcb86P2
x6I38rhMyQYvY/oZIXDJbfXf5wO6qxcpwIrIgOJKt86cvKizRWQqA3TwPETlp8Fk
NBc/+5M0cC0kDsXVPIWQNQzZxwKBgQDRCF/XSlM7G6mXg+0+iW/xzWXPY4Xurzd7
RgZvpaPr/Sc/jQl5EQVH4rbOBo/WCMeCYJSqMtuvCN18R76T+ZmXIa02qIkBTi1F
WSyZSCPlk/BnP7UkDAFr/dwMXR24cjnF8CJYp3Nsc7gwqxirpmeO7KeIj2hXhOjZ
kJfH/mRbbwKBgQCN0koBr5DdivaGchps3whkpA37hvL8dM54anB86d7ovKSncQEO
982Ih0s8aVU0vKabpilP6ulutiMpTIy6QNnliM58uZwBQD7qDhoPbLmLWi1KfSqS
PedYtojTjGmr5H3xFiMqhubBH2uvTndPg8Skykopn5lsESclko9leg8C8wKBgHex
mue1eJlVCrRm57eyjTZhjdXGQE/fZx6gh1jw+T9NU2cRhIYdl++Ew3aPzVca6dsf
IKGgw6ijo+fhUSB8gVVIBF5S/TiRIl0eZepTo7J3FuaYVUoR0dKbp6Awxa7zQV+1
VIV9RRup26OKpXLMs2nk2z3YGEBdK9RA9pifc6njAoGBAMyruw1f+5VH+fAoSH+K
3HEgMdL4VKKE25WfzDCyN3s/2A1YNsABCzqQdDY07ROB/yy/AHkKc9dIZLrV7XHB
VAfnTf71SFv+phdbLEJIXQEVtnhCTewUCNVNh5TAnykKne3fBbz1lvIkq4I7W0r4
lE+ACh0f58oLg7eOwJu7CpZj
-----END PRIVATE KEY-----
在x-ui上配置节点
输入CDN增加的域名
输入上一个步骤的加密证书
测试和对比
第一条为走CDN(本地测试速度减小了,因地而异,不一定会慢)
第二条为裸奔
第三条为CDN并为随机端口(无法使用)
你认为这篇文章怎么样?
- 0
- 0
- 0
- 0
- 0
- 0
Powered by Waline v3.3.2