Proxy setting do not work for YoutubeDL update

I asked a question on GitHub https://github.com/Chocobozzz/PeerTube/issues/4465

That issue I didn’t ask accurately enough.

I’ve already set HTTP_PROXY and HTTPS_PROXY in the environment variables, but Cannot update youtube-dl. error still happens.

Error logs are as follow:

{
    "err": {
        "stack": "RequestError: connect ETIMEDOUT 95.143.172.170:443\n    at ClientRequest.<anonymous> (/app/node_modules/got/dist/source/core/index.js:956:111)\n    at Object.onceWrapper (events.js:421:26)\n at ClientRequest.emit (events.js:326:22)\n    at ClientRequest.EventEmitter.emit (domain.js:483:12)\n    at ClientRequest.origin.emit (/app/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)\n    at TLSSocket.socketErrorListener (_http_client.js:427:9)\n    at TLSSocket.emit (events.js:314:20)\n    at TLSSocket.EventEmitter.emit (domain.js:483:12)\n    at emitErrorNT (internal/streams/destroy.js:92:8)\n   at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)",
        "message": "connect ETIMEDOUT 95.143.172.170:443",
        "name": "RequestError",
        "code": "ETIMEDOUT",
        "request": {
            "_readableState": {
                "objectMode": false,
                "highWaterMark": 0,
                "buffer": {
                    "head": null,
                    "tail": null,
                    "length": 0
                },
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": null,
                "ended": false,
                "endEmitted": false,
                "reading": false,
                "sync": true,
                "needReadable": false,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "emitClose": true,
                "autoDestroy": false,
                "destroyed": true,
                "defaultEncoding": "utf8",
                "awaitDrainWriters": null,
                "multiAwaitDrain": false,
                "readingMore": false,
                "decoder": null,
                "encoding": null
            },
            "readable": true,
            "_events": {
                "pipe": [
                    null,
                    null
                ],
                "response": [
                    null,
                    null
                ]
            },
            "_eventsCount": 8,
            "_writableState": {
                "objectMode": false,
                "highWaterMark": 0,
                "finalCalled": true,
                "needDrain": false,
                "ending": true,
                "ended": true,
                "finished": false,
                "destroyed": true,
                "decodeStrings": true,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": true,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "afterWriteTickInfo": null,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 1,
                "prefinished": false,
                "errorEmitted": true,
                "emitClose": true,
                "autoDestroy": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                    "next": null,
                    "entry": null
                }
            },
            "writable": false,
            "allowHalfOpen": true,
            "requestInitialized": true,
            "redirects": [],
            "retryCount": 2,
            "_progressCallbacks": [],
            "options": {
                "method": "GET",
                "retry": {
                    "limit": 2,
                    "methods": [
                        "GET",
                        "PUT",
                        "HEAD",
                        "DELETE",
                        "OPTIONS",
                        "TRACE"
                    ],
                    "statusCodes": [
                        408,
                        413,
                        429,
                        500,
                        502,
                        503,
                        504,
                        521,
                        522,
                        524
                    ],
                    "errorCodes": [
                        "ETIMEDOUT",
                        "ECONNRESET",
                        "EADDRINUSE",
                        "ECONNREFUSED",
                        "EPIPE",
                        "ENOTFOUND",
                        "ENETUNREACH",
                        "EAI_AGAIN"
                    ],
                    "maxRetryAfter": null
                },
                "headers": {
                    "user-agent": "got (https://github.com/sindresorhus/got)",
                    "accept-encoding": "gzip, deflate, br"
                },
                "hooks": {
                    "init": [],
                    "beforeRequest": [],
                    "beforeRedirect": [],
                    "beforeRetry": [],
                    "beforeError": [],
                    "afterResponse": []
                },
                "decompress": true,
                "throwHttpErrors": true,
                "followRedirect": false,
                "isStream": false,
                "responseType": "text",
                "resolveBodyOnly": false,
                "maxRedirects": 10,
                "prefixUrl": "",
                "methodRewriting": true,
                "ignoreInvalidCookies": false,
                "http2": false,
                "allowGetBody": false,
                "pagination": {
                    "countLimit": null,
                    "backoff": 0,
                    "requestLimit": 10000,
                    "stackAllItems": true
                },
                "cacheOptions": {},
                "url": "https://yt-dl.org/downloads/latest/youtube-dl",
                "username": "",
                "password": "",
                "timeout": {}
            },
            "requestUrl": "https://yt-dl.org/downloads/latest/youtube-dl",
            "_cannotHaveBody": true,
            "_noPipe": true
        },
        "timings": {
            "start": 1634256419465,
            "socket": 1634256419465,
            "lookup": 1634256419465,
            "error": 1634256550550,
            "phases": {
                "wait": 0,
                "dns": 0,
                "total": 131085
            }
        }
    },
    "level": "error",
    "message": "Cannot update youtube-dl.",
    "label": "",
    "timestamp": "2021-10-15T00:09:10.551Z"
}

I will be very grateful to you if you can help.

My PeerTube instance:
URL:
version: 3.4.0
NodeJS version: 12.22.6
Ffmpeg version: 4.1.6-1~deb10u1
Postgres: 13.3
Browser name/version: Google chrome 92

Have you seen the last comment on the PR? https://github.com/Chocobozzz/PeerTube/issues/4465#issuecomment-944037761
It seems that the bug was found, and the fix will be available in the next Peertube’s release.