-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
appsettings.json
216 lines (206 loc) · 9.8 KB
/
appsettings.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
{
"RunTasks": "", //要运行的任务名称[Daily,LiveLottery,UnfollowBatched,VipBigPoint,Test],多个使用&分隔,如“Daily&LiveLottery”,建议使用命令行参数指定
//程序自定义个性化配置
"DailyTaskConfig": {
"Cron": "0 15 * * *",
"IsWatchVideo": true, //是否观看视频
"IsShareVideo": true, //是否分享视频
"IsDonateCoinForArticle": false,
"NumberOfCoins": 5, //每日设定的投币数 [0,5]
"NumberOfProtectedCoins": 0, // 要保留的硬币数量 [0,int_max],0 为不保留,int_max 通常取 (2^31)-1
"SaveCoinsWhenLv6": false, //达到六级后是否开始白嫖[false,true]
"SelectLike": true, //投币时是否同时点赞[false,true]
"SupportUpIds": "", //优先选择支持的up主Id集合,多个以英文逗号分隔,如:"123,456"。配置后会优先从指定的up主下挑选视频进行观看、分享和投币,不配置或配置为-1则表示没有特别支持的up,会从关注和排行耪中随机获取支持视频
"DayOfAutoCharge": -1, //每月几号自动充电[-1,31],-1表示不指定,默认月底最后一天;0表示不充电
"AutoChargeUpId": "-1", //指定支持的UP主Id,-1表示自己
"ChargeComment": "", //充电后留言
"DayOfReceiveVipPrivilege": 1, //每月几号自动领取会员权益的[-1,31],-1表示不指定,默认每月1号;0表示不自动领取
"DayOfExchangeSilver2Coin": 0, //每月几号执行银瓜子兑换硬币[-1,31],-1表示不指定,默认每月最后一天;-2表示每天;0表示不进行兑换
"DevicePlatform": "android", //执行客户端操作时的平台 [ios,android]
"CustomComicId": 27355, //自定义漫画阅读 comic_id,若不清楚含义请勿修改
"CustomEpId": 381662 //自定义漫画阅读 ep_id,若不清楚含义请勿修改
},
"LiveLotteryTaskConfig": {
"Cron": "0 22 * * *",
"ExcludeAwardNames": "舰|船|航海|代金券|自拍|照|写真|图|提督", //根据关键字排除包含这些文字的奖品名称,多个用“|”分隔,如“照|舰|船|航海|代金券|自拍”
"IncludeAwardNames": "", //根据关键字指定奖品名称必须包含的文字,多个用“|”分隔,如“红包|现金|块|元”
"AutoGroupFollowings": true, //抽奖结束后是否自动将关注的主播分组到“天选时刻”分组,值域[true,false]
"DenyUids": "65566781,1277481241,1643654862,603676925" //主播Uid黑名单(一般是中奖后的老赖),多个用英文逗号分隔,配置后不会参加黑名单中的主播的抽奖活动
},
"UnfollowBatchedTaskConfig": {
"Cron": "0 6 1 * *",
"GroupName": "天选时刻", //取关的分组名称
"Count": 20, //本次取关个数(倒序,从后往前取关)
"RetainUids": "" //白名单(保留的UpId),多个用英文都好分隔,配置后,批量取关时不会取关配置的Up
},
"VipBigPointConfig": {
"Cron": "7 1 * * *",
"ViewBangumis": "33378" // 自定义番剧的ssid,若不清楚含义请勿修改(默认为名侦探柯南)
},
"LiveFansMedalTaskConfig": {
"Cron": "5 0 * * *",
"DanmakuContent": "OvO",
"HeartBeatNumber": 70, //直播间观看的时长,单位为分钟",
"HeartBeatSendGiveUpThreshold": 5, //当心跳包发送连续失败多少次时放弃
"IsSkipLevel20Medal": true // 是否跳过粉丝牌等级 >=0 的
},
//安全相关配置
"Security": {
"IsSkipDailyTask": false, //是否跳过执行任务,用于特殊情况下,通过配置灵活的开启和关闭任务
"RandomSleepMaxMin": 0, //随机睡眠的最大时长(单位为分钟),用于使每天运行时间在范围内相对随机,值域[0,+];配置为0表示不进行休眠
"IntervalSecondsBetweenRequestApi": 20, //两次调用api之间的间隔[0,+](单位为秒)。因为有人担心在几秒内连续调用api会被b站安全机制发现,所以为不放心的朋友添加了间隔秒数配置,两次连续调用Api之间会大于该秒数
"IntervalMethodTypes": "GET,POST", //间隔秒数所针对的HttpMethod,多个用英文逗号隔开,当前有GET和POST两种,可配置如“GET,POST”
"UserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0", //请求B站接口时头部传递的User-Agent
"UserAgentApp": "Mozilla/5.0 (Linux; Android 12; SM-S9080 Build/V417IR; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 os/android model/SM-S9080 build/7760700 osVer/12 sdkInt/32 network/2 BiliApp/7760700 mobi_app/android channel/bili innerVer/7760710 c_locale/zh_CN s_locale/zh_CN disable_rcmd/0 7.76.0 os/android model/SM-S9080 mobi_app/android build/7760700 channel/bili innerVer/7760710 osVer/12 network/2", //App请求B站接口时头部传递的User-Agent
"WebProxy": "" //代理,格式为http://host:port,如果有鉴权则为user:password@http://host:port
},
// 推送
"Notification": {
"IsSingleAccountSingleNotify": true //是否开启每个账号单独推送消息
},
//日志
"Serilog": {
"Using": [
"Serilog.Sinks.Console",
"Serilog.Sinks.Debug",
"Serilog.Sinks.File",
"Ray.Serilog.Sinks.TelegramBatched",
"Ray.Serilog.Sinks.WorkWeiXinBatched",
"Ray.Serilog.Sinks.DingTalkBatched",
"Ray.Serilog.Sinks.ServerChanBatched",
"Ray.Serilog.Sinks.CoolPushBatched",
"Ray.Serilog.Sinks.OtherApiBatched",
"Ray.Serilog.Sinks.PushPlusBatched",
"Ray.Serilog.Sinks.MicrosoftTeamsBatched",
"Ray.Serilog.Sinks.WorkWeiXinAppBatched",
"Ray.Serilog.Sinks.GotifyBatched"
],
"MinimumLevel": {
"Default": "Debug",
"Override": {
"Microsoft": "Warning",
"System": "Warning",
"Microsoft.AspNetCore": "Warning"
}
},
"WriteTo": [
//0.Console
{
"Name": "Console",
"Args": {
"restrictedToMinimumLevel": "Information",
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
}
},
//1.Debug
{ "Name": "Debug" },
//2.File
{
"Name": "File",
"Args": {
"path": "Logs/log.txt",
"restrictedToMinimumLevel": "Verbose",
"rollingInterval": 3
}
},
//3.Telegram机器人(https://core.telegram.org/bots/api#available-methods)
{
"Name": "TelegramBatched",
"Args": {
"botToken": "",
"chatId": "",
"restrictedToMinimumLevel": "Information",
"proxy": "", //代理,user:password@host:port
"apiHost": "https://api.telegram.org" //可以替换成自己搭建的反代host(https://hostloc.com/thread-805441-1-1.html)
}
},
//4.企业微信机器人(https://work.weixin.qq.com/api/doc/90000/90136/91770)
{
"Name": "WorkWeiXinBatched",
"Args": {
"webHookUrl": "", //群机器人生成
"restrictedToMinimumLevel": "Information"
}
},
//5.钉钉机器人(https://developers.dingtalk.com/document/app/overview-of-group-robots)
{
"Name": "DingTalkBatched",
"Args": {
"webHookUrl": "", //群机器人生成
"restrictedToMinimumLevel": "Information"
}
},
//6.Server酱(http://sc.ftqq.com/9.version)
{
"Name": "ServerChanBatched",
"Args": {
"scKey": "", //已过时,待删除
"turboScKey": "", //平台生成的ScKey
"restrictedToMinimumLevel": "Information"
}
},
//7.酷推
{
"Name": "CoolPushBatched",
"Args": {
"sKey": "",
"restrictedToMinimumLevel": "Information"
}
},
//8.自定义Api
{
"Name": "OtherApiBatched",
"Args": {
"api": "",
"placeholder": "#msg#", //占位符
"bodyJsonTemplate": "{\"msgtype\":\"markdown\",\"markdown\":{\"content\":#msg#}}", //json模板,会当作post的body,占位符会被日志内容替换(日志文本为json字符串,已经带有引号,所有模板中占位符不用使用引号包裹,如例子所示为企业微信的标准推送格式)
"restrictedToMinimumLevel": "Information"
}
},
//9.PushPlus(http://www.pushplus.plus/doc/)
{
"Name": "PushPlusBatched",
"Args": {
"token": "",
"channel": "", //渠道,值域[wechat,webhook,cp,sms,mail],分别对应[微信公众号,指定第三方webhook,企业微信应用,短信,邮件]
"topic": "", //群组编码,用于群发,没有就不填(不填仅发送给自己);channel为webhook时无效
"webhook": "", //webhook编码(不是地址),仅在channel使用webhook渠道和CP渠道时需要填写
"restrictedToMinimumLevel": "Information"
}
},
//10.MicrosoftTeams
{
"Name": "MicrosoftTeamsBatched",
"Args": {
"webhook": "", //webhook完整地址
"restrictedToMinimumLevel": "Information"
}
},
//11.企业微信应用推送
{
"Name": "WorkWeiXinAppBatched",
"Args": {
"corpId": "", //必填
"agentId": "", //必填
"secret": "", //必填
"toUser": "@all",
"toParty": "",
"toTag": "",
"restrictedToMinimumLevel": "Information"
}
},
//12.gotify推送
{
"Name": "GotifyBatched",
"Args": {
"host": "", //必填,如https://www.mygotify.com
"token": "", //必填,应用(app)的token
"restrictedToMinimumLevel": "Information"
}
}
],
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
},
"PlateformType": "Unknown",
"IsPrd": false
}