Skip to content

Commit ef177e6

Browse files
build: update dist folder
1 parent 83c73af commit ef177e6

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

dist/index.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ class HttpClient {
25782578
}
25792579
const usingSsl = parsedUrl.protocol === 'https:';
25802580
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
2581-
token: `${proxyUrl.username}:${proxyUrl.password}`
2581+
token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
25822582
})));
25832583
this._proxyAgentDispatcher = proxyAgent;
25842584
if (usingSsl && this._ignoreSslError) {
@@ -2692,11 +2692,11 @@ function getProxyUrl(reqUrl) {
26922692
})();
26932693
if (proxyVar) {
26942694
try {
2695-
return new URL(proxyVar);
2695+
return new DecodedURL(proxyVar);
26962696
}
26972697
catch (_a) {
26982698
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
2699-
return new URL(`http://${proxyVar}`);
2699+
return new DecodedURL(`http://${proxyVar}`);
27002700
}
27012701
}
27022702
else {
@@ -2755,6 +2755,19 @@ function isLoopbackAddress(host) {
27552755
hostLower.startsWith('[::1]') ||
27562756
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
27572757
}
2758+
class DecodedURL extends URL {
2759+
constructor(url, base) {
2760+
super(url, base);
2761+
this._decodedUsername = decodeURIComponent(super.username);
2762+
this._decodedPassword = decodeURIComponent(super.password);
2763+
}
2764+
get username() {
2765+
return this._decodedUsername;
2766+
}
2767+
get password() {
2768+
return this._decodedPassword;
2769+
}
2770+
}
27582771
//# sourceMappingURL=proxy.js.map
27592772

27602773
/***/ }),

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)