zerocustom/xray

By zerocustom

Updated about 2 months ago

xray with mtls support

Image
0

50K+

zerocustom/xray repository overview

xray with mtls support(shit AI powered)

感谢xray团队,我终于明白了什么叫"朕赐给你的才是你的﹐朕不给﹐你不能抢"

https://github.com/XTLS/Xray-core/pull/5903

https://github.com/XTLS/Xray-core/issues/2273


镜像说明

镜像 Tag对应分支功能
zerocustom/xray:latest-mtlsmtls_supportmTLS 用户证书
zerocustom/xray:latest-dyncertdyn-client-certmTLS+动态用户证书
zerocustom/xray:latestdyn-client-certmTLS+动态用户证书

功能差异

latest-mtls — mTLS 用户证书支持

新增 usage: "client" 证书类型。当 Xray 作为 TLS 客户端(outbound)连接到一个要求用户证书的服务端时,可以配置一个用户证书用于认证。

配置示例(outbound):

{
  "streamSettings": {
    "security": "tls",
    "tlsSettings": {
      "serverName": "example.com",
      "certificates": [
        {
          "usage": "client",
          "certificateFile": "/path/to/client.crt",
          "keyFile": "/path/to/client.key"
        }
      ]
    }
  }
}
latest / latest-dyncert — mTLS+动态用户证书

mtls_support 基础上增加 usage: "client_authority" 证书类型。配置一个 CA 证书后,Xray 会在收到服务端 CertificateRequest自动签发用户证书。

配置示例(outbound):

{
  "streamSettings": {
    "security": "tls",
    "tlsSettings": {
      "serverName": "example.com",
      "certificates": [
        {
          "usage": "client_authority",
          "certificateFile": "/path/to/ca.crt",
          "keyFile": "/path/to/ca.key"
        }
      ]
    }
  }
}

Docker 使用

# 拉取镜像
docker pull zerocustom/xray:latest
docker pull zerocustom/xray:latest-dyncert
docker pull zerocustom/xray:latest-mtls

# 运行(挂载配置文件)
docker run -d \
  -v /path/to/config.json:/etc/xray/config.json \
  -v /path/to/certs:/etc/xray/certs \
  -p 443:443 \
  zerocustom/xray:latest

# 测试运行
docker run --rm \
  -v /path/to/config.json:/etc/xray/config.json \
  zerocustom/xray:latest \
  run -c /etc/xray/config.json

Tag summary

Content type

Image

Digest

sha256:c671ddfbc

Size

26.1 MB

Last updated

about 2 months ago

docker pull zerocustom/xray:latest-mtls