[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
Message
Author
Rietr
Newbie
Posts: 8
Joined: Sat Jun 28, 2014 1:15 pm
Contact:

[SOLVED] Web updater with https

#1 Post by Rietr »

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!

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

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

Re: Web updater with https

#2 Post by Spiky Caterpillar »

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
PyTom
Ren'Py Creator
Posts: 16093
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
Contact:

Re: Web updater with https

#3 Post by PyTom »

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
Software > Drama • https://www.patreon.com/renpytom

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

Re: Web updater with https

#4 Post by Rietr »

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: Ahrefs [Bot], Imperf3kt, Semrush [Bot]