Repository navigation
Trouter
To run trouter tests, from dev\projects\servers\trouter:
ant functionaltest -Dtest_skype_token_env=qbuildtest
The dev\projects\other\js\http\lib\server.js module abstracts the process of creating HTTP[S] servers when Trouter tests are run. To replace the built in server side HTTP[S] stack in Node.js with one based on HTTP.SYS, add the following at the very beginning of that file:
require('c:\\projects\\httpsys\\lib\\httpsys.js').slipstream();
require('msglogger').getLogger('httpserver').info('HTTPSYS slipstreamed for PID ' + process.pid);Adjust the path to the httpsys module according to your installation.
By default tests call the Trouter service over HTTPS on port 8081. To configure SSL with HTTP.SYS on that port, one must install the auth server certificate with private key in the LocalMachine\My certificate store and tell HTTP.SYS to use it for all SSL connections on TCP port 8081.
Go to dev\projects\servers\trouter\src.
Import the server certificate into the LocalMachine\My certificate store:
certutil -f -p 9yQ9uR_duwZi6ifU2oXQ -importpfx server.pfx
(pfx password is from config.json in that directory).
Next configure HTTP.SYS to use that certificate for all SSL connections on port 8081:
netsh http add sslcert ipport=0.0.0.0:8081 certhash=9ACC5122D1BBF8CCA988CCF8258A4C6023CACA38 appid={00112233-4455-6677-8899-AABBCCDDEEFE}
(The certhash corresponds to the SHA1 thumbprint of the server certifiate now installed in the LocalMachine\My certificate store, the appid is irrelevant and can be any GUID).
By default tests call to the auth service over HTTPS on port 8090. To configure SSL with HTTP.SYS on that port, one must install the auth server certificate with private key in the LocalMachine\My certificate store and tell HTTP.SYS to use it for all SSL connections on TCP port 8090.
Go to dev\projects\servers\trouter\node_modules\trouter-auth\src\keys.
Convert the PEM server certificate to PFX using openssl (e.g. from GNU package)
openssl pkcs12 -in server.pem -out server1.pfx -export
When asked to provide an export password for the private key, specify httpsys.
Then import the server certificate into the LocalMachine\My certificate store:
certutil -f -p httpsys -importpfx server1.pfx
Next configure HTTP.SYS to use that certificate for all SSL connections on port 8090:
netsh http add sslcert ipport=0.0.0.0:8090 certhash=F06A3100B23F635BA82CBFE6A5243DABBE1D87AC appid={00112233-4455-6677-8899-AABBCCDDEEFE}
(The certhash corresponds to the SHA1 thumbprint of the server certifiate now installed in the LocalMachine\My certificate store, the appid is irrelevant and can be any GUID).
Need to disable pref counters with "winPerfCountersEnabled": false in config.json, otherwise exception. Reason TBD.
Set log4jsEnabled: true in config.json to get more trouter logging into trouter-TRACE.log