MCPcopy Create free account

hub / github.com/Anarkh-Lee/nginx-flow / functions

Functions259 in github.com/Anarkh-Lee/nginx-flow

↓ 210 callersFunctioncn
(...inputs: ClassValue[])
src/lib/utils.ts:4
↓ 90 callersFunctiont
(key: string)
src/contexts/LanguageContext.tsx:389
↓ 75 callersFunctionindent
(level: number)
src/utils/configGenerator.ts:3
↓ 40 callersFunctiongenId
()
src/data/templates.ts:28
↓ 20 callersFunctionupdateServer
(serverId: string, updates: Partial<UpstreamServer>)
src/components/panels/UpstreamPropertyPanel.tsx:44
↓ 18 callersMethodtrackEvent
* 事件追踪(推荐使用此方法)
src/utils/analytics.ts:72
↓ 17 callersFunctionuseLanguage
()
src/contexts/LanguageContext.tsx:400
↓ 13 callersFunctioncleanDirectives
(configText: string, targets: string[])
src/services/fixService.ts:20
↓ 13 callersFunctionuseConfig
()
src/contexts/ConfigContext.tsx:56
↓ 12 callersMethodcurrent
()
src/utils/nginxParser.ts:172
↓ 11 callersMethodcleanDirective
* 暴力清洗:从文本中移除指定指令 * 使用全局匹配确保移除所有实例
src/services/fixApplicator.ts:110
↓ 10 callersMethodremoveDirective
* 移除指定指令 - 核心清洗方法 * * @param text - 原始自定义指令文本 * @param directiveName - 要移除的指令名(如 'ssl_protocols', 'server_tokens') * @returns 清洗后的文本
src/utils/configCleaner.ts:91
↓ 8 callersFunctiontoast
({ ...props }: Toast)
src/hooks/use-toast.ts:137
↓ 7 callersFunctioncleanDirectives
(configText: string, targets: CleanKey[])
src/services/AutoFixService.ts:32
↓ 6 callersFunctioncleanCustomDirectives
(customText: string, activeKeys: string[])
src/utils/configGenerator.ts:52
↓ 6 callersFunctionensureSemicolons
* 确保每行以分号结尾(如果需要的话)
src/utils/configGenerator.ts:102
↓ 6 callersFunctionserverNeedsSecurityHeaders
* 检查服务器是否需要安全头 * 跳转服务器不需要 X-Frame-Options 等安全头
src/services/auditService.ts:54
↓ 5 callersMethodadvance
()
src/utils/nginxParser.ts:176
↓ 5 callersFunctiondispatch
(action: Action)
src/hooks/use-toast.ts:128
↓ 4 callersMethodcleanAndFormat
* 清理并格式化文本 * - 移除多余空行 * - 移除行首行尾空白
src/utils/configCleaner.ts:137
↓ 4 callersFunctioncleanRegex
(text: string, key: string)
src/services/AutoFixService.ts:26
↓ 4 callersMethodinit
* 初始化 Google Analytics 4 * 只会初始化一次,避免重复初始化
src/utils/analytics.ts:14
↓ 4 callersMethodpageView
* 页面浏览追踪
src/utils/analytics.ts:54
↓ 4 callersFunctionuseCarousel
()
src/components/ui/carousel.tsx:31
↓ 4 callersFunctionuseFormField
()
src/components/ui/form.tsx:33
↓ 4 callersFunctionuseSidebar
()
src/components/ui/sidebar.tsx:34
↓ 3 callersMethodaddSecurityHeader
* 添加安全 Header (通用方法)
src/services/fixApplicator.ts:500
↓ 3 callersMethodaddSecurityHeader
* 添加安全 Header
src/services/fixService.ts:507
↓ 3 callersFunctionescapeRegex
(str: string)
src/utils/configCleaner.ts:74
↓ 3 callersFunctiongetPayloadConfigFromPayload
(config: ChartConfig, payload: unknown, key: string)
src/components/ui/chart.tsx:278
↓ 3 callersFunctionhasAddHeader
* 检查自定义指令中是否包含特定 header
src/services/auditService.ts:77
↓ 3 callersFunctionisRedirectServer
(server: ServerConfig)
src/utils/configGenerator.ts:127
↓ 3 callersMethodsmartAddHeader
* 智能添加 add_header
src/utils/configCleaner.ts:308
↓ 2 callersFunctionaddServer
()
src/components/panels/UpstreamPropertyPanel.tsx:28
↓ 2 callersFunctionaddToRemoveQueue
(toastId: string)
src/hooks/use-toast.ts:55
↓ 2 callersFunctionconvertBlockToServer
(block: ASTBlock)
src/utils/nginxParser.ts:457
↓ 2 callersFunctionconvertBlockToUpstream
(block: ASTBlock)
src/utils/nginxParser.ts:527
↓ 2 callersFunctionconvertToPureRedirectHttpServer
(server: ServerConfig, serverName: string)
src/services/AutoFixService.ts:43
↓ 2 callersFunctioncreateDefaultLocation
(serverId: string)
src/types/nginx.ts:239
↓ 2 callersMethodformatCleanedText
* 格式化清洗后的文本
src/services/fixApplicator.ts:144
↓ 2 callersFunctiongetCategoryIcon
(iconName: string)
src/components/TemplateLibrary.tsx:201
↓ 2 callersFunctiongetLayoutedElements
( nodes: Node[], edges: Edge[], options: LayoutOptions = {} )
src/utils/autoLayout.ts:12
↓ 2 callersFunctiongetPortAsString
(server: ServerConfig)
src/services/AutoFixService.ts:15
↓ 2 callersFunctionhandleAddLocation
(serverId: string)
src/components/sidebar/ConfigSidebar.tsx:45
↓ 2 callersFunctionisRedirectOnlyServer
(server: ServerConfig)
src/services/fixService.ts:139
↓ 2 callersMethodisRedirectServer
* 检测 Server 是否为跳转服务器
src/utils/configCleaner.ts:260
↓ 2 callersMethodparseStatement
()
src/utils/nginxParser.ts:222
↓ 2 callersFunctionrunAudit
(config: NginxConfig)
src/services/auditService.ts:682
↓ 2 callersMethodsetUserProperty
* 设置用户属性
src/utils/analytics.ts:300
↓ 2 callersMethodsmartAddDirective
* 智能添加指令:先清理再添加 * 防止重复添加相同指令
src/utils/configCleaner.ts:294
↓ 2 callersMethodtrackConfigExport
* 追踪配置导出
src/utils/analytics.ts:144
↓ 2 callersFunctionuseChart
()
src/components/ui/chart.tsx:22
↓ 2 callersFunctionuseToast
()
src/hooks/use-toast.ts:166
↓ 1 callersFunctionapplyAllFixes
(config: NginxConfig)
src/services/auditService.ts:730
↓ 1 callersMethodapplyAllFixes
* 应用所有修复 - 按正确顺序执行
src/services/fixService.ts:693
↓ 1 callersFunctionapplyFix
(config: NginxConfig, ruleId: string, affectedNodeId?: string | null)
src/services/auditService.ts:722
↓ 1 callersMethodapplyForceHttps
(config: NginxConfig, httpsServerId: string)
src/services/AutoFixService.ts:145
↓ 1 callersMethodcleanAddHeader
* 清洗 add_header 指令
src/services/fixApplicator.ts:134
↓ 1 callersMethodcleanDirectives
* 批量清洗多个指令
src/services/fixApplicator.ts:123
↓ 1 callersFunctionconvertBlockToLocation
(block: ASTBlock, serverId: string)
src/utils/nginxParser.ts:352
↓ 1 callersFunctionconvertDirectivesToGlobal
(directives: ASTDirective[])
src/utils/nginxParser.ts:561
↓ 1 callersFunctionconvertEventsBlock
(block: ASTBlock)
src/utils/nginxParser.ts:594
↓ 1 callersFunctionconvertHttpBlock
(block: ASTBlock)
src/utils/nginxParser.ts:623
↓ 1 callersFunctionconvertToRedirectServer
(server: ServerConfig, targetUrl: string)
src/services/fixService.ts:147
↓ 1 callersFunctioncreateAddHeaderPattern
(headerName: string)
src/utils/configCleaner.ts:64
↓ 1 callersFunctioncreateAddHeaderPattern
(headerName: string)
src/services/fixApplicator.ts:67
↓ 1 callersFunctioncreateDefaultServer
()
src/types/nginx.ts:224
↓ 1 callersFunctioncreateDefaultUpstream
()
src/types/nginx.ts:277
↓ 1 callersFunctioncreateForceHttpsTemplate
()
src/data/templates.ts:755
↓ 1 callersFunctioncreateIpHashTemplate
()
src/data/templates.ts:676
↓ 1 callersFunctioncreateLoadBalancerTemplate
()
src/data/templates.ts:594
↓ 1 callersFunctioncreateNodejsProxyTemplate
()
src/data/templates.ts:205
↓ 1 callersFunctioncreateProxySetHeaderPattern
(headerName: string)
src/utils/configCleaner.ts:70
↓ 1 callersFunctioncreatePythonProxyTemplate
()
src/data/templates.ts:285
↓ 1 callersFunctioncreateSpaTemplate
()
src/data/templates.ts:33
↓ 1 callersFunctioncreateStaticCdnTemplate
()
src/data/templates.ts:119
↓ 1 callersFunctioncreateWebSocketTemplate
()
src/data/templates.ts:384
↓ 1 callersFunctioncreateWordPressTemplate
()
src/data/templates.ts:487
↓ 1 callersFunctiondismiss
()
src/hooks/use-toast.ts:145
↓ 1 callersFunctionescapeRegex
* 转义正则特殊字符
src/utils/configGenerator.ts:95
↓ 1 callersMethodexecuteFix
* 执行修复 * @param config 当前配置 * @param fixType 修复类型 * @param targetNodeId 目标节点 ID(可选)
src/services/fixApplicator.ts:709
↓ 1 callersMethodexpect
(type: Token['type'])
src/utils/nginxParser.ts:180
↓ 1 callersMethodfindHttpNode
(config: NginxConfig, serverName: string, excludeServerId?: string)
src/services/AutoFixService.ts:72
↓ 1 callersMethodfixAutoindex
(config: NginxConfig)
src/services/AutoFixService.ts:130
↓ 1 callersMethodfixAutoindex
* 修复 Autoindex (目录列表)
src/services/fixApplicator.ts:252
↓ 1 callersMethodfixAutoindex
* 修复 Autoindex - 在所有层级移除
src/services/fixService.ts:264
↓ 1 callersMethodfixGzip
* 修复 Gzip 压缩
src/services/fixApplicator.ts:345
↓ 1 callersMethodfixGzip
* 修复 Gzip
src/services/fixService.ts:350
↓ 1 callersMethodfixHSTS
* 修复 HSTS
src/services/fixApplicator.ts:571
↓ 1 callersMethodfixHSTS
(config: NginxConfig, targetServerId: string)
src/services/fixService.ts:573
↓ 1 callersMethodfixHiddenFiles
* 添加隐藏文件保护 * 只使用 return 403,不同时使用 deny all(冗余代码优化)
src/services/fixApplicator.ts:449
↓ 1 callersMethodfixHiddenFiles
* 添加隐藏文件保护 * 只使用 return 403,不使用 deny all(避免冗余)
src/services/fixService.ts:455
↓ 1 callersMethodfixKeepalive
* 修复 Keepalive Timeout
src/services/fixApplicator.ts:425
↓ 1 callersMethodfixKeepalive
* 修复 Keepalive Timeout
src/services/fixService.ts:430
↓ 1 callersMethodfixRootUser
* 修复 user root 安全问题 * * @param globalCustomDirectives - 全局自定义指令 * @returns 新指令和警告信息
src/utils/configCleaner.ts:157
↓ 1 callersMethodfixRootUser
(config: NginxConfig)
src/services/AutoFixService.ts:80
↓ 1 callersMethodfixRootUser
* 修复 Root User 问题 * 1. 设置 global.user = 'nginx' * 2. 从 customDirectives 中移除所有 user 指令
src/services/fixApplicator.ts:165
↓ 1 callersMethodfixRootUser
* 修复 Root User - 彻底消除 user root
src/services/fixService.ts:182
↓ 1 callersMethodfixSSLProtocols
* 修复 SSL Protocols - 强制协议升级 * 不读取旧值,直接覆盖为安全协议
src/services/fixApplicator.ts:291
↓ 1 callersMethodfixSSLProtocols
* 修复 SSL Protocols - 强制升级,不读取旧值
src/services/fixService.ts:300
next →1–100 of 259, ranked by callers