Skip to content

Commit

Permalink
set secure to default, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatNerdyPikachu committed Apr 2, 2020
1 parent 6bdac16 commit 742d1a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Currently I've only been able to get this working on Docker, as with that, I can

My container is ran as so:
```
docker run -e ADVERTISE_IP="http://<local ip>:32400/" -e ALLOWED_NETWORKS=192.168.200.0/24 \
docker run -e ADVERTISE_IP="http://<local ip>:32400/" -e ALLOWED_NETWORKS=<local netmask> \
-d --restart=always \
--name plex \
-p 32401:32400 \
Expand All @@ -38,6 +38,8 @@ plexinc/pms-docker
```
(If there is something I am configuring wrong here, please open an issue, PR, or post on the [Plex forum thread](https://forums.plex.tv/t/metaproxy-for-plex/566250). Thanks!)

- For now, until I can figure out a solution, you'll also need to set your server to *require* secure connections.

5. Configure your reverse proxy
- I use [Caddy](https://caddyserver.com/v1), but feel free to use what you want!

Expand All @@ -48,9 +50,10 @@ My configuration is as so (note the ``*``):
transparent
}
proxy / localhost:32401 {
proxy / https://localhost:32401 {
transparent
websocket
insecure_skip_verify
}
log logs/plex.log
Expand Down
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"crypto/tls"
"encoding/json"
"flag"
"io/ioutil"
Expand Down Expand Up @@ -151,9 +152,11 @@ func getMediaTitle(media *media) string {
}

func main() {
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}

bindAddress := flag.String("addr", "127.0.0.1:3213", "the address to bind to")
plexHost := flag.String("plex-host", "localhost:32401", "the host + port that your plex server is running on")
secure := flag.Bool("secure", false, "use https to connect to your plex server (will increase loading times) (needed if Secure Connections is set to Required)")
secure := flag.Bool("secure", true, "use https to connect to your plex server (will increase loading times) (needed if Secure Connections is set to Required)")

flag.Parse()

Expand Down

0 comments on commit 742d1a3

Please sign in to comment.