bdy 1.22.42-stage → 1.22.43-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/distTs/package.json
CHANGED
|
@@ -652,6 +652,13 @@ class Tunnel extends events_1.default {
|
|
|
652
652
|
if (!user || !user.name || !user.pass)
|
|
653
653
|
return false;
|
|
654
654
|
const client = this._getHttpAuthClient();
|
|
655
|
+
let ipAddress;
|
|
656
|
+
if (req.httpVersion === '2.0') {
|
|
657
|
+
ipAddress = req.socket.stream ? req.socket.stream.remoteAddress : '::1';
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
ipAddress = req.socket.remoteAddress;
|
|
661
|
+
}
|
|
655
662
|
try {
|
|
656
663
|
const { statusCode, body } = await client.request({
|
|
657
664
|
path: `/tunnel/auth/pat`,
|
|
@@ -664,6 +671,7 @@ class Tunnel extends events_1.default {
|
|
|
664
671
|
agentId: this.agent.id,
|
|
665
672
|
login: user.name,
|
|
666
673
|
password: user.pass,
|
|
674
|
+
ipAddress,
|
|
667
675
|
}),
|
|
668
676
|
});
|
|
669
677
|
if (statusCode !== 200) {
|