Add checksums to pipe, cp, mirror commands.
> Add checksum to uploaded object. Values: MD5, CRC32, CRC32C, SHA1 or SHA256. Requires server trailing headers support like AWS, MinIO and possibly others.
`--md5` is hidden, but still applied.
Uploads to buckets with object locking will still use MD5.
Bonus: `mc stat` shows checksum information.
add global `--resolve HOST[:PORT]:IP` flag
This commit adds support for custom DNS overwrites via one or multiple
`--resolve` flags. It allows `mc` users to define custom DNS mappings
from a HOST (and optional port) to an IP address.
For example:
```
mc --resolve foo.com:9000=10.1.2.3 ls myminio/mybucket
```
The `--resolve` syntax is taken from cURL. Ref. `curl --help dns`
Use cases:
1. DNS overwrites. If there are no DNS resolvers available, e.g.
due to a temp. outage, this allows `mc` to connect to a defined
alias as long as the IP of the one or multiple cluster nodes are
known. It also allows `mc` to overwrite the current DNS responses.
This is useful for various tests in dev and staging environments.
2. TLS certificate verification. Often TLS certificates are issued
for some DNS names (via SAN) but not for IP addresses. IP addresses
are usually not static and might change anytime. Accessing a MinIO
cluster that serves a certificate containing only DNS SANs via an
IP address results in a TLS certificate verification error - even
if the certificate is issued by a trusted CA. The current workaround
is the `--insecure` flag which disables TLS certification completely.
Example for TLS verification:
```
$ mc alias set 'myminio' 'https://192.168.188.118:9000' 'minioadmin' 'minioadmin'
mc: <ERROR> Unable to initialize new alias from the provided credentials.
Get "https://192.168.188.118:9000": tls: failed to verify certificate:
x509: cannot validate certificate for 192.168.188.118 because it doesn't contain any IP SANs.
```
```
mc alias set --resolve foo.com:9000=192.168.188.118 'myminio' 'https://foo.com:9000' 'minioadmin' 'minioadmin'
Added `myminio` successfully.
```
Signed-off-by: Andreas Auernhammer <github@aead.dev>
*) Add --no-autocompletion to disable the automatic install of
the auto completion
*) Add a prompt to ask for permission to install automatic
auto completion when not installed yet