Add support for custom S3 endpoints via AWS_ENDPOINT_URL

Read the standard AWS_ENDPOINT_URL environment variable to allow connecting to S3-compatible backends such as Cloudflare R2, Ceph, Garage, SeaweedFS, etc.

When a custom endpoint is set:

  • Use path-style addressing for non-AWS endpoints
  • Honor AWS_DEFAULT_REGION for SigV4 signing

Replace Aws::Client::ClientConfiguration with the S3-specific subclass Aws::S3::S3ClientConfiguration which provides the useVirtualAddressing option needed for path-style access.

How to test

With a custom endpoint:

AWS_ENDPOINT_URL=https://<account-id>.r2.cloudflarestorage.com \
AWS_DEFAULT_REGION=auto kioclient ls s3://

Without (default AWS behavior unchanged):

kioclient ls s3://

Merge request reports

Loading