// socket should not be closed at that point
}
} catch (IOException e) {
e.printStackTrace();
} finally {
if (ss!=null) {
try {
ss.close();
} catch (IOException e) {}
}
}
}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi mfucci
I have tested the program that you gave me. but the program still has problems. when I run the program the server can listen on port 1234,but the client is still can not connection and report :
An security error occured (Error #2048).
Check your policy-policy server configuration or disable security for this domain.
There is a strange phenomenon . When client connection the security policy server If I interrupt the service then the client can connect at once however if you refresh the page then clients cannot connect again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What issue do you have with the code?
There is no need to patch the jar, just compile and run this java code.
Flash policy is not really related to flashlight-vnc, so the best support will be found on the link posted by lonnys.
Marco
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
policyserver.jar relies on graphic interface in Linux system ,Who have the policyserver.jar and it do not rely on graphical interface
hi
My system does not have a graphical interface,Who can help me thank you.
Hi lonnyluo,
The security policy server is pretty stupid. Here is the code of one not using the graphical interface:
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class SecurityServer {
public static void main(String args) {
ServerSocket ss = null;
Socket s = null;
try {
ss = new ServerSocket(1234);
while (true) {
s = ss.accept();
DataOutputStream os = new DataOutputStream(s.getOutputStream());
os.writeBytes("<cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"*\" /></cross-domain-policy>");
os.flush();
// socket should not be closed at that point
}
} catch (IOException e) {
e.printStackTrace();
} finally {
if (ss!=null) {
try {
ss.close();
} catch (IOException e) {}
}
}
}
}
2012-06-23 00:25:52 PDT
Hi mfucci
Thanks for your answer. I will test it on Monday. I hope there is no problem . thank you again for your help.
hi mfucci
I have tested the program that you gave me. but the program still has problems. when I run the program the server can listen on port 1234,but the client is still can not connection and report :
An security error occured (Error #2048).
Check your policy-policy server configuration or disable security for this domain.
There is a strange phenomenon . When client connection the security policy server If I interrupt the service then the client can connect at once however if you refresh the page then clients cannot connect again.
hi mfucci
thank you for your help. I have found the answer. http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html
Hi,
Can anyone show me how to use the code posted by Marco ? I can't find a way to patch the JAR archive and get it running on CLI.
Thanks
Hi Xamzab,
What issue do you have with the code?
There is no need to patch the jar, just compile and run this java code.
Flash policy is not really related to flashlight-vnc, so the best support will be found on the link posted by lonnys.
Marco