fix amt notls always using tls, fix tls undefined, amt timeout shortened, commander typo fix
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
May 5, 2025 at 01:34 UTC
fa7f194ed11c23390b27c7637bb162386a2cee25
5 files changed
+6
-5
amt/amt-wsman-comm.js
+1
-1
@@ -291,7 +291,7 @@ var CreateWsmanComm = function (host, port, user, pass, tls, tlsoptions, mpsConn
291
}
292
obj.socket = obj.tls.connect(obj.port, obj.host, options, obj.xxOnSocketConnected);
293
obj.socket.setEncoding('binary');
294
- obj.socket.setTimeout(60000); // Set socket idle timeout
294
+ obj.socket.setTimeout(28000); // Set socket idle timeout of 28 seconds
295
obj.socket.on('data', obj.xxOnSocketData);
296
obj.socket.on('close', obj.xxOnSocketClosed);
297
obj.socket.on('timeout', obj.destroy);
amtmanager.js
+2
-2
@@ -638,7 +638,7 @@ module.exports.CreateAmtManager = function (parent) {
638
639
// Connect now
640
var comm;
641
- if ((dev.tlsfail !== true) && (parent.config.domains[dev.domainid].amtmanager.tlsconnections !== false)) {
641
+ if ((dev.tlsfail !== true) && (parent.config.domains[dev.domainid].amtmanager.tlsconnections !== false) && (dev.intelamt.tls == 1)) {
642
parent.debug('amt', dev.name, (dev.connType == 1) ? 'Relay-Connect' : 'LMS-Connect', "TLS", user);
643
comm = CreateWsmanComm(dev.nodeid, 16993, user, pass, 1, null, ciraconn); // Perform TLS
644
comm.xtlsFingerprint = 0; // Perform no certificate checking
@@ -670,7 +670,7 @@ module.exports.CreateAmtManager = function (parent) {
670
671
// Connect now
672
var comm;
673
- if ((dev.tlsfail !== true) && (parent.config.domains[dev.domainid].amtmanager.tlsconnections !== false)) {
673
+ if ((dev.tlsfail !== true) && (parent.config.domains[dev.domainid].amtmanager.tlsconnections !== false) && (dev.intelamt.tls == 1)) {
674
parent.debug('amt', dev.name, 'Direct-Connect', "TLS", dev.host, user);
675
comm = CreateWsmanComm(dev.host, 16993, user, pass, 1); // Always try with TLS first
676
comm.xtlsFingerprint = 0; // Perform no certificate checking
public/commander.htm
+1
-1
@@ -1155,7 +1155,7 @@ function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:am
1155
32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1156
""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">'+
1157
xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").value)&&(a='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">'+
1158
-xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.sstringify(d,null,2));console.log("netAuthProfile",JSON.sstringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1158
+xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1159
function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1160
!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1161
function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("None")+"</option>",c="<option value=-1>"+EscapeHtml("None")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
public/scripts/amt-redir-ws-0.1.0-min.js
+1
-1
@@ -1 +1 @@
1
-var CreateAmtRedirect=function(e,o){var y={};function x(e){return String.fromCharCode.apply(null,e)}return((y.m=e).parent=y).authCookie=o,y.State=0,y.socket=null,y.host=null,y.port=0,y.user=null,y.pass=null,y.authuri="/RedirectionService",y.tlsv1only=0,y.inDataCount=0,y.connectstate=0,y.protocol=e.protocol,y.acc=null,y.amtsequence=1,y.amtkeepalivetimer=null,y.onStateChanged=null,y.Start=function(e,t,n,r,a){y.host=e,y.port=t,y.user=n,y.pass=r,y.connectstate=0,y.inDataCount=0;e=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+e+"&port="+t+"&tls="+a+("*"==n?"&serverauth=1":"")+(void 0===r?"&serverauth=1&user="+n:"");null!=o&&""!=o&&(e+="&auth="+o),y.socket=new WebSocket(e),y.socket.binaryType="arraybuffer",y.socket.onopen=y.xxOnSocketConnected,y.socket.onmessage=y.xxOnMessage,y.socket.onclose=y.xxOnSocketClosed,y.xxStateChange(1)},y.xxOnSocketConnected=function(){y.xxStateChange(2),1==y.protocol&&y.directSend(new Uint8Array([16,0,0,0,83,79,76,32])),2==y.protocol&&y.directSend(new Uint8Array([16,1,0,0,75,86,77,82])),3==y.protocol&&y.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))},y.xxOnMessage=function(e){if(e.data&&-1!=y.connectstate){if(y.inDataCount++,1==y.connectstate&&(2==y.protocol||3==y.protocol))return y.m.ProcessBinaryData?y.m.ProcessBinaryData(e.data):y.m.ProcessData(x(e.data));var t;for(null==y.acc?y.acc=e.data:((t=new Uint8Array(y.acc.byteLength+e.data.byteLength)).set(new Uint8Array(y.acc),0),t.set(new Uint8Array(e.data),y.acc.byteLength),y.acc=t.buffer);null!=y.acc&&1<=y.acc.byteLength;){var n=0,r=new Uint8Array(y.acc);switch(r[0]){case 17:if(r.byteLength<4)return;var a=r[1];if(0===a){if(r.byteLength<13)return;a=r[12];if(r.byteLength<13+a)return;y.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0])),n=13+a}else y.Stop(1);break;case 20:if(r.byteLength<9)return;var o=new DataView(y.acc).getUint32(5,!0);if(r.byteLength<9+o)return;var a=r[1],c=r[4],s=[];for(i=0;i<o;i++)s.push(r[9+i]);var l=new Uint8Array(y.acc.slice(9,9+o)),n=9+o;if(0==c)0<=s.indexOf(4)?y.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(y.user.length+y.authuri.length+8)+String.fromCharCode(y.user.length)+y.user+String.fromCharCode(0,0)+String.fromCharCode(y.authuri.length)+y.authuri+String.fromCharCode(0,0,0,0)):y.Stop(2);else if(3!=c&&4!=c||1!=a)if(0==a)switch(y.protocol){case 1:y.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(y.amtsequence++)+ShortToStrX(1e4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1e4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:y.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:y.connectstate=1,y.xxStateChange(3)}else y.Stop(3);else{var h=0,u=l[0],S=x(new Uint8Array(l.buffer.slice(1,1+u))),u=l[h+=u+1],d=x(new Uint8Array(l.buffer.slice(h+1,h+1+u))),u=(h+=u+1,null),g=(e=>{for(var t="",n=0;n<e;n++)t+="abcdef0123456789".charAt(Math.floor(16*Math.random()));return t})(32),f="00000002",C="",l=(4==c&&(m=l[h],u=x(new Uint8Array(l.buffer.slice(h+1,h+1+m))),C=f+":"+g+":"+u+":"),hex_md5(hex_md5(y.user+":"+S+":"+y.pass)+":"+d+":"+C+hex_md5("POST:"+y.authuri))),h=y.user.length+S.length+d.length+y.authuri.length+g.length+f.length+l.length+7,m=(4==c&&(h+=u.length+1),String.fromCharCode(19,0,0,0,c)+IntToStrX(h)+String.fromCharCode(y.user.length)+y.user+String.fromCharCode(S.length)+S+String.fromCharCode(d.length)+d+String.fromCharCode(y.authuri.length)+y.authuri+String.fromCharCode(g.length)+g+String.fromCharCode(f.length)+f+String.fromCharCode(l.length)+l);4==c&&(m+=String.fromCharCode(u.length)+u),y.xxSend(m)}break;case 33:r.byteLength<23||(n=23,y.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(y.amtsequence++)+String.fromCharCode(0,0,27,0,0,0)),1==y.protocol&&(y.amtkeepalivetimer=setInterval(y.xxSendAmtKeepAlive,2e3)),y.connectstate=1,y.xxStateChange(3));break;case 41:r.byteLength<10||(n=10);break;case 42:r.byteLength<10||(C=10+(r[9]<<8)+r[8],r.byteLength<C)||(y.m.ProcessBinaryData?y.m.ProcessBinaryData(new Uint8Array(r.buffer.slice(10,C))):y.m.ProcessData(x(new Uint8Array(r.buffer.slice(10,C)))),n=C);break;case 43:r.byteLength<8||(n=8);break;case 65:r.byteLength<8||(y.connectstate=1,y.m.Start(),8<r.byteLength&&(y.m.ProcessBinaryData?y.m.ProcessBinaryData(new Uint8Array(r.buffer.slice(8))):y.m.ProcessData(x(new Uint8Array(r.buffer.slice(8))))),n=r.byteLength);break;case 240:y.serverIsRecording=!0,n=1;break;default:return console.log("Unknown Intel AMT command: "+r[0]+" acclen="+r.byteLength),void y.Stop(4)}if(0==n)return;n!=y.acc.byteLength?y.acc=y.acc.slice(n):y.acc=null}}},y.directSend=function(e){try{y.socket.send(e.buffer)}catch(e){}},y.xxSend=function(e){if(null!=y.socket&&y.socket.readyState==WebSocket.OPEN){for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);try{y.socket.send(t.buffer)}catch(e){}}},y.Send=y.send=function(e){null!=y.socket&&1==y.connectstate&&y.xxSend(1==y.protocol?String.fromCharCode(40,0,0,0)+IntToStrX(y.amtsequence++)+ShortToStrX(e.length)+e:e)},y.xxSendAmtKeepAlive=function(){null!=y.socket&&y.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(y.amtsequence++))},y.xxOnSocketClosed=function(){0==y.inDataCount&&0==y.tlsv1only?(y.tlsv1only=1,y.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+y.host+"&port="+y.port+"&tls="+y.tls+"&tls1only=1"+("*"==y.user?"&serverauth=1":"")+("undefined"==typeof pass?"&serverauth=1&user="+y.user:"")),y.socket.binaryType="arraybuffer",y.socket.onopen=y.xxOnSocketConnected,y.socket.onmessage=y.xxOnMessage,y.socket.onclose=y.xxOnSocketClosed):y.Stop(5)},y.xxStateChange=function(e){y.State!=e&&(y.State=e,y.m.xxStateChange(y.State),null!=y.onStateChanged)&&y.onStateChanged(y,y.State)},y.Stop=function(e){y.xxStateChange(0),y.connectstate=-1,(y.acc=null)!=y.socket&&(y.socket.close(),y.socket=null),null!=y.amtkeepalivetimer&&(clearInterval(y.amtkeepalivetimer),y.amtkeepalivetimer=null)},y}
\ No newline at end of file
1
+var CreateAmtRedirect=function(e,o){var y={};function x(e){return String.fromCharCode.apply(null,e)}return((y.m=e).parent=y).authCookie=o,y.State=0,y.socket=null,y.host=null,y.port=0,y.user=null,y.pass=null,y.authuri="/RedirectionService",y.tlsv1only=0,y.inDataCount=0,y.connectstate=0,y.protocol=e.protocol,y.acc=null,y.amtsequence=1,y.amtkeepalivetimer=null,y.onStateChanged=null,y.Start=function(e,t,n,r,a){y.host=e,y.port=t,y.user=n,y.pass=r,y.tls=a,y.connectstate=0,y.inDataCount=0;e=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+e+"&port="+t+"&tls="+a+("*"==n?"&serverauth=1":"")+(void 0===r?"&serverauth=1&user="+n:"");null!=o&&""!=o&&(e+="&auth="+o),y.socket=new WebSocket(e),y.socket.binaryType="arraybuffer",y.socket.onopen=y.xxOnSocketConnected,y.socket.onmessage=y.xxOnMessage,y.socket.onclose=y.xxOnSocketClosed,y.xxStateChange(1)},y.xxOnSocketConnected=function(){y.xxStateChange(2),1==y.protocol&&y.directSend(new Uint8Array([16,0,0,0,83,79,76,32])),2==y.protocol&&y.directSend(new Uint8Array([16,1,0,0,75,86,77,82])),3==y.protocol&&y.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))},y.xxOnMessage=function(e){if(e.data&&-1!=y.connectstate){if(y.inDataCount++,1==y.connectstate&&(2==y.protocol||3==y.protocol))return y.m.ProcessBinaryData?y.m.ProcessBinaryData(e.data):y.m.ProcessData(x(e.data));var t;for(null==y.acc?y.acc=e.data:((t=new Uint8Array(y.acc.byteLength+e.data.byteLength)).set(new Uint8Array(y.acc),0),t.set(new Uint8Array(e.data),y.acc.byteLength),y.acc=t.buffer);null!=y.acc&&1<=y.acc.byteLength;){var n=0,r=new Uint8Array(y.acc);switch(r[0]){case 17:if(r.byteLength<4)return;var a=r[1];if(0===a){if(r.byteLength<13)return;a=r[12];if(r.byteLength<13+a)return;y.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0])),n=13+a}else y.Stop(1);break;case 20:if(r.byteLength<9)return;var o=new DataView(y.acc).getUint32(5,!0);if(r.byteLength<9+o)return;var a=r[1],c=r[4],s=[];for(i=0;i<o;i++)s.push(r[9+i]);var l=new Uint8Array(y.acc.slice(9,9+o)),n=9+o;if(0==c)0<=s.indexOf(4)?y.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(y.user.length+y.authuri.length+8)+String.fromCharCode(y.user.length)+y.user+String.fromCharCode(0,0)+String.fromCharCode(y.authuri.length)+y.authuri+String.fromCharCode(0,0,0,0)):y.Stop(2);else if(3!=c&&4!=c||1!=a)if(0==a)switch(y.protocol){case 1:y.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(y.amtsequence++)+ShortToStrX(1e4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1e4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:y.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:y.connectstate=1,y.xxStateChange(3)}else y.Stop(3);else{var h=0,u=l[0],S=x(new Uint8Array(l.buffer.slice(1,1+u))),u=l[h+=u+1],d=x(new Uint8Array(l.buffer.slice(h+1,h+1+u))),u=(h+=u+1,null),g=(e=>{for(var t="",n=0;n<e;n++)t+="abcdef0123456789".charAt(Math.floor(16*Math.random()));return t})(32),f="00000002",C="",l=(4==c&&(m=l[h],u=x(new Uint8Array(l.buffer.slice(h+1,h+1+m))),C=f+":"+g+":"+u+":"),hex_md5(hex_md5(y.user+":"+S+":"+y.pass)+":"+d+":"+C+hex_md5("POST:"+y.authuri))),h=y.user.length+S.length+d.length+y.authuri.length+g.length+f.length+l.length+7,m=(4==c&&(h+=u.length+1),String.fromCharCode(19,0,0,0,c)+IntToStrX(h)+String.fromCharCode(y.user.length)+y.user+String.fromCharCode(S.length)+S+String.fromCharCode(d.length)+d+String.fromCharCode(y.authuri.length)+y.authuri+String.fromCharCode(g.length)+g+String.fromCharCode(f.length)+f+String.fromCharCode(l.length)+l);4==c&&(m+=String.fromCharCode(u.length)+u),y.xxSend(m)}break;case 33:r.byteLength<23||(n=23,y.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(y.amtsequence++)+String.fromCharCode(0,0,27,0,0,0)),1==y.protocol&&(y.amtkeepalivetimer=setInterval(y.xxSendAmtKeepAlive,2e3)),y.connectstate=1,y.xxStateChange(3));break;case 41:r.byteLength<10||(n=10);break;case 42:r.byteLength<10||(C=10+(r[9]<<8)+r[8],r.byteLength<C)||(y.m.ProcessBinaryData?y.m.ProcessBinaryData(new Uint8Array(r.buffer.slice(10,C))):y.m.ProcessData(x(new Uint8Array(r.buffer.slice(10,C)))),n=C);break;case 43:r.byteLength<8||(n=8);break;case 65:r.byteLength<8||(y.connectstate=1,y.m.Start(),8<r.byteLength&&(y.m.ProcessBinaryData?y.m.ProcessBinaryData(new Uint8Array(r.buffer.slice(8))):y.m.ProcessData(x(new Uint8Array(r.buffer.slice(8))))),n=r.byteLength);break;case 240:y.serverIsRecording=!0,n=1;break;default:return console.log("Unknown Intel AMT command: "+r[0]+" acclen="+r.byteLength),void y.Stop(4)}if(0==n)return;n!=y.acc.byteLength?y.acc=y.acc.slice(n):y.acc=null}}},y.directSend=function(e){try{y.socket.send(e.buffer)}catch(e){}},y.xxSend=function(e){if(null!=y.socket&&y.socket.readyState==WebSocket.OPEN){for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);try{y.socket.send(t.buffer)}catch(e){}}},y.Send=y.send=function(e){null!=y.socket&&1==y.connectstate&&y.xxSend(1==y.protocol?String.fromCharCode(40,0,0,0)+IntToStrX(y.amtsequence++)+ShortToStrX(e.length)+e:e)},y.xxSendAmtKeepAlive=function(){null!=y.socket&&y.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(y.amtsequence++))},y.xxOnSocketClosed=function(){0==y.inDataCount&&0==y.tlsv1only?(y.tlsv1only=1,y.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+y.host+"&port="+y.port+"&tls="+y.tls+"&tls1only=1"+("*"==y.user?"&serverauth=1":"")+("undefined"==typeof pass?"&serverauth=1&user="+y.user:"")),y.socket.binaryType="arraybuffer",y.socket.onopen=y.xxOnSocketConnected,y.socket.onmessage=y.xxOnMessage,y.socket.onclose=y.xxOnSocketClosed):y.Stop(5)},y.xxStateChange=function(e){y.State!=e&&(y.State=e,y.m.xxStateChange(y.State),null!=y.onStateChanged)&&y.onStateChanged(y,y.State)},y.Stop=function(e){y.xxStateChange(0),y.connectstate=-1,(y.acc=null)!=y.socket&&(y.socket.close(),y.socket=null),null!=y.amtkeepalivetimer&&(clearInterval(y.amtkeepalivetimer),y.amtkeepalivetimer=null)},y}
\ No newline at end of file
public/scripts/amt-redir-ws-0.1.0.js
+1
@@ -36,6 +36,7 @@ var CreateAmtRedirect = function (module, authCookie) {
36
obj.port = port;
37
obj.user = user;
38
obj.pass = pass;
39
+ obj.tls = tls;
40
obj.connectstate = 0;
41
obj.inDataCount = 0;
42
var url = window.location.protocol.replace('http', 'ws') + '//' + window.location.host + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + '/webrelay.ashx?p=2&host=' + host + '&port=' + port + '&tls=' + tls + ((user == '*') ? '&serverauth=1' : '') + ((typeof pass === 'undefined') ? ('&serverauth=1&user=' + user) : ''); // The 'p=2' indicates to the relay that this is a REDIRECTION session