1
0
mirror of https://github.com/rclone/rclone.git synced 2026-02-26 01:13:32 +00:00

internxt: use rclone's http.Client to enable more features

e.g. --bwlimit, HTTP proxies, connection timeouts, --dump headers/bodies etc
This commit is contained in:
Nick Craig-Wood
2026-01-30 16:32:50 +00:00
parent e2a079d73f
commit 1bf73d862a

View File

@@ -26,6 +26,7 @@ import (
"github.com/rclone/rclone/fs/config/configstruct"
"github.com/rclone/rclone/fs/config/obscure"
"github.com/rclone/rclone/fs/fserrors"
"github.com/rclone/rclone/fs/fshttp"
"github.com/rclone/rclone/fs/hash"
"github.com/rclone/rclone/lib/dircache"
"github.com/rclone/rclone/lib/encoder"
@@ -113,6 +114,7 @@ func Config(ctx context.Context, name string, m configmap.Mapper, configIn fs.Co
}
cfg := config.NewDefaultToken("")
cfg.HTTPClient = fshttp.NewClient(ctx)
switch configIn.State {
case "":
@@ -259,6 +261,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
cfg := config.NewDefaultToken(oauthToken.AccessToken)
cfg.Mnemonic = opt.Mnemonic
cfg.SkipHashValidation = opt.SkipHashValidation
cfg.HTTPClient = fshttp.NewClient(ctx)
userInfo, err := getUserInfo(ctx, &userInfoConfig{Token: cfg.Token})
if err != nil {