feat: 添加Cloudflare Access支持,允许通过请求头传递Client ID和Client Secret

This commit is contained in:
xdf
2025-08-20 16:32:53 +09:00
parent aa461f2189
commit fb9828378b
6 changed files with 53 additions and 5 deletions

View File

@@ -92,5 +92,7 @@ func init() {
RootCmd.PersistentFlags().StringVar(&flags.ExcludeNics, "exclude-nics", "", "Comma-separated list of network interfaces to exclude")
RootCmd.PersistentFlags().StringVar(&flags.IncludeMountpoints, "include-mountpoint", "", "Semicolon-separated list of mount points to include for disk statistics")
RootCmd.PersistentFlags().IntVar(&flags.MonthRotate, "month-rotate", 0, "Month reset for network statistics (0 to disable)")
RootCmd.PersistentFlags().StringVar(&flags.CFAccessClientID, "cf-access-client-id", "", "Cloudflare Access Client ID")
RootCmd.PersistentFlags().StringVar(&flags.CFAccessClientSecret, "cf-access-client-secret", "", "Cloudflare Access Client Secret")
RootCmd.PersistentFlags().ParseErrorsWhitelist.UnknownFlags = true
}