Commit Graph

45 Commits

Author SHA1 Message Date
mickael
da4f228479 discard urls who fail at first test 2019-01-09 23:38:59 +00:00
mickael
15dee0cd73 add -intitle:pdf to searx query 2019-01-09 23:30:55 +00:00
mickael
e94644a60e searx: loop for 10 pages on each searx instance 2019-01-09 22:55:55 +00:00
mickael
8993727f03 changed regex 2019-01-09 20:07:28 +00:00
mickael
33887385f0 is_usable_proxy: group the 2 firsts lines 2019-01-09 19:23:09 +00:00
mickael
9828db79d4 is_usable_proxy(): dont check twice if A < 1 2019-01-09 19:11:05 +00:00
mickael
6f0d5c1ffa modify and rename should_i_... function
> remove :port from D
> check if octets are within a correct range
2019-01-09 19:01:55 +00:00
mickael
a74d6dfce8 do not save invalid IPs 2019-01-09 00:42:28 +00:00
rofl0r
6e4c45175e ppf: add safeguards against tor outage 2019-01-08 15:48:38 +00:00
rofl0r
1f3179de48 ppf: check for valid ports 2019-01-08 04:30:50 +00:00
rofl0r
9ccf8b7854 ppf: write dates as int 2019-01-08 04:19:09 +00:00
rofl0r
38d89f5bd9 ppf: add option for number of http retries 2019-01-08 03:30:31 +00:00
rofl0r
115c4a56f5 ppf: honor timeout 2019-01-08 03:25:52 +00:00
rofl0r
f16f754b0e implement combo config parser
allows all options to be overridden by command line.

e.g.
[watchd]
threads=10
debug=false

--watch.threads=50 --debug=true
2019-01-08 02:17:10 +00:00
rofl0r
e7b8d526c0 ppf: print url if fetching failed 2019-01-08 00:46:41 +00:00
mickael
1b3ce72efc add and use combining class 2019-01-07 23:19:14 +00:00
mickael
1288dca38f fixme: change var names 2019-01-07 21:41:41 +00:00
mickael
aeff09d2b3 move math function inside the sql statement 2019-01-07 21:11:08 +00:00
rofl0r
898c8f36ee ppf: fix cpu hogs 2019-01-07 15:38:51 +00:00
rofl0r
ad7c7fce67 ppf: use timeout and only 1 try for http 2019-01-07 05:37:44 +00:00
mickael
8b15faf84d ppf: change user-agent; use headers 2019-01-06 23:29:30 +00:00
mickael
3223cc82c4 use http2.py instead of requests 2019-01-06 22:22:42 +00:00
mickael
1a025f102f only load search/bad terms when "search" arg is enabled 2019-01-06 18:31:42 +00:00
mickael
5e9f8baf56 remove unused imports 2019-01-06 18:27:06 +00:00
mickael
64d9da9156 sleep even when no proxies are added 2019-01-06 02:58:58 +00:00
mickael
63b77043ac minor changes
remove comments, minimal code reorganization
2019-01-06 01:35:18 +00:00
mickael
84a1de26c3 sqlite: do not create tables with "duration" column 2019-01-06 00:50:35 +00:00
mickael
d93f4dcaf2 introduce success_count and total_duration (proxylist.sqlit
run those commands to update the database:

sqlite3 proxylist.sqlite "alter table proxylist add success_count int"
sqlite3 proxylist.sqlite "alter table proxylist add total_duration int"
sqlite3 proxylist.sqlite "update proxylist set success_count=0,total_duration=0"
2019-01-05 22:24:38 +00:00
rofl0r
af8f82924f fix logic so threads do an orderly shutdown
basically the issue was that the main loop received the SIGINT
and therefore broke out before reaching the parts of the code
that care about bringing down the child threads.

therefore there's now a finish() method that needs to be called
after stop().

because sqlite dbs insists to be used from the thread that created
the object, the DB cleanup operation are done from the thread
that controls it.

for standalone operation, in order to keep the main thread alive,
an additional run() method is used. this is not necessary when
used via ppf.py.
2019-01-05 17:17:27 +00:00
rofl0r
bb3da7122e ppf: properly reraise keyboard interrupts 2019-01-05 17:11:08 +00:00
rofl0r
9ac3ed45d6 rewrite threading code in jobwatchd
now it distributes the tasks properly among all threads,
and it can be used as a standalone program.
there are some minor performance issues which will be fixed shortly.
2019-01-05 06:35:41 +00:00
rofl0r
ffbe450aee outsource configuration to external module 2019-01-05 03:47:03 +00:00
mickael
09ea30b4e4 undo last change 2019-01-05 02:39:40 +00:00
mickael
f8b1b53fe9 cpu: be gentle
sleep 0.1 sec when adding proxies and urls to database
2019-01-05 01:17:12 +00:00
mickael
8f6f9d2f2e fix nonsense 2019-01-05 01:12:27 +00:00
mickael
85043d8e8a move includes in root directory 2019-01-05 00:22:28 +00:00
mickael
df2a2ec072 sort server list; remove freenode 2019-01-04 23:59:06 +00:00
mickael
97416017c4 rename is_usable_ipv4 -> is_reserved_ipv4 2019-01-04 22:52:45 +00:00
mickael
5a2d994b49 get rid of ipcalc 2019-01-04 22:45:15 +00:00
mickael
0c271de1d7 tor: use socks4 instead of socks5 2019-01-04 21:58:30 +00:00
mickael
563f3323ab remove hardcoded tor hosts
use user config
+ minor reorg.
2019-01-04 21:52:29 +00:00
mickael
4a60a23df3 fix imports
+ move soup_parser.py to includes
+ reorganize imports
+ remove double
2019-01-04 21:23:22 +00:00
mickael
d7f79708ca misc minor changes
proxywatchd: remove sleep
ppf: update proxies schemes
2019-01-04 20:23:50 +00:00
mickael
f0b7e2dc2f cleansing 2019-01-03 23:28:35 +00:00
mickael
3fb2dc40a6 initial commit 2019-01-03 16:36:31 +00:00