is a service for downloading, checking and providing socks proxy servers.
To download and run this project, you need to install git
- Launch terminal in the folder for this project
- Clone project repository -
git clone https://github.com/ArchiKeV/Proxy-Provider.git
- Go to project folder -
cd Proxy-Provider
- Allow execution of
init.sh
andrun.sh
files -chmod + x init.sh run.sh
- Run
init.sh
for the first time -./init.sh
To download and run this project, you need to install git
and python
- Launch terminal in the folder for this project
- Clone project repository -
git clone https://github.com/ArchiKeV/Proxy-Provider.git
- Go to project folder -
cd Proxy-Provider
- Run
init.bat
for the first time -init.bat
- Launch terminal in this project folder
- Run
run.sh
in a terminal every time you need to run a project -./run.sh
- Use the visual text interface in the terminal and get tested proxy servers at
127.0.0.1:5000/proxy
- Run
run.sh
in a terminal every time you need to run a project -./run.sh
- Launch terminal in this project folder
- Run
run.bat
for the first time -run.bat
- Use the visual text interface in the terminal and get tested proxy servers at
127.0.0.1:5000/proxy
- The first run will create a basic
config.json
, use that to configure
The input data for the service is described in the configuration file config.json
created when the service is first started. It, among other things, describes all the used sources of proxy servers, their configuration will be discussed below.
Proxy sources are provided as a Python 3 module located in the ./sources
directory. An example module is described in ./sources/example_module.py
. Such a module should independently obtain lists of proxy servers and return a list of dictionaries in the get_proxy()
function:
[
{
'country_code_in': "BB", # two-letter country code or None
'ip_in': '1.2.3.4', # string
'port_in': 4321, # integer
'type': 4 # integer - socks proxy type (4 or 5)
},
{
'country_code_in': None,
'ip_in': '4.3.2.1',
'port_in': 1234,
'type': 5
}
]
Parameter country_code_in
- ISO code of the country of entry into the proxy server, the parameter is optional, but desirable. This setting is used to filter out unwanted provider countries. The list of unwantedm countries is described in config.json (details below). If there is no information about the country of entry, the parameter should be filled with the value None
.
Available proxies are checked by visiting a site with connection information through the proxy server. From this information, data on the Country of exit and the exit IP address are taken.
Verified proxies are provided by the FLASK server as a REST API (currently only getting tested servers is available).
The configuration file consists of three sections - db
, proxy
, system
. Each section is responsible for its part of the settings.
db_type
- db type (currently|default - sqlite
, others in the future)
settings.filepath
- db name (default - proxy_provider_db.sqlite
)
settings.concurrent_slots
- Num of concurrent db access slots (sqlite default - 1
)
country_code_ignore_list
- List of 2-letter codes of unwanted countries whose proxies will not be added to the database. Default - ["IR", ]
sources
- List of proxy server source dictionaries:
"name": str
- Module name and display name, DO NOT end with .py
"timer": int
- Source reload timer, in seconds. It should be set based on the source update frequency and large enough so as not to be aggressive towards the source server (so as not to be banned)
checkup_timers.active_server_check_period_in_hours
- Timer in hours, for working servers
checkup_timers.inactive_server_check_period_in_hours
-Timer in hours, for not working servers (currently not in use)
timeouts.connection_timeout
- Server connection timeout during health check (in seconds)
timeouts.read_timeout
- Server read timeout during health check (in seconds)
num_of_simultaneous_checks
- The number of simultaneously scanned servers, the more simultaneous scans, the faster all servers will be scanned (5
- default)
tui_text_line_buffer_size
- String buffer for TUI (default - 500
)
debug
- Debug mode (default - False
). Currently affects the behavior of sqlalchemy and does not affect logs