Forcing HTTPS for Default Client

Forum for alternative clients, mods & discussions on the same.

Forcing HTTPS for Default Client

Postby TheRussianB » Thu Aug 27, 2020 6:31 pm

I'm trying to export my map data with the new import/export feature Loftar introduced into the default client so that I can clear my cache. I've primarily been using Amber and Purus client. From what I understand, Amber uses HTTPS for resfiles and so map data ends up being stored in a different cache than if you were to use HTTP. Whenever I open the default client, I don't see any of my usual map data so I'm assuming it is not using HTTPS (unless default and custom clients store map data in different spots regardless of HTTP/HTTPS).

Is there any way to force the default client to use HTTPS so that I can export and import my map data? I've tried copying the custom JVM args Purus gives when you click "Use HTTPS for resfiles (amber maps)" like this: Image
But I simply get this error:
Image.
User avatar
TheRussianB
 
Posts: 83
Joined: Sun May 16, 2010 5:43 am

Re: Forcing HTTPS for Default Client

Postby loftar » Sun Aug 30, 2020 9:41 pm

The specific problem you're having is that you're trying to pass the resource-URL argument to the launcher, rather than the client itself. If you want to change the launch parameters, I'd recommend downloading the actual launch file, modify it, and run the launcher on that modified file. Note, however, that it is the haven.mapbase property that you'll want to change for this, rather than the resource URL.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 8926
Joined: Fri Apr 03, 2009 7:05 am

Re: Forcing HTTPS for Default Client

Postby TheRussianB » Sun Aug 30, 2020 10:24 pm

loftar wrote:The specific problem you're having is that you're trying to pass the resource-URL argument to the launcher, rather than the client itself. If you want to change the launch parameters, I'd recommend downloading the actual launch file, modify it, and run the launcher on that modified file. Note, however, that it is the haven.mapbase property that you'll want to change for this, rather than the resource URL.

Thanks for the response! How would I specify the modified hafen.hl file as a command line argument?
User avatar
TheRussianB
 
Posts: 83
Joined: Sun May 16, 2010 5:43 am

Re: Forcing HTTPS for Default Client

Postby loftar » Sun Aug 30, 2020 10:32 pm

TheRussianB wrote:How would I specify the modified hafen.hl file as a command line argument?

Simply specify it with an argument, eg. java -jar autohaven.jar my-hafen.hl
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 8926
Joined: Fri Apr 03, 2009 7:05 am

Re: Forcing HTTPS for Default Client

Postby TheRussianB » Sun Aug 30, 2020 10:39 pm

loftar wrote:Simply specify it with an argument, eg. java -jar autohaven.jar my-hafen.hl

I was trying that but was getting this exception. This occurred with both a modified and unmodified version of hafen.hl.
User avatar
TheRussianB
 
Posts: 83
Joined: Sun May 16, 2010 5:43 am

Re: Forcing HTTPS for Default Client

Postby loftar » Sun Aug 30, 2020 11:38 pm

TheRussianB wrote:I was trying that but was getting this exception. This occurred with both a modified and unmodified version of hafen.hl.

Hmm, right, the launch file uses relative URLs. You probably need to manually "absolutify" them. It should probably be something like this:
Code: Select all
require 1.0

validate tls-cert:key:rsa:99118FA7C13D9686021FFDB74F8FFE77CA5EB7D356A8D31BB907A31AFAE04D46

class-path https://game.havenandhearth.com/java/hafen.jar
class-path https://game.havenandhearth.com/java/hafen-res.jar
class-path https://game.havenandhearth.com/java/builtin-res.jar

main-class haven.MainFrame

include https://game.havenandhearth.com/java/jogl2/jogl.hl

title "Haven & Hearth"
splash-image splash.gif

heap-size 1024

property haven.errorurl http://game.havenandhearth.com/java/error
property haven.defserv game.havenandhearth.com
property haven.resurl https://game.havenandhearth.com/res/
property haven.screenurl http://game.havenandhearth.com/mt/ss
property haven.cachebase http://game.havenandhearth.com/render/
property haven.mapbase http://game.havenandhearth.com/java/
property haven.fullscreen off
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 8926
Joined: Fri Apr 03, 2009 7:05 am

Re: Forcing HTTPS for Default Client

Postby TheRussianB » Sun Aug 30, 2020 11:44 pm

loftar wrote:Hmm, right, the launch file uses relative URLs. You probably need to manually "absolutify" them. It should probably be something like this:

Your example looks correctly "absolutified", but I'm still getting the same exception. Would the URLs in jogl.hl also have to be absolutified?
User avatar
TheRussianB
 
Posts: 83
Joined: Sun May 16, 2010 5:43 am

Re: Forcing HTTPS for Default Client

Postby loftar » Sun Aug 30, 2020 11:45 pm

TheRussianB wrote:Would the URLs in jogl.hl also have to be absolutified?

I don't think so. As long as it's loaded from that URL, it should work correctly.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 8926
Joined: Fri Apr 03, 2009 7:05 am

Re: Forcing HTTPS for Default Client

Postby TheRussianB » Sun Aug 30, 2020 11:50 pm

loftar wrote:I don't think so. As long as it's loaded from that URL, it should work correctly.

Yeah still not working :(

Anyways, thanks for taking a look. I'll keep poking around to see if I can get it to work.

Edit: Absolutified splash.gif but still same exception
User avatar
TheRussianB
 
Posts: 83
Joined: Sun May 16, 2010 5:43 am

Re: Forcing HTTPS for Default Client

Postby loftar » Mon Aug 31, 2020 12:07 am

Uh, right, sorry, the command-line argument needs to be a URL, not a filename. It might work if you use file://my-hafen.hl
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 8926
Joined: Fri Apr 03, 2009 7:05 am

Next

Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 10 guests