https://console.scaleway.com/, 开通 1h1g1g vps

教程 https://www.nodeseek.com/post-131646-1

开通完成,花了 0.05€

安装 Xray

https://github.com/XTLS/Xray-install/blob/main/alpinelinux/README_zh-Hans.md

安装 cURL

apk add curl

下载安装脚本

curl -O -L https://github.com/XTLS/Xray-install/raw/main/alpinelinux/install-release.sh

运行安装脚本

ash install-release.sh

管理命令

启用 Xray 服务 (开机自启)

rc-update add xray

禁用 Xray 服务 (取消自启)

rc-update del xray

运行 Xray

rc-service xray start

停止 Xray

rc-service xray stop

重启 Xray

rc-service xray restart

配置目录

cd /usr/local/etc/xray/ 
ls

删除所有*.json,新建 config.json

config.json
{
  "log": {
    "loglevel": "warning"
  },
  "inbounds": [
{
    
      "listen": null,
      "port": 20001,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "email": "1x9orhjz",
            "flow": "",
            "id": "20c5a1ca-ee4c-4894-1234-db0b88ec1ac2"
          }
        ],
        "decryption": "none",
        "fallbacks": []
      },
      "sniffing": {
        "destOverride": [
          "http",
          "tls",
          "quic",
          "fakedns"
        ],
        "enabled": false,
        "metadataOnly": false,
        "routeOnly": false
      },
      "streamSettings": {
        "network": "ws",
        "security": "none",
        "wsSettings": {
          "acceptProxyProtocol": false,
          "headers": {},
          "heartbeatPeriod": 0,
          "host": "",
          "path": "/sc"
        }
      }
}
  ],
  "outbounds": [
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {"domainStrategy": "UseIPv6v4"}
    },
    {
      "tag": "blocked",
      "protocol": "blackhole",
      "settings": {}
    }
  ],
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "type": "field",
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked"
      }
    ]
  }
}

空间情况

安装完xray之后

df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
shm                     483.5M         0    483.5M   0% /dev/shm
/dev/vda2               762.0M    232.7M    473.8M  33% /
tmpfs                   193.4M    288.0K    193.1M   0% /run
efivarfs                 55.9K     22.1K     28.8K  43% /sys/firmware/efi/efivars
/dev/vda1               157.5M    274.0K    157.2M   0% /boot/efi
tmpfs                   483.5M         0    483.5M   0% /tmp