diff --git a/README.md b/README.md index 2ce4709..ee70bee 100644 --- a/README.md +++ b/README.md @@ -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://:32400/" -e ALLOWED_NETWORKS=192.168.200.0/24 \ +docker run -e ADVERTISE_IP="http://:32400/" -e ALLOWED_NETWORKS= \ -d --restart=always \ --name plex \ -p 32401:32400 \ @@ -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! @@ -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 diff --git a/main.go b/main.go index 5d984bc..e1762fd 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "crypto/tls" "encoding/json" "flag" "io/ioutil" @@ -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()