xfy 2734b04d8f refactor: remove 16.8k lines of dead code across all internal packages
- Delete unused files: tempfile subsystem, matcher variants, server/internal
- Remove 200+ unused functions across proxy, ssl, lua, http2/3, stream, variable
- Fix proxy test type errors (backgroundRefresh ctx→Request)
- Move bench/tools mock backend into internal/testutil
- Remove corresponding test functions for all deleted code
2026-06-03 16:15:43 +08:00

41 lines
956 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package stream 提供 TCP/UDP Stream 代理功能。
//
// 该文件实现 Stream 模块的 SSL/TLS 支持,包括:
// - 服务端 TLS 终端
// - 客户端 TLS 连接(上游 SSL
// - 证书加载和配置
// - mTLS 客户端证书验证
//
// 作者xfy
package stream
import (
"crypto/tls"
"crypto/x509"
"sync"
"rua.plus/lolly/internal/config"
)
// SSLManager 管理 Stream SSL/TLS 配置。
//
// 负责加载证书、配置 TLS 连接,支持服务端和客户端两种模式。
type SSLManager struct {
cert tls.Certificate
clientCAPool *x509.CertPool
config config.StreamSSLConfig
mu sync.RWMutex
}
// ProxySSLManager 管理上游 SSL 连接。
//
// 负责创建到上游服务器的 TLS 连接,支持证书验证和客户端证书。
type ProxySSLManager struct {
cert tls.Certificate
rootCAPool *x509.CertPool
config config.StreamProxySSLConfig
mu sync.RWMutex
}