anti-fraud.toml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. # This is a TOML document. Boom.
  2. version = "1.0.0"
  3. user = "nobody"
  4. dir = "./"
  5. debug = false
  6. [log]
  7. dir = "/tmp/log/anti-fraud"
  8. [db]
  9. [db.antiFraud]
  10. addr = "172.16.33.203:3306"
  11. dsn = "root:123456@tcp(172.16.33.203:3306)/tickets?timeout=5s&readTimeout=30s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  12. active = 5
  13. idle = 5
  14. queryTimeout = "1s"
  15. execTimeout = "1s"
  16. tranTimeout = "2s"
  17. [db.antiFraud.breaker]
  18. window = "3s"
  19. sleep = "100ms"
  20. bucket = 10
  21. ratio = 0.5
  22. request = 100
  23. [db.payShield]
  24. addr = "127.0.0.1:3306"
  25. dsn = "root:123456@tcp(127.0.0.1:3306)/shield?timeout=5s&readTimeout=30s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  26. active = 5
  27. idle = 5
  28. queryTimeout = "1s"
  29. execTimeout = "1s"
  30. tranTimeout = "2s"
  31. [db.payShield.breaker]
  32. window = "3s"
  33. sleep = "100ms"
  34. bucket = 10
  35. ratio = 0.5
  36. request = 100
  37. [db.payShield1]
  38. addr = "172.22.33.156:3306"
  39. dsn = "pay:QaJvNP7FGxDjpMI3tcVXUusZ80w6gmbk@tcp(172.22.33.156:3306)/shield?timeout=5s&readTimeout=30s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  40. active = 5
  41. idle = 5
  42. queryTimeout = "1s"
  43. execTimeout = "1s"
  44. tranTimeout = "2s"
  45. [db.payShield1.breaker]
  46. window = "3s"
  47. sleep = "100ms"
  48. bucket = 10
  49. ratio = 0.5
  50. request = 100
  51. [redis]
  52. name = "antifraud"
  53. proto = "tcp"
  54. addr = "172.16.33.203:9379"
  55. idle = 100
  56. active = 100
  57. dialTimeout = "1s"
  58. readTimeout = "1s"
  59. writeTimeout = "1s"
  60. idleTimeout = "10s"
  61. expire = "24h"
  62. verifyCdTimes = "2h"
  63. [httpClient]
  64. [httpClient.read]
  65. key = "7c7ac0db1aa05587"
  66. secret = "9a6d62d93290c5f771ad381e9ca23f26"
  67. dial = "1s"
  68. timeout = "4s"
  69. keepAlive = "60s"
  70. timer = 1000
  71. [httpClient.read.breaker]
  72. window = "3s"
  73. sleep = "100ms"
  74. bucket = 10
  75. ratio = 0.5
  76. request = 100
  77. [httpClient.write]
  78. key = "7c7ac0db1aa05587"
  79. secret = "9a6d62d93290c5f771ad381e9ca23f26"
  80. dial = "1s"
  81. timeout = "3s"
  82. keepAlive = "60s"
  83. timer = 1000
  84. [httpClient.write.breaker]
  85. window = "3s"
  86. sleep = "100ms"
  87. bucket = 10
  88. ratio = 0.5
  89. request = 100
  90. [geetest]
  91. #极验每小时拉起的总数 to do
  92. count = 20
  93. [limit]
  94. Name = "ticket"
  95. SaleTimeOut = 86400
  96. #mid下单时间限制 to do
  97. MIDCreateTimeOut = 3600
  98. #mid最大下单次数 to do
  99. MIDCreateMax = 10
  100. #ip下单时间限制 to do
  101. IPCreateTimeOut = 3600
  102. #ip最大下单次数 to do
  103. IPCreateMax = 20
  104. #ip白名单
  105. IPWhiteList = ["222.73.196.18"]
  106. #ip修改时间间隔
  107. IPChangeInterval = 2
  108. [rule]
  109. [rule.10001]
  110. Name = "ticket"
  111. SaleTimeOut = 86400
  112. #mid下单时间限制 to do
  113. MIDCreateTimeOut = 3600
  114. #mid最大下单次数 to do
  115. MIDCreateMax = 10
  116. #ip下单时间限制 to do
  117. IPCreateTimeOut = 3600
  118. #ip最大下单次数 to do
  119. IPCreateMax = 20
  120. #ip白名单
  121. IPWhiteList = ["222.73.196.18"]
  122. #ip修改时间间隔
  123. IPChangeInterval = 100
  124. [rule.10002]
  125. Name = "mall"
  126. SaleTimeOut = 86400
  127. #mid下单时间限制 to do
  128. MIDCreateTimeOut = 3600
  129. #mid最大下单次数 to do
  130. MIDCreateMax = 10
  131. #ip下单时间限制 to do
  132. IPCreateTimeOut = 3600
  133. #ip最大下单次数 to do
  134. IPCreateMax = 20
  135. #ip白名单
  136. IPWhiteList = ["222.73.196.18"]
  137. #ip修改时间间隔
  138. IPChangeInterval = 2
  139. [url]
  140. shield = "http://10.23.144.107:8080/payplatform/shield/askasync"
  141. [base]
  142. shieldListTime = 8886400