
Security News
Opengrep Adds Apex Support and New Rule Controls in Latest Updates
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
ProxyKit is a lightweight Python package for managing and rotating proxy servers, user agents, and headers. It validates proxy lists and provides a context manager to easily inject reliable, random configurations into your HTTP requests.
A lightweight Python package for managing and rotating proxy servers with built-in validation and caching.
pip install proxykit
from proxykit import ProxyKit, ProxyLoader
from proxykit.models import ProxyDataFormat
# clear all previous Proxies
ProxyKit.clear_all_data() # Optional only if you want to have fresh start
# Load proxies from various sources
ProxyLoader.load("proxies.json", format=ProxyDataFormat.JSON)
ProxyLoader.load("https://api.example.com/proxies", format=ProxyDataFormat.JSON)
# Use with context manager
with ProxyKit() as pk:
proxy = pk.get_random_proxy()
print(f"Using proxy: {proxy.host}:{proxy.port}")
ip
and port
are required rest all are optionalip
can also be proper ip address with port separated by :
, e.g: 127.0.0.1:8080
in this case port
is ignoredProxyLoader.load(
"proxies.json",
format=ProxyDataFormat.JSON,
entry=["data"], # Navigate nested JSON
key_mapping={
"ip": "host",
"anonymity": "anonymityLevel"
}
)
ProxyLoader.load(
"proxies.csv",
format=ProxyDataFormat.CSV,
key_mapping={
"ip": "proxy_host",
"port": "proxy_port"
}
)
# Simple text file with IP:PORT format
ProxyLoader.load("proxies.txt", format=ProxyDataFormat.IP)
Method | Description |
---|---|
load(source, format, key_mapping, entry, token) | Load proxies from file or URL |
custom_load(data) | Load pre-parsed ProxyServer objects |
Method | Description |
---|---|
get_random_proxy() | Get a random validated proxy |
clear_cache() | Clear cached proxy data |
clear_all_data() | Static method to clear all data |
Map your data fields to ProxyKit's expected format:
key-mapping required for only unmatched keys
key_mapping = {
"ip": "your_host_field",
"port": "your_port_field",
"protocol": "your_protocol_field",
"anonymity": "your_anonymity_field",
"username": "your_username_field",
"password": "your_password_field",
"country": "your_country_field",
"latency": "your_latency_field",
"is_working": "your_status_field"
}
@dataclass
class ProxyServer:
host: str
port: int
protocol: ProxyProtocol = ProxyProtocol.HTTP
anonymity: AnonymityLevel = AnonymityLevel.UNKNOWN
country: str | None = None
latency: float | None = None
username: str | None = None
password: str | None = None
is_working: bool = True
HTTP
, HTTPS
, SOCKS4
, SOCKS5
ELITE
, ANONYMOUS
, TRANSPARENT
, UNKNOWN
JSON
, CSV
, IP
, CUSTOM
Customize validation settings in constants.py
:
TEST_SITES = [
"https://httpbin.org/ip",
"https://icanhazip.com",
"https://example.com"
]
THREADS = 25 # Validation concurrency
MIT License - see LICENSE for details.
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)Suraj Airi - surajairi.ml@gmail.com
FAQs
ProxyKit is a lightweight Python package for managing and rotating proxy servers, user agents, and headers. It validates proxy lists and provides a context manager to easily inject reliable, random configurations into your HTTP requests.
We found that proxykit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.