New way to play SWBFI online? (not Tunngle)

Started by Kit Fisto, April 07, 2013, 05:09:32 PM

Previous topic - Next topic
Quote from: StoneCold on April 29, 2013, 04:41:25 PM
I was playing around with the BF2 Gamespy Login Emulator and found that it picks up any login attempts that I tried to make in SWBF. The reason why it didn't want to work, is because I don't have MySQL setup on my main PC, as it wants you to create a database into which it can store usernames and passwords. So, I'm almost convinced that OpenSpy.org works with something similar to this.

End of last year I was also playing around with the BF2142 server emulator and got that working. I don't have a lot of time on my hands now, but I'll see what I can get working in the next day or so.If anyone else wants to have  a crack at it, please feel free to drop me a pm  :D
Yes, I would like to have a link to the emulator you mention.  We have people that can help us set up the database server.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Here you is an old version: http://www.unknowncheats.me/forum/downloads.php?do=file&id=5696

And here is a newer version, although, very little documentation exists for it:

https://code.google.com/p/gsloginserver/

I'll play around again with it tomorrow, see you guys later !


i have finished a beta patcher for openspy, would it be ok to post a link here when i finish with testing.

Quote from: StoneCold on April 29, 2013, 05:25:43 PM
Here you is an old version: http://www.unknowncheats.me/forum/downloads.php?do=file&id=5696

And here is a newer version, although, very little documentation exists for it:

https://code.google.com/p/gsloginserver/

I'll play around again with it tomorrow, see you guys later !

1st link doesn't work, second one did.

@Buckler u could try contacting openspy dev team and see if they could help you with setting up  our own master server.

Quote from: Phobos on April 29, 2013, 05:30:51 PM
1st link doesn't work, second one did.

@Buckler u could try contacting openspy dev team and see if they could help you with setting up  our own master server.

The first link does work, you just need to register on the site to download it  ::)

BTW, I got it to redirect to emulator on my dedicated box, but it doesn't allow me to create a new account, but I guess the fields in the database just need to correspond with the data you're entering, then it might work, but alas lets see what we can find out about this.

Quote from: StoneCold on April 29, 2013, 05:41:03 PM
The first link does work, you just need to register on the site to download it  ::)

BTW, I got it to redirect to emulator on my dedicated box, but it doesn't allow me to create a new account, but I guess the fields in the database just need to correspond with the data you're entering, then it might work, but alas lets see what we can find out about this.
Reupload it here?

April 29, 2013, 10:28:22 PM #111 Last Edit: April 30, 2013, 05:22:47 AM by StoneCold
Ok, I attached the old version of the login emulator  8)

EDIT: Here is another site similar to that of Openspy.net:

http://bobzent.info/index.php

Seems to be a Brazilian or Argentinian site of sorts. Note, their DNS server IP's are also located at the top left.

They even have a list of all the Gamespy games, with relevant rooms etc, check BF1942 for example:

http://bobzent.info/gsstatusget.php?game=bfield1942d

And they even have an Openspy status page as well:

http://bobzent.info/osstatus.php  :ohmy:

April 30, 2013, 07:13:49 AM #112 Last Edit: April 30, 2013, 07:39:44 AM by StoneCold
I've done a lot of digging today and found the core Openspy files on github. It appears to be all coded in C / C++, I have no idea how to execute any of it, but it's very interesting that's for sure.

Here is an extract of the openspy.cfg file

mysql_user = "openspy";
mysql_password = "P7LjdYy8HKY7CLtu";
mysql_server = "localhost";
mysql_database = "GameTracker";
modules {
peerchat {
database = "Matrix";
bindip = I"205.185.122.188";
queueip = I"127.0.0.1";
}
gskeyserv {
bindip = I"205.185.122.188";
}
playersearch {
bindip = I"205.185.122.188";
}
playerspy {
bindip = I"205.185.122.188";
}
serverbrowsing {
bindip = I"205.185.122.188";
}
qr {
bindip = I"205.185.122.188";
}
natneg {
numinstances = 3;
bindip1 = I"205.185.122.188";
bindip2 = I"209.141.49.170";
bindip3 = I"209.141.49.161";
probeip = I"209.141.49.161";
}
legacyms {
bindip = I"205.185.122.188";
}
legacystats {
bindip = I"209.141.49.170";
}
legacystatsprocessor {
webdir = "/home/openspy/gamestats";
}
}


Here is a link to the Openspy core files: https://github.com/sfcspanky/Openspy-Core


Like I said, I have no idea how it works, but I guess this might be a way to host your own Openspy type like server. Just a pity there isn't any documentation to go along with it  :(

nice find stonecold
this 30mb zip contains all the source file for openspy
https://github.com/sfcspanky/Openspy-Core/archive/master.zip

