V
V
Vovanys2016-02-19 22:38:07
Nginx
Vovanys, 2016-02-19 22:38:07

Proxy server from NGINX with ssl?

Hello
I want to set up nginx as a proxy for sites, because there is a vps server, but tun, tap is
prohibited there

server {
        listen       33445;
        listen       33446 ssl;

        ssl_certificate /etc/nginx/ssl/server.crt;
        ssl_certificate_key /etc/nginx/ssl/server.key;
        ssl_dhparam /etc/nginx/ssl/dhparam.pem;

        ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;

        location / {  
        resolver 8.8.8.8;  
            proxy_pass $scheme://$http_host$uri$is_args$args;
        }
}

http sites work, but ssl ones don't.
I try with firefox, SSL proxy is specified separately 33446
How to make a proxy so that all traffic to the proxy is encrypted?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene, 2016-02-19
@Nc_Soft

You are messing around, deploy a vpn or a real proxy (try 3proxy pretty simple setup)

B
borodka_lenina, 2016-02-20
@borodka_lenina

It seems to me that the ssl_protocols section is redundant. This is how it works for me:

upstream backend {
  server 10.10.10.10;
    keepalive 70;
}

server {
    listen 80;
    listen 443 ssl;
    server_name test.com;

    ssl_certificate           /etc/nginx/cert/test_pub.crt;
    ssl_certificate_key       /etc/nginx/cert/test_priv.key;

    proxy_set_header         X-Forwarded-For $proxy_add_x_forwarded_for;

    access_log		/var/log/nginx/test.com.access.log;
    error_log		/var/log/nginx/test.com.error.log;

  location / {
    expires -1s;
    proxy_cache off;
    proxy_pass http://backend;
    }
}

J
jacob1237, 2017-09-11
@jacob1237

In such a situation, normal SSH tunneling will suit you:
https://ru.wikibooks.org/wiki/SSH_%D1%82%D1%83%D0%...
rus-linux.net/MyLDP/sec/SSH-Tunneling. html
https://www.opennet.ru/tips/1691_ssh_tunnel_socks.shtml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question