Skip to content

feat: add mTLS client certificate support#5889

Closed
zero-custom wants to merge 3 commits intoXTLS:mainfrom
zero-custom:main
Closed

feat: add mTLS client certificate support#5889
zero-custom wants to merge 3 commits intoXTLS:mainfrom
zero-custom:main

Conversation

@zero-custom
Copy link
Copy Markdown

  • Add ClientCertificate message in config.proto (field 23)
  • Add BuildClientCertificates() method in config.go
  • Add GetClientCertificate callback in GetTLSConfig()
  • Add uTLS adapter in copyConfig() for client cert support
  • Support both file path and inline PEM formats
{
  "outbounds": [
    {
      "tag": "vless-mtls",
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "mtls.example.com",
            "port": 443,
            "users": [
              {
                "id": "bcrn6-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                "flow": "",
                "encryption": "none"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "tlsSettings": {
          "serverName": "mtls.example.com",
          "clientCertificate": [
            {
              "certificateFile": "/path/to/client.crt",
              "keyFile": "/path/to/client.key"
            }
          ]
        },
        "wsSettings": {
          "path": "/vless"
        }
      }
    },
  ]
}

- Add ClientCertificate message in config.proto (field 23)
- Add BuildClientCertificates() method in config.go
- Add GetClientCertificate callback in GetTLSConfig()
- Add uTLS adapter in copyConfig() for client cert support
- Support both file path and inline PEM formats
@Fangliding Fangliding closed this Apr 4, 2026
@RPRX
Copy link
Copy Markdown
Member

RPRX commented Apr 5, 2026

这个为啥直接关了,有人想双向认证的话就让他弄吧

@RPRX RPRX reopened this Apr 5, 2026
@Fangliding
Copy link
Copy Markdown
Member

这个为啥直接关了,有人想双向认证的话就让他弄吧

写的是个错的啊 infra都没改 纯AI乱写

@Fangliding Fangliding closed this Apr 5, 2026
@zero-custom
Copy link
Copy Markdown
Author

确实是使用AI生成的,当时是先生成的patch,本地编译了,测试过功能后,让AI合并上传的代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants