This repository has been archived by the owner on Feb 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
facebook.conf
44 lines (37 loc) · 1.48 KB
/
facebook.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
server {
server_name {{HOST}};
listen 80;
return 301 https://{{HOST}}$request_uri;
}
server {
server_name {{HOST}};
listen 443 ssl spdy;
ssl_session_cache shared:SSL:50m;
ssl_session_timeout 5m;
ssl_certificate {{SSL_CRT}};
ssl_certificate_key {{SSL_KEY}};
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
subs_filter_types text/html application/x-javascript;
subs_filter "(https?:)?(\\\/|/)(\\\/|/)www\.facebook\.com" "https:$2$2{{HOST}}" r;
subs_filter "(https?(:|\\\\u00253A))?(\\\/|\\\\u00252F|/){2}([^/]+?)\.(akamaihd|fbcdn|facebook)\.(com|net)" "https$2$3$3{{HOST}}$3__$5.$6$3$4" r;
subs_filter "document\.domain\s*=\s*\"facebook\.com\"" ";" r;
subs_filter "__d\(\"ExceptionDialog\"" "__d(\"ExceptionDialog2\"" r;
proxy_cookie_domain facebook.com {{HOST}};
proxy_hide_header content-security-policy;
location ~ /__([^.]+?)\.([^/]+?)/([^/]+?)/(.*) {
resolver 8.8.8.8;
proxy_pass http://$3.$1.$2;
proxy_set_header Accept-Encoding "";
rewrite /__([^.]+?)\.([^/]+?)/([^/]+?)/(.*) /$4 break;
}
location / {
proxy_pass https://www.facebook.com/;
auth_basic "restricted personal site";
auth_basic_user_file {{AUTH_FILE}};
proxy_set_header Accept-Encoding "";
proxy_set_header Authentication "";
proxy_set_header Cookie "{{COOKIE}}";
}
}