mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 05:56:46 +08:00

主要清理内容: - logging包:移除DetailedFormatter、JSONFormatter及相关方法 - output包:清理Manager和Statistics中的未使用方法 - parsers包:移除各Parser中的Validate()和GetStatistics()方法 - proxy包:清理Factory和Global中的所有未使用函数 - ProgressManager:移除未使用的进度条方法和字段 - globals:清理未使用的status变量 技术改进: - 使用deadcode和golangci-lint工具系统性检测 - 保持代码结构清晰,添加清理注释 - 修复相关依赖引用问题 - 确保编译通过和功能正常 代码减少:移除约40个死代码函数和多个未使用字段
27 lines
1.0 KiB
Go
27 lines
1.0 KiB
Go
package proxy
|
|
|
|
import (
|
|
"sync"
|
|
)
|
|
|
|
var (
|
|
globalManager ProxyManager
|
|
globalMutex sync.RWMutex
|
|
once sync.Once
|
|
)
|
|
|
|
// =============================================================================================
|
|
// 已删除的死代码(未使用):
|
|
// - InitGlobalProxy: 初始化全局代理管理器
|
|
// - GetGlobalProxy: 获取全局代理管理器
|
|
// - UpdateGlobalProxyConfig: 更新全局代理配置
|
|
// - CloseGlobalProxy: 关闭全局代理管理器
|
|
// - GetGlobalProxyStats: 获取全局代理统计信息
|
|
// - DialWithProxy: 使用全局代理拨号
|
|
// - DialContextWithProxy: 使用全局代理和上下文拨号
|
|
// - DialTLSWithProxy: 使用全局代理建立TLS连接
|
|
// - DialTLSContextWithProxy: 使用全局代理和上下文建立TLS连接
|
|
// - IsProxyEnabledGlobally: 检查全局是否启用了代理
|
|
// - GetGlobalProxyType: 获取全局代理类型
|
|
// - GetGlobalProxyAddress: 获取全局代理地址
|
|
// =============================================================================================
|