mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 18:36:11 +02:00
Updated Set up http proxy server (markdown)
parent
cd2a63796e
commit
b3a8cffd33
1 changed files with 66 additions and 0 deletions
|
@ -99,5 +99,71 @@ The `http` proxy allows connections to HTTPS endpoints.
|
|||
|
||||
You can hide `Tinyproxy` behind `NGINX` to create a true `https` proxy, but there seems some bugs, https://github.com/tinyproxy/tinyproxy/issues/399, this might be why it is called `tiny`.
|
||||
|
||||
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
|
||||
>
|
||||
> Enable the necessary modules
|
||||
> 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:
|
||||
>
|
||||
> <VirtualHost *:443>
|
||||
> SSLEngine on
|
||||
> SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
> SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
>
|
||||
> ProxyRequests On
|
||||
> ProxyVia On
|
||||
> AllowCONNECT 21114-21119
|
||||
> <Proxy *>
|
||||
> AuthType Basic
|
||||
> AuthName "Password Required"
|
||||
> AuthUserFile /etc/apache2/.htpasswd
|
||||
> Require valid-user
|
||||
> </Proxy>
|
||||
> </VirtualHost>
|
||||
>
|
||||
> Disable the default site and enable the proxy config:
|
||||
>
|
||||
> 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.
|
||||
>
|
||||
> <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>
|
||||
>
|
||||
> Change the line
|
||||
> AllowCONNECT 21114-21119
|
||||
> into
|
||||
> AllowCONNECT 4443 21114-21119
|
||||
>
|
||||
> 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
|
||||
>
|
||||
> Finally configure it on rustdesk:
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue