# Setup proxy

{% hint style="warning" %}
If you do not plan to manage Plex servers, you can skip this step.
{% endhint %}

{% hint style="info" %}
This step is optional but highly recommended.
{% endhint %}

Streams Manager allows you to route all requests to `plex.tv` domain through a proxy. This is an additional security measure to ensure that your account is not accessed from Streams Manager's IP address. This is an optional step but recommended.&#x20;

You have two options for proxying:

1. (**Recommended**) If you have ssh access to the machine running the Plex Media Server, you can run a simple proxy program I created which is described below. Alternatively, you could also run well known open source proxy server [https://www.squid-cache.org](https://www.squid-cache.org/). This will allow you to proxy your calls to `plex.tv` through the machine running the Plex Media Server and the calls will look exactly the same as the calls that Plex web app makes when accessing your server. This way Plex will not be able to detect that your Plex account is being used from multiple machines or IP addresses. Many think, this is the best option.
2. If you do not have ssh access to the machine running the Plex Media Server, you can purchase a separate HTTP proxy service (lots of them on the Internet like <https://www.anonymous-proxies.net/products/http-proxy/> or [https://marsproxies.com/proxies/residential-proxies](https://marsproxies.com/proxies/residential-proxies/#pricing)) and proxy your calls through that service. This will still ensure that Plex never sees Stream Manager's IP address.

Proxying only affects traffic going to `plex.tv` domain and not your server. Your server will still be accessed directly as if proxy is not enabled.

## Proxy program

I have created a simple proxy executable that you can run on a machine that runs your Plex Media Server.

### Requirements

The program requires .NET 6.x to be installed. Please see this to install .NET 6 on your machine <https://dotnet.microsoft.com/en-us/download/dotnet/6.0>.

### Running

Download the executable from the [Github repository](https://github.com/plexstreams/simple-proxy/tree/main) for your platform (windows or linux) and choose the correct architecture (x64 or arm64) create a Docker image from the included Docker file. Make the file executable if necessary (`chmod +x`).

### Arguments

`PlexManager.Proxy run --port 5000 --username proxy_user --password proxy_pass`

* `--port` Port on which the proxy will listen for connections&#x20;
* `--username` Username for proxy authentication. Omit for no authentication&#x20;
* `--password` Password for proxy authentication. Omit for no authentication


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://streamsmanager.gitbook.io/streams-manager/configuration/setup-proxy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
