forked from aditya-shri/VPN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx_ss.conf
47 lines (39 loc) · 1.17 KB
/
nginx_ss.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
45
46
47
# The content of the top grid comment will be removed during sed processing and will not appear in the final configuration file
server {
listen ${PORT};
listen [::]:${PORT};
root /wwwroot;
location = /ss {
root /wwwroot;
try_files /index.html $uri $uri/;
}
location = /ss/ {
root /wwwroot;
try_files /index.html $uri $uri/;
}
location = ${QR_Path} {
root /wwwroot;
try_files /vpn.png $uri $uri/;
}
location = ${QR_Path}/ {
root /wwwroot;
try_files /vpn.png $uri $uri/;
}
location = ${V2_Path} {
if ($http_upgrade != "websocket") {
return 404;
}
proxy_redirect off;
proxy_pass http://127.0.0.1:2333;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
# Show real IP in v2ray access.log
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location = / {
proxy_pass https://github.com/aditya-shri/VPN;
}
}