more changes
This commit is contained in:
+10
-5
@@ -48,7 +48,7 @@ def socks4_resolve(srvname, server_port):
|
||||
|
||||
|
||||
class WorkerJob():
|
||||
def __init__(self, proxy, proto, failcount, success_count, total_duration, country):
|
||||
def __init__(self, proxy, proto, failcount, success_count, total_duration, country, oldies = False):
|
||||
self.proxy = proxy
|
||||
self.proto = proto
|
||||
self.failcount = failcount
|
||||
@@ -56,6 +56,7 @@ class WorkerJob():
|
||||
self.success_count = success_count
|
||||
self.total_duration = total_duration
|
||||
self.country = country
|
||||
self.isoldies = oldies
|
||||
|
||||
def connect_socket(self):
|
||||
srvname = random.choice(config.servers).strip()
|
||||
@@ -82,6 +83,9 @@ class WorkerJob():
|
||||
]
|
||||
|
||||
try:
|
||||
if self.isoldies:
|
||||
sock = rocksock.Rocksock(host=srv, port=server_port, ssl=use_ssl, proxies=proxies, timeout=config.watchd.timeout - 2)
|
||||
else:
|
||||
sock = rocksock.Rocksock(host=srv, port=server_port, ssl=use_ssl, proxies=proxies, timeout=config.watchd.timeout)
|
||||
sock.connect()
|
||||
sock.send('NICK\n')
|
||||
@@ -268,15 +272,15 @@ class Proxywatchd():
|
||||
}
|
||||
|
||||
def fetch_rows(self):
|
||||
self.isoldies = False
|
||||
q = 'SELECT proxy,proto,failed,success_count,total_duration,country FROM proxylist WHERE failed >= ? and failed < ? and (tested + ? + (failed * ?)) < ? ORDER BY RANDOM()'
|
||||
rows = self.mysqlite.execute(q, (0, config.watchd.max_fail, config.watchd.checktime, config.watchd.perfail_checktime, time.time())).fetchall()
|
||||
# check oldies ?
|
||||
if len(rows) < config.watchd.threads and config.watchd.oldies:
|
||||
self.isoldies = True
|
||||
## disable tor safeguard for old proxies
|
||||
if self.tor_safeguard: self.tor_safeguard = False
|
||||
#q += ' LIMIT ?'
|
||||
#rows = self.mysqlite.execute(q, (config.watchd.max_fail, config.watchd.max_fail*2, config.watchd.checktime, config.watchd.oldies_checktime, time.time(), config.watchd.threads*config.watchd.oldies_multi)).fetchall()
|
||||
rows = self.mysqlite.execute(q, (config.watchd.max_fail, config.watchd.max_fail*3, config.watchd.checktime, config.watchd.oldies_checktime, time.time())).fetchall()
|
||||
rows = self.mysqlite.execute(q, (config.watchd.max_fail, config.watchd.max_fail*2, config.watchd.checktime, config.watchd.oldies_checktime, time.time())).fetchall()
|
||||
return rows
|
||||
|
||||
def prepare_jobs(self):
|
||||
@@ -284,8 +288,9 @@ class Proxywatchd():
|
||||
## enable tor safeguard by default
|
||||
self.tor_safeguard = config.watchd.tor_safeguard
|
||||
rows = self.fetch_rows()
|
||||
#print('preparing jobbs, oldies: %s' % str(self.isoldies))
|
||||
for row in rows:
|
||||
job = WorkerJob(row[0], row[1], row[2], row[3], row[4], row[5])
|
||||
job = WorkerJob(row[0], row[1], row[2], row[3], row[4], row[5], self.isoldies)
|
||||
self.jobs.append(job)
|
||||
self._close_db()
|
||||
|
||||
|
||||
+12
-14
@@ -1,16 +1,14 @@
|
||||
https://searx.serneels.xyz
|
||||
https://searx.me
|
||||
https://searx.xyz
|
||||
https://searx.site
|
||||
https://searx.win
|
||||
https://searx.ru
|
||||
https://stemy.me/searx
|
||||
https://searx.at
|
||||
https://listi.me
|
||||
https://searx.dk
|
||||
https://searx.laquadrature.net
|
||||
#https://searx.site
|
||||
#https://searx.win
|
||||
#https://searx.ru
|
||||
#https://stemy.me/searx
|
||||
#https://searx.at
|
||||
#https://listi.me
|
||||
#https://searx.dk
|
||||
#https://searx.laquadrature.net
|
||||
## hidden services
|
||||
http://searchb5a7tmimez.onion
|
||||
http://nxhhwbbxc4khvvlw.onion
|
||||
http://searx.l4qlywnpwqsluw65ts7md3khrivpirse744un3x7mlskqauz5pyuzgqd.onion
|
||||
http://ulrn6sryqaifefld.onion
|
||||
#http://searchb5a7tmimez.onion
|
||||
#http://nxhhwbbxc4khvvlw.onion
|
||||
#http://searx.l4qlywnpwqsluw65ts7md3khrivpirse744un3x7mlskqauz5pyuzgqd.onion
|
||||
#http://ulrn6sryqaifefld.onion
|
||||
|
||||
-26
@@ -1,21 +1,10 @@
|
||||
eu.ircnet.org
|
||||
eu.undernet.org
|
||||
irc.2600.net
|
||||
irc.Undernet.Org
|
||||
irc.afterx.net
|
||||
irc.atrum.org
|
||||
irc.atw-inter.net
|
||||
irc.au.dal.net
|
||||
irc.austnet.org
|
||||
irc.azzurra.org
|
||||
irc.blitzed.org
|
||||
irc.bongster.org
|
||||
irc.chat4all.org
|
||||
irc.chatspike.net
|
||||
irc.choopa.net
|
||||
irc.coldfront.net
|
||||
irc.cyberarmy.net
|
||||
irc.d-t-net.de
|
||||
irc.dal.net
|
||||
irc.darkmyst.org
|
||||
irc.data.lt
|
||||
@@ -34,9 +23,6 @@ irc.europnet.org
|
||||
irc.eversible.com
|
||||
irc.fdfnet.net
|
||||
irc.fef.net
|
||||
irc.financialchat.com
|
||||
irc.forestnet.org
|
||||
irc.foreverchat.net
|
||||
irc.freequest.net
|
||||
irc.gamesurge.net
|
||||
irc.geekshed.net
|
||||
@@ -44,18 +30,8 @@ irc.german-freakz.net
|
||||
irc.gigairc.net
|
||||
irc.globalgamers.net
|
||||
irc.greekirc.net
|
||||
irc.icq.com
|
||||
irc.immortal-anime.net
|
||||
irc.inet.tele.dk
|
||||
irc.irc2.hu
|
||||
irc.irc4fun.net
|
||||
irc.irchighway.net
|
||||
irc.ircsource.net
|
||||
irc.irctoo.net
|
||||
irc.ircube.org
|
||||
irc.ircworld.nl
|
||||
irc.irdsi.net
|
||||
irc.kampungchat.org
|
||||
irc.knightirc.net
|
||||
irc.krono.net
|
||||
irc.langochat.net
|
||||
@@ -91,8 +67,6 @@ irc.swiftirc.net
|
||||
irc.teranova.net
|
||||
irc.us.dal.net
|
||||
irc.us.gamesurge.net
|
||||
irc.whatnet.org
|
||||
irc.wondernet.nu
|
||||
irc.xevion.net
|
||||
irc.xs4all.nl
|
||||
irc.zerofuzion.net
|
||||
|
||||
Reference in New Issue
Block a user