From b0afb7cb561f495bc4585c19ce075f23c3e4dd88 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Fri, 29 May 2026 22:15:58 +0200 Subject: [PATCH] add the ssl-insecure flag Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- README.md | 1 + cmd/spilltea/main.go | 5 +++++ docs/basics.md | 1 + docs/main.md | 1 + 4 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 8c2b2b5..b5f48e9 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ Flags: --plugins-dir string path to plugins dir (overrides config) -p, --port int proxy port (overrides config) -P, --project string project name to open directly, or "tmp" for a temporary session + --ssl-insecure skip TLS certificate verification (overrides config) --upstream-proxy string upstream proxy URL, e.g. http://user:pass@host:8888 (overrides config) -v, --version version for spilltea ``` diff --git a/cmd/spilltea/main.go b/cmd/spilltea/main.go index 7315a01..1b11719 100644 --- a/cmd/spilltea/main.go +++ b/cmd/spilltea/main.go @@ -38,6 +38,7 @@ func main() { flagPort int flagUpstreamProxy string flagProject string + flagSslInsecure bool flagAddDefaultPlugins bool flagAddDefaultConfig bool ) @@ -110,6 +111,9 @@ func main() { if flagUpstreamProxy != "" { config.Global.App.UpstreamProxy = flagUpstreamProxy } + if cmd.Flags().Changed("ssl-insecure") { + config.Global.App.SslInsecure = flagSslInsecure + } style.Init() icons.Init(config.Global) @@ -155,6 +159,7 @@ func main() { rootCmd.Flags().StringVar(&flagHost, "host", "", "proxy host (overrides config)") rootCmd.Flags().IntVarP(&flagPort, "port", "p", 0, "proxy port (overrides config)") rootCmd.Flags().StringVar(&flagUpstreamProxy, "upstream-proxy", "", "upstream proxy URL, e.g. http://user:pass@host:8888 (overrides config)") + rootCmd.Flags().BoolVar(&flagSslInsecure, "ssl-insecure", false, "skip TLS certificate verification (overrides config)") rootCmd.Flags().StringVarP(&flagProject, "project", "P", "", `project name to open directly, or "tmp" for a temporary session`) rootCmd.Flags().BoolVar(&flagAddDefaultPlugins, "add-default-plugins", false, "copy built-in example plugins into the plugins dir and exit") rootCmd.Flags().BoolVar(&flagAddDefaultConfig, "add-default-config", false, "copy the default config file to the config path and exit") diff --git a/docs/basics.md b/docs/basics.md index 172570d..6b0a82f 100644 --- a/docs/basics.md +++ b/docs/basics.md @@ -33,6 +33,7 @@ Flags: --plugins-dir string path to plugins dir (overrides config) -p, --port int proxy port (overrides config) -P, --project string project name to open directly, or "tmp" for a temporary session + --ssl-insecure skip TLS certificate verification (overrides config) --upstream-proxy string upstream proxy URL, e.g. http://user:pass@host:8888 (overrides config) -v, --version version for spilltea ``` diff --git a/docs/main.md b/docs/main.md index fcd3e5b..dfe7cd4 100644 --- a/docs/main.md +++ b/docs/main.md @@ -11,5 +11,6 @@ # Spilltea Documentation - **Version**: `{{.Cfg.Version}}` +- **SSL Insecure**: `{{.Cfg.App.SslInsecure}}` - **Repository**: `https://github.com/anotherhadi/spilltea` - **Sponsor this project**: `https://ko-fi.com/anotherhadi`