This commit is contained in:
@ -50,6 +50,40 @@ location ^~ /api/v1/freedom {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /api/v2/freedom {
|
||||
client_max_body_size 0;
|
||||
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
client_body_timeout 5m;
|
||||
grpc_read_timeout 315;
|
||||
grpc_send_timeout 5m;
|
||||
grpc_pass unix:/dev/shm/Freedom-Vless.socket;
|
||||
}
|
||||
|
||||
location /api/v3/freedom {
|
||||
if ($http_upgrade != "websocket") {
|
||||
return 404;
|
||||
}
|
||||
proxy_pass http://[::1]:1234;
|
||||
proxy_redirect off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 5d;
|
||||
}
|
||||
|
||||
location /api/v4/freedom {
|
||||
if ($request_method != "POST") {
|
||||
return 404;
|
||||
}
|
||||
client_body_buffer_size 1m;
|
||||
client_body_timeout 1h;
|
||||
client_max_body_size 0;
|
||||
grpc_pass grpc://[::1]:3002;
|
||||
}
|
||||
|
||||
location ^~ /freedom {
|
||||
if ($content_type !~ "^application/grpc") {
|
||||
return 402;
|
||||
|
@ -9,7 +9,6 @@ WorkingDirectory=/root/Server
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
User=root
|
||||
Environment="LD_LIBRARY_PATH=/opt/Libraries/boost_1_87_0/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Reference in New Issue
Block a user