Skip to content

feat: added options for static-ip & custom root CA#1324

Open
normanre wants to merge 3 commits intohetznercloud:mainfrom
normanre:main
Open

feat: added options for static-ip & custom root CA#1324
normanre wants to merge 3 commits intohetznercloud:mainfrom
normanre:main

Conversation

@normanre
Copy link

@normanre normanre commented Feb 1, 2026

Hello everyone,

I added these two options to configure a http.Client for the cli:

  1. static-ip: With this option a static ip is used and DNS resolution is skipped but still the host of endpoint is used
  2. root-ca: With this option someone can define a custom root ca

I did this because DNS and certificates resolution does not work as expected on Termux for Android. With these two additions this cli can be used for Android.

One quirk with Termux is that export HCLOUD_CONFIG="$HOME/.config/hcloud/cli.toml" has to be set (for example in .bashrc)

I hope this helps also someone else.

@normanre normanre requested a review from a team as a code owner February 1, 2026 04:11
@phm07
Copy link
Contributor

phm07 commented Feb 5, 2026

hcloud already allows configuring the API endpoint using the endpoint option. Why would it be necessary do add another option?
Also, would it not be possible to install the root CA locally?

@jooola
Copy link
Member

jooola commented Feb 5, 2026

You might also be able to leverage SSL_CERT_DIR or SSL_CERT_FILE to set custom root CAs.

See https://pkg.go.dev/crypto/x509#SystemCertPool

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.

3 participants