Compare commits

..

3 Commits

Author SHA1 Message Date
24d6880a81 Add new sources 2023-11-09 17:52:58 -05:00
1549877f26 Write proxychains.conf 2023-11-09 17:52:44 -05:00
1464f16371 Change to random_chain 2 2023-11-09 17:52:19 -05:00
3 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,6 @@
https://raw.githubusercontent.com/proxifly/free-proxy-list/main/proxies/protocols/socks5/data.txt
https://raw.githubusercontent.com/sunny9577/proxy-scraper/master/proxies.txt
https://github.com/Anonym0usWork1221/Free-Proxies/blob/main/proxy_files/socks5_proxies.txt
https://api.openproxylist.xyz/socks4.txt
https://api.openproxylist.xyz/socks5.txt
https://api.proxyscrape.com/?request=displayproxies&proxytype=socks4
@ -33,6 +36,7 @@ https://raw.githubusercontent.com/officialputuid/KangProxy/KangProxy/socks5/sock
https://raw.githubusercontent.com/officialputuid/KangProxy/KangProxy/socks5/socks5.txt
https://raw.githubusercontent.com/prxchk/proxy-list/main/socks4.txt
https://raw.githubusercontent.com/prxchk/proxy-list/main/socks5.txt
https://raw.githubusercontent.com/fahimscirex/proxybd/master/proxylist/socks5.txt
https://raw.githubusercontent.com/rdavydov/proxy-list/main/proxies/socks4.txt
https://raw.githubusercontent.com/rdavydov/proxy-list/main/proxies/socks5.txt
https://raw.githubusercontent.com/rdavydov/proxy-list/main/proxies_anonymous/socks4.txt

17
main.py
View File

@ -7,11 +7,11 @@ import logging
from harvester.proxy import fetch_all, validate_socks
def load_urls(path):
def read_file(path):
with open(path, 'r', encoding='utf-8') as file:
urls = [line.strip() for line in file.readlines()]
data = [line.strip() for line in file.readlines()]
return urls
return data
def write_file(path, data):
@ -24,7 +24,7 @@ def main():
logging.basicConfig(level=logging.WARN)
# Load proxy source list and fetch proxies
urls = load_urls('data/proxy-sources.txt')
urls = read_file('data/proxy-sources.txt')
proxies = fetch_all(urls)
print(f'Fetched {len(proxies)} proxies!')
@ -52,8 +52,13 @@ def main():
path=f'proxies/valid-socks-{time.strftime("%Y%m%d%H%M%S")}.txt',
data='\n'.join(valid)
)
for proxy in valid:
print(proxy)
# Write proxychains conf
proxychains_template = read_file('templates/proxychains.conf')
proxychains_data = [f'socks5 {proxy.replace(":", " ")}' for proxy in proxies]
write_file(
path=f'proxies/proxychains-{time.strftime("%Y%m%d%H%M%S")}.conf',
data='\n'.join(proxychains_template + proxychains_data)
)
if __name__ == '__main__':

View File

@ -22,7 +22,7 @@
# all proxies must be online to play in chain
# otherwise EINTR is returned to the app
#
round_robin_chain
#round_robin_chain
#
# Round Robin - Each connection will be done via chained proxies
# of chain_len length
@ -36,14 +36,14 @@ round_robin_chain
# otherwise EINTR is returned to the app
# These semantics are not guaranteed in a multithreaded environment.
#
#random_chain
random_chain
#
# Random - Each connection will be done via random proxy
# (or proxy chain, see chain_len) from the list.
# this option is good to test your IDS :)
# Make sense only if random_chain or round_robin_chain
chain_len = 3
chain_len = 2
# Quiet mode (no output from library)
#quiet_mode