You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
226 lines
4.8 KiB
226 lines
4.8 KiB
# This is a TOML document. Boom. |
|
|
|
version = "2.1.0" |
|
user = "nobody" |
|
pid = "/tmp/antispam.pid" |
|
dir = "./" |
|
perf = "0.0.0.0:6840" |
|
checkFile = "/data/www/antispam.html" |
|
family = "antispam" |
|
address = "172.16.0.148" |
|
|
|
proc = 32 |
|
|
|
maxDurationSec=7200 |
|
maxAllowedCounts=1000 |
|
|
|
[autoWhite] |
|
KeywordHitCounts = 100 |
|
NumOfSenders = 50 |
|
Derivation = 0.02 |
|
|
|
[serviceoption] |
|
maxExportRows=100000 |
|
minKeywordLen=5 |
|
defaultExpireSec=10 |
|
ruleDefaultExpireSec=-1 |
|
regexpDefaultExpireSec=-1 |
|
defaultChanSize=1000 |
|
maxRegexpCountsPerArea=20 |
|
maxSenderNum=500 |
|
buildTrieIntervalMinute=1 |
|
buildTrieMaxRowsPerQuery=4000 |
|
refreshTrieIntervalSec=10 |
|
refreshRulesIntervalSec=10 |
|
refreshRegexpsIntervalSec=10 |
|
maxSpawnGoroutines=1000 |
|
asyncTaskChanSize=1000 |
|
|
|
[serviceoption.gcopt] |
|
open=true |
|
intervalSec = 5 |
|
maxRowsPerQuery = 10 |
|
|
|
|
|
[log] |
|
dir = "/data/log/antispam-service/" |
|
|
|
[identify] |
|
whiteAccessKey = "nKUPGzuhU|vTG58H!HPKLlktz{8}3^" |
|
whiteMid = 88889082 |
|
|
|
[identify.app] |
|
key = "c1a1cb2d89c33794" |
|
secret = "dda47eeca111e03e6845017505baea13" |
|
|
|
[identify.host] |
|
auth = "http://passport.bilibili.com" |
|
secret = "http://open.bilibili.com" |
|
|
|
[identify.httpClient] |
|
key = "c1a1cb2d89c33794" |
|
secret = "dda47eeca111e03e6845017505baea13" |
|
dial = "1s" |
|
timeout = "1s" |
|
keepAlive = "60s" |
|
timer = 1000 |
|
|
|
[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"} |
|
|
|
|
|
[tracer] |
|
proto = "unixgram" |
|
addr = "/var/run/dapper-collect/dapper-collect.sock" |
|
family = "antispam-service" |
|
|
|
[app] |
|
key = "c1a1cb2d89c33794" |
|
secret = "dda47eeca111e03e6845017505baea13" |
|
|
|
[httpClient] |
|
key = "c1a1cb2d89c33794" |
|
secret = "dda47eeca111e03e6845017505baea13" |
|
dial = "500ms" |
|
timeout = "1s" |
|
keepAlive = "60s" |
|
timer = 1000 |
|
[httpClient.breaker] |
|
window ="3s" |
|
sleep ="100ms" |
|
bucket = 10 |
|
ratio = 0.1 |
|
request = 100 |
|
switchoff= false |
|
|
|
[captcha] |
|
[captcha.app] |
|
key = "c1a1cb2d89c33794" |
|
secret = "dda47eeca111e03e6845017505baea13" |
|
|
|
[captcha.memcache] |
|
proto = "tcp" |
|
addr = "172.16.33.54:11211" |
|
active = 1 |
|
idle = 1 |
|
dialTimeout = "500ms" |
|
readTimeout = "1s" |
|
writeTimeout = "1s" |
|
idleTimeout = "80s" |
|
|
|
[captcha.captcha] |
|
bid = "1" |
|
bidKey = "86&JHBJHJHJ)()*(*&(*" |
|
expire = 360 |
|
|
|
[captcha.httpClient] |
|
dial = "500ms" |
|
timeout = "500ms" |
|
keepAlive = "60s" |
|
timer = 1000 |
|
|
|
[captcha.httpClient.breaker] |
|
window ="3s" |
|
sleep ="100ms" |
|
bucket = 10 |
|
ratio = 0.1 |
|
request = 100 |
|
switchoff= false |
|
|
|
[multiHTTP] |
|
[multiHTTP.inner] |
|
addrs = ["127.0.0.1:7022"] |
|
maxListen = 1000 |
|
|
|
[rpc] |
|
[[rpc.servers]] |
|
discoveroff=false |
|
proto = "tcp" |
|
addr = ":6849" |
|
weight = 10 |
|
|
|
[rpc.zookeeper] |
|
root = "/microservice/antispam-service/" |
|
addrs = ["172.18.33.172:2181"] |
|
timeout = "1s" |
|
|
|
|
|
[ecode] |
|
domain = "172.16.33.248:6401" |
|
all = "1h" |
|
diff = "5m" |
|
[ecode.clientconfig] |
|
key = "test" |
|
secret = "e6c4c252dc7e3d8a90805eecd7c73396" |
|
dial = "2000ms" |
|
timeout = "2s" |
|
keepAlive = "10s" |
|
timer = 128 |
|
[ecode.clientconfig.breaker] |
|
window ="3s" |
|
sleep ="100ms" |
|
bucket = 10 |
|
ratio = 0.5 |
|
request = 100 |
|
[ecode.app] |
|
key = "test" |
|
secret = "e6c4c252dc7e3d8a90805eecd7c73396" |
|
|
|
|
|
[mysql] |
|
[mysql.antispam] |
|
#addr= "172.16.0.148:3306" |
|
#dsn = "test:test@tcp(172.16.0.148:3306)/bilibili_filter_job?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8" |
|
#active = 5 |
|
#idle = 2 |
|
|
|
addr= "172.16.33.205:3308" |
|
#dsn = "test:test@tcp(172.16.33.205:3308)/bilibili_antispam?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8" |
|
dsn = "antispam:tumRXf1TYwY17QE1CYaXphakD24myKfT@tcp(172.16.33.205:3308)/bilibili_antispam?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8" |
|
active = 5 |
|
idle = 2 |
|
idleTimeout ="4h" |
|
queryTimeout = "700ms" |
|
execTimeout = "200ms" |
|
tranTimeout = "200ms" |
|
|
|
|
|
#addr= "127.0.0.1:3306" |
|
#dsn = "root:123456@tcp(127.0.0.1:3306)/bilibili?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8" |
|
#active = 5 |
|
#idle = 2 |
|
|
|
[mysql.antispam.breaker] |
|
window = "3s" |
|
sleep = "100ms" |
|
bucket = 10 |
|
ratio = 0.5 |
|
request = 100 |
|
[redis] |
|
proto = "tcp" |
|
addr = "172.16.33.54:6379" |
|
#addr = "127.0.0.1:6379" |
|
idle = 10 |
|
active = 10 |
|
dialTimeout = "500ms" |
|
readTimeout = "1s" |
|
writeTimeout = "1s" |
|
idleTimeout = "80s" |
|
indexExpire = "200s" |
|
|
|
[snowflake] |
|
workerIDs = [ 0,1 ] |
|
|
|
[snowflake.ZooKeeper] |
|
addrs = ["172.16.33.54:2181"] |
|
root = "/gosnowflake-servers" |
|
timeout= "30s"
|
|
|