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-mtls | mtls_support | mTLS 用户证书 |
zerocustom/xray:latest-dyncert | dyn-client-cert | mTLS+动态用户证书 |
zerocustom/xray:latest | dyn-client-cert | mTLS+动态用户证书 |
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 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
Content type
Image
Digest
sha256:c671ddfbc…
Size
26.1 MB
Last updated
about 2 months ago
docker pull zerocustom/xray:latest-mtls