Skip to content

Commit

Permalink
misc option update
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsandeep committed Oct 11, 2023
1 parent 3f49fd3 commit 28f9862
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ EXPORT:

CONFIGURATION:
-config string path to the proxify configuration file
-lc, -logger-config string proxify logger module configuration file ($home/.config/proxify/logger-config.yaml)
-ec, -export-config string proxify export module configuration file ($home/.config/proxify/export-config.yaml)
-config-directory string override the default config path ($home/.config/proxify)
-cert-cache-size int Number of certificates to cache (default 256)
-a, -allow string[] Allowed list of IP/CIDR's to be proxied
Expand Down
4 changes: 2 additions & 2 deletions internal/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func ParseOptions() (*Options, error) {

flagSet.CreateGroup("configuration", "Configuration",
flagSet.StringVar(&cfgFile, "config", "", "path to the proxify configuration file"),
flagSet.StringVarP(&options.LoggerConfig, "logger-config", "lc", filepath.Join(homeDir, ".config", "proxify", logger.LoggerConfigFilename), "proxify logger module configuration file"),
flagSet.StringVarP(&options.LoggerConfig, "export-config", "ec", filepath.Join(homeDir, ".config", "proxify", logger.LoggerConfigFilename), "proxify export module configuration file"),
flagSet.StringVar(&options.ConfigDir, "config-directory", filepath.Join(homeDir, ".config", "proxify"), "override the default config path ($home/.config/proxify)"),
flagSet.IntVar(&options.CertCacheSize, "cert-cache-size", 256, "Number of certificates to cache"),
flagSet.StringSliceVarP(&options.Allow, "allow", "a", nil, "Allowed list of IP/CIDR's to be proxied", goflags.FileNormalizedStringSliceOptions),
Expand Down Expand Up @@ -244,7 +244,7 @@ func (options *Options) configureOutput() {
}
}

// createLoggerConfigIfNotExists creates logger-config if it doesn't exists
// createLoggerConfigIfNotExists creates export-config if it doesn't exists
func (options *Options) createLoggerConfigIfNotExists() error {
if fileutil.FileExists(options.LoggerConfig) {
return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
dataWithNewLine = "%s\n"
dataWithoutNewLine = "%s"
LoggerConfigFilename = "logger-config.yaml"
LoggerConfigFilename = "export-config.yaml"
)

type OptionsLogger struct {
Expand Down

0 comments on commit 28f9862

Please sign in to comment.