Skip to content

Allow for automatic setup of TLS for HTTPS#4417

Closed
papuSpartan wants to merge 8 commits intoAUTOMATIC1111:masterfrom
papuSpartan:self-sign
Closed

Allow for automatic setup of TLS for HTTPS#4417
papuSpartan wants to merge 8 commits intoAUTOMATIC1111:masterfrom
papuSpartan:self-sign

Conversation

@papuSpartan
Copy link
Copy Markdown
Contributor

In #948, users expressed that they wished to be able to use the webui using HTTPS. This PR enables a user to enable TLS, and effectively HTTPS, by adding one command line switch.

If --self-sign is passed with no arguments, it will attempt to generate a key/cert pair for the user and will also add the newly generated certificate to the certifi trust store. This means that, in most cases, the user can simply add --self-sign, and use TLS/HTTPS. Additionally, one can pass in their own key/cert pair using --tls-certfile and --tls-keyfile in order to add their own certificate to the certifi trust store without having to manually edit it themselves.

@papuSpartan papuSpartan changed the title Allow for automatic setup of TLS Allow for automatic setup of TLS for HTTPS Nov 7, 2022
@RJSprod
Copy link
Copy Markdown

RJSprod commented Nov 9, 2022

I rarely ever pull into my local before Auto approves, but this one I need. I've tried to figure out how to add HTTPS on my own and ran into all sort of noob issues that will take me longer to learn. Thanks for this!

@AUTOMATIC1111
Copy link
Copy Markdown
Owner

I'd very much prefer if this was an extension.

@papuSpartan
Copy link
Copy Markdown
Contributor Author

Converting to -> extension

@papuSpartan
Copy link
Copy Markdown
Contributor Author

@36DB Could you add my extension implementation for this PR to the extensions index?

@36DB
Copy link
Copy Markdown
Collaborator

36DB commented Nov 13, 2022

@papuSpartan Sure but I would need the basic template. I have the permissions to add but have little knowledge to write it myself 😅
Reply me with the content that you would like to add to the json.

@papuSpartan
Copy link
Copy Markdown
Contributor Author

papuSpartan commented Nov 13, 2022

@papuSpartan Sure but I would need the basic template. I have the permissions to add but have little knowledge to write it myself sweat_smile Reply me with the content that you would like to add to the json.

{
      "name": "Auto TLS/HTTPS",
      "url": "https://github.com/papuSpartan/stable-diffusion-webui-auto-tls-https.git",
      "description": "Automatically(Default) or semi-automatically enable HTTPS",
      "tags": [
        "script"
      ]
}

You would need to add that object to the main extensions array. For testing I just put it right at the end after "old localizations".

image

Tested on my machine by loading the modified index in the webui and it seemed to work properly.

@papuSpartan
Copy link
Copy Markdown
Contributor Author

This is the modified version I was able to load in the webui: https://gist.github.com/papuSpartan/c32cb0f3c59ec15a7bbb7de56c056389.

Also, It might be helpful to save the extensions index file in a prettified format just so that it is easier to read straight from the wiki without something parsing it. (I used jq for this but any other json prettifier should work)

@36DB
Copy link
Copy Markdown
Collaborator

36DB commented Nov 14, 2022

@ClashSAN Mind if you add this? I got some RL issues and probably can't add edit the file for few days.

@papuSpartan
Copy link
Copy Markdown
Contributor Author

@ClashSAN Mind if you add this? I got some RL issues and probably can't add edit the file for few days.

Looks like someone added it to the list. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants