Editing Server:MacSupport
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
Mac support requires special care to provide a server name to the client application. This is typically handled by the server, but it is possible to also manipulate it at client level using Apple IPC mechanisms (as Solar did for the [https://github.com/EQArchives/EQMacEmu/blob/09da8370ff01ea671fbc772511579b8d4876741e/utils/EQPPCLaunch/main.c PPC launcher]). | |||
The original Everquest: Macintosh Edition used the launcher to authenticate with an SOE session server which would then provide a ticket back to the client. The client would then pass the ticket to the world server. EQ has a basic crypt thing for the password and this is similar in concept to how Kerberos is/was used by Active Directory in Windows operating systems. | |||
The original Everquest: Macintosh Edition used the launcher to authenticate with an SOE session server which would then provide a ticket back to the client. The client would then pass the ticket to the world server. EQ has a basic crypt | |||
To get MAC support working, the client simply passes username/password directly to the loginserver as if it was a ticket (skipping the session server step). The loginserver parses the username/password part of the ticket string. | To get MAC support working, the client simply passes username/password directly to the loginserver as if it was a ticket (skipping the session server step). The loginserver parses the username/password part of the ticket string. | ||
== Opcodes == | |||
All opcodes are found at [https://github.com/EQMacEmu/Server/blob/fc08674c9bf0d02aa1b408b2d9c7e5cb578a0c75/loginserver/login_util/login_opcodes_oldver.conf login_opcodes_oldver.conf] but the following are relevant to this discussion: | All opcodes are found at [https://github.com/EQMacEmu/Server/blob/fc08674c9bf0d02aa1b408b2d9c7e5cb578a0c75/loginserver/login_util/login_opcodes_oldver.conf login_opcodes_oldver.conf] but the following are relevant to this discussion: | ||
Line 21: | Line 15: | ||
* OP_LoginBanner=0x5200 | * OP_LoginBanner=0x5200 | ||
== Login Protocol == | |||
When a client first authenticates to the loginserver, it sends the <span style="font-weight:bold">OP_SessionReady</span> opcode to the server, and the server responds back with <span style="font-weight:bold">OP_SessionReady</span>. | When a client first authenticates to the loginserver, it sends the <span style="font-weight:bold">OP_SessionReady</span> opcode to the server, and the server responds back with <span style="font-weight:bold">OP_SessionReady</span>. | ||
The client then replies with the <span style="font-weight:bold">OP_LoginOSX</span> opcode followed by the username/password and eqworld-52.989studios.com as a UDP datagram. The url is no longer used but rather parsed server-side to validate mac clients (see [https://github.com/EQArchives/EQMacEmu/blob/09da8370ff01ea671fbc772511579b8d4876741e/loginserver/client.cpp#L62 OP_LoginOSX] and [https://github.com/EQArchives/EQMacEmu/blob/09da8370ff01ea671fbc772511579b8d4876741e/loginserver/client.cpp#L245 handle_login] behavior). | The client then replies with the <span style="font-weight:bold">OP_LoginOSX</span> opcode followed by the username/password and eqworld-52.989studios.com as a UDP datagram. The url is no longer used but rather parsed server-side to validate mac clients (see [https://github.com/EQArchives/EQMacEmu/blob/09da8370ff01ea671fbc772511579b8d4876741e/loginserver/client.cpp#L62 OP_LoginOSX] and [https://github.com/EQArchives/EQMacEmu/blob/09da8370ff01ea671fbc772511579b8d4876741e/loginserver/client.cpp#L245 handle_login] behavior). | ||
If the username was found in the accounts table, the server pulls the sha1 hash of the user's password and compares it against what the user sent to the server. If it checks out, the server sends a packet back to the client with the <span style="font-weight:bold">OP_LoginAccepted</span> opcode and the account ID prepended with "LS#" which is used as the session id, a field with the string "unused", and the number 4 | If the username was found in the accounts table, the server pulls the sha1 hash of the user's password and compares it against what the user sent to the server. If it checks out, the server sends a packet back to the client with the <span style="font-weight:bold">OP_LoginAccepted</span> opcode and the account ID prepended with "LS#" which is used as the session id, a field with the string "unused", and the number 4. The second and third fields would appear on the wire as <span style="font-weight:bold">75 6e 75 73 65 64 00 04</span>. | ||
Finally, the client responds to the server with <span style="font-weight:bold">OP_LoginComplete</span>. | Finally, the client responds to the server with <span style="font-weight:bold">OP_LoginComplete</span>. | ||
The key difference | The key difference between a Windows Client and OSX client successfully authenticating is the following [https://github.com/EQArchives/EQMacEmu/blob/09da8370ff01ea671fbc772511579b8d4876741e/loginserver/client.cpp#L337 block of code] in the loginserver source that sends an extra UDP packet to the client telling it which world server to connect to: | ||
<pre> | <pre> | ||
string buf = server.options.GetNetworkIP(); | string buf = server.options.GetNetworkIP(); | ||
Line 38: | Line 33: | ||
sentsessioninfo = true; | sentsessioninfo = true; | ||
</pre> | </pre> | ||
<span style="font-weight:bold">GetNetworkIP()</span> pulls the world server's URL from your login.ini file and/or the database as mentioned previously. This leaves you with a packet containing "0x4900" and your server's URL which the client will then use to reach server select. | <span style="font-weight:bold">GetNetworkIP()</span> pulls the world server's URL from your login.ini file and/or the database as mentioned previously. This leaves you with a packet containing "0x4900" and your server's URL which the client will then use to reach server select. |