[SOLVED] Web updater with https

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Posts: 8
Joined: Sat Jun 28, 2014 1:15 pm

[SOLVED] Web updater with https

#1 Post by Rietr » Mon Aug 18, 2014 4:14 pm

Hi everybody,

While trying to implement a web-updater I've been stuck on a problem.
The updater is working fine when I'm testing it internally from my server over http.
However when I'm trying to grab a file externally the site uses https and the updater just gives an error about an unknown url type.

So I've done some googling and came on this issue.
When I'm trying to retrieve an url which starts with http, there is no problem. Also when I'm just using a test-script (retrieving the same updates.json file) with my own python distribution it works.

Is there anyway to get it working with a https site? I tried replacing the urllib.pyo from ren'py with my own, but unfortunately that didn't work.
Or is it just recommended to use http on the server?

Thanks for the help!

Last edited by Rietr on Thu Aug 21, 2014 3:35 am, edited 1 time in total.

User avatar
Spiky Caterpillar
Posts: 252
Joined: Fri Nov 14, 2008 7:59 pm
Completed: Lots.
Projects: Black Closet
Organization: Slipshod
Location: Behind you.

Re: Web updater with https

#2 Post by Spiky Caterpillar » Mon Aug 18, 2014 10:36 pm

Ren'Py doesn't ship with SSL included. You could try recompiling Ren'Py with
SSL linked in (this will be Somewhat Annoying, because you'll need to do it
once for each platform); it should also be possible to write (or adapt) a
Python module to use the system SSL libs.

https://docs.python.org/2/library/httplib.html indicates that it's actually
socket that you need to replace - I think urllib automatically checks for
SSL socket support, but might be wrong.

Other gotchas and alternate approaches depend on what your actual goal in
using SSL is.
Nom nom nom nom nom LEAVES.

User avatar
Ren'Py Creator
Posts: 15642
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY

Re: Web updater with https

#3 Post by PyTom » Wed Aug 20, 2014 10:17 pm

Note that beyond Ren'Py, you'd also have to get zsync working with https, which would provide its own challenge.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Posts: 8
Joined: Sat Jun 28, 2014 1:15 pm

Re: Web updater with https

#4 Post by Rietr » Thu Aug 21, 2014 3:34 am

Thanks for your suggestions!

I'm indeed also stuck on zsync, which doesn't want to cooperate.
So for now I decided it would not be worth the hassle and just put up a http server, thanks anyway!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot