I need to connect to client server using TLS Socket connection.
This works fine when I am directly accessing it, i.e through IDE but it gives error if I try accessing it through the browser.
Error:
SecurityError: Error #2010: Local-with-filesystem SWF files are not permitted to use sockets.
Add compiler option use-network=true. You can either load local files or use network, so choose your side.
Related
I've setup an vsftpd on my Ubuntu 16.04 using this tutorial.
I can connect to server using FileZilla but not through PhpStorm. It issues this error when I try to upload a file to server:
Failed to transfer file 'C:\xampp\htdocs\sherkat\artisan.php': cant open output connection for file "ftps://SERVER-IP/artisan.php". Reason: "500 Illegal PORT command.".
What's wrong with my config?
The FTP protocol supports two modes for the data connection. In the traditional mode, called "active" (which is the default), on each command sent by the client the server creates a connection back to the client and uses it to send the response. This is impossible on the most setups nowadays (actually, in the past 20+ years) because of firewalls.
There is another mode, called "passive", where the data connection for the response is also initiated by the client. It works through firewalls without problems.
Press the "Advanced options..." button, check the "Passive mode" option and you're good to go!
As a side note, a better way is to use the SFTP protocol. If you can connect through SSH to your Ubuntu box, most probably you can also use SFTP to transfer files to it, without any other setup. FTP is an old and convoluted protocol. SFTP uses a secure connection (maybe it's not that important for you), and a simpler protocol.
I am writing an action script 3.0 client that has to communicate with a remote server. In localhost environment everything works fine, but if I test the client in the real internet environment there is no connection.
My guess is that it has to do with the cross domain policy file, but calling
Security.loadPolicyFile("xmlsocket://"+targetIP);
does not send the <policy file request\> message to the server on the default 843 port, or any port for that matter. I think it might be because flash recognises that the address is local and omits the request. But I need to receive it to be able to implement the answer on the server. Otherwise I'd be coding blindly.
Is there a way to force the flash client to behave as if it was in a different domain while still being in localhost so I can troubleshoot this issue without involving a remote host? I don't have many resources in that regard.
Try running the client on 'localhost', and load the policy file from '127.0.0.1'.
They should be seen as different 'domains'.
I have a Kiosk that connects to a local socket server so it can access some hardware. If the kiosk code is stored locally, it can access the socket perfectly.
However, and I know for good reason, if the kiosk code is hosted on a remote server, it can not access the local socket server because of a sandbox violation.
The problem is that all of these kiosks are hosted on AppEngine, so when I am done making changes, it takes hours to render out to a single HTML file, and change all the css/js location links.
Is there anyway possible for the allow the SWF file to access the local socket server when it is hostel remotely?
Also,
The socket server is a Java app that I dont have the source to. I run it locally through the terminal
I've had the same problem.
The thing is that with Flash player 10 security with sockets has become much stricter. Just placing crossdomain.xml on the server won't do anything - you actually have to send the crossdomain policy file to any client who connects.
The simplest solution is provided by Adobe - they've provided a couple of scripts, one perl and one python, which will set up a policy file server. You can find them here:
Setting up a socket policy server
I am trying to connect a flash socket client to a c++ socket server ( using boost::asio ). I always run the server app on the distant server listening on port 7171.
The connection works fine if I run the flash socket client on my local machine ( directly inside CS5.5 ).
After this successful test, I decided to upload my swf to the same machine as the socket server, to allow multiple users to connect it throught HTTP ( then I suppose flash client and c++ server are inside same domain ), but in this case, I always get a SecurityError 2048.
What could I be missing ?
When you test locally you are in your sandbox which will ignore security issues, that is why it will not work when uploaded( outside of sandbox ).
In your ActionScript you need to include this.
// host is something like dev.mydomain.com
Security.allowDomain( host );
Security.loadPolicyFile( "xmlsocket://" host + ":" port );
On the port you need to listen for this request
<policy-file-request/>
When you get the request for the policy you need to return a cross domain policy with with this node.
<allow-access-from domain="*" to-ports="*" />
Flash requires a policy server to be running on the hosting machine to access any sockets:
http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html
This is a separate requirement from a crossdomain file-- it requires an actual policy server app running on port 843.
It may be that Flash inside CS5 ignores the policy requirement because it knows that it's in a development environment.
I have a simple IRC socket that is used to communicate with servers for a web-based IRC client. Unfortunately, attempting to connect to a network results in a security error. I read up on sandboxes and their appropriate permissions, and then used Security.sandboxType to get the sandbox of my socket, which came up as remote. After reviewing the documentation, I still don't fully understand how I can enable my socket to connect to a remote IRC server. I tried Security.allowDomain, but that didn't do anything. What else is there?
Well the error is simply because you are directly trying to connect to IRC. You will need to use some sort of proxy server to get your request through.
Read about Adobe's security policy. I asked a similar question on SO just a day back..
For connecting to IRC, perhaps the following could help:
Flash does not allow you to connect to servers that are outside the so-called sandbox of your Flash application. You are of course able to extend that sandbox by using Security.loadPolicyFile...(link)