test.sh 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #protocol 1
  2. {
  3. "log": {
  4. "loglevel": "none"
  5. },
  6. "inbounds": [
  7. {
  8. "port": 443,
  9. "protocol": "vless",
  10. "settings": {
  11. "clients": [
  12. {
  13. "id": "$xid_1",
  14. "flow": "xtls-rprx-direct"
  15. }
  16. ],
  17. "decryption": "none",'
  18. "fallbacks": ['
  19. {
  20. "alpn": "h2",
  21. "dest": "/dev/shm/nginx_unixsocket/h2.sock"
  22. },
  23. {
  24. "dest": "/dev/shm/nginx_unixsocket/default.sock"
  25. }
  26. ]
  27. },
  28. "streamSettings": {
  29. "network": "tcp",
  30. "security": "xtls",
  31. "xtlsSettings": {
  32. "alpn": [
  33. "h2",
  34. "http/1.1"
  35. ],
  36. "minVersion": "1.2",
  37. "cipherSuites": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
  38. "certificates": [
  39. {
  40. "certificateFile": "${nginx_prefix}/certs/${true_domain_list[$i]}.cer",
  41. "keyFile": "${nginx_prefix}/certs/${true_domain_list[$i]}.key",
  42. "ocspStapling": 3600
  43. ]
  44. }
  45. }
  46. },
  47. "streamSettings": {
  48. "network": "grpc",
  49. "grpcSettings": {
  50. "serviceName": "$serviceName"
  51. }
  52. }
  53. },
  54. "streamSettings": {
  55. "network": "ws",
  56. "wsSettings": {
  57. "path": "$path"
  58. }
  59. }
  60. }
  61. ],
  62. "outbounds": [
  63. {
  64. "protocol": "freedom"
  65. }
  66. ]
  67. }
  68. EOF
  69. #protocol 2
  70. {
  71. "log": {
  72. "loglevel": "none"
  73. },
  74. "inbounds": [
  75. {
  76. "port": 443,
  77. "protocol": "vless",
  78. "settings": {
  79. {
  80. {
  81. "alpn": "h2",
  82. "dest": "/dev/shm/nginx_unixsocket/h2.sock"
  83. },
  84. {
  85. "dest": "/dev/shm/nginx_unixsocket/default.sock"
  86. }
  87. ]
  88. },
  89. "streamSettings": {
  90. "network": "tcp",
  91. "security": "xtls",
  92. "xtlsSettings": {
  93. "alpn": [
  94. "h2",
  95. "http/1.1"
  96. ],
  97. "minVersion": "1.2",
  98. "cipherSuites": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
  99. "certificates": [
  100. {
  101. "certificateFile": "${nginx_prefix}/certs/${true_domain_list[$i]}.cer",
  102. "keyFile": "${nginx_prefix}/certs/${true_domain_list[$i]}.key",
  103. "ocspStapling": 3600
  104. ]
  105. }
  106. }