"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
fshttp: add --disable-http-keep-alives to disable HTTP Keep Alives
Nick Craig-Woode7483b40b34f
diff --git a/fs/config.go b/fs/config.goindex 5eb85ec61..e96be37d0 100644--- a/fs/config.go+++ b/fs/config.go@@ -132,6 +132,7 @@ type ConfigInfo struct {DisableHTTP2 boolHumanReadable boolKvLockTime time.Duration // maximum time to keep key-value database locked by process+ DisableHTTPKeepAlives bool}// NewConfig creates a new config with everything set to the defaultdiff --git a/fs/config/configflags/configflags.go b/fs/config/configflags/configflags.goindex 7c2c8ade9..8e3e8d558 100644--- a/fs/config/configflags/configflags.go+++ b/fs/config/configflags/configflags.go@@ -137,6 +137,7 @@ func AddFlags(ci *fs.ConfigInfo, flagSet *pflag.FlagSet) {flags.BoolVarP(flagSet, &ci.DisableHTTP2, "disable-http2", "", ci.DisableHTTP2, "Disable HTTP/2 in the global transport")flags.BoolVarP(flagSet, &ci.HumanReadable, "human-readable", "", ci.HumanReadable, "Print numbers in a human-readable format, sizes with suffix Ki|Mi|Gi|Ti|Pi")flags.DurationVarP(flagSet, &ci.KvLockTime, "kv-lock-time", "", ci.KvLockTime, "Maximum time to keep key-value database locked by process")+ flags.BoolVarP(flagSet, &ci.DisableHTTPKeepAlives, "disable-http-keep-alives", "", ci.DisableHTTPKeepAlives, "Disable HTTP keep-alives and use each connection once.")}// ParseHeaders converts the strings passed in via the header flags into HTTPOptionsdiff --git a/fs/fshttp/http.go b/fs/fshttp/http.goindex ef7cf2851..9384d2fa4 100644--- a/fs/fshttp/http.go+++ b/fs/fshttp/http.go@@ -53,6 +53,7 @@ func NewTransportCustom(ctx context.Context, customize func(*http.Transport)) htt.MaxIdleConns = 2 * t.MaxIdleConnsPerHostt.TLSHandshakeTimeout = ci.ConnectTimeoutt.ResponseHeaderTimeout = ci.Timeout+ t.DisableKeepAlives = ci.DisableHTTPKeepAlives// TLS Configt.TLSClientConfig = &tls.Config{