# Host your own proxy

{% hint style="info" %}
**Info:** this guide contains affiliate links, which means that if you register and purchase something with my link, I'll be getting a small comission from the provider. This doesn't affect you in any way, and you just help me cover some of the public proxies costs.
{% endhint %}

{% hint style="danger" %}
**Important:** please keep in mind through the whole tutorial that **Twitch doesn't support the IPv6 protocol**, thus you **MUST** have outbound IPv4 available for this to work. Inbound connections can be made using IPv6 without any issues, but you may need to readjust some squid settings for this to work, which we don't cover here.
{% endhint %}

{% hint style="danger" %}
**Important:** please do not follow this tutorial if your plan is to publicly host a server for people to use with TTV LOL PRO. If you want to contribute, you may contact us at [official-links](https://wiki.cdn-perfprod.com/information/official-links "mention") and donate a few of your proxy connections and bandwidth for other users to use. We'll secure everything from our end so you don't need to worry about unwanted traffic, nor commercial break in progress ads.

Additionally, if you have an active VPN subscription with several concurrent connections available, that you don't need, you may also donate that for others to use securely.
{% endhint %}

{% hint style="danger" %}
**Disclaimer:** proxying through another country could open up a range of features that are not accessible in your region, including Predictions, Prime Subscriptions, or currency changes, among others. Please be aware that you take full responsibility for the content passing through your proxy or public ones. It's important to note that in certain countries, features like Predictions might be categorized as gambling, making them inappropriate for minors. If your country doesn't support these features, there are legitimate reasons for it. Stay informed and conduct online research accordingly.
{% endhint %}

{% hint style="warning" %}
**About:** this tutorial has been made using a very unreliable provider. Please use some other provider listed in the "Ad-free countries" section. The cheapest option is going with [Proxy6](https://proxy6.net/en/?r=528519) and using the promo code `taTmJgVHDF` which gives you a small discount to get a proxy server for less than $0.50 USD a month in Russia, and shared amongst other users. You can also skip this tutorial if you go this way.&#x20;

Alternatively, if you don't want to bother with setting up your own proxy or dealing with providers, you can support our project and get access to the restricted proxy infrastructure available all around the world. [#get-access-to-the-restricted-infrastructure](https://wiki.cdn-perfprod.com/must-read/proxy-information#get-access-to-the-restricted-infrastructure "mention")
{% endhint %}

## List of known ad-free countries

{% hint style="info" %}
**Ad-free country**: no records of ads over the last 12 months.

**Partially ad-free country**: there's records of minimal ads in the last 12 months. Ranging from 1-2 ad(s).
{% endhint %}

***

<table data-full-width="true"><thead><tr><th width="172">Country</th><th width="98" data-type="checkbox">Tested</th><th width="265" align="center">Comments</th><th align="center">Recommended Provider</th></tr></thead><tbody><tr><td>🇷🇺 Russia</td><td>true</td><td align="center">Ad-free country. As of 06/23/2025, limited to 720p stream.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://time-host.net/?from=33731">time-host.net</a>, <a href="https://aeza.net/?ref=364671">aeza.net</a>, <a href="https://www.robovps.biz/?ref=47047">robovps.biz</a>, <a href="https://ruvds.com/pr34929">ruvds.com</a>, <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://kvmka.ru/?from=6082">kvmka.ru</a>, <a href="https://deephost.pw/?from=4346">deephost.pw</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇰🇷 South Korea</td><td>true</td><td align="center">Ad-free country. Limited to 720p stream.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>)</td></tr><tr><td>🇦🇱 Albania</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://www.albahost.net/r/3">albahost.net</a> (premium), <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇲🇩 Moldova</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://my.ava.hosting/aff.php?aff=15641">ava.hosting</a></td></tr><tr><td>🇧🇾 Belarus</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>)</td></tr><tr><td>🇷🇴 Romania</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://www.hosteroid.uk/aff.php?aff=1">hosteroid.uk</a> (premium), <a href="https://rarecloud.io/clients/aff.php?aff=51">rarecloud.io</a>, <a href="https://justhost.ru/?ref=181709">justhost.ru</a></td></tr><tr><td>🇱🇻 Latvia</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇱🇹 Lithuania</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://www.bacloud.com/aff.php?aff=532">bacloud.com</a> (premium), <a href="https://www.hosteroid.uk/aff.php?aff=1">hosteroid.uk</a> (premium), <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇪🇪 Estonia</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://clients.hostslim.eu/aff.php?aff=213">hostslim.eu</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇧🇬 Bulgaria</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://alphavps.com/clients/aff.php?aff=615">alphavps.com</a> (premium), <a href="https://justhost.ru/?ref=181709">justhost.ru</a></td></tr><tr><td>🇸🇮 Slovenia</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://justhost.ru/?ref=181709">justhost.ru</a></td></tr><tr><td>🇮🇸 Iceland</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://justhost.ru/?ref=181709">justhost.ru</a></td></tr><tr><td>🇵🇹 Portugal</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇭🇷 Croatia</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇲🇰 North Macedonia</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇬🇪 Georgia</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>)</td></tr><tr><td>🇦🇲 Armenia</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇰🇿 Kazakhstan</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://ruvds.com/pr34929">ruvds.com</a>, <a href="https://own.tn/portal/?affid=15">own.tn</a></td></tr><tr><td>🇸🇨 Seychelles</td><td>true</td><td align="center">Ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>)</td></tr><tr><td>🇺🇦 Ukraine</td><td>true</td><td align="center">Partially ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://hostiko.com.ua/en/?p=951980">hostiko.com.ua</a>, <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇸🇰 Slovakia</td><td>true</td><td align="center">Partially ad-free country.</td><td align="center"><a href="https://www.hosteroid.uk/aff.php?aff=1">hosteroid.uk</a> (premium)</td></tr><tr><td>🇱🇺 Luxembourg</td><td>true</td><td align="center">Partially ad-free country.</td><td align="center"><a href="https://my.frantech.ca/aff.php?aff=6805">BuyVM</a> (premium)</td></tr><tr><td>🇦🇪 United Arab Emirates</td><td>true</td><td align="center">Partially ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇷🇸 Serbia</td><td>true</td><td align="center">Partially ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://kvmka.ru/?from=6082">kvmka.ru</a>, <a href="https://deephost.pw/?from=4346">deephost.pw</a></td></tr><tr><td>🇵🇱 Poland</td><td>true</td><td align="center">Partially ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://skhron.com.ua/aff.php?aff=18">skhron.com.ua</a> (premium), <a href="https://hostiko.com.ua/en/?p=951980">hostiko.com.ua</a>, <a href="https://justhost.ru/?ref=181709">justhost.ru</a>, <a href="https://4vps.su/r/k502Bb6Fb8a7">4vps.su</a></td></tr><tr><td>🇪🇬 Egypt</td><td>true</td><td align="center">Partially ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>)</td></tr><tr><td>🇮🇱 Israel</td><td>true</td><td align="center">Partially ad-free country.</td><td align="center"><a href="https://proxy6.net/en/?r=528519">proxy6.net</a> (promo code: <code>taTmJgVHDF</code>), <a href="https://justhost.ru/?ref=181709">justhost.ru</a></td></tr></tbody></table>

## Step 1 - Creating your VM

***

Firstly, we need to create our instance. Once you've logged in and added some account balance, go to `Servers -> New Instance`.

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2F3ONywEL4CSHaVI4zEAYB%2F241818467-bf3cde8c-8ddd-48e0-a73c-09d6f5167acc.png?alt=media&#x26;token=692a175e-9b24-4f35-8c8b-f53e1661f2fe" alt=""><figcaption><p>Creating your new Virtual Machine Instance</p></figcaption></figure>

Once you're there, set a random `hostname` you'd like, leave 🇷🇺 Moscow as the region and select Debian 11 (also known as Bullseye) as the image. You can use whatever Linux distro you like the most, but this tutorial focuses on Debian 11 specifically, so results may vary with other Linux distros.

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2F3G70y5Amef3qhjegKG8t%2F241818535-5e0eee9c-8595-4e53-a353-8f2a64b4f71a.png?alt=media&#x26;token=7022410b-98ff-47e3-ac88-1318b6251f5a" alt=""><figcaption><p>Initial configuration before deploying</p></figcaption></figure>

Proceed to select the flavor you'd like (the cheapest one should work just fine, but if you want more power, go ahead!) and leave the rest as default. You can now deploy your instance.

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FZqzCt5upPwODc4xnzGlk%2F241818762-1c60557e-7bcc-4e80-bb51-2a449d8796e0.png?alt=media&#x26;token=a524c4d8-3daa-448e-8587-11ad90f4f1e2" alt=""><figcaption><p>Initial configuration before deploying</p></figcaption></figure>

## Step 2 - Accessing the VM

***

After you've done the above steps, you will be able to log in into your VM. Proceed to open a Command Prompt (Or Windows Terminal) window:\
Execute the following command: `ssh root@server-ip`. Remember to replace `server-ip` with your server IP address, which you can find in your Servers control panel.

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FXApQ9Ov3nQS1bKgyj1IN%2F241818909-0c98a600-66dc-4404-900d-a8ee8d168274.png?alt=media&#x26;token=bc0bb582-1c61-416d-a028-0b6e19e3cf66" alt=""><figcaption><p>Initial SSH access to your VM</p></figcaption></figure>

Once done, it will prompt for the root password. Check your email to get your root password. If that password doesn't work, go back to your Instances page in your browser and change it under the Security tab.

## Step 3 - Basic Initial Setup

***

After you've logged in, proceed to update your package repositories and upgrade the needed packages.\
Execute the following command: `apt update && apt upgrade -y`

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2F8MSBoLS9WB16XnlgLYHd%2F241819113-052c366f-0f24-47c2-8bbd-fa146fd326ea.png?alt=media&#x26;token=d8bbc2e9-60e8-4e85-8491-4c658ae3ea48" alt=""><figcaption><p>Upgrading system packages</p></figcaption></figure>

Once the update process finishes, lets setup auto-updates so you don't need to worry about the server anymore. Execute the following command: `apt install unattended-upgrades -y`

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FFO5sczF6R0Cuovxs1f3r%2F241819242-6ded324d-8a6b-41ec-9311-8ffb54ee611c.png?alt=media&#x26;token=47287d1e-d5ff-44f3-acb7-27cd96a2832f" alt=""><figcaption><p>Installing unattended-upgrades package</p></figcaption></figure>

Now let's enable it!\
Execute the following command: `dpkg-reconfigure --priority=low unattended-upgrades` and proceed to agree to Automatically download and install stable updates.

{% hint style="info" %}
**Info:** if you're prompted to install an updated version of the package's config, proceed to select the first option (install the package maintaner's version)
{% endhint %}

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2F9PxII5mDVDaAyHYTA4OE%2F241819338-333bea6b-d18d-4276-af10-1da1ebfe34b9.png?alt=media&#x26;token=200c64fb-4e83-422c-b0fe-5afd68101a2f" alt=""><figcaption><p>Configuring the unattended-upgrades package</p></figcaption></figure>

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FPVo1mXL8pggUspA8kRVv%2F241819379-43171d48-d7db-4022-89fa-2451a3bbc0cc.png?alt=media&#x26;token=6a84c878-c7f1-4709-b873-cb1215903cb4" alt=""><figcaption><p>Configuring the unattended-upgrades package</p></figcaption></figure>

## Step 4 - Proxy Server Setup

***

We'll be installing the software `squid` for it to act as our proxy server.\
To install it, execute the following command: `apt install squid -y`

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FQS0Rf5eSSWpe4920LDgP%2F241819848-d7f8dd80-cae9-4610-89e7-cf9f57b1711e.png?alt=media&#x26;token=31c9e979-4de2-4c93-892c-867c147dc8cc" alt=""><figcaption><p>Installing our proxy server software</p></figcaption></figure>

Once you're here, you can take the more or less secure route of configuring your proxy server.

<details>

<summary><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Secure</summary>

You'll be allowing to use the proxy to a limited amount of IP addresses, making it more secure, but less convinient if you have a dynamic IP address.

Proceed to edit the `squid.conf` file.\
Execute the following the command: `nano /etc/squid/squid.conf`

<img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FUsUbvJqtb2D4ftrgV2Vy%2F241820367-9fe8ef8a-b7c4-40f5-a2d2-bf2358c0c78a.png?alt=media&#x26;token=6ce66c1b-c090-471a-b0b3-844fbd06ca60" alt="" data-size="original">

Once you're editing the file, press `Ctrl + W` and search for `http_access deny all`

<img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2F2xQZrmiwLMSEqhftb6eS%2F241820425-310f3b77-a7a4-4d59-9fc6-9ce43926d80b.png?alt=media&#x26;token=edab31c9-69d3-4209-9cc5-a5656fc81dd5" alt="" data-size="original">

Add the following lines before `http_access deny all` as shown in the screenshot. Remember to replace `your_ip` with your Public IPv4 address ([what's my ip?](https://whatismyipaddress.com/))

![](https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FxeJAh7DVbgyvLOQ33IzU%2Fimagen.png?alt=media\&token=beb67788-0af9-4b69-acc2-129ea26bcfcc)

Here's all the lines for you to copy and paste:

<pre class="language-powershell" data-title="squid.conf"><code class="lang-powershell"># Twitch ACL for video-weaver.*.hls.ttvnw.net
acl twitch dstdom_regex video-weaver\.\w+\.hls\.ttvnw\.net

# Twitch ACL for playlist.live-video.net
acl twitchplaylist dstdom_regex \w+\.playlist\.live-video\.net

# Twitch ACL for playlist.ttvnw.net
acl twitchplaylist2 dstdom_regex [a-z0-9-]+\.playlist\.ttvnw\.net

# Twitch ACL for usher.ttvnw.net
acl twitchusher dstdomain usher.ttvnw.net

# Twitch ACL for gql.twitch.tv
acl twitchgql dstdomain gql.twitch.tv

# Twitch ACL for passport.twitch.tv
acl twitchpassport dstdomain passport.twitch.tv

# Twitch ACL for www.twitch.tv
acl twitchwww dstdomain www.twitch.tv

# Allow rules for your public IP address

acl myip src your_ip
<strong>http_access allow myip twitch
</strong>http_access allow myip twitchplaylist
http_access allow myip twitchplaylist2
http_access allow myip twitchusher
http_access allow myip twitchgql
http_access allow myip twitchpassport
http_access allow myip twitchwww
</code></pre>

</details>

<details>

<summary><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> Less Secure</summary>

You'll be allowing to use the proxy to an unlimited amount of IP addresses, making it less secure, but more convenient if you don't have an static IP address. You'll also restrict the proxy server to only allow what we need to.

Proceed to edit the `squid.conf` file.\
Execute the following the command: `nano /etc/squid/squid.conf`

<img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FUsUbvJqtb2D4ftrgV2Vy%2F241820367-9fe8ef8a-b7c4-40f5-a2d2-bf2358c0c78a.png?alt=media&#x26;token=6ce66c1b-c090-471a-b0b3-844fbd06ca60" alt="" data-size="original">

Once you're editing the file, press `Ctrl + W` and search for `http_access deny all`

<img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2F2xQZrmiwLMSEqhftb6eS%2F241820425-310f3b77-a7a4-4d59-9fc6-9ce43926d80b.png?alt=media&#x26;token=edab31c9-69d3-4209-9cc5-a5656fc81dd5" alt="" data-size="original">

Add the following lines before `http_access deny all` as shown in the screenshot.&#x20;

![](https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FydzpNWJuulvhX2rj2hcc%2Fimagen.png?alt=media\&token=b2bc7035-ff7e-4dbf-b466-f7fb5b518ddf)

Here's all the lines for you to copy and paste.

{% code title="squid.conf" %}

```powershell
# Twitch ACL for video-weaver.*.hls.ttvnw.net
acl twitch dstdom_regex video-weaver\.\w+\.hls\.ttvnw\.net
http_access allow twitch

# Twitch ACL for playlist.live-video.net
acl twitchplaylist dstdom_regex \w+\.playlist\.live-video\.net
http_access allow twitchplaylist

# Twitch ACL for playlist.ttvnw.net
acl twitchplaylist2 dstdom_regex [a-z0-9-]+\.playlist\.ttvnw\.net
http_access allow twitchplaylist2

# Twitch ACL for usher.ttvnw.net
acl twitchusher dstdomain usher.ttvnw.net
http_access allow twitchusher

# Twitch ACL for gql.twitch.tv
acl twitchgql dstdomain gql.twitch.tv
http_access allow twitchgql

# Twitch ACL for passport.twitch.tv
acl twitchpassport dstdomain passport.twitch.tv
http_access allow twitchpassport

# Twitch ACL for www.twitch.tv
acl twitchwww dstdomain www.twitch.tv
http_access allow twitchwww
```

{% endcode %}

</details>

Alternatively, you could also set up password-based authentication for the proxy server, but that goes outside the scope of this tutorial. Please follow the following guide if you'd like to set up password-based authentication.

{% embed url="<https://www.digitalocean.com/community/tutorials/how-to-set-up-squid-proxy-for-private-connections-on-debian-11>" %}

Following with the tutorial, you can change the default port that the proxy listens to. This can make your proxy more "secure" (security over obscurity), preventing servers on the internet port checking and possibly adding you to a public proxy list.\
Execute the following the command: `nano /etc/squid/squid.conf`

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FUsUbvJqtb2D4ftrgV2Vy%2F241820367-9fe8ef8a-b7c4-40f5-a2d2-bf2358c0c78a.png?alt=media&#x26;token=6ce66c1b-c090-471a-b0b3-844fbd06ca60" alt=""><figcaption><p>Editing the squid config file</p></figcaption></figure>

Once you're editing the file, press `Ctrl + W` and search for `http_port 3128`

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FDWI6y6kDBRYVVAeyXyAM%2F241822791-5e326311-8e59-4d60-9aff-30aeba7d726b.png?alt=media&#x26;token=009e03e1-1149-4e69-98ba-6cf123350ec7" alt=""><figcaption><p>Editing the squid config file</p></figcaption></figure>

Change the `3128` port value to some random number value between `1025 - 65535`

<figure><img src="https://3089871892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw0DtUs3tWZJZTa0QKQCG%2Fuploads%2FIrdKTlTK7AkUNPaRbSsd%2F241822928-4286fa29-3155-4907-8557-1c4e6cc5f0e8.png?alt=media&#x26;token=3d43e73c-1052-47bc-9db8-3f2838f1b7b9" alt=""><figcaption><p>Editing the squid default port number value</p></figcaption></figure>

Save the file by pressing `Ctrl + X` then pressing `Y` then `Enter`

Proceed to restart the `squid` service with the following command: `service squid restart`\
This will take a while, please be patient.

## Step 5 - Connecting to the proxy

***

And you're all set! You can now add your proxy server in your Extension's Options page!

Please use the following syntax: `server-ip:squidport`

Alternatively, you can provide the extension with authentication credentials if you've configured `squid` with a password using the following syntax: `youruser:yourpassword@server-ip:squidport`

## Wrapping up

***

With this tutorial, you've managed to set up your own custom proxy server, using specific rules to make it work only for what's intended to be used for.

{% hint style="warning" %}
**Important:** this tuturial covers the basics of setting up automatic updates on your Linux server. Please follow alternative tutorials, such as the one linked right below, to harden your Linux server.
{% endhint %}

{% embed url="<https://www.digitalocean.com/community/tutorials/recommended-security-measures-to-protect-your-servers>" %}

{% hint style="warning" %}
**Important:** please keep a regular reboot schedule of your server, for example once a month to ensure latest updates are applied and cache cleanup.
{% endhint %}
