certs

package
v0.1.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package certs 处理主控 push_cert 下发的 TLS 证书落盘。

约定(05 号文档 §4):落盘 `/etc/xray/certs/<domain>/{fullchain.pem,key.pem}`, fullchain 0644、key 0600,原子写;xray 默认每小时热重载证书文件,换证不重启。 证书/私钥校验与解析在共享包 pkg/tlscert(主控 certs API 同源)。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeDomain

func SanitizeDomain(domain string) string

SanitizeDomain 供日志使用(委托共享包)。

func ValidatePair

func ValidatePair(certPEM, keyPEM string) error

ValidatePair 校验证书与私钥(委托共享包)。

func Write

func Write(dir, domain, certPEM, keyPEM string) error

Write 校验并落盘 <dir>/<domain>/{fullchain.pem,key.pem}(原子写;key 600)。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL