Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
ttodua committed Apr 24, 2024
1 parent a3d3779 commit 9339694
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ts/src/pro/test/Exchange/test.proxies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function testWsProxy (exchange: Exchange, skippedProperties: object) {
exchange.wsProxy = 'http://' + testVpsServerIp + ':8002'; // "wsProxy" or "wssProxy" (depending on your proxy protocol)
exchange.handleMessage = ws_helper_callback; // todo for PHP: specifically this custom example does not work in PHP to retrieve the target message, however proxies do work in PHP for websockets independently from this example
const demoServerUrl = 'ws://' + testVpsServerIp + ':9876';
exchange.options['tempWatchPromise'] = exchange.watch (demoServerUrl, 'test', 'test');
exchange.options['tempWatchPromise'] = exchange.watch (demoServerUrl, 'ws_proxy_test', 'ws_proxy_test');
// reset the instance property
testSharedMethods.setProxyOptions (exchange, skippedProperties, proxyUrl, httpProxy, httpsProxy, socksProxy);
return await exchange.options['tempWatchPromise'];
Expand All @@ -40,8 +40,7 @@ function ws_helper_callback (client, message) {
let ipString = message['your_ip'];
ipString = ipString.replace ('::ffff:', '');
assert (ipString === testVpsServerIp, method + ' test failed. Returned response is ' + ipString + ' while it should be "' + testVpsServerIp + '"');
console.log ('WS proxy test finished');
client.resolve ();
client.resolve (null, 'ws_proxy_test');
}
}
catch (e) {
Expand Down

0 comments on commit 9339694

Please sign in to comment.