antispam-test.toml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. # This is a TOML document. Boom.
  2. version = "2.1.0"
  3. user = "nobody"
  4. pid = "/tmp/antispam.pid"
  5. dir = "./"
  6. perf = "0.0.0.0:6840"
  7. checkFile = "/data/www/antispam.html"
  8. family = "antispam"
  9. address = "172.16.0.148"
  10. proc = 32
  11. maxDurationSec=7200
  12. maxAllowedCounts=1000
  13. [autoWhite]
  14. KeywordHitCounts = 100
  15. NumOfSenders = 50
  16. Derivation = 0.02
  17. [serviceoption]
  18. maxExportRows=100000
  19. minKeywordLen=5
  20. defaultExpireSec=10
  21. ruleDefaultExpireSec=-1
  22. regexpDefaultExpireSec=-1
  23. defaultChanSize=1000
  24. maxRegexpCountsPerArea=20
  25. maxSenderNum=500
  26. buildTrieIntervalMinute=1
  27. buildTrieMaxRowsPerQuery=4000
  28. refreshTrieIntervalSec=10
  29. refreshRulesIntervalSec=10
  30. refreshRegexpsIntervalSec=10
  31. maxSpawnGoroutines=1000
  32. asyncTaskChanSize=1000
  33. [serviceoption.gcopt]
  34. open=true
  35. intervalSec = 5
  36. maxRowsPerQuery = 10
  37. [log]
  38. dir = "/data/log/antispam-service/"
  39. [identify]
  40. whiteAccessKey = "nKUPGzuhU|vTG58H!HPKLlktz{8}3^"
  41. whiteMid = 88889082
  42. [identify.app]
  43. key = "c1a1cb2d89c33794"
  44. secret = "dda47eeca111e03e6845017505baea13"
  45. [identify.host]
  46. auth = "http://passport.bilibili.com"
  47. secret = "http://open.bilibili.com"
  48. [identify.httpClient]
  49. key = "c1a1cb2d89c33794"
  50. secret = "dda47eeca111e03e6845017505baea13"
  51. dial = "1s"
  52. timeout = "1s"
  53. keepAlive = "60s"
  54. timer = 1000
  55. [identify.httpClient.breaker]
  56. window ="10s"
  57. sleep ="100ms"
  58. bucket = 10
  59. ratio = 0.5
  60. request = 100
  61. [identify.httpClient.url]
  62. "http://passport.bilibili.co/intranet/auth/tokenInfo" = {timeout = "100ms"}
  63. "http://passport.bilibili.co/intranet/auth/cookieInfo" = {timeout = "100ms"}
  64. "http://open.bilibili.co/api/getsecret" = {timeout = "500ms"}
  65. [tracer]
  66. proto = "unixgram"
  67. addr = "/var/run/dapper-collect/dapper-collect.sock"
  68. family = "antispam-service"
  69. [app]
  70. key = "c1a1cb2d89c33794"
  71. secret = "dda47eeca111e03e6845017505baea13"
  72. [httpClient]
  73. key = "c1a1cb2d89c33794"
  74. secret = "dda47eeca111e03e6845017505baea13"
  75. dial = "500ms"
  76. timeout = "1s"
  77. keepAlive = "60s"
  78. timer = 1000
  79. [httpClient.breaker]
  80. window ="3s"
  81. sleep ="100ms"
  82. bucket = 10
  83. ratio = 0.1
  84. request = 100
  85. switchoff= false
  86. [captcha]
  87. [captcha.app]
  88. key = "c1a1cb2d89c33794"
  89. secret = "dda47eeca111e03e6845017505baea13"
  90. [captcha.memcache]
  91. proto = "tcp"
  92. addr = "172.16.33.54:11211"
  93. active = 1
  94. idle = 1
  95. dialTimeout = "500ms"
  96. readTimeout = "1s"
  97. writeTimeout = "1s"
  98. idleTimeout = "80s"
  99. [captcha.captcha]
  100. bid = "1"
  101. bidKey = "86&JHBJHJHJ)()*(*&(*"
  102. expire = 360
  103. [captcha.httpClient]
  104. dial = "500ms"
  105. timeout = "500ms"
  106. keepAlive = "60s"
  107. timer = 1000
  108. [captcha.httpClient.breaker]
  109. window ="3s"
  110. sleep ="100ms"
  111. bucket = 10
  112. ratio = 0.1
  113. request = 100
  114. switchoff= false
  115. [multiHTTP]
  116. [multiHTTP.inner]
  117. addrs = ["127.0.0.1:7022"]
  118. maxListen = 1000
  119. [rpc]
  120. [[rpc.servers]]
  121. discoveroff=false
  122. proto = "tcp"
  123. addr = ":6849"
  124. weight = 10
  125. [rpc.zookeeper]
  126. root = "/microservice/antispam-service/"
  127. addrs = ["172.18.33.172:2181"]
  128. timeout = "1s"
  129. [ecode]
  130. domain = "172.16.33.248:6401"
  131. all = "1h"
  132. diff = "5m"
  133. [ecode.clientconfig]
  134. key = "test"
  135. secret = "e6c4c252dc7e3d8a90805eecd7c73396"
  136. dial = "2000ms"
  137. timeout = "2s"
  138. keepAlive = "10s"
  139. timer = 128
  140. [ecode.clientconfig.breaker]
  141. window ="3s"
  142. sleep ="100ms"
  143. bucket = 10
  144. ratio = 0.5
  145. request = 100
  146. [ecode.app]
  147. key = "test"
  148. secret = "e6c4c252dc7e3d8a90805eecd7c73396"
  149. [mysql]
  150. [mysql.antispam]
  151. #addr= "172.16.0.148:3306"
  152. #dsn = "test:test@tcp(172.16.0.148:3306)/bilibili_filter_job?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8"
  153. #active = 5
  154. #idle = 2
  155. addr= "172.16.33.205:3308"
  156. #dsn = "test:test@tcp(172.16.33.205:3308)/bilibili_antispam?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8"
  157. dsn = "antispam:tumRXf1TYwY17QE1CYaXphakD24myKfT@tcp(172.16.33.205:3308)/bilibili_antispam?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8"
  158. active = 5
  159. idle = 2
  160. idleTimeout ="4h"
  161. queryTimeout = "700ms"
  162. execTimeout = "200ms"
  163. tranTimeout = "200ms"
  164. #addr= "127.0.0.1:3306"
  165. #dsn = "root:123456@tcp(127.0.0.1:3306)/bilibili?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8"
  166. #active = 5
  167. #idle = 2
  168. [mysql.antispam.breaker]
  169. window = "3s"
  170. sleep = "100ms"
  171. bucket = 10
  172. ratio = 0.5
  173. request = 100
  174. [redis]
  175. proto = "tcp"
  176. addr = "172.16.33.54:6379"
  177. #addr = "127.0.0.1:6379"
  178. idle = 10
  179. active = 10
  180. dialTimeout = "500ms"
  181. readTimeout = "1s"
  182. writeTimeout = "1s"
  183. idleTimeout = "80s"
  184. indexExpire = "200s"
  185. [snowflake]
  186. workerIDs = [ 0,1 ]
  187. [snowflake.ZooKeeper]
  188. addrs = ["172.16.33.54:2181"]
  189. root = "/gosnowflake-servers"
  190. timeout= "30s"