A middleware proxy for the plex server API. This sits in between the plex client and the plex server, forwarding requests and modifying responses to add some extra features.
Inspired by Replex
This project is still very much a WIP and it is not recommended to enable remote access yet.
-
Instead of only showing related movies from your server, you can show the list of similar movies from letterboxd
For movies that aren't available on your server, the "unavailable" status will appear on the film page.
Note: The unavailable status will not show on the Roku client or any other client that doesn't subscribe to the plex server websocket.
-
Activity from your letterboxd friends can be displayed on the server home page. Different users on your server can be configured to display their own friend feeds.
-
Reviews from your letterboxd friends can be included alongside the RottenTomatoes reviews
You will need to use your own SSL certificate for your plex server in order for this proxy to modify requests over HTTPS. Otherwise, it will only work over HTTP, or it will fallback to the plex server's true address instead of the proxy address.
Create a config.json
file with the following structure, and fill in the configuration for your setup:
{
"port": 32397,
"plex": {
"host": "http://127.0.0.1:32400",
"token": "<PLEX API TOKEN>"
},
"ssl": {
"keyPath": "/etc/pseudo_plex_proxy/ssl_cert.key",
"certPath": "/etc/pseudo_plex_proxy/ssl_cert.crt"
},
"perUser": {
"[email protected]": {
"letterboxdUsername": "<LETTERBOXD USERNAME>"
}
}
}
- protocol: The server protocol. Either
http
,https
, orhttp+https
(default ishttp+https
) - port: The port that this proxy will run on.
- plex
- host: The url of your plex server.
- token: The plex API token of the server owner.
- appDataPath: (optional) Manually specify the path of your plex server's appdata folder if it's in an unconventional place. On Linux, this is typically
/var/lib/plexmediaserver/Library/Application Support/Plex Media Server
unless you're running via docker. This will be used to determine the path of the SSL certificate ifssl.autoP12Path
istrue
. This will also be used to determine the path ofPreferences.xml
ifssl.autoP12Password
istrue
.
- ssl
- p12Path: The path to your SSL p12 file.
- p12Password: The password to decrypt your SSL p12 file.
- keyPath: The path to your SSL private key. This is ignored if
ssl.p12Path
is set orssl.autoP12Path
istrue
. - certPath: The path to your SSL certificate. This is ignored if
ssl.p12Path
is set orssl.autoP12Path
istrue
. - autoP12Path: Automatically locate and use your plex server's SSL p12 file (if it's installed on the same system in a conventional location).
- autoP12Password: Automatically determine the password of your plex server's SSL p12 file.
- watchCertChanges: Automatically reload the SSL certificate/key whenever your cert/key/p12 file changes
- certReloadDelay: The time in milliseconds to wait after your cert/key/p12 file changes before reloading SSL (if
ssl.watchCertChanges
istrue
). Default is1000
.
- perUser: A map of settings to configure for each user on your server. The map keys are the plex email for each user.
- letterboxdUsername: The letterboxd username for this user
- letterboxdSimilarItemsEnabled: Display similar items from letterboxd on plex media item pages for this user
- letterboxdFriendsActivityHubEnabled: Display the letterboxd friends activity hub on the home page for this user
- letterboxdFriendsReviewsEnabled: Display letterboxd friends reviews for this user
- letterboxdSimilarItemsEnabled: Display similar items from letterboxd on plex media item pages for all users
- letterboxdFriendsActivityHubEnabled: Display the letterboxd friends activity hub on the home page for all users
- letterboxdFriendsReviewsEnabled: Display letterboxd friends reviews for all users
If you have generated your own SSL certificate, configure your server's Network settings to use it. You don't need to set these settings if using ssl.autoP12Path
and ssl.autoP12Password
in your config.
In the Custom server access URLs field, put the URLs of your proxy server, separated by commas.
If you are using your plex server's default certificate (ie ssl.autoP12Path
and ssl.autoP12Password
in your config), you may need to manually add the automatic domains for your plex server here instead.
Ensure Enable local network discovery (GDM) and Enable Relay are both unchecked, and then save the changes to your server's network settings.
At this point, your plex server might not show up on app.plex.tv until you start the proxy server, but you should still be able to access it via its local ip.
If you're using a custom domain name for your SSL certificate, you can hardcode the DNS entry mapping on your home router (or pihole if you have it). This way your domain will always resolve to the local ip when accessing via your local network (ie: map yourdomain.com
to 192.168.1.123
or whatever the local IP of your proxy server is).
If you're having issues getting clients to connect through the proxy, try setting a firewall rule to disallow connections directly to your plex server. Alternatively, you can run Plex inside of docker, and set the external port to anything other than 32400
.
If you want to enable the proxy for remote access, you'll just need to port forward your proxy server instead of your plex server.
To run, cd into this repo's folder in terminal and run the following commands, replacing the config.json path with your own:
npm install
npm start -- --config="/path/to/config.json"