docs: add documentation comments for more exported constants and variables

- Add comments for ssl/client_verify.go verification modes
- Add comments for security/auth.go hash algorithms
- Add comments for rewrite/rewrite.go flags
- Add comments for compression/compression.go algorithms
- Add comments for limitrate/limitrate.go strategies
- Include author attribution (xfy)
This commit is contained in:
xfy911 2026-06-03 15:28:53 +08:00
parent 396a466de1
commit fc1de2d445
6 changed files with 19 additions and 17 deletions

View File

@ -12,8 +12,10 @@ import (
const (
// LargeFileStrategySkip 跳过大文件限速
// LargeFileStrategySkip 大文件策略:跳过(不限制)。
LargeFileStrategySkip = "skip"
// LargeFileStrategyCoarse 粗粒度限速
// LargeFileStrategyCoarse 大文件策略:粗略限制。
LargeFileStrategyCoarse = "coarse"
)

View File

@ -43,9 +43,9 @@ import (
type Action int
const (
// ActionAllow 允许请求通过
// ActionAllow 允许请求通过
ActionAllow Action = iota
// ActionDeny 拒绝请求(返回 403 Forbidden
// ActionDeny 拒绝请求(返回 403 Forbidden
ActionDeny
accessAllow = "allow"

View File

@ -48,9 +48,9 @@ import (
type HashAlgorithm int
const (
// HashBcrypt bcrypt 算法(默认,推荐)
// HashBcrypt bcrypt 哈希算法(默认,推荐)
HashBcrypt HashAlgorithm = iota
// HashArgon2id Argon2id 算法(更安全,计算密集)
// HashArgon2id Argon2id 哈希算法(更安全,计算密集)
HashArgon2id
)

View File

@ -29,13 +29,13 @@ import (
type ClientVerifyMode int
const (
// VerifyOff 不验证客户端证书
// VerifyOff 不验证客户端证书
VerifyOff ClientVerifyMode = iota
// VerifyOn 强制验证客户端证书
// VerifyOn 强制验证客户端证书
VerifyOn
// VerifyOptional 可选验证(客户端可选择不提供证书)
// VerifyOptional 可选验证(客户端可选择不提供证书)
VerifyOptional
// VerifyOptionalNoCA 可选验证但不验证 CA
// VerifyOptionalNoCA 可选验证但不验证 CA
VerifyOptionalNoCA
// verifyModeOff 验证模式字符串常量