新增功能: - 新增 TLS 指纹 Profile CRUD 管理(Ent schema + 迁移 + Admin API + 前端管理界面) - 支持账号绑定数据库中的自定义 TLS Profile,或随机选择(profile_id=-1) - HTTPUpstream.DoWithTLS 接口从 bool 改为 *tlsfingerprint.Profile,支持按账号指定 Profile - AccountUsageService 注入 TLSFingerprintProfileService,统一 usage 场景与网关的 Profile 解析逻辑 代码优化: - 删除已被 TLSFingerprintProfileService 完全取代的 registry.go 死代码(418 行) - 提取 3 个 dialer 的重复 TLS 握手逻辑为 performTLSHandshake() 共用函数 - 修复 GetTLSFingerprintProfileID 缺少 json.Number 处理的 bug - gateway_service.Forward 中 ResolveTLSProfile 从重试循环内重复调用改为预解析局部变量 - 删除冗余的 buildClientHelloSpec() 单行 wrapper 和 int64(e.ID) 无效转换 - tls_fingerprint_profile_cache.go 日志从 log.Printf 改为 slog 结构化日志 - dialer_capture_test.go 添加 //go:build integration 标签,防止 CI 失败 - 去重 TestProfileExpectation 类型至共享 test_types_test.go - 修复 9 个测试文件缺少 tlsfingerprint import 的编译错误 - 修复 error_policy_integration_test.go 中 handleError 回调签名被错误替换的问题
74 lines
2.5 KiB
Go
74 lines
2.5 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package predicate
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
// APIKey is the predicate function for apikey builders.
|
|
type APIKey func(*sql.Selector)
|
|
|
|
// Account is the predicate function for account builders.
|
|
type Account func(*sql.Selector)
|
|
|
|
// AccountGroup is the predicate function for accountgroup builders.
|
|
type AccountGroup func(*sql.Selector)
|
|
|
|
// Announcement is the predicate function for announcement builders.
|
|
type Announcement func(*sql.Selector)
|
|
|
|
// AnnouncementRead is the predicate function for announcementread builders.
|
|
type AnnouncementRead func(*sql.Selector)
|
|
|
|
// ErrorPassthroughRule is the predicate function for errorpassthroughrule builders.
|
|
type ErrorPassthroughRule func(*sql.Selector)
|
|
|
|
// Group is the predicate function for group builders.
|
|
type Group func(*sql.Selector)
|
|
|
|
// IdempotencyRecord is the predicate function for idempotencyrecord builders.
|
|
type IdempotencyRecord func(*sql.Selector)
|
|
|
|
// PromoCode is the predicate function for promocode builders.
|
|
type PromoCode func(*sql.Selector)
|
|
|
|
// PromoCodeUsage is the predicate function for promocodeusage builders.
|
|
type PromoCodeUsage func(*sql.Selector)
|
|
|
|
// Proxy is the predicate function for proxy builders.
|
|
type Proxy func(*sql.Selector)
|
|
|
|
// RedeemCode is the predicate function for redeemcode builders.
|
|
type RedeemCode func(*sql.Selector)
|
|
|
|
// SecuritySecret is the predicate function for securitysecret builders.
|
|
type SecuritySecret func(*sql.Selector)
|
|
|
|
// Setting is the predicate function for setting builders.
|
|
type Setting func(*sql.Selector)
|
|
|
|
// TLSFingerprintProfile is the predicate function for tlsfingerprintprofile builders.
|
|
type TLSFingerprintProfile func(*sql.Selector)
|
|
|
|
// UsageCleanupTask is the predicate function for usagecleanuptask builders.
|
|
type UsageCleanupTask func(*sql.Selector)
|
|
|
|
// UsageLog is the predicate function for usagelog builders.
|
|
type UsageLog func(*sql.Selector)
|
|
|
|
// User is the predicate function for user builders.
|
|
type User func(*sql.Selector)
|
|
|
|
// UserAllowedGroup is the predicate function for userallowedgroup builders.
|
|
type UserAllowedGroup func(*sql.Selector)
|
|
|
|
// UserAttributeDefinition is the predicate function for userattributedefinition builders.
|
|
type UserAttributeDefinition func(*sql.Selector)
|
|
|
|
// UserAttributeValue is the predicate function for userattributevalue builders.
|
|
type UserAttributeValue func(*sql.Selector)
|
|
|
|
// UserSubscription is the predicate function for usersubscription builders.
|
|
type UserSubscription func(*sql.Selector)
|