These are 2 files from the natneg folder

client.h
[spoiler]#ifndef NN_CLIENT_H
#define NN_CLIENT_H
#include "main.h"
#include "structs.h"
class Client {
public:
Client(int sd, struct sockaddr_in *peer, int instance);
~Client();
void handleIncoming(char *buff, int len);
struct sockaddr_in *getSockAddr();
gameInfo *getGameInfo();
uint16_t getPort();
uint32_t getAddress();
int getSocket();
int getCookie();
int getInstance();
int getIndex();
time_t getConnectTime();
time_t getLastPacket();
time_t getSendConnectTime();
bool getConnected();
bool getConnectedAck();
void sendDeadBeatNotice();
void trySendConnect(bool sendToOther = true);
private:
void handleInitPacket(NatNegPacket *packet);
void handleAddressCheck(NatNegPacket *packet);
void handleNatifyRequest(NatNegPacket *packet);
void handleReport(NatNegPacket *packet);
void SendERTReply(char type, NatNegPacket *packet);
void SendConnectPacket(Client *user, bool sendToOther = true);
int instance;
uint8_t version;
time_t connecttime;
time_t lastPacket;
time_t sentconnecttime;
int sd;
int cookie;
char cindex;
bool connected;
bool gotInit;
bool gotConnectAck;
gameInfo *game;
struct sockaddr_in sockinfo;
};
#endif
[/spoiler]

server.h
[spoiler]#ifndef _NN_SERVER_INC
#define _NN_SERVER_INC
#include "main.h"
#include "structs.h"
class Client;
typedef struct {
modLoadOptions *loadOptions;
std::list<Client *> client_list;
} serverInfo;
void deleteClient(Client *client);
Client *find_user(struct sockaddr_in *peer, int instance);
Client *find_user(uint32_t ip, uint16_t port, int instance);
Client *find_user_by_cookie(int cookie, int instance);
Client *find_user_by_cookie_index(int cookie, int instance, int index);
#endif
[/spoiler]

I think if someone knew how to edit those they could recompile a master server app with modified settings and then host it from your own site URL. Maybe some of the bugs with using swbf internet through openspy are caused because the master server scripts gamespy used for swbf1 were slightly different?

I would like to try to compile this server software.  So, if you don't mind, let's test the openspy for direct connection servers and macs and by then maybe I can see if I can get our own operational.

If it works out well, I bet we could run our own stats server.

I would also like to try to get the SWBF2 master server working for us as well, as they are probably only a short while from being shut down too.

How about testing until about the end of May?  and then move the community to one place or another depending on the results?
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Quote from: Buckler on April 30, 2013, 07:42:36 PM
I would like to try to compile this server software.  So, if you don't mind, let's test the openspy for direct connection servers and macs and by then maybe I can see if I can get our own operational.

If it works out well, I bet we could run our own stats server.

I would also like to try to get the SWBF2 master server working for us as well, as they are probably only a short while from being shut down too.

How about testing until about the end of May?  and then move the community to one place or another depending on the results?

Sounds good. For the direction connection option, does it allow you to directly connect to a dedicated server or to an internet game that somebody is hosting (almost like a listen server) ?

Actually there has been  no problem with gamespy of swbf2
But ill ask ace if we can host a server warning of a possible shutdown, and tell them to come to this site
Anyder | Talent, Ops & Culture | SWBF & Player Engagement
Email: communityambassador@swbfgamers.com
SWBFSpy Discord: http://discord.swbfspy.com
SWBFSpy Info: http://info.swbfspy.com

There will be no warning if SWBF2 shuts down.  Gamespy reserved the right to shutdown their service at any time (regardless of what third party GLU does).  We played the day before and the next it was gone.

Anyway, if we could figure out how to compile and optimize the Openspy source, it would probably be nicer than Gamespy, and definitely better than Tunngle (which I have so many problems with on dialup...)

I didn't try to join yet (I haven't been home much), but when I did check, I could see the FC server, so I'm excited.  If I would have known the batch files I've been messing with could do all of this, I could have helped. :)

8)

Stonecold:  Direct Connect allows connection through an IP address to someone else hosting using the Direct Connect option.  It goes through Gamespy which is why it was left unoperational after the shutdown.

The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

Quote from: Buckler on April 30, 2013, 07:42:36 PM
I would like to try to compile this server software.  So, if you don't mind, let's test the openspy for direct connection servers and macs and by then maybe I can see if I can get our own operational.
Wooo Macs! Don't forgot about the 5 or so of us that still play SWBF on them...

Quote from: UNIT 33 on May 01, 2013, 08:00:41 AM
Wooo Macs! Don't forgot about the 5 or so of us that still play SWBF on them...

Heh, at this point, everyone counts!
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet