mirror of
https://github.com/restic/restic.git
synced 2026-11-21 13:02:42 +00:00
build(deps): bump the golang-x-deps group across 1 directory with 8 updates (#22066)
* build(deps): bump the golang-x-deps group across 1 directory with 8 updates Bumps the golang-x-deps group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [golang.org/x/crypto](https://github.com/golang/crypto) | `0.55.0` | `0.58.0` | | [golang.org/x/net](https://github.com/golang/net) | `0.58.0` | `0.60.0` | | [golang.org/x/oauth2](https://github.com/golang/oauth2) | `0.36.0` | `0.37.0` | | [golang.org/x/sync](https://github.com/golang/sync) | `0.22.0` | `0.24.0` | | [golang.org/x/sys](https://github.com/golang/sys) | `0.47.0` | `0.49.0` | | [golang.org/x/term](https://github.com/golang/term) | `0.45.0` | `0.47.0` | | [golang.org/x/text](https://github.com/golang/text) | `0.41.0` | `0.43.0` | | [golang.org/x/time](https://github.com/golang/time) | `0.15.0` | `0.16.0` | Updates `golang.org/x/crypto` from 0.55.0 to 0.58.0 - [Commits](https://github.com/golang/crypto/compare/v0.55.0...v0.58.0) Updates `golang.org/x/net` from 0.58.0 to 0.60.0 - [Commits](https://github.com/golang/net/compare/v0.58.0...v0.60.0) Updates `golang.org/x/oauth2` from 0.36.0 to 0.37.0 - [Commits](https://github.com/golang/oauth2/compare/v0.36.0...v0.37.0) Updates `golang.org/x/sync` from 0.22.0 to 0.24.0 - [Commits](https://github.com/golang/sync/compare/v0.22.0...v0.24.0) Updates `golang.org/x/sys` from 0.47.0 to 0.49.0 - [Commits](https://github.com/golang/sys/compare/v0.47.0...v0.49.0) Updates `golang.org/x/term` from 0.45.0 to 0.47.0 - [Commits](https://github.com/golang/term/compare/v0.45.0...v0.47.0) Updates `golang.org/x/text` from 0.41.0 to 0.43.0 - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.41.0...v0.43.0) Updates `golang.org/x/time` from 0.15.0 to 0.16.0 - [Commits](https://github.com/golang/time/compare/v0.15.0...v0.16.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.57.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-x-deps - dependency-name: golang.org/x/net dependency-version: 0.59.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-x-deps - dependency-name: golang.org/x/oauth2 dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-x-deps - dependency-name: golang.org/x/sync dependency-version: 0.23.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-x-deps - dependency-name: golang.org/x/sys dependency-version: 0.48.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-x-deps - dependency-name: golang.org/x/term dependency-version: 0.46.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-x-deps - dependency-name: golang.org/x/text dependency-version: 0.42.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-x-deps - dependency-name: golang.org/x/time dependency-version: 0.16.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-x-deps ... Signed-off-by: dependabot[bot] <support@github.com> * Resolve deprecations --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Eischer <michael.eischer@fau.de>
This commit is contained in:
4 files changed
+41
-38
No files matched your search
@@ -14,7 +14,6 @@ import (
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/feature"
|
||||
"golang.org/x/net/http2"
|
||||
)
|
||||
|
||||
// TransportOptions collects various options which can be set for an HTTP based
|
||||
@@ -86,15 +85,18 @@ func Transport(opts TransportOptions) (http.RoundTripper, error) {
|
||||
TLSClientConfig: &tls.Config{},
|
||||
}
|
||||
|
||||
// A custom TLSClientConfig disables automatic HTTP/2, so enable it explicitly.
|
||||
var protocols http.Protocols
|
||||
protocols.SetHTTP1(true)
|
||||
protocols.SetHTTP2(true)
|
||||
tr.Protocols = &protocols
|
||||
// ensure that http2 connections are closed if they are broken
|
||||
h2, err := http2.ConfigureTransports(tr)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if feature.Flag.Enabled(feature.BackendErrorRedesign) {
|
||||
h2.WriteByteTimeout = 120 * time.Second
|
||||
h2.ReadIdleTimeout = 60 * time.Second
|
||||
h2.PingTimeout = 60 * time.Second
|
||||
tr.HTTP2 = &http.HTTP2Config{
|
||||
WriteByteTimeout: 120 * time.Second,
|
||||
SendPingTimeout: 60 * time.Second,
|
||||
PingTimeout: 60 * time.Second,
|
||||
}
|
||||
}
|
||||
|
||||
unixtransport.Register(tr)
|
||||
|
||||
@@ -3,7 +3,6 @@ package rclone
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
@@ -25,13 +24,12 @@ import (
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/terminal"
|
||||
"golang.org/x/net/http2"
|
||||
)
|
||||
|
||||
// rclone is used to access data stored somewhere via rclone.
|
||||
type rclone struct {
|
||||
*rest.Backend
|
||||
tr *http2.Transport
|
||||
tr *http.Transport
|
||||
cmd *exec.Cmd
|
||||
waitCh <-chan struct{}
|
||||
waitResult error
|
||||
@@ -180,9 +178,12 @@ func newBackend(ctx context.Context, cfg Config, lim limiter.Limiter, errorLog f
|
||||
}
|
||||
|
||||
dialCount := 0
|
||||
tr := &http2.Transport{
|
||||
AllowHTTP: true, // this is not really HTTP, just stdin/stdout
|
||||
DialTLSContext: func(_ context.Context, network, address string, _ *tls.Config) (net.Conn, error) {
|
||||
// This is not really HTTP, just stdin/stdout.
|
||||
var protocols http.Protocols
|
||||
protocols.SetUnencryptedHTTP2(true)
|
||||
tr := &http.Transport{
|
||||
Protocols: &protocols,
|
||||
DialContext: func(_ context.Context, network, address string) (net.Conn, error) {
|
||||
debug.Log("new connection requested, %v %v", network, address)
|
||||
if dialCount > 0 {
|
||||
// the connection to the child process is already closed
|
||||
|
||||
Reference in new issue
Block a user