http://www.adobe.com/devnet/flashcom/articles/firewalls_proxy03.html
then here is the code from that app from adobe that we decompiled and peter hall cleaned up:
function dclear() {
out_txt.text="";
}
function dtrace(msg) {
out_txt.text = out_txt.text + (msg + newline);
out_txt.scroll=out_txt.maxscro
ll;
}
function display() {
dclear();
dtrace(getVersion() + newline);
var i=0;
while (i < 6) {
if (ncs[i].state != null) {
dtrace((ncs[i].proto + ncs[i].port) + ncs[i].state);
} else {
dtrace(((ncs[i].proto + ncs[i].port) + "Connecting ") + ncs[i].timeout);
}
i++;
}
}
function check() {
var i=0;
while (i < 6) {
if (ncs[i].state != null) {
} else if (ncs[i].timeout > 0) {
ncs[i].timeout--;
} else {
ncs[i].onStatus({code:"NetConnection.Connect.TimeOut"});
}
i++;
}
display();
}
function onStatus(info) {
this.state = info.code.substring(22);
if (((((info.code == "NetConnection.Connect.Success") || (info.code ==
"NetConnection.Connect.Rejected")) || (info.code ==
"NetConnection.Connect.Failed ")) || (info.code ==
"NetConnection.Connect.Closed")) || (info.code ==
"NetConnection.Connect.TimeOut")) {
this.> }
count++;
display();
if (count >= 6) {
clearInterval(timer);
status_txt.text="Done running port tests.";
openemail();
}
}
function doRun() {
out_txt.text="";
status_txt.text="Running port tests ...";
count=0;
var i=0;
while (i < 6) {
ncs[i].> ncs[i] = new NetConnection ();
ncs[i].> ncs[i].state=null;
ncs[i].timeout=30;
i++;
}
//hostname=host_txt.text;
//if (hostname.length != 0) {
// hostname="//" + hostname;
//} else {
hostname="//fcwww.macromedia.com";
//}
appName = "tunnel";
ncs[0].url = "" + hostname) + "/") + appName;
ncs[0].port = "DEFAULT\t";
ncs[0].proto = "RTMP \t\t";
ncs[1].url = "" + hostname) + ":80/") + appName;
ncs[1].port = "80 \t\t";
ncs[1].proto = "RTMP \t\t";
ncs[2].url = "" + hostname) + ":443/") + appName;
ncs[2].port = "443 \t\t";
ncs[2].proto = "RTMP \t\t";
ncs[3].url = "" + hostname) + ":1935/") + appName;
ncs[3].port = "1935 \t\t";
ncs[3].proto = "RTMP \t\t";
ncs[4].url = "" + hostname) + "/") + appName;
ncs[4].port = "DEFAULT\t";
ncs[4].proto = "HTTP Tunneling\t\t";
ncs[5].url = "" + hostname) + ":80/") + appName;
ncs[5].port = "80 \t\t";
ncs[5].proto = "HTTP Tunneling\t\t";
var i=0;
while (i < 6) {
trace(ncs[i].url);
ncs[i].connect(ncs[i].url);
i++;
}
clearInterval(timer);
display();
timer = setInterval(check, 1000);
}
function openemail() {
/// deleted - irrelevent
}
ncs = new Array (6);
count=0;
timer=null;
this.createTextField("status_txt", 1, 0,0,300,30);
status_txt.border = true;
status_txt.multiline = true;
status_txt.wordWrap = true;
status_txt.textColor = 0xFF0000;
this.createTextField ("out_txt", 2, 0,50,300,200);
out_txt.border = true;
out_txt.multiline = true;
out_txt.wordWrap = true;
doRun();
tahts should be everything you need :)
}
function display() {
dclear();
dtrace(getVersion() + newline);
var i=0;
while (i < 6) {
if (ncs[i].state != null) {
dtrace((ncs[i].proto + ncs[i].port) + ncs[i].state);
} else {
dtrace(((ncs[i].proto + ncs[i].port) + "Connecting ") + ncs[i].timeout);
}
i++;
}
}
function check() {
var i=0;
while (i < 6) {
if (ncs[i].state != null) {
} else if (ncs[i].timeout > 0) {
ncs[i].timeout--;
} else {
ncs[i].onStatus({code:"NetConnection.Connect.TimeOut"});
}
i++;
}
display();
}
function onStatus(info) {
this.state = info.code.substring(22);
if (((((info.code == "NetConnection.Connect.Success") || (info.code ==
"NetConnection.Connect.Rejected")) || (info.code ==
"NetConnection.Connect.Failed ")) || (info.code ==
"NetConnection.Connect.Closed")) || (info.code ==
"NetConnection.Connect.TimeOut")) {
this.> }
count++;
display();
if (count >= 6) {
clearInterval(timer);
status_txt.text="Done running port tests.";
openemail();
}
}
function doRun() {
out_txt.text="";
status_txt.text="Running port tests ...";
count=0;
var i=0;
while (i < 6) {
ncs[i].> ncs[i] = new NetConnection ();
ncs[i].> ncs[i].state=null;
ncs[i].timeout=30;
i++;
}
//hostname=host_txt.text;
//if (hostname.length != 0) {
// hostname="//" + hostname;
//} else {
hostname="//fcwww.macromedia.com";
//}
appName = "tunnel";
ncs[0].url = "" + hostname) + "/") + appName;
ncs[0].port = "DEFAULT\t";
ncs[0].proto = "RTMP \t\t";
ncs[1].url = "" + hostname) + ":80/") + appName;
ncs[1].port = "80 \t\t";
ncs[1].proto = "RTMP \t\t";
ncs[2].url = "" + hostname) + ":443/") + appName;
ncs[2].port = "443 \t\t";
ncs[2].proto = "RTMP \t\t";
ncs[3].url = "" + hostname) + ":1935/") + appName;
ncs[3].port = "1935 \t\t";
ncs[3].proto = "RTMP \t\t";
ncs[4].url = "" + hostname) + "/") + appName;
ncs[4].port = "DEFAULT\t";
ncs[4].proto = "HTTP Tunneling\t\t";
ncs[5].url = "" + hostname) + ":80/") + appName;
ncs[5].port = "80 \t\t";
ncs[5].proto = "HTTP Tunneling\t\t";
var i=0;
while (i < 6) {
trace(ncs[i].url);
ncs[i].connect(ncs[i].url);
i++;
}
clearInterval(timer);
display();
timer = setInterval(check, 1000);
}
function openemail() {
/// deleted - irrelevent
}
ncs = new Array (6);
count=0;
timer=null;
this.createTextField("status_txt", 1, 0,0,300,30);
status_txt.border = true;
status_txt.multiline = true;
status_txt.wordWrap = true;
status_txt.textColor = 0xFF0000;
this.createTextField ("out_txt", 2, 0,50,300,200);
out_txt.border = true;
out_txt.multiline = true;
out_txt.wordWrap = true;
doRun();
tahts should be everything you need :)
On 9/4/06, Dan Rossi <[EMAIL PROTECTED]
> wrote:
Johannes Nel wrote:http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16466
was quite usefull for me yesterday :)
It said it failed to connect to rtmp on port 1935 lol.
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
--
j:pn
http://www.lennel.org
_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
