use a 64-bit web browser and it'll let you download the 64bit java setMonkeytofu wrote:Java client is annoying too because Java itself doesn't know how to give you the right driver and you have to go download it from third party websites making it a bitch for a lot of people running 64 bit to play.
DEVS: Are you interested in a brand-new client?
Moderator: Phades
-
boshaw
- Posts: 1612
- Joined: Tue Jun 01, 2010 10:22 pm
Re: DEVS: Are you interested in a brand-new client?
-
themendios
- Posts: 49
- Joined: Mon Feb 07, 2011 6:32 pm
Re: DEVS: Are you interested in a brand-new client?
Still running back through all the netcode since that's the majority of my effort, the sprite rendering will be trivial in comparison.Oddity wrote:Status report, OP.
Question for loftar - is the auth server moltke.seatribe.se or havenandearth.com? I found most of the definitions of stuff I want but I'm not even sure what the auth server is since it's a System.getproperty and I'm not certain how you're setting it and without that I can't 'find usage' to figure out what you're setting. Also why are there 2 certs, authsrv and ressrv?
I don't want to start trying to hit the server until I feel like I have a pretty damn good grasp on the netcode since it's rude to just throw my hacky half-client at it for testing.
Also had a fun idea, make an ASCII text-render mode like DF (which I never played for more than 10 minutes) just for kicks.
EDIT: Also am I correct when I see that the minimap is not rendered on the fly but rather collected from the server? If so, why? Doesn't that add unnecessary load? Further if so: any problems with me rendering it on the fly?
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: DEVS: Are you interested in a brand-new client?
See Bootstrap.java:themendios wrote:Question for loftar - is the auth server moltke.seatribe.se or havenandearth.com? I found most of the definitions of stuff I want but I'm not even sure what the auth server is since it's a System.getproperty and I'm not certain how you're setting it and without that I can't 'find usage' to figure out what you're setting.
Code: Select all
String authserver = (Config.authserv == null)?address:Config.authserv;(Reasonably, it should always be explicit in Config, but I only added that variable to Config as of late, and it was a rushed thing.)
authsrv.crt is for the auth server, and ressrv.crt is for the HTTP server serving resources. The latter is protected with SSL as well since resources can contain arbitrary Java code, and thus it would be bad to have someone MITM the resource server and send malicious code to clients.themendios wrote:Also why are there 2 certs, authsrv and ressrv?
Mostly because it uses the same system as Cartography, which is able to save historical maps as well, but also to be able to render objects like trees and houses on the minimap beyond the cut-off distance. Either way, it's just a little bit of HTTP traffic. The server hardly notices it.themendios wrote:EDIT: Also am I correct when I see that the minimap is not rendered on the fly but rather collected from the server? If so, why? Doesn't that add unnecessary load?
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
themendios
- Posts: 49
- Joined: Mon Feb 07, 2011 6:32 pm
Re: DEVS: Are you interested in a brand-new client?
No I got that far, what i'm asking is what is the actual address Config.authserv by default? I found all the references to it and your (I'm guessing) test with the localhost but I need the actual address haha - all I'm finding are references to change it but if nothing changes it and it's not in arg[] what is the default value, moltke.seatribe.se?loftar wrote: See Bootstrap.java:"address" is the address of the game server. If no auth server is explicitly specified in the Config, the game server is used by default.Code: Select all
String authserver = (Config.authserv == null)?address:Config.authserv;
(Reasonably, it should always be explicit in Config, but I only added that variable to Config as of late, and it was a rushed thing.)
I'll probably have questions on the 2nd part but I'm still digesting the rest.
-
themendios
- Posts: 49
- Joined: Mon Feb 07, 2011 6:32 pm
Re: DEVS: Are you interested in a brand-new client?
Ugh this SSL code is not trivial. Luckily I already had an HTTP code bit laying around.
I just wanna make sure I'm even hitting the right address getting these SSL errors
I just wanna make sure I'm even hitting the right address getting these SSL errors
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: DEVS: Are you interested in a brand-new client?
Config.authserv is null by default.themendios wrote:No I got that far, what i'm asking is what is the actual address Config.authserv by default?
The "address" variable itself is what is given on the command-line; that is, moltke.seatribe.se.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
themendios
- Posts: 49
- Joined: Mon Feb 07, 2011 6:32 pm
Re: DEVS: Are you interested in a brand-new client?
Thanks!loftar wrote:Config.authserv is null by default.themendios wrote:No I got that far, what i'm asking is what is the actual address Config.authserv by default?
The "address" variable itself is what is given on the command-line; that is, moltke.seatribe.se.
-
themendios
- Posts: 49
- Joined: Mon Feb 07, 2011 6:32 pm
Re: DEVS: Are you interested in a brand-new client?
Okay I need a little help understanding your auth process sorry! Shouldn't need hand-holding once I get past this part, I don't know why it's taking so much effort, probably because I'm not incredibly comfortable with SSL and am afraid I'm messing that part up.
If I have the SSL set up and handshake complete (according to reflection), if I understand your code correctly I should send a [0][length of username][username utf-8] byte array and get back a 2-byte header that starts with [0] right? Then eventually get a token etc.
I'm sending successfully but then never get anything back, not even the 2-byte header. I don't know what I'm not getting on your code I've been through it 20 times.
If I have the SSL set up and handshake complete (according to reflection), if I understand your code correctly I should send a [0][length of username][username utf-8] byte array and get back a 2-byte header that starts with [0] right? Then eventually get a token etc.
I'm sending successfully but then never get anything back, not even the 2-byte header. I don't know what I'm not getting on your code I've been through it 20 times.
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: DEVS: Are you interested in a brand-new client?
Generally, the protocol consists of a series of records, each of which follows the same format -- [type (uint8)][length (uint8)][data (length bytes)]. In responses from the server, the "type" field is the return value, where 0 normally indicates success and 1 indicates an error. So yes, you're right.themendios wrote:if I understand your code correctly I should send a [0][length of username][username utf-8] byte array and get back a 2-byte header that starts with [0] right?
If I were to guess at what you're doing wrong, you need to flush the SSL stream after writing your message. Your SSL library is probably buffering the data, waiting to fill up an entire SSL record.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
marvi
- Posts: 138
- Joined: Thu Feb 18, 2010 3:41 pm
Re: DEVS: Are you interested in a brand-new client?
Some time ago, having the same issue I [almost] blindly rewrote original Java code. :]themendios wrote:Okay I need a little help understanding your auth process sorry! Shouldn't need hand-holding once I get past this part, I don't know why it's taking so much effort, probably because I'm not incredibly comfortable with SSL and am afraid I'm messing that part up.
If I have the SSL set up and handshake complete (according to reflection), if I understand your code correctly I should send a [0][length of username][username utf-8] byte array and get back a 2-byte header that starts with [0] right? Then eventually get a token etc.
I'm sending successfully but then never get anything back, not even the 2-byte header. I don't know what I'm not getting on your code I've been through it 20 times.
Here the authentication code snippet which works for me: link. Hope this helps.