Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Kalie
Beginner


Joined: 23 Jun 2008
Posts: 22

PostPosted: Sun Feb 01, 2009 5:55 pm   

autologin - cygwin, proxy, scripts
 
I am using CMUD with a socks proxy to a local port. I can setup the dynamic port forwarding and connect with CMUD using the proxy settings. I can even start the proxy from the CMUD command line with this: (startproxy.sh is a one line script to start the dynamic port forwarding and login to the remote server)

#LAUNCH "C:\cygwin\bin\bash --login ./startproxy.sh"

The question is: How can I have CMUD trigger that command when it tries to auto connect? I've put an alarm in the autolog folder with the above command in it - but it seems like that folder is not turned on until CMUD sees a connection. If I have an alarm running outside of that folder, which is then suspended when the user name trigger (in the autolog folder) fires will work once - but then it would need to get turned back on when there is a disconnect event.

My basic problem is if I loose internet connectivity briefly, I loose the proxy server too. So I need to get that reconnected with the above command before CMUD can log back in. However, I don't want that command running on some random interval because then I'd get multiple proxy sessions. Any ideas? Thanks guys.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Feb 02, 2009 5:28 am   
 
You can lookin into using the onLoad or onConnect events.
_________________
Asati di tempari!
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Mon Feb 02, 2009 11:07 am   
 
I think those won't work, since an onConnect won't fire until there's already a connection and an onLoad would require restarting CMud each time.

I think you will need to create your own auto-connect system by disabling CMud's built in auto-connect and then using onDisconnect aliases. (With all the usual caveats of this being an easy thing to mess up and make sure you're not connecting when you don't want to be and then sitting idle all night.)

Better would be re-configuring or re-writing your proxy server so that it doesn't close every time you're disconnected.
Reply with quote
Kalie
Beginner


Joined: 23 Jun 2008
Posts: 22

PostPosted: Mon Feb 02, 2009 1:13 pm   
 
I've tried writing my own system as you suggested gamma_ray; however, it got complicated fairly quickly since I don't always get an onDisconnect event to work with. After thinking about it yesterday I've come to the same final conclusion - I'm going to set up a cron job to check the proxy connection and reconnect it as necessary totally independent of CMUD. I haven't figured out what the script would look like yet but I'm sure google will help me out on that one.

Thanks for the help guys, I appreciate it.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net