captcha-test.toml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. # This is a TOML document. Boom.
  2. version = "1.0.0"
  3. user = "nobody"
  4. pid = "/tmp/captcha.pid"
  5. dir = "./"
  6. perf = "127.0.0.1:6240"
  7. family = "captcha"
  8. [xlog]
  9. dir = "/data/log/captcha/"
  10. [ecode]
  11. domain = "172.16.33.248:6401"
  12. all = "1h"
  13. diff = "10m"
  14. [ecode.clientconfig]
  15. dial = "2000ms"
  16. timeout = "2s"
  17. keepAlive = "10s"
  18. timer = 128
  19. key = "test"
  20. secret = "e6c4c252dc7e3d8a90805eecd7c73396"
  21. [ecode.clientconfig.breaker]
  22. window ="3s"
  23. sleep ="100ms"
  24. bucket = 10
  25. ratio = 0.5
  26. request = 100
  27. [bm]
  28. [bm.outer]
  29. addr = "0.0.0.0:6241"
  30. maxListen = 1000
  31. timeout = "100ms"
  32. [identify]
  33. whiteAccessKey = ""
  34. whiteMid = 0
  35. [identify.app]
  36. key = "f022126a8a365e20"
  37. secret = "b7b86838145d634b487e67b811b8fab2"
  38. [identify.memcache]
  39. name = "go-business/identify"
  40. proto = "tcp"
  41. addr = "172.16.33.54:11211"
  42. active = 5
  43. idle = 10
  44. dialTimeout = "1s"
  45. readTimeout = "1s"
  46. writeTimeout = "1s"
  47. idleTimeout = "80s"
  48. [identify.host]
  49. auth = "http://passport.bilibili.com"
  50. secret = "http://open.bilibili.com"
  51. [identify.httpClient]
  52. key = "f022126a8a365e20"
  53. secret = "b7b86838145d634b487e67b811b8fab2"
  54. dial = "30ms"
  55. timeout = "100ms"
  56. keepAlive = "60s"
  57. [identify.httpClient.breaker]
  58. window = "10s"
  59. sleep = "100ms"
  60. bucket = 10
  61. ratio = 0.5
  62. request = 100
  63. [identify.httpClient.url]
  64. "http://passport.bilibili.co/intranet/auth/tokenInfo" = {timeout = "100ms"}
  65. "http://passport.bilibili.co/intranet/auth/cookieInfo" = {timeout = "100ms"}
  66. "http://open.bilibili.co/api/getsecret" = {timeout = "500ms"}
  67. [rate]
  68. [rate.apps]
  69. "reply" = {limit = 10000.0, burst = 10000}
  70. "live" = {limit = 30000.0, burst = 10000}
  71. [rate.urls]
  72. "/x/internal/v1/captcha/token" = {limit = 30000.0, burst = 10000}
  73. "/x/internal/v1/captcha/verify" = {limit = 30000.0, burst = 10000}
  74. "/x/v1/captcha/get" = {limit = 30000.0, burst = 10000}
  75. [memcache]
  76. proto = "tcp"
  77. addr = "172.16.33.54:11211"
  78. idle = 10
  79. active = 10
  80. dialTimeout = "2s"
  81. readTimeout = "2s"
  82. writeTimeout = "2s"
  83. idleTimeout = "7h"
  84. [captcha]
  85. outerHost = "http://api.bilibili.com"
  86. capacity = 1000
  87. interval = "5m"
  88. disturbLevel = 16
  89. ext = "jpeg"
  90. fonts = ["./fonts/comic.ttf"]
  91. [[captcha.bkgColors]]
  92. r = 255
  93. g = 0
  94. b = 0
  95. a = 255
  96. [[captcha.bkgColors]]
  97. r = 0
  98. g = 0
  99. b = 255
  100. a = 255
  101. [[captcha.bkgColors]]
  102. r = 0
  103. g = 153
  104. b = 0
  105. a = 255
  106. [[captcha.frontColors]]
  107. r = 255
  108. g = 255
  109. b = 255
  110. a = 255
  111. [[business]]
  112. businessID = "default"
  113. lenStart = 4
  114. lenEnd = 4
  115. width = 100
  116. length =50
  117. ttl = "120s"
  118. [[business]]
  119. businessID = "account"
  120. lenStart = 4
  121. lenEnd = 5
  122. width = 100
  123. length =50
  124. ttl = "120s"
  125. [[business]]
  126. businessID = "101"
  127. lenStart = 4
  128. lenEnd = 5
  129. width = 100
  130. length =50
  131. ttl = "5m"