Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > Advanced MUD Concepts
Click here to Register

Reply
 
Thread Tools
Old 03-16-2010, 08:10 PM   #1
Brnt
New Member
 
Join Date: Dec 2003
Name: B
Location: Delawhere
Home MUD: Dragons's Den : http://dden.org
Posts: 8
Brnt is on a distinguished road
Getting FMud to work

I'm trying to get the FMud application up and running and having a problem with it not properly connecting to our mud and returning 'Unable to connect: security error'.

Due to limitations on our host, I was trying to set it up so that the flash policy file was served on a port other than the standard 843, but not on the same port as the mud itself. Now it says that the latest editions of FMud can handle specifying the port in which the policy file is to be served, and I can see the request from FMud being received and returning the flash policy file, but FMud won't connect.

Has anyone else been able to accomplish what I've been trying to do? Any suggestions?
Brnt is offline   Reply With Quote
Old 03-16-2010, 09:21 PM   #2
Orrin
Member
 
Orrin's Avatar
 
Join Date: Jul 2008
Name: Matt
Posts: 141
Orrin is on a distinguished road
Re: Getting FMud to work

If the policy file is being requested and served correctly then it may be a problem with the policy file itself, or possibly your host has a master policy file which is overriding it.

What is the url where you have FMud embedded?

What does your policy file look like?
Orrin is offline   Reply With Quote
Old 03-16-2010, 09:41 PM   #3
Brnt
New Member
 
Join Date: Dec 2003
Name: B
Location: Delawhere
Home MUD: Dragons's Den : http://dden.org
Posts: 8
Brnt is on a distinguished road
Re: Getting FMud to work

policy file:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="discordia.org" to-ports="2222" />
</cross-domain-policy>


URL:
http://dden.discordia.org/FMud/Fmud.html

I'm pretty sure the host does not already have a master policy file. I've tried all sorts of variations on the allow-access-from domain all the way to "*".

thanks for the help
Brnt is offline   Reply With Quote
Old 03-17-2010, 04:35 AM   #4
Orrin
Member
 
Orrin's Avatar
 
Join Date: Jul 2008
Name: Matt
Posts: 141
Orrin is on a distinguished road
Re: Getting FMud to work

I can't test it because that url is giving a 404 error.

At the very least the domain should be "dden.discordia.org" if that's where the client is hosted.
Orrin is offline   Reply With Quote
Old 03-17-2010, 01:28 PM   #5
Brnt
New Member
 
Join Date: Dec 2003
Name: B
Location: Delawhere
Home MUD: Dragons's Den : http://dden.org
Posts: 8
Brnt is on a distinguished road
Re: Getting FMud to work

Sorry, this is the link:
Play Dragon's Den!

Last edited by Brnt : 03-17-2010 at 01:30 PM. Reason: use actual link in /url desc
Brnt is offline   Reply With Quote
Old 03-17-2010, 04:58 PM   #6
noodles
Member
 
Join Date: Nov 2002
Posts: 30
noodles is on a distinguished road
Re: Getting FMud to work

While I had no intention of using FMud (I tried the latest version on Windows), I tried it with my MUD. I set up the policy to allow connections from any site, on the port my MUD was on. I started up the Python server to serve the policy file. I then browsed the included web page (modified for correct port number (3000) and addresses (127.0.0.1)) and tried to connect.

The policy server said it served it successfully. But the client would not connect due to security problems. Now, I gave up here, no big loss as I was just playing with it.

However, the weird thing is and I suspect this is on Flash rather than FMud, regardless of a lack of correct security policy being available the client still seemed to do a queer partial connection. It wasn't every time I tried, but it was often enough, that when the connection attempt was getting nowhere and I disconnected the attempt in the client, that the MUD server would crash because it detected a disconnection before it fully processed the connection. It was like it was no longer going to try and connect, but while cleaning up it opened the socket to immediately close it.

Anyway, ignoring the queer pointless connect/disconnect, I noticed the comments on the FMud site indicated someone else had the same problem with the policy not working on Windows as well. I tried all the other solutions given there.
noodles is offline   Reply With Quote
Old 03-17-2010, 05:31 PM   #7
Orrin
Member
 
Orrin's Avatar
 
