/
gopa.yml
319 lines (290 loc) · 6.63 KB
/
gopa.yml
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
cluster:
name: gopa
minimum_nodes: 1
# seeds:
# - localhost:20000
# - localhost:20001
# - localhost:20002
#node.name: node1
path.data: data
path.logs: log
path.certs: test/cert
cookie_secret: YOUR-GOPA-SECRET
allow_multi_instance: true
max_num_of_instances: 30
tls_enabled: false
logging.level: info
node.master: true
node.data: true
node.proxy: true
node.tag: ["external","hot"]
network:
http_bind: 0.0.0.0:9000
api_bind: 0.0.0.0:8000
rpc_bind: 0.0.0.0:20000
broadcast_bind: 224.3.2.2:9876
elasticsearch:
- name: default
enabled: true
endpoint: http://localhost:9200
index_prefix: gopa-
basic_auth:
username: elastic
password: changeme
- name: monitoring
enabled: true
endpoint: http://localhost:9200
index_prefix: gopa-
basic_auth:
username: elastic
password: changeme
pipelines:
- name: url_filter_flow
start:
joint: init_task
enabled: true
process:
- joint: url_normalization
enabled: true
parameters:
follow_all_domain: false
follow_sub_domain: true
max_filename_length: 1000
- joint: url_filter
enabled: true
parameters:
url_match_rule:
must_not:
prefix:
- "mailto:"
- "data:image/"
- "#"
- "javascript:"
contain:
- "crond/run"
- "login"
- "logout"
suffix: []
must:
prefix: []
contain: []
suffix: []
should:
prefix: []
contain: []
suffix: []
host_match_rule:
must:
prefix: []
contain: []
suffix: []
should:
prefix: []
contain: []
suffix: []
must_not:
prefix: []
contain: []
suffix: []
file_match_rule:
must:
prefix: []
contain: []
suffix: []
should:
prefix: []
contain: []
suffix: []
must_not:
prefix: []
contain: []
suffix: []
file_ext_match_rule:
should:
prefix: []
contain: []
suffix: []
must:
prefix: []
contain: []
suffix: []
must_not:
contain: [zip, exe, jar, js, css, rar, gz, zip, bmp, jpeg, gif,svg, png, jpg, apk]
prefix: []
suffix: []
- joint: filter_check
enabled: true
parameters:
filter_key: check_filter
- joint: task_deduplication
enabled: true
end:
joint: save_task
enabled: true
parameters:
is_create: true
error:
joint: save_task
enabled: true
- name: url_fetch_flow
start:
joint: init_task
enabled: true
process:
- joint: url_normalization
enabled: true
parameters:
follow_all_domain: false
follow_sub_domain: true
max_filename_length: 1000
- joint: ignore_timeout
parameters:
ignore_timeout_after_count: 500
enabled: true
- joint: chrome_fetch
enabled: false
parameters:
chrome_host: http://127.0.0.1:9223
save_screenshot: true
compress_enabled: true
timeout_in_seconds: 60
screenshot_quality: 50
- joint: fetch
enabled: true
parameters:
timeout_in_seconds: 100
# proxy: "socks5://127.0.0.1:1080"
# cookie: ""
- joint: parse_pdf
enabled: true
parameters:
accepted_content_type:
- application/octet-stream
- application/pdf
- joint: parse
enabled: true
parameters:
dispatch_links: true
save_images: true
max_depth: 100
max_breadth: 1
- joint: extract
enabled: false
parameters:
html_block:
your_tag_name1: ".tag_class"
your_tag_name2: "#tag_id"
- joint: html2text
parameters:
remove_nonscript: true
merge_whitespace: false
enabled: true
- joint: hash
enabled: true
- joint: content_deduplication
enabled: true
- joint: update_check_time
enabled: true
parameters:
decelerate_steps: "24h,48h,72h,168h,360h,720h"
accelerate_steps: "24h,12h,6h,3h,1h30m,45m,30m,20m,10m"
- joint: lang_detect
enabled: true
- joint : save_snapshot_fs
enabled: false
- joint : save_snapshot_db
enabled: true
parameters:
compress_enabled: true
bucket: "Snapshot"
max_revision: 5
- joint: index
enabled: true
end:
joint: save_task
enabled: true
keep_404: true
keep_redirected: true
error:
joint: save_task
enabled: true
modules:
- name: pipeline
enabled: true
runners:
- name: checker
enabled: true
input_queue: check
pipeline_id: url_filter_flow
max_go_routine: 1
threshold_in_ms: 0
timeout_in_ms: 5000
- name: fetch
enabled: true
input_queue: fetch
pipeline_id: url_fetch_flow
max_go_routine: 1
threshold_in_ms: 0
timeout_in_ms: 30000
- name: cluster
enabled: true
- name: api
enabled: true
- name: web
enabled: true
auth:
enabled: false
oauth_provider: github
oauth_authorize_url: https://github.com/login/oauth/authorize
oauth_token_url: https://github.com/login/oauth/access_token
client_id: 850d747174ace88ce889
client_secret: 3d437b64e06371d6f62769320438d3dfc95a8d8e
authorized_admin:
- medcl
- your_github_login_name
- name: filter
enabled: true
- name: queue
enabled: true
- name: index
enabled: true
ui:
enabled: true
# site_name: Elasticsearch
# logo: https://static-www.elastic.co/cn/assets/blt6050efb80ceabd47/elastic-logo (2).svg?q=294
# favicon: https://www.elastic.co/favicon.ico
elasticsearch: default
- name: elastic
enabled: true
store_enabled: true
orm_enabled: true
indexer_enabled: true
elasticsearch: default
- name: stats
enabled: true
- name: statsd
enabled: false
host: 127.0.0.1
port: 8125
namespace: gopa.
interval_in_seconds: 1
plugins:
- name: chrome
enabled: false
command: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
# command: "/usr/bin/google-chrome"
debug_port: 9223
- name: dispatch
enabled: true
failed_retry: true
new_task: true
update_task: true
max_concurrent_fetch_tasks: 10
fetch_size: 10
get_host_config_by_url: false
rpc:
enabled: true
tls_enabled: true
tls_cert_file: test/cert/server.crt
tls_key_file: test/cert/server.key
# tls_skip_insecure_verify: false