Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CoreModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,9 @@ function handleServerCommand(data) {
woptions.checkServerIdentity = tunnel_checkServerIdentity;
woptions.checkServerIdentity.servertlshash = data.servertlshash;

// Add custom relay headers if provided by the server
if (data.relayHeaders != null) { woptions.headers = data.relayHeaders; }

//sendConsoleText(JSON.stringify(woptions));
//sendConsoleText('TUNNEL: ' + JSON.stringify(data, null, 2));

Expand Down
2 changes: 2 additions & 0 deletions modules/RecoveryCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ require('MeshAgent').AddCommandHandler(function (data)
if (xurl != null) {
var woptions = http.parseUri(xurl);
woptions.rejectUnauthorized = 0;
// Add custom relay headers if provided by the server
if (data.relayHeaders != null) { woptions.headers = data.relayHeaders; }
//sendConsoleText(JSON.stringify(woptions));
var tunnel = http.request(woptions);
tunnel.on('upgrade', function (response, s, head)
Expand Down
Loading