httpd: include protocol in /proxies plain text format
This commit is contained in:
2
httpd.py
2
httpd.py
@@ -1588,7 +1588,7 @@ class ProxyAPIServer(threading.Thread):
|
|||||||
rows = db.execute(sql, args).fetchall()
|
rows = db.execute(sql, args).fetchall()
|
||||||
|
|
||||||
if fmt == 'plain':
|
if fmt == 'plain':
|
||||||
return '\n'.join('%s:%s' % (r[0], r[1]) for r in rows), 'text/plain', 200
|
return '\n'.join('%s://%s:%s' % (r[2] or 'http', r[0], r[1]) for r in rows), 'text/plain', 200
|
||||||
proxies = [{
|
proxies = [{
|
||||||
'proxy': '%s:%s' % (r[0], r[1]), 'proto': r[2], 'country': r[3],
|
'proxy': '%s:%s' % (r[0], r[1]), 'proto': r[2], 'country': r[3],
|
||||||
'asn': r[4], 'latency': r[5],
|
'asn': r[4], 'latency': r[5],
|
||||||
|
|||||||
Reference in New Issue
Block a user