根据v5版本现有文档添加配置

This commit is contained in:
Weltolk
2023-02-15 11:21:24 +08:00
parent bf9bcd656b
commit 1d15c34ea1
10 changed files with 372 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# 最低版本要求
NGINX 的最低版本要求为 1.13.10:\
[https://www.nginx.com/blog/nginx-1-13-10-grpc/](https://www.nginx.com/blog/nginx-1-13-10-grpc/)。
V2Ray-core 的最低版本要求为 v5.0.4:\
[https://www.v2fly.org/config/transport/grpc.html#grpcobject](https://www.v2fly.org/config/transport/grpc.html#grpcobject)。
## 本设置同样适用于 Shadowsocks 客户端搭配 V2Ray-plugin 使用
_你需要一个兼容 gRPC 的 v2ray-plugin 程序。
例如由[TeddySun](https://github.com/teddysun)维护的 v2ray-plugin 叉子: \
[https://github.com/teddysun/v2ray-plugin](https://github.com/teddysun/v2ray-plugin)。_
### 客户端设置
Shadowsocks Windows 设置示例:
```properties
Server_IP: mydomain.me OR your server IP
Server_Port: 443
Password: ifYouWantToKeepYourPassphraseSafeChangeThis!!
Encryption: chacha20-ietf-poly1305
Plugin_Program: pathToYourV2ray-plugin_windows_arch.exe
Plugin_Options: tls;mode=grpc;serviceName=michi;host=mydomain.me
```

View File

@@ -0,0 +1,28 @@
# Minimum Versions
中文用户请看[这里](./README-CN.md)。
Minimum NGINX version is 1.13.10:\
[https://www.nginx.com/blog/nginx-1-13-10-grpc/](https://www.nginx.com/blog/nginx-1-13-10-grpc/).
Minimum V2Ray-Core version is v5.0.4:\
[https://www.v2fly.org/config/transport/grpc.html#grpcobject](https://www.v2fly.org/config/transport/grpc.html#grpcobject).
## These settings are also compatible with shadowsocks + v2ray-plugins
_You need a grpc compatible v2ray-plugin program to use with shadowsocks client.
For example the one maintained by [TeddySun](https://github.com/teddysun): \
[https://github.com/teddysun/v2ray-plugin](https://github.com/teddysun/v2ray-plugin)._
### Client Configurations
Shadowsocks Windows Example Config:
```properties
Server_IP: mydomain.me OR your server IP
Server_Port: 443
Password: ifYouWantToKeepYourPassphraseSafeChangeThis!!
Encryption: chacha20-ietf-poly1305
Plugin_Program: pathToYourV2ray-plugin_windows_arch.exe
Plugin_Options: tls;mode=grpc;serviceName=michi;host=mydomain.me
```

View File

@@ -0,0 +1,32 @@
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/v2ray/v2ray.crt;
ssl_certificate_key /etc/v2ray/v2ray.key;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
server_name mydomain.me;
location /michi/Tun { # This michi shall in consistent with the grpc serviceName in v2ray config.json
if ($request_method != "POST") { # if the request method is not POST for this location, return 404
return 404;
}
grpc_socket_keepalive on;
grpc_intercept_errors on;
grpc_pass grpc://127.0.0.1:12345; # presume v2ray is listening on port 12345
grpc_set_header Upgrade $http_upgrade;
grpc_set_header Connection "upgrade";
grpc_set_header Host $host;
# Show real IP in v2ray access.log
grpc_set_header X-Real-IP $remote_addr;
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}