Skip to content

Add --insecure flag to ignore certificate errors#10

Closed
zgolus wants to merge 3 commits intosimonw:mainfrom
zgolus:main
Closed

Add --insecure flag to ignore certificate errors#10
zgolus wants to merge 3 commits intosimonw:mainfrom
zgolus:main

Conversation

@zgolus
Copy link

@zgolus zgolus commented Feb 13, 2026

Adds a --insecure (or -k) flag to the start command for accessing HTTPS sites with self-signed or invalid certificates.

Useful when testing against local development servers or internal services with custom CAs.

Usage

rodney start --insecure
rodney open https://localhost:8871/account/settings

Without the flag, you get ERR_CERT_AUTHORITY_INVALID. With it, the page loads.

Changes

  • Added --insecure/-k flag that sets Chrome's --ignore-certificate-errors
  • Updated help text
  • Test added that verifies cert validation fails without the flag and succeeds with it
  • The flag is also auto-enabled when using an authenticated proxy (preserves existing behavior)

Jakub Zgolinski and others added 2 commits February 13, 2026 09:47
Adds --insecure/-k flag to the start command to bypass certificate
validation, enabling rodney to access HTTPS sites with self-signed
or invalid certificates.

When --insecure is set, Chrome launches with --ignore-certificate-errors.
The flag is also automatically enabled when using an authenticated proxy.

Includes test coverage verifying that navigation fails with
ERR_CERT_AUTHORITY_INVALID without the flag, and succeeds with it.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The TestInsecureFlag test intentionally causes a TLS handshake error
when verifying that certificate validation works. Suppress this
expected error log to keep test output clean for CI.
@simonw
Copy link
Owner

simonw commented Feb 17, 2026

I had Claude knock out a quick Go test server that uses a self-signed certificate: https://gist.github.com/simonw/29f72b400110cfcdfbfccf2847c7338a

Run like this:

git clone https://gist.github.com/simonw/29f72b400110cfcdfbfccf2847c7338a
cd 29f72b400110cfcdfbfccf2847c7338a
go run .

Starts a server here:

https://localhost:8443

Then you can:

curl 'https://localhost:8443'
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.se/docs/sslcerts.html

But this works:

curl -k 'https://localhost:8443'
Hello over HTTPS!

@simonw
Copy link
Owner

simonw commented Feb 17, 2026

Testing manually against that server:

rodney % ./rodney start
Chrome started (PID 64987)
Debug URL: ws://127.0.0.1:54046/devtools/browser/342e9162-7b58-436a-aea2-fd0f8f9d00f4
rodney % ./rodney open https://localhost:8443
panic: navigation failed: net::ERR_CERT_AUTHORITY_INVALID

goroutine 1 [running]:
github.com/go-rod/rod/lib/utils.init.func2({0x104e7ccc0?, 0x1400020c340?})
	/Users/simon/go/pkg/mod/github.com/go-rod/rod@v0.116.2/lib/utils/utils.go:68 +0x24
main.connectBrowser.New.(*Browser).WithPanic.genE.func1({0x1400020c3b0?, 0x16b68f56e?, 0x16?})
	/Users/simon/go/pkg/mod/github.com/go-rod/rod@v0.116.2/must.go:36 +0x68
github.com/go-rod/rod.(*Browser).MustPage(0x140000007e0, {0x14000157e58?, 0x104accad4?, 0x3?})
	/Users/simon/go/pkg/mod/github.com/go-rod/rod@v0.116.2/must.go:71 +0xec
main.cmdOpen({0x1400001e140?, 0x104781b88?, 0x7001010521c800?})
	/Users/simon/dev/rodney/main.go:420 +0x160
main.main()
	/Users/simon/dev/rodney/main.go:135 +0x2d4

Then with the new option:

rodney % ./rodney stop
Chrome stopped
rodney % ./rodney start --insecure           
Chrome started (PID 68457)
Debug URL: ws://127.0.0.1:54070/devtools/browser/c0ebf86e-81d9-49d4-96ec-654f535ce6a3
rodney % ./rodney open https://localhost:8443
localhost:8443
rodney % ./rodney html
<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Hello over HTTPS!
</pre></body></html>
rodney % ./rodney stop
Chrome stopped

Worked perfectly.

@simonw simonw closed this in 1377e5b Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants