TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 1 | var http = require('http'); |
| 2 | var https = require('https'); |
| 3 | var ArgumentParser = require('argparse').ArgumentParser; |
| 4 | var express = require('express'); |
| 5 | const stream = require('stream'); |
| 6 | var app = express(); |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 7 | var fs = require('fs'); |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 8 | const sleep = (milliseconds) => { |
| 9 | return new Promise(resolve => setTimeout(resolve, milliseconds)) |
| 10 | } |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 11 | var privateKey = fs.readFileSync('cert/private.key', 'utf8'); |
| 12 | var certificate = fs.readFileSync('cert/certificate.crt', 'utf8'); |
| 13 | var credentials = {key: privateKey, cert: certificate}; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 14 | |
| 15 | //For execution time calculation |
| 16 | var startTime = Date.now(); |
| 17 | |
| 18 | //Test case constants |
| 19 | const tc_normal = "normal"; |
| 20 | const tc_none_published = "none_published"; |
| 21 | const tc_all_published = "all_published" |
| 22 | const tc_10p_no_response = "10p_no_response"; |
| 23 | const tc_10first_no_response = "10first_no_response"; |
| 24 | const tc_100first_no_response = "100first_no_response"; |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 25 | const tc_all_delay_1s = "all_delay_1s"; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 26 | const tc_all_delay_10s = "all_delay_10s"; |
| 27 | const tc_10p_delay_10s = "10p_delay_10s"; |
| 28 | const tc_10p_error_response = "10p_error_response"; |
| 29 | const tc_10first_error_response = "10first_error_response"; |
| 30 | const tc_100first_error_response = "100first_error_response"; |
| 31 | |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 32 | var drr_sim_ip = '127.0.0.1'; //IP for redirect to DR redir sim. Can be changed by env DRR_SIM_IP |
| 33 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 34 | //Counters |
| 35 | var ctr_publish_query = 0; |
| 36 | var ctr_publish_query_published = 0; |
| 37 | var ctr_publish_query_not_published = 0; |
| 38 | var ctr_publish_req = 0; |
| 39 | var ctr_publish_req_redirect = 0; |
| 40 | var ctr_publish_req_published = 0; |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 41 | var ctr_double_publish = 0 |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 42 | |
| 43 | var parser = new ArgumentParser({ |
| 44 | version: '0.0.1', |
| 45 | addHelp:true, |
| 46 | description: 'Datarouter simulator' |
| 47 | }); |
| 48 | |
| 49 | parser.addArgument('--tc' , { help: 'TC $NoOfTc' } ); |
| 50 | parser.addArgument('--printtc' , |
| 51 | { |
| 52 | help: 'Print complete usage help', |
| 53 | action: 'storeTrue' |
| 54 | } |
| 55 | ); |
| 56 | |
| 57 | var args = parser.parseArgs(); |
| 58 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 59 | if (args.tc==tc_normal) { |
| 60 | console.log("TC: " + args.tc) |
| 61 | |
| 62 | } else if (args.tc==tc_none_published) { |
| 63 | console.log("TC: " + args.tc) |
| 64 | |
| 65 | } else if (args.tc==tc_all_published) { |
| 66 | console.log("TC: " + args.tc) |
| 67 | |
| 68 | } else if (args.tc==tc_10p_no_response) { |
| 69 | console.log("TC: " + args.tc) |
| 70 | |
| 71 | } else if (args.tc==tc_10first_no_response) { |
| 72 | console.log("TC: " + args.tc) |
| 73 | |
| 74 | } else if (args.tc==tc_100first_no_response) { |
| 75 | console.log("TC: " + args.tc) |
| 76 | |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 77 | } else if (args.tc==tc_all_delay_1s) { |
| 78 | console.log("TC: " + args.tc) |
| 79 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 80 | } else if (args.tc==tc_all_delay_10s) { |
| 81 | console.log("TC: " + args.tc) |
| 82 | |
| 83 | } else if (args.tc==tc_10p_delay_10s) { |
| 84 | console.log("TC: " + args.tc) |
| 85 | |
| 86 | } else if (args.tc==tc_10p_error_response) { |
| 87 | console.log("TC: " + args.tc) |
| 88 | |
| 89 | } else if (args.tc==tc_10first_error_response) { |
| 90 | console.log("TC: " + args.tc) |
| 91 | |
| 92 | } else if (args.tc==tc_100first_error_response) { |
| 93 | console.log("TC: " + args.tc) |
| 94 | } else { |
| 95 | console.log("No TC specified, use: --tc <tc-id>"); |
| 96 | process.exit(0); |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | if (args.printtc) { |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 100 | console.log("TC " + tc_normal + ": Normal case, query respone based on published files. Publish responde with ok/redirect depending on if file is published or not."); |
| 101 | console.log("TC " + tc_none_published + ": Query responde 'ok'. Publish respond with redirect."); |
| 102 | console.log("TC " + tc_all_published + ": Query respond with filename. Publish respond with 'ok'."); |
| 103 | console.log("TC " + tc_10p_no_response + ": 10% % no response for query and publish. Otherwise normal case."); |
| 104 | console.log("TC " + tc_10first_no_response + ": 10 first queries and requests gives no response for query and publish. Otherwise normal case."); |
| 105 | console.log("TC " + tc_100first_no_response + ": 100 first queries and requests gives no response for query and publish. Otherwise normal case."); |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 106 | console.log("TC " + tc_all_delay_1s + ": All responses delayed 1s (both query and publish)."); |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 107 | console.log("TC " + tc_all_delay_10s + ": All responses delayed 10s (both query and publish)."); |
| 108 | console.log("TC " + tc_10p_delay_10s + ": 10% of responses delayed 10s, (both query and publish)."); |
| 109 | console.log("TC " + tc_10p_error_response + ": 10% error response for query and publish. Otherwise normal case."); |
| 110 | console.log("TC " + tc_10first_error_response + ": 10 first queries and requests gives no response for query and publish. Otherwise normal case."); |
| 111 | console.log("TC " + tc_100first_error_response + ": 100 first queries and requests gives no response for query and publish. Otherwise normal case."); |
| 112 | |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 113 | process.exit(0); |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 114 | } |
| 115 | |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 116 | |
| 117 | var bodyParser = require('body-parser') |
| 118 | app.use(bodyParser.urlencoded({ extended: false })) |
| 119 | |
| 120 | // parse application/json |
| 121 | app.use(bodyParser.json()) |
| 122 | |
| 123 | // parse application/vnd.api+json as json |
| 124 | app.use(bodyParser.json({ type: 'application/vnd.api+json' })) |
| 125 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 126 | // parse some custom thing into a Buffer (to cater for 60MB files) |
| 127 | app.use(bodyParser.raw({limit:1024*1024*60, type: 'application/octet-stream' })) |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 128 | // parse an HTML body into a string |
| 129 | app.use(bodyParser.text({ type: 'text/html' })) |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 130 | |
| 131 | |
| 132 | |
| 133 | //Is alive function |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 134 | app.get("/",function(req, res){ |
| 135 | res.send("ok"); |
| 136 | }) |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 137 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 138 | //Counter readout |
| 139 | app.get("/ctr_publish_query",function(req, res){ |
| 140 | res.send(""+ctr_publish_query); |
| 141 | }) |
| 142 | app.get("/ctr_publish_query_published",function(req, res){ |
| 143 | res.send(""+ctr_publish_query_published); |
| 144 | }) |
| 145 | app.get("/ctr_publish_query_not_published",function(req, res){ |
| 146 | res.send(""+ctr_publish_query_not_published); |
| 147 | }) |
| 148 | app.get("/ctr_publish_req",function(req, res){ |
| 149 | res.send(""+ctr_publish_req); |
| 150 | }) |
| 151 | app.get("/ctr_publish_req_redirect",function(req, res){ |
| 152 | res.send(""+ctr_publish_req_redirect); |
| 153 | }) |
| 154 | app.get("/ctr_publish_req_published",function(req, res){ |
| 155 | res.send(""+ctr_publish_req_published); |
| 156 | }) |
| 157 | app.get("/ctr_published_files",function(req, res){ |
| 158 | res.send(""+published.length); |
| 159 | }) |
| 160 | app.get("/tc_info",function(req, res){ |
| 161 | res.send(args.tc); |
| 162 | }) |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 163 | app.get("/ctr_double_publish",function(req, res){ |
| 164 | res.send(""+ctr_double_publish); |
| 165 | }) |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 166 | function fmtMSS(s){ |
| 167 | return(s-(s%=60))/60+(9<s?':':':0')+s //Format time diff in mm:ss |
| 168 | } |
| 169 | app.get("/execution_time",function(req, res){ |
| 170 | diff = fmtMSS(Math.floor((Date.now()-startTime)/1000)); |
| 171 | res.send(""+diff); |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 172 | }) |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 173 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 174 | //db of published files |
| 175 | var published = []; |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 176 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 177 | app.get('/feedlog/1/',function(req, res){ |
| 178 | console.log("url:"+req.url); |
| 179 | ctr_publish_query++; |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 180 | var filename = req.query.filename; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 181 | console.log(filename); |
| 182 | var qtype = req.query.type; |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 183 | if(typeof(filename) == 'undefined'){ |
| 184 | res.status(400).send({error: 'No filename provided.'}); |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 185 | return; |
| 186 | } else if(typeof(qtype) == 'undefined'){ |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 187 | res.status(400).send({error: 'No type provided.'}); |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 188 | return; |
| 189 | } |
| 190 | |
| 191 | //Ugly fix, plus signs replaces with spaces in query params....need to put them back |
| 192 | filename = filename.replace(/ /g,"+"); |
| 193 | |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 194 | var sleeptime=0; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 195 | if (args.tc==tc_normal) { |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 196 | sleeptime=0; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 197 | } else if (args.tc==tc_10p_no_response && (ctr_publish_query%10) == 0) { |
| 198 | return; |
| 199 | } else if (args.tc==tc_10first_no_response && ctr_publish_query<11) { |
| 200 | return; |
| 201 | } else if (args.tc==tc_100first_no_response && ctr_publish_query<101) { |
| 202 | return; |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 203 | } else if (args.tc==tc_all_delay_1s) { |
| 204 | sleeptime=1000; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 205 | } else if (args.tc==tc_all_delay_10s) { |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 206 | sleeptime=10000; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 207 | } else if (args.tc==tc_10p_delay_10s && (ctr_publish_query%10) == 0) { |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 208 | sleeptime=10000; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 209 | } else if (args.tc==tc_10p_error_response && (ctr_publish_query%10) == 0) { |
| 210 | res.send(400); |
| 211 | return; |
| 212 | } else if (args.tc==tc_10first_error_response && ctr_publish_query<11) { |
| 213 | res.send(400); |
| 214 | return; |
| 215 | } else if (args.tc==tc_100first_error_response & ctr_publish_query<101) { |
| 216 | res.send(400); |
| 217 | return; |
| 218 | } |
| 219 | |
| 220 | if (published.includes(filename)) { |
| 221 | ctr_publish_query_published++; |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 222 | strToSend="[" + filename + "]"; |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 223 | } else { |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 224 | ctr_publish_query_not_published++; |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 225 | strToSend="[]"; |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 226 | } |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 227 | if (sleeptime > 0) { |
| 228 | sleep(sleeptime).then(() => { |
| 229 | res.send(strToSend); |
| 230 | }); |
| 231 | } else { |
| 232 | res.send(strToSend); |
| 233 | } |
| 234 | }); |
| 235 | |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 236 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 237 | app.put('/publish/1/:filename', function (req, res) { |
| 238 | console.log("url:"+req.url); |
| 239 | console.log("body (first 25 bytes):"+req.body.slice(0,25)); |
| 240 | console.log("headers:"+req.headers); |
| 241 | ctr_publish_req++; |
| 242 | |
| 243 | var filename = req.params.filename; |
| 244 | console.log(filename); |
| 245 | |
| 246 | if (args.tc==tc_normal) { |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 247 | // Continue |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 248 | } else if (args.tc==tc_none_published) { |
| 249 | ctr_publish_req_redirect++; |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 250 | res.redirect(301, 'http://' + drr_sim_ip + ':3908/publish/1/'+filename); |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 251 | return; |
| 252 | } else if (args.tc==tc_all_published) { |
| 253 | ctr_publish_req_published++; |
| 254 | res.send("ok"); |
| 255 | return; |
| 256 | }else if (args.tc==tc_10p_no_response && (ctr_publish_req%10) == 0) { |
| 257 | return; |
| 258 | } else if (args.tc==tc_10first_no_response && ctr_publish_req<11) { |
| 259 | return; |
| 260 | } else if (args.tc==tc_100first_no_response && ctr_publish_req<101) { |
| 261 | return; |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 262 | } else if (args.tc==tc_all_delay_1s) { |
| 263 | do_publish_delay(res, filename, 1000); |
| 264 | return; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 265 | } else if (args.tc==tc_all_delay_10s) { |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 266 | do_publish_delay(res, filename, 10000); |
| 267 | return; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 268 | } else if (args.tc==tc_10p_delay_10s && (ctr_publish_req%10) == 0) { |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 269 | do_publish_delay(res, filename, 10000); |
| 270 | return; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 271 | } else if (args.tc==tc_10p_error_response && (ctr_publish_req%10) == 0) { |
| 272 | res.send(400); |
| 273 | return; |
| 274 | } else if (args.tc==tc_10first_error_response && ctr_publish_req<11) { |
| 275 | res.send(400); |
| 276 | return; |
| 277 | } else if (args.tc==tc_100first_error_response & ctr_publish_req<101) { |
| 278 | res.send(400); |
| 279 | return; |
| 280 | } |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 281 | if (!published.includes(filename)) { |
| 282 | ctr_publish_req_redirect++; |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 283 | res.redirect(301, 'http://'+drr_sim_ip+':3908/publish/1/'+filename); |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 284 | } else { |
| 285 | ctr_publish_req_published++; |
| 286 | res.send("ok"); |
| 287 | } |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 288 | return; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 289 | }) |
| 290 | |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 291 | function do_publish_delay(res, filename, sleeptime) { |
| 292 | if (!published.includes(filename)) { |
| 293 | ctr_publish_req_redirect++; |
| 294 | sleep(1000).then(() => { |
| 295 | res.redirect(301, 'http://'+drr_sim_ip+':3908/publish/1/'+filename); |
| 296 | }); |
| 297 | } else { |
| 298 | ctr_publish_req_published++; |
| 299 | sleep(1000).then(() => { |
| 300 | res.send("ok"); |
| 301 | }); |
| 302 | } |
| 303 | } |
| 304 | |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 305 | //Callback from DR REDIR server, when file is published ok this PUT request update the list of published files. |
| 306 | app.put('/dr_redir_publish/:filename', function (req, res) { |
| 307 | console.log("url:"+req.url); |
| 308 | var filename = req.params.filename; |
| 309 | console.log(filename); |
| 310 | |
| 311 | if (!published.includes(filename)) { |
| 312 | console.log("File marked as published by callback from DR redir SIM. url: " + req.url); |
| 313 | published.push(filename); |
| 314 | } else { |
| 315 | console.log("File already marked as published. Callback from DR redir SIM. url: " + req.url); |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 316 | ctr_double_publish = ctr_double_publish+1; |
BjornMagnussonXA | f4e1836 | 2019-04-10 13:04:08 +0000 | [diff] [blame] | 317 | } |
| 318 | |
| 319 | res.send("ok"); |
| 320 | }) |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 321 | |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 322 | var httpServer = http.createServer(app); |
| 323 | var httpsServer = https.createServer(credentials, app); |
| 324 | |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 325 | var httpPort=3906; |
| 326 | var httpsPort=3907; |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 327 | httpServer.listen(httpPort); |
maximesson | b8b94ae | 2019-03-25 16:03:08 +0000 | [diff] [blame] | 328 | console.log("DR-simulator listening (http) at "+httpPort); |
TamasBakai | 9b78033 | 2019-02-15 08:38:16 +0000 | [diff] [blame] | 329 | httpsServer.listen(httpsPort); |
BjornMagnussonXA | 42dcb26 | 2019-04-26 19:29:54 +0000 | [diff] [blame] | 330 | console.log("DR-simulator listening (https) at "+httpsPort); |
| 331 | |
| 332 | if (process.env.DRR_SIM_IP) { |
| 333 | drr_sim_ip=process.env.DRR_SIM_IP; |
| 334 | } |
| 335 | console.log("Using IP " + drr_sim_ip + " for redirect to DR redir sim"); |