2019-04-22 02:59:20 +00:00

141 lines
3.0 KiB
TOML

# 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"