From bd256360de2745d63542e1510c3cd3f779e9ab69 Mon Sep 17 00:00:00 2001 From: Takanori Hirano Date: Thu, 21 Aug 2025 13:06:42 +0000 Subject: [PATCH] fix: resolve configuration merge conflicts and update documentation --- docs/docs/configuration.md | 4 ++-- main.go | 8 ++++---- pkg/mcp-proxy/main.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/docs/configuration.md b/docs/docs/configuration.md index a9e8aa4..acf12ff 100644 --- a/docs/docs/configuration.md +++ b/docs/docs/configuration.md @@ -65,8 +65,8 @@ Complete reference for all MCP Auth Proxy configuration options. | Option | Environment Variable | Default | Description | | -------------- | -------------------- | -------- | ---------------------------- | | `--listen` | `LISTEN` | `:80` | Address to listen on | -| `--listen-tls` | `TLS_LISTEN` | `:443` | Address to listen on for TLS | -| `--data` | `DATA_PATH` | `./data` | Path to the data directory | +| `--tls-listen` | `TLS_LISTEN` | `:443` | Address to listen on for TLS | +| `--data-path` | `DATA_PATH` | `./data` | Path to the data directory | ### Proxy Options diff --git a/main.go b/main.go index b45fc1e..b0ef87e 100644 --- a/main.go +++ b/main.go @@ -27,7 +27,7 @@ func getEnvBoolWithDefault(key string, defaultValue bool) bool { func main() { var listen string - var listenTLS string + var tlsListen string var noAutoTLS bool var tlsHost string var tlsDirectoryURL string @@ -100,7 +100,7 @@ func main() { if err := mcpproxy.Run( listen, - listenTLS, + tlsListen, !noAutoTLS, tlsHost, tlsDirectoryURL, @@ -132,12 +132,12 @@ func main() { } rootCmd.Flags().StringVar(&listen, "listen", getEnvWithDefault("LISTEN", ":80"), "Address to listen on") - rootCmd.Flags().StringVar(&listenTLS, "listen-tls", getEnvWithDefault("TLS_LISTEN", ":443"), "Address to listen on for TLS") + rootCmd.Flags().StringVar(&tlsListen, "tls-listen", getEnvWithDefault("TLS_LISTEN", ":443"), "Address to listen on for TLS") rootCmd.Flags().BoolVar(&noAutoTLS, "no-auto-tls", getEnvBoolWithDefault("NO_AUTO_TLS", false), "Disable automatic TLS host detection from externalURL") rootCmd.Flags().StringVarP(&tlsHost, "tls-host", "H", getEnvWithDefault("TLS_HOST", ""), "Host name for TLS") rootCmd.Flags().StringVar(&tlsDirectoryURL, "tls-directory-url", getEnvWithDefault("TLS_DIRECTORY_URL", "https://acme-v02.api.letsencrypt.org/directory"), "ACME directory URL for TLS certificates") rootCmd.Flags().BoolVar(&tlsAcceptTOS, "tls-accept-tos", getEnvBoolWithDefault("TLS_ACCEPT_TOS", false), "Accept TLS terms of service") - rootCmd.Flags().StringVarP(&dataPath, "data", "d", getEnvWithDefault("DATA_PATH", "./data"), "Path to the data directory") + rootCmd.Flags().StringVarP(&dataPath, "data-path", "d", getEnvWithDefault("DATA_PATH", "./data"), "Path to the data directory") rootCmd.Flags().StringVarP(&externalURL, "external-url", "e", getEnvWithDefault("EXTERNAL_URL", "http://localhost"), "External URL for the proxy") // Google OAuth configuration diff --git a/pkg/mcp-proxy/main.go b/pkg/mcp-proxy/main.go index 106f9f3..76c9c36 100644 --- a/pkg/mcp-proxy/main.go +++ b/pkg/mcp-proxy/main.go @@ -35,7 +35,7 @@ var ServerShutdownTimeout = 5 * time.Second func Run( listen string, - listenTLS string, + tlsListen string, autoTLS bool, tlsHost string, tlsDirectoryURL string, @@ -258,7 +258,7 @@ func Run( })), } httpsServer := &http.Server{ - Addr: listenTLS, + Addr: tlsListen, Handler: router, TLSConfig: m.TLSConfig(), } @@ -344,7 +344,7 @@ func Run( } if tlsHost != "" { - logger.Info("Starting server", zap.Strings("listen", []string{listen, listenTLS})) + logger.Info("Starting server", zap.Strings("listen", []string{listen, tlsListen})) } else { logger.Info("Starting server", zap.Strings("listen", []string{listen})) }