add User Agent info

This commit is contained in:
AJ ONeal 2018-06-06 03:24:14 -06:00
parent 5725d9f1e1
commit d3a9d0422d
1 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@ var WebSocket = require('ws');
var PromiseA = require('bluebird'); var PromiseA = require('bluebird');
var sni = require('sni'); var sni = require('sni');
var Packer = require('proxy-packer'); var Packer = require('proxy-packer');
var os = require('os');
function timeoutPromise(duration) { function timeoutPromise(duration) {
return new PromiseA(function (resolve) { return new PromiseA(function (resolve) {
@ -495,6 +496,12 @@ function _connect(state) {
, subject_scheme: 'mailto' , subject_scheme: 'mailto'
// TODO create domains list earlier // TODO create domains list earlier
, scope: Object.keys(state.config.servernames || {}).join(',') , scope: Object.keys(state.config.servernames || {}).join(',')
, hostname: os.hostname()
// Used for User-Agent
, os_type: os.type()
, os_platform: os.platform()
, os_release: os.release()
, os_arch: os.arch()
}; };
} }
} }