拯救被墙甲骨文云
- 平台: Windows 10 Pro
- 工具: 甲骨文云账号 , 谷歌浏览器 , 域名
韩国甲骨文云所有 IP 段都被中国电信阻断,中国电信的家宽无法连接上甲骨文云搭建的 xray 节点,但是中国移动和中国联通就不受影响能继续使用,你说气不气?嘿,如果你家是中国电信,可以使用 grpc/websockets 的 xray 节点套 cloudflare 的 cdn 复活。但是 grpc 目前似乎被 cloudflare 限速,所以此文补充 xray:vless+ws+tls+cdn 的节点服务器搭建教程。
防火墙放行所有协议和所有端口
Cannot load image on this device.
none.blue
删除默认出/入站规则,新建出/入规则,放行所有协议和端口。
创建服务器
Cannot load image on this device.
none.blue
新建实例,系统镜像选择 Ubuntu 20.04; 勾选 无需 ssh 密钥; 其他选项默认即可。
cloudflare 生成证书
Cannot load image on this device.
none.blue
如图位置,创建 Cloudflare 颁发的证书,默认不做修改,备份源证书和私钥待用。
粘贴一键脚本
Cannot load image on this device.
none.blue
显示高级选项,粘贴 cloud-init 脚本,高亮地方需要修改。
#!/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
# custom id = "none.blue"
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 = "ws"
security = "tls"
[inbounds.streamSettings.tlsSettings]
[[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
域名解析
Cannot load image on this device.
none.blue
甲骨文云出现公网 IP 地址后,在 Cloudflare 添加 A 记录二级域名解析,比如;ws.none.blue
客户端添加节点
Cannot load image on this device.
none.blue
V2rayN >= 4.14 版本,切换使用 xray 内核,扫码下图节点,编辑节点,修改地址(address)为自己的域名即可。
Loading ...
无广告!