「零基础」甲骨文云搭建xray:vless+grpc+tls+cdn
- 平台: Windows 10 Pro , 域名
- 工具: Chrome Browser , cloudflare
「零基础」甲骨文云搭建 xray:vless+grpc+tls+cdn,本文非常凸显零基础。无需任何 ssh 客户端,只需要复制粘贴即可完成。xray vless 代表先进生产力,gRPC 表示这种协议可以过 cloudflare 的 cdn,拯救被墙 IP 以及 IP 优选加速等。
无信用卡获取甲骨文云
Cannot load image on this device.
none.blue
信用卡一直是我比较头疼的事啊,因为没有信用卡嘛!也不值得去办一个信用卡。花呗白条都可以提前消费远比信用卡好用啊。所以对于我这种经济基础良好的自然选择,从淘宝闲鱼直接购买成品号。此账号就是从网上购买的,花 100 块钱可以买到两个月流量 8T 的 VPS 在我看来是非常值得的。搭建 xray 节点作为备用。我主要会用这台免费 VPS 来做 7×24 小时的直播推流。修改卖家的联系邮箱,完成两步验证信息的修改。登录甲骨文云后台可以先将语言设置为中文。
https://cloud.oracle.com
禁止账号升级
Cannot load image on this device.
none.blue
将操作系统修改为 ubuntu 20.04 ,我接下来的脚本只能在乌班图上使用。操作系统内核 5.4,不需要额外再装魔改的 BBR 模块。
无需 ssh 密钥
Cannot load image on this device.
none.blue
在图中所示的位置粘贴脚本,注意脚本高亮黑色区域需要按需修改。会在 YouTube 视频当中详细说明如何修改?粘贴完之后直接点击底部的创建,等待公网 IP 出现即可。
/var/lib/cloud/instance/scripts
/var/log/cloud-init-output.log
#!/bin/sh
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F;netfilter-persistent save
# Xray Installation
wget -O /usr/local/bin/xray https://github.com/none-blue/xray-amd64/raw/main/xray
chmod +x /usr/local/bin/xray
cat <<EOF > /etc/systemd/system/xray.service
[Unit]
Description=The Xray Proxy Serve
After=network-online.target
[Service]
ExecStart=/usr/local/bin/xray -c /etc/xray/serve.toml
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=always
RestartSec=15s
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable xray
# Xray Configuration
# id = "none.blue" and serviceName = "page" should custom
mkdir -p /etc/xray
cat <<EOF > /etc/xray/serve.toml
[log]
loglevel = "none"
[[inbounds]]
port = 443
protocol = "vless"
[inbounds.settings]
decryption = "none"
[[inbounds.settings.clients]]
id = "none.blue"
[inbounds.streamSettings]
network = "grpc"
security = "tls"
[inbounds.streamSettings.grpcSettings]
serviceName = "page"
[inbounds.streamSettings.tlsSettings]
alpn = "h2"
[[inbounds.streamSettings.tlsSettings.certificates]]
certificateFile = "/etc/xray/cert.pem"
keyFile = "/etc/xray/key.pem"
[[outbounds]]
protocol = "freedom"
EOF
# pem fortmat certificate from cloudflare
cat <<EOF > /etc/xray/cert.pem
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
EOF
# pem fortmat private key from cloudflare
cat <<EOF > /etc/xray/key.pem
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
EOF
systemctl start xray
CF 证书
Cannot load image on this device.
none.blue
V2rayN 4.14 版本使用 XRay 内核,gRPC 协议节点配置,如图所示。速度较慢,可以选择使用 cloud flare 优选 IP。
防火墙问题
Cannot load image on this device.
none.blue
硬防火墙规则,点击所创建实例当中的实例详细信息下的虚拟云网络,选择安全列表,创建或者修改出/入站规则,允许所有协议和端口;软防火墙 iptables 规则已经在脚本中。
Loading ...
无广告!