mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-07 12:20:03 +03:00
Updated Set up http proxy server (markdown)
@@ -101,24 +101,25 @@ You can hide `Tinyproxy` behind `NGINX` to create a true `https` proxy, but ther
|
||||
|
||||
One RustDesk user shared his method for creating an HTTPS proxy with Apache2. I have never tested, but you can try yourself.
|
||||
|
||||
> sudo apt install apache2
|
||||
> sudo apt install apache2
|
||||
>
|
||||
> Enable the necessary modules
|
||||
> a2enmod ssl
|
||||
> a2enmod proxy
|
||||
> a2enmod proxy_connect
|
||||
> a2enmod proxy_http
|
||||
>
|
||||
> a2enmod ssl
|
||||
> a2enmod proxy
|
||||
> a2enmod proxy_connect
|
||||
> a2enmod proxy_http
|
||||
>
|
||||
> Create a file with proxy-user credentials:
|
||||
>
|
||||
> sudo htpasswd -b -c /etc/apache2/.htpasswd proxy-user your-password
|
||||
>
|
||||
> Create a file /etc/apache2/sites-available/rustdesk.conf and add below lines:
|
||||
> Create a file `/etc/apache2/sites-available/rustdesk.conf` and add below lines:
|
||||
>
|
||||
> <VirtualHost *:443>
|
||||
> SSLEngine on
|
||||
> SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
> SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
> <VirtualHost *:443>
|
||||
> SSLEngine on
|
||||
> SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
> SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
>
|
||||
> ProxyRequests On
|
||||
> ProxyVia On
|
||||
@@ -129,36 +130,40 @@ One RustDesk user shared his method for creating an HTTPS proxy with Apache2. I
|
||||
> AuthUserFile /etc/apache2/.htpasswd
|
||||
> Require valid-user
|
||||
> </Proxy>
|
||||
> </VirtualHost>
|
||||
> </VirtualHost>
|
||||
>
|
||||
> Disable the default site and enable the proxy config:
|
||||
>
|
||||
> sudo a2dissite 000-default.conf
|
||||
> sudo a2ensite rustdesk.conf
|
||||
> sudo service apache2 restart
|
||||
> sudo a2dissite 000-default.conf
|
||||
> sudo a2ensite rustdesk.conf
|
||||
> sudo service apache2 restart
|
||||
>
|
||||
> If you want to use ssl for the web console you can add another virtualhost to /etc/apache2/sites-available/rustdesk.conf. As port 443 is already used for the forwarding proxy, you can use for example port 4443.
|
||||
> If you want to use ssl for the web console you can add another virtualhost to `/etc/apache2/sites-available/rustdesk.conf`. As port `443` is already used for the forwarding proxy, you can use for example port `4443`.
|
||||
>
|
||||
> <VirtualHost *:4443>
|
||||
> SSLEngine on
|
||||
> SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
> SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
> <VirtualHost *:4443>
|
||||
> SSLEngine on
|
||||
> SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
> SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
>
|
||||
> ProxyPass / http://127.0.0.1:21114/
|
||||
> ProxyPassReverse / http://127.0.0.1:21114/
|
||||
> </VirtualHost>
|
||||
> ProxyPass / http://127.0.0.1:21114/
|
||||
> ProxyPassReverse / http://127.0.0.1:21114/
|
||||
> </VirtualHost>
|
||||
>
|
||||
> Change the line
|
||||
> AllowCONNECT 21114-21119
|
||||
>
|
||||
> AllowCONNECT 21114-21119
|
||||
> into
|
||||
> AllowCONNECT 4443 21114-21119
|
||||
>
|
||||
> AllowCONNECT 4443 21114-21119
|
||||
>
|
||||
> Restart apache2
|
||||
> sudo service apache2 restart
|
||||
> Restart `apache2`
|
||||
>
|
||||
> sudo service apache2 restart
|
||||
>
|
||||
> As all ports of hhhbs and hbbr are connected via proxy, you can disable these ports in ufw. You only need to open port 443 and 4443:
|
||||
> ufw allow 443/tcp
|
||||
> ufw allow 4443/tcp
|
||||
> As all ports of `hbbs` and `hbbr` are connected via proxy, you can disable these ports in ufw. You only need to open port `443` and `4443`:
|
||||
>
|
||||
> ufw allow 443/tcp
|
||||
> ufw allow 4443/tcp
|
||||
>
|
||||
> Finally configure it on rustdesk:
|
||||

|
||||
|
||||
Reference in New Issue
Block a user