Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corossdomain not loaded =( #20

Open
Aziz87 opened this issue May 1, 2013 · 2 comments
Open

corossdomain not loaded =( #20

Aziz87 opened this issue May 1, 2013 · 2 comments

Comments

@Aziz87
Copy link

Aziz87 commented May 1, 2013

Hi! How to achieve load policyUrl?

CLIENT

this.client.init(*************, 3004,null, function():void{
            client.addEventListener(ClientEvent.IO_ERROR,onError);
            client.addEventListener(ClientEvent.SECURITY_ERROR,onError);
            client.addEventListener(ClientEvent.MESSAGE,onMessage);
            Log("Connected ");
            dispatchEvent(new Event(Event.CONNECT));

});

SERVER DEMON ON NODEJS

var net = require('net');

console.log("Secur server started");


var host = '***********';
var port = 843;

var server = net.createServer(function(stream) {
stream.setEncoding('utf8');
stream.on('error', function (extension) {  console.log('policy.socket.error '+extension);  stream.end();        stream.destroy(); });
stream.on('connect',function(){console.log("Connected"); });
stream.on('end', function(){console.log("DISConnected"); stream.end();});
stream.addListener('data', function(mess) {
    var polic = '<?xml version="1.0"?>';
        polic += '<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">';
        polic += '<!-- Policy file for xmlsocket://socks.mysite.com -->';
        polic += '<cross-domain-policy>';
        polic += '    <allow-access-from domain="*" to-ports="*" />';
        polic += '</cross-domain-policy>\0';
    stream.write(polic);
    console.log('Conn :: policy, ip: '+stream.remoteAddress);
});

});

server.listen(port, host);
@simb
Copy link
Owner

simb commented May 1, 2013

Hi, The crossdomain file should get requested automatically by flash if it is required. that is if you are doing a cross domain request. You should not have to do anything to make it request your crossdomain policy file.

@d3nd0g69
Copy link

d3nd0g69 commented Mar 9, 2015

//Security.loadPolicyFile("xmlsocket://184.172.xx.xxx:xxxxx"); not working with flashsocket. It works in other scripts that dont use flashsocket. using AS3. if i try to run the swf without loadpolicy, it fails. any ideas plz"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants