在Raspberry 3 B+ 上安装v2ray 并运行shadowsocks服务器

安装准备

apt-get install -y curl
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

生产v2ray的shadowsocks服务器配置文件

vim /usr/local/etc/v2ray/config.json

贴入以下代码后,并修改端口号和密码

{
  "log": {
    "loglevel": "warning",
    "access": "/dev/null",
    "error": "/dev/null"
  },
  "inbounds": [
    {
      "port": 12345,
      "protocol": "shadowsocks",
      "settings": {
        "method": "aes-256-gcm",
        "password": "namo.one",
        "network": "tcp,udp",
        "level": 0
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "allowed"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "routing": {
    "rules": [
      {
        "domain": [
          "google.com",
          "apple.com",
          "oppomobile.com"
        ],
        "type": "field",
        "outboundTag": "allowed"
      },
      {
        "type": "field",
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked"
      }
    ]
  }
}

测试配置文件是否正确

/usr/local/bin/v2ray test -config /usr/local/etc/v2ray/config.json

启动v2ray服务

service v2ray restart

发表回复