Advertisement
imKobz

Untitled

Oct 21st, 2023 (edited)
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. listen 443 ssl http2 reuseport;
  5. listen [::]:443 http2 reuseport;
  6. server_name xxx;
  7. ssl_certificate /etc/xray/xray.crt;
  8. ssl_certificate_key /etc/xray/xray.key;
  9. ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AES128:EECDH+aRSA+AES128:RSA+AES128:EECDH+ECDSA+AES256:EECDH+aRSA+AES256:RSA+AES256:EECDH+ECDSA+3DES:EECDH+aRSA+3DES:RSA+3DES:!MD5;
  10. ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
  11. root /etc/kobe/public_html;
  12.  
  13. # XRAY SERVER (c) kobe 2023
  14. # Vless
  15. location /vless {
  16. if ($http_upgrade != "Upgrade"){
  17. rewrite /(.*) /vless break;
  18. }
  19. proxy_redirect off;
  20. proxy_pass http://127.0.0.1:10001;
  21. proxy_http_version 1.1;
  22. proxy_set_header Upgrade $http_upgrade;
  23. proxy_set_header Connection "Upgrade";
  24. proxy_set_header Host $host;
  25. ### set real ip in access.log;
  26. proxy_set_header X-Real-IP $remote_addr;
  27. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28. }
  29.  
  30. # Vmess
  31. location / {
  32. if ($http_upgrade != "Upgrade") {
  33. rewrite /(.*) /vmess break;
  34. }
  35. proxy_redirect off;
  36. proxy_pass http://127.0.0.1:10002;
  37. proxy_http_version 1.1;
  38. proxy_set_header Upgrade $http_upgrade;
  39. proxy_set_header Connection "Upgrade";
  40. proxy_set_header Host $host;
  41. ### set real ip in access.log;
  42. proxy_set_header X-Real-IP $remote_addr;
  43. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  44. }
  45.  
  46. # Vless grpc
  47. location ^~ /vlessws-grpc {
  48. proxy_redirect off;
  49. grpc_set_header X-Real-IP $remote_addr;
  50. grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  51. grpc_set_header Host $http_host;
  52. grpc_pass grpc://127.0.0.1:10005;
  53. }
  54.  
  55. # Vmess grpc
  56. location ^~ /vmess-grpc {
  57. proxy_redirect off;
  58. grpc_set_header X-Real-IP $remote_addr;
  59. grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  60. grpc_set_header Host $http_host;
  61. grpc_pass grpc://127.0.0.1:10006;
  62. }
  63. }
  64. server {
  65. listen 81;
  66. root /etc/kobe/public_html;
  67. index index.html index.htm;
  68.  
  69. location / {
  70. try_files $uri $uri/ /index.html;
  71. }
  72.  
  73. location ~ \.json$ {
  74. default_type application/json;
  75. }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement