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 ( const (
// LargeFileStrategySkip 跳过大文件限速 // LargeFileStrategySkip 跳过大文件限速
// LargeFileStrategySkip 大文件策略:跳过(不限制)。
LargeFileStrategySkip = "skip" LargeFileStrategySkip = "skip"
// LargeFileStrategyCoarse 粗粒度限速 // LargeFileStrategyCoarse 粗粒度限速
// LargeFileStrategyCoarse 大文件策略:粗略限制。
LargeFileStrategyCoarse = "coarse" LargeFileStrategyCoarse = "coarse"
) )

View File

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

View File

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

View File

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