使用一键脚本安装

bash <(curl -Ls https://raw.githubusercontent.com/XrayR-project/XrayR-release/master/install.sh)

配置文件路径:/etc/XrayR 配置文件详见:配置文件说明

更新

XrayR update

安装 Docker

Centos

yum install -y yum-utils
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io -y
systemctl start docker
systemctl enable docker

Debian / Ubuntu

sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
systemctl start docker
systemctl enable docker

安装Docker-compose

curl -fsSL https://get.docker.com | bash -s docker
curl -L "https://github.com/docker/compose/releases/download/1.26.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

Docker-compose 安装XrayR (推荐)

  1. git clone https://github.com/XrayR-project/XrayR-release
  2. cd XrayR-release
  3. 编辑配置文件:config.yml,详见:配置文件说明
  4. 启动docker:docker-compose up -d

Docker run 安装XrayR

请注意指定config.yml目录。

更新XrayR

docker-compose仅需两条简单通用的命令即可实现更新、删除容器并重启。更新软件后config.yml不会被更新覆盖。
注意在 docker-compose.yml 所在的目录下执行:

docker-compose pull
docker-compose up -d

###

docker-compose logs --tail=500      # 截取输出最后500行日志
docker-compose down                 # 停止并删除容器
docker-compose restart              # 重启

在Debian上安装Docker
执行以下步骤从Docker的存储库安装最新的稳定Docker版本。

01、安装通过HTTPS添加新存储库所需的软件包:

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg2

02、使用以下curl命令导入存储库的GPG密钥:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

成功后,命令将返回OK。

03、将稳定的Docker APT存储库添加到系统的软件存储库列表中:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

$(lsb_release -cs)将返回Debian发行版的名称。在这种情况下,就是这样buster。

04、更新apt软件包列表并安装最新版本的Docker CE(Community Edition):

sudo apt update
sudo apt install docker-ce

05、安装完成后,Docker服务将自动启动。要验证它输入:

sudo systemctl status docker

输出类似如下:

● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-07-30 20:52:00 GMT; 1min 11s ago
    Docs: https://docs.docker.com
...

06、在撰写本文时,Docker的最新稳定版本是19.03.1:

docker -v

输出内容:

Docker version 19.03.1, build 74b1e89


ipv6设置奈飞出口

先去config.yml 填入custom_outbound.json 和 route.json 两个个文件的路径

修改custom_outbound.json

[
    {
      "tag":"IP4_out",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag":"IP6_out",
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "UseIPv6"
      }
    }
]

修改route.json

{
    "domainStrategy": "IPOnDemand",
    "rules": [
        {
            "type": "field",
            "outboundTag": "block",
            "ip": [
                "geoip:private"
            ]
        },
        {
            "type": "field",
            "outboundTag": "IPv6_out",
            "domain": [
                "geosite:netflix"
            ]
        },
        {
            "type": "field",
            "outboundTag": "IP4_out",
            "network": "udp,tcp"
        }
    ]
}
最后编辑:2021年12月05日 ©著作权归作者所有

发表评论