Join Date: Jul 2008
Name: Matt
Posts: 141
Orrin is on a distinguished road
Re: Getting FMud to work

It's certainly possible there are issues with flash security policy or sockets on Windows servers, but as I don't use one the client isn't tested on Windows (from a server perspective).

As far as I can see from the Dragons Den link the policy file is not being checked, so I'd double check that your embedding page html is correct (you have a space in the params tag would could be an issue) and also that your firewall is allowing connections on the port you are serving the policy file.

I just did a quick test on my own server with the policy file on a non standard port specified in the embedding page and it appears to be working as expected for me.
Orrin is offline   Reply With Quote
Old 03-18-2010, 07:05 AM   #8
Sombalance
Member
 
Join Date: Sep 2002
Posts: 49
Sombalance is on a distinguished road
Re: Getting FMud to work

I haven't played with FMUD, but I did write a flash client a wee bit ago and I recall getting the policy file handled by the game server was a pain in the butt.

Basically, the client probably does a call to loadPolicyFile that makes a connection to the game server to recover the policy file. Once it retrieves the file, it closes the connection and then uses a call to connect to do the actual game connection. That is two separate connections that have to be handled.

The loadPolicyFile call expects only the policy file to be returned. If anything else is returned, it fails. So, if you have a welcome banner that is displayed when players first connect, that might be sent along with the policy file, which would invalidate the policy file. Your server should see something like <policy-file-request/> sent when this connection is made.

I got around it by having the game server listen on a second port. It only sends the policy information on the first attempt when it receives the policy-file-request. On the second connection (to actually run the game), I send an immediate tag to the game server that lets it know I've already received the policy, and that triggers the welcome message and starts the normal game login process.

I do a few other things that made sense at the time to handle all flash connections through an alternate port. In theory, you can probably handle the policy request to one port and still use the main game port for the actual playing connection.


Here is a snippet from the flash client that I worked with.

Code:
xmlsock.addEventListener(Event.CONNECT, handleConnect);
Security.loadPolicyFile("xmlsocket://HOST:PORT");
xmlsock.connect("HOST", PORT);

public function handleConnect(event:Event): void
{
    xmlsock.send("SOME_GAME_TAG");
} /* handleConnect */
Sombalance is offline   Reply With Quote
Old 06-16-2010, 03:03 PM   #9
raistie
New Member
 
Join Date: Jun 2010
Posts: 6
raistie is on a distinguished road
Re: Getting FMud to work

Hi all, i get the same :

Code:
Connection from ::ffff:116.14.78.189:51973
Valid request received from ::ffff:116.14.78.189:51973
Sent policy file to ::ffff:116.14.78.189:51973
Then it FMud tells me unable to connect: security error.

my policy file is as follows


Code:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">

<!-- Policy file for xmlsocket://socks.example.com -->
<cross-domain-policy>

   <!-- This is a master socket policy file -->
   <!-- No other socket policies on the host will be permitted -->
   <site-control permitted-cross-domain-policies="all"/>

   <!-- Instead of setting to-ports="*", administrator's can use ranges and com$
   <allow-access-from domain="ldchronicles.com" to-ports="5050" />

</cross-domain-policy>
i changed the master-only to "all"... both did not work.

my page for that is FMud
raistie is offline   Reply With Quote
Old 06-16-2010, 06:16 PM   #10
Orrin
Member
 
Orrin's Avatar
 
Join Date: Jul 2008
Name: Matt
Posts: 141
Orrin is on a distinguished road
Re: Getting FMud to work

From the FMud README:
Quote:
When editing flashpolicy.xml to allow specific domains you must ensure
that the domain and subdomain exactly match where you host the FMud file.
For example, if you are hosting FMud at domain "www.yourmud.com" you must
specify "www.yourmud.com" and not "yourmud.com" in the flashpolicy.xml
file.
Your policy file needs to have the www subdomain for ldchronicles.com if that's where you are hosting the client.
Orrin is offline   Reply With Quote
Old 06-17-2010, 06:04 AM   #11
raistie
New Member
 
Join Date: Jun 2010
Posts: 6
raistie is on a distinguished road
Re: Getting FMud to work

thank you Orrin! you are a saver!
raistie is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 08:50 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014