File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -368,9 +368,18 @@ let srv = {
368368 let host = s . host || srv . tn_host ;
369369 let port = s . port || srv . tn_port ;
370370
371+ if ( ! s . ttype ) s . ttype = [ ] ;
372+
373+ s . ttype = s . ttype . concat ( srv . ttype . portal . slice ( 0 ) ) ;
374+ s . ttype . push ( s . remoteAddress ) ;
375+ s . ttype . push ( s . remoteAddress ) ;
376+
377+ s . compressed = 0 ;
378+
371379 // do not allow the proxy connect to different servers
372380 if ( ONLY_ALLOW_DEFAULT_SERVER ) {
373381 if ( s . host !== srv . tn_host ) {
382+ srv . log ( 'avoid connection attempt to: ' + s . host + ':' + s . port , s ) ;
374383 srv . sendClient (
375384 s ,
376385 new Buffer (
@@ -379,19 +388,10 @@ let srv = {
379388 'Take a look to https://github.com/maldorne/mud-web-proxy/ and install it in your own server.\r\n'
380389 )
381390 ) ;
382- srv . log ( 'attempt connection to: ' + s . host + ':' + s . port , s ) ;
383391 srv . closeSocket ( s ) ;
384392 }
385393 }
386394
387- if ( ! s . ttype ) s . ttype = [ ] ;
388-
389- s . ttype = s . ttype . concat ( srv . ttype . portal . slice ( 0 ) ) ;
390- s . ttype . push ( s . remoteAddress ) ;
391- s . ttype . push ( s . remoteAddress ) ;
392-
393- s . compressed = 0 ;
394-
395395 s . ts = net . createConnection ( port , host , function ( ) {
396396 srv . log (
397397 'new connection to ' + host + ':' + port + ' for ' + s . remoteAddress
You can’t perform that action at this time.
0 commit comments