server_config.json 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {
  2. {% if sec_region is defined %}
  3. "region": "{{ sec_region }}",
  4. {% endif %}
  5. {% if sec_region is not defined %}
  6. "region": "{{ region }}",
  7. {% endif %}
  8. {% if sec is defined %}
  9. "node": "{{ node_id|int + 1 }}",
  10. {% else %}
  11. "node": "{{ node_id }}",
  12. {% endif %}
  13. "server": "0.0.0.0",
  14. "server_port": 8388,
  15. "password": "58Ssd2nn95",
  16. "method": "aes-256-cfb",
  17. "timeout": 600,
  18. "type":"1",
  19. "proxy_config": {
  20. "proxy_list": [
  21. {% if sec is defined and sec_opposite_ip is defined%}
  22. "{{ sec_opposite_ip }}|443|chacha20-ietf-poly1305|a564FDSOisdf"
  23. {% elif opposite_ip and sec is not defined %}
  24. "{{ opposite_ip }}|443|chacha20-ietf-poly1305|a564FDSOisdf"
  25. {% endif %}
  26. ],
  27. "retry_interval": 60,
  28. "retry_url": "https://twitter.com",
  29. "failed_threshold": 0.6,
  30. "failed_least_count": 5
  31. },
  32. "account_check": true,
  33. "api": {
  34. "addr": ":8389",
  35. "https": false,
  36. "cert_file": "cert.pem",
  37. "key_file": "key.pem",
  38. "auth": "asdf1234",
  39. "routers": {
  40. "/statistics": {
  41. "handler": "statistics",
  42. "option": ""
  43. },
  44. "/acc": {
  45. "handler": "acc",
  46. "option": ""
  47. },
  48. "/dnsrequest": {
  49. "handler": "dnsrequest",
  50. "option": ""
  51. },
  52. "/proxy_status": {
  53. "handler": "proxy_status",
  54. "option": ""
  55. }
  56. },
  57. "client_ip": [
  58. "127.0.0.1"
  59. ]
  60. },
  61. "log": {
  62. "level": 5,
  63. "o_file": "",
  64. "o_std": false,
  65. "hide_category": {
  66. "remoteapi": true,
  67. "ss-stream-detail": false,
  68. "ulitily": false,
  69. "auth": true
  70. }
  71. },
  72. "stream": {
  73. "record_dns_request": true
  74. },
  75. "capture": {
  76. "dnsquery": true,
  77. "socks5domain": true
  78. },
  79. "remote_api":{
  80. "token":"EYRG87P6LjZe7Q9nf9X9",
  81. "host_addr":{
  82. "region":"https://wongderf.xyz",
  83. "cache_gate":"https://cache-pool.qhisec.xyz:7788"
  84. },
  85. "router":{
  86. "api_auth":{
  87. "host":"region",
  88. "path":"/api/proxy/v1/authenticate"
  89. },
  90. "upload_account_connection_info": {
  91. "host": "cache_gate",
  92. "path": "/putdata"
  93. },
  94. "upload_online_count": {
  95. "host": "region",
  96. "path": "/api/proxy/v1/nodes/record_online_users"
  97. },
  98. "upload_user_flow_bytes": {
  99. "host": "region",
  100. "path": "/api/proxy/v1/users/inspect_expiration"
  101. },
  102. "query_ip": {
  103. "host": "region",
  104. "path": "/api/proxy/v1/remote_ip"
  105. },
  106. "limit_speed":{
  107. "host": "region",
  108. "path": "/api/proxy/v1/nodes/limit_speed"
  109. }
  110. }
  111. },
  112. "parameters": {
  113. "user_maintaince_interval_second": "600s",
  114. "online_user_timeout_second": "300s",
  115. "registry_interval_second": "300s",
  116. "registry_ttl": "350"
  117. }
  118. }