123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- # This is a TOML document. Boom.
- version = "1.0.0"
- user = "nobody"
- pid = "/tmp/captcha.pid"
- dir = "./"
- perf = "127.0.0.1:6240"
- family = "captcha"
- [xlog]
- dir = "/data/log/captcha/"
- [ecode]
- domain = "172.16.33.248:6401"
- all = "1h"
- diff = "10m"
- [ecode.clientconfig]
- dial = "2000ms"
- timeout = "2s"
- keepAlive = "10s"
- timer = 128
- key = "test"
- secret = "e6c4c252dc7e3d8a90805eecd7c73396"
- [ecode.clientconfig.breaker]
- window ="3s"
- sleep ="100ms"
- bucket = 10
- ratio = 0.5
- request = 100
- [bm]
- [bm.outer]
- addr = "0.0.0.0:6241"
- maxListen = 1000
- timeout = "100ms"
- [identify]
- whiteAccessKey = ""
- whiteMid = 0
- [identify.app]
- key = "f022126a8a365e20"
- secret = "b7b86838145d634b487e67b811b8fab2"
- [identify.memcache]
- name = "go-business/identify"
- proto = "tcp"
- addr = "172.16.33.54:11211"
- active = 5
- idle = 10
- dialTimeout = "1s"
- readTimeout = "1s"
- writeTimeout = "1s"
- idleTimeout = "80s"
- [identify.host]
- auth = "http://passport.bilibili.com"
- secret = "http://open.bilibili.com"
- [identify.httpClient]
- key = "f022126a8a365e20"
- secret = "b7b86838145d634b487e67b811b8fab2"
- dial = "30ms"
- timeout = "100ms"
- keepAlive = "60s"
- [identify.httpClient.breaker]
- window = "10s"
- sleep = "100ms"
- bucket = 10
- ratio = 0.5
- request = 100
- [identify.httpClient.url]
- "http://passport.bilibili.co/intranet/auth/tokenInfo" = {timeout = "100ms"}
- "http://passport.bilibili.co/intranet/auth/cookieInfo" = {timeout = "100ms"}
- "http://open.bilibili.co/api/getsecret" = {timeout = "500ms"}
- [rate]
- [rate.apps]
- "reply" = {limit = 10000.0, burst = 10000}
- "live" = {limit = 30000.0, burst = 10000}
- [rate.urls]
- "/x/internal/v1/captcha/token" = {limit = 30000.0, burst = 10000}
- "/x/internal/v1/captcha/verify" = {limit = 30000.0, burst = 10000}
- "/x/v1/captcha/get" = {limit = 30000.0, burst = 10000}
- [memcache]
- proto = "tcp"
- addr = "172.16.33.54:11211"
- idle = 10
- active = 10
- dialTimeout = "2s"
- readTimeout = "2s"
- writeTimeout = "2s"
- idleTimeout = "7h"
- [captcha]
- outerHost = "http://api.bilibili.com"
- capacity = 1000
- interval = "5m"
- disturbLevel = 16
- ext = "jpeg"
- fonts = ["./fonts/comic.ttf"]
- [[captcha.bkgColors]]
- r = 255
- g = 0
- b = 0
- a = 255
- [[captcha.bkgColors]]
- r = 0
- g = 0
- b = 255
- a = 255
- [[captcha.bkgColors]]
- r = 0
- g = 153
- b = 0
- a = 255
- [[captcha.frontColors]]
- r = 255
- g = 255
- b = 255
- a = 255
- [[business]]
- businessID = "default"
- lenStart = 4
- lenEnd = 4
- width = 100
- length =50
- ttl = "120s"
- [[business]]
- businessID = "account"
- lenStart = 4
- lenEnd = 5
- width = 100
- length =50
- ttl = "120s"
- [[business]]
- businessID = "101"
- lenStart = 4
- lenEnd = 5
- width = 100
- length =50
- ttl = "5m"
|