0
Continuos connection with AS3 in browser (HTTP tunneling)
New Here
,
/t5/animate-discussions/continuos-connection-with-as3-in-browser-http-tunneling/td-p/926617
Jan 24, 2008
Jan 24, 2008
Copy link to clipboard
Copied
Is there any possibility to use HTTP tunneling(that needs to
connect to a proxy in some cases) to go through the proxy without
the need of the crossdomain.xml? In most cases the proxy is on a
different server and because of this the flash(embedded into html)
asks for the crossdomain.xml first, if it can't be downloaded then
it won't try to communicate with the proxy and can't connect to the
target.
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
RobDan75
AUTHOR
New Here
,
/t5/animate-discussions/continuos-connection-with-as3-in-browser-http-tunneling/m-p/926618#M23889
Jan 25, 2008
Jan 25, 2008
Copy link to clipboard
Copied
anyone?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/animate-discussions/continuos-connection-with-as3-in-browser-http-tunneling/m-p/926619#M23890
Jan 25, 2008
Jan 25, 2008
Copy link to clipboard
Copied
Hi RobDan75,
The short answer is, no. If your application is making calls across
domains, a crossdomain XML file will always be requested. If it's not there
or doesn't allow communication, Flash will stop trying to communicate with
that server. It would be a very severe security violation (in many respects)
for Adobe to allow this sort of thing. That being said, if you have access
to your own server, you can create a secondary proxy that will shuttle data
to and from the target proxy. Basically, it simply acts to send data to/from
Flash and the target server. Using PHP, simple HTTP requests are very simple
to carry out. Here's a script I used on an older project that did just that:
<?
if (isset($_POST['address'])) {
$address=$_POST['address'];
$proxyData=file_get_contents($address);
$fileSize=strlen($proxyData);
header('Content-Type: text/html');
header("Content-Length: " .$fileSize);
header("Cache-Control: no-cache, must-revalidate");
header ("Date: ".date("r"));
header("Expires: Mon, 01 Jan 2007 00:00:00 GMT");
header("Host: ".$_SERVER['HTTP_HOST']);
header("Server: Proxy Script v1.0");
echo ($proxyData);
} else {
echo ('You didn\'t include the data in the "address" variable.');
}//else
?>
Note that Flash needs to send an "address" POST variable telling the script
the address to load from. You can update this to GET if you want...it can be
used to test via the browser. This just makes it a bit more difficult to
abuse. The script automatically detects MIME type so you can use this to
transport any type of data (video, text, audio, etc.)
Regards,
Patrick Bay
BAY NEW MEDIA
"RobDan75" <webforumsuser@macromedia.com> wrote in message
news:fn9p8h$m4t$1@forums.macromedia.com...
> Is there any possibility to use HTTP tunneling(that needs to connect to a
> proxy
> in some cases) to go through the proxy without the need of the
> crossdomain.xml?
> In most cases the proxy is on a different server and because of this the
> flash(embedded into html) asks for the crossdomain.xml first, if it can't
> be
> downloaded then it won't try to communicate with the proxy and can't
> connect to
> the target.
>
The short answer is, no. If your application is making calls across
domains, a crossdomain XML file will always be requested. If it's not there
or doesn't allow communication, Flash will stop trying to communicate with
that server. It would be a very severe security violation (in many respects)
for Adobe to allow this sort of thing. That being said, if you have access
to your own server, you can create a secondary proxy that will shuttle data
to and from the target proxy. Basically, it simply acts to send data to/from
Flash and the target server. Using PHP, simple HTTP requests are very simple
to carry out. Here's a script I used on an older project that did just that:
<?
if (isset($_POST['address'])) {
$address=$_POST['address'];
$proxyData=file_get_contents($address);
$fileSize=strlen($proxyData);
header('Content-Type: text/html');
header("Content-Length: " .$fileSize);
header("Cache-Control: no-cache, must-revalidate");
header ("Date: ".date("r"));
header("Expires: Mon, 01 Jan 2007 00:00:00 GMT");
header("Host: ".$_SERVER['HTTP_HOST']);
header("Server: Proxy Script v1.0");
echo ($proxyData);
} else {
echo ('You didn\'t include the data in the "address" variable.');
}//else
?>
Note that Flash needs to send an "address" POST variable telling the script
the address to load from. You can update this to GET if you want...it can be
used to test via the browser. This just makes it a bit more difficult to
abuse. The script automatically detects MIME type so you can use this to
transport any type of data (video, text, audio, etc.)
Regards,
Patrick Bay
BAY NEW MEDIA
"RobDan75" <webforumsuser@macromedia.com> wrote in message
news:fn9p8h$m4t$1@forums.macromedia.com...
> Is there any possibility to use HTTP tunneling(that needs to connect to a
> proxy
> in some cases) to go through the proxy without the need of the
> crossdomain.xml?
> In most cases the proxy is on a different server and because of this the
> flash(embedded into html) asks for the crossdomain.xml first, if it can't
> be
> downloaded then it won't try to communicate with the proxy and can't
> connect to
> the target.
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/animate-discussions/continuos-connection-with-as3-in-browser-http-tunneling/m-p/926620#M23891
Jan 25, 2008
Jan 25, 2008
Copy link to clipboard
Copied
Oops, I lied a bit. The content type is hard-coded. But you
can update that
to suit your needs (and I believe PHP comes with automatic MIME type
detection).
Regards,
Patrick Bay
BAY NEW MEDIA
"Patrick Bay" <patrick@baynewmedia.com> wrote in message
news:fndcpj$el$1@forums.macromedia.com...
> Hi RobDan75,
>
> The short answer is, no. If your application is making calls across
> domains, a crossdomain XML file will always be requested. If it's not
> there or doesn't allow communication, Flash will stop trying to
> communicate with that server. It would be a very severe security violation
> (in many respects) for Adobe to allow this sort of thing. That being said,
> if you have access to your own server, you can create a secondary proxy
> that will shuttle data to and from the target proxy. Basically, it simply
> acts to send data to/from Flash and the target server. Using PHP, simple
> HTTP requests are very simple to carry out. Here's a script I used on an
> older project that did just that:
>
> <?
> if (isset($_POST['address'])) {
> $address=$_POST['address'];
> $proxyData=file_get_contents($address);
> $fileSize=strlen($proxyData);
> header('Content-Type: text/html');
> header("Content-Length: " .$fileSize);
> header("Cache-Control: no-cache, must-revalidate");
> header ("Date: ".date("r"));
> header("Expires: Mon, 01 Jan 2007 00:00:00 GMT");
> header("Host: ".$_SERVER['HTTP_HOST']);
> header("Server: Proxy Script v1.0");
> echo ($proxyData);
> } else {
> echo ('You didn\'t include the data in the "address" variable.');
> }//else
> ?>
>
> Note that Flash needs to send an "address" POST variable telling the
> script the address to load from. You can update this to GET if you
> want...it can be used to test via the browser. This just makes it a bit
> more difficult to abuse. The script automatically detects MIME type so you
> can use this to transport any type of data (video, text, audio, etc.)
>
> Regards,
> Patrick Bay
> BAY NEW MEDIA
>
> "RobDan75" <webforumsuser@macromedia.com> wrote in message
> news:fn9p8h$m4t$1@forums.macromedia.com...
>> Is there any possibility to use HTTP tunneling(that needs to connect to a
>> proxy
>> in some cases) to go through the proxy without the need of the
>> crossdomain.xml?
>> In most cases the proxy is on a different server and because of this the
>> flash(embedded into html) asks for the crossdomain.xml first, if it can't
>> be
>> downloaded then it won't try to communicate with the proxy and can't
>> connect to
>> the target.
>>
>
to suit your needs (and I believe PHP comes with automatic MIME type
detection).
Regards,
Patrick Bay
BAY NEW MEDIA
"Patrick Bay" <patrick@baynewmedia.com> wrote in message
news:fndcpj$el$1@forums.macromedia.com...
> Hi RobDan75,
>
> The short answer is, no. If your application is making calls across
> domains, a crossdomain XML file will always be requested. If it's not
> there or doesn't allow communication, Flash will stop trying to
> communicate with that server. It would be a very severe security violation
> (in many respects) for Adobe to allow this sort of thing. That being said,
> if you have access to your own server, you can create a secondary proxy
> that will shuttle data to and from the target proxy. Basically, it simply
> acts to send data to/from Flash and the target server. Using PHP, simple
> HTTP requests are very simple to carry out. Here's a script I used on an
> older project that did just that:
>
> <?
> if (isset($_POST['address'])) {
> $address=$_POST['address'];
> $proxyData=file_get_contents($address);
> $fileSize=strlen($proxyData);
> header('Content-Type: text/html');
> header("Content-Length: " .$fileSize);
> header("Cache-Control: no-cache, must-revalidate");
> header ("Date: ".date("r"));
> header("Expires: Mon, 01 Jan 2007 00:00:00 GMT");
> header("Host: ".$_SERVER['HTTP_HOST']);
> header("Server: Proxy Script v1.0");
> echo ($proxyData);
> } else {
> echo ('You didn\'t include the data in the "address" variable.');
> }//else
> ?>
>
> Note that Flash needs to send an "address" POST variable telling the
> script the address to load from. You can update this to GET if you
> want...it can be used to test via the browser. This just makes it a bit
> more difficult to abuse. The script automatically detects MIME type so you
> can use this to transport any type of data (video, text, audio, etc.)
>
> Regards,
> Patrick Bay
> BAY NEW MEDIA
>
> "RobDan75" <webforumsuser@macromedia.com> wrote in message
> news:fn9p8h$m4t$1@forums.macromedia.com...
>> Is there any possibility to use HTTP tunneling(that needs to connect to a
>> proxy
>> in some cases) to go through the proxy without the need of the
>> crossdomain.xml?
>> In most cases the proxy is on a different server and because of this the
>> flash(embedded into html) asks for the crossdomain.xml first, if it can't
>> be
>> downloaded then it won't try to communicate with the proxy and can't
>> connect to
>> the target.
>>
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

