<div dir="ltr"><div>Because Internet censorship, I reverse proxy facebook\twitter\youtube, can be accessed😀, can not be login😵, can not play video😩.</div><div><br></div><div>Like:  <a href="http://www.you-tube.com.example.com">www.you-tube.com.example.com</a> -> <a href="http://www.youtube.com">www.youtube.com</a></div><div><br></div><div><br></div><div>location / {</div><div>            resolver 8.8.8.8;</div><div>            set $domain <a href="http://example.com">example.com</a>;</div><div>            if ($host ~* "^(.*)-(.*).<a href="http://example.com">example.com</a>$" ) {set $domains $1$2;}</div><div><br></div><div>            proxy_pass https://$domains;</div><div>            proxy_http_version 1.1;</div><div>            proxy_read_timeout      300;</div><div>            proxy_connect_timeout   300;</div><div>            proxy_redirect     off;</div><div>            proxy_set_header   Host            $proxy_host;</div><div>            proxy_set_header   X-Real-IP    $remote_addr;</div><div>            proxy_set_header   X-Forwarded-By     $server_addr:$server_port;</div><div>            proxy_set_header   X-Forwarded-Proto $scheme;</div><div>            proxy_set_header   X-Forwarded-For     $proxy_add_x_forwarded_for;</div><div>            proxy_set_header   Referer        $host;</div><div>            proxy_set_header   Accept-Encoding  "";</div><div><br></div><div>            sub_filter_once  off;</div><div>            sub_filter sub_filter_types *;</div><div>            sub_filter <a href="http://youtube.com">youtube.com</a> you-tube.com.$domain;</div><div>            sub_filter <a href="http://googlevideo.com">googlevideo.com</a> goog-levideo.com.$domain;</div><div>            sub_filter $proxy_host $host;</div><div>}</div><div><br></div><div>🤔🤔<br></div></div>