To configure a network-level proxy in mvanhorn/last30days-skill, set YOUTUBE_PROXY=socks5://user:pass@host:port in ~/.config/last30days/.env for YouTube (yt-dlp) traffic, and export standard HTTP_PROXY / HTTPS_PROXY environment variables for outbound requests in corporate or VPS environments.
Key distinction: The built-in LAST30DAYS_API_MODE=proxy setting is a paid API gateway for hosted providers (ScrapeCreators, xAI, Serper)—it does not route local yt-dlp or free public data sources through a network proxy. If you run last30days-skill on a cloud VPS (AWS, DigitalOcean, GCP) or behind a corporate firewall where datacenter IPs face strict YouTube verification, you need a dedicated authenticated SOCKS5 or HTTP proxy.
1. LAST30DAYS_API_MODE=proxy vs. YOUTUBE_PROXY vs. Global HTTP_PROXY
Many developers confuse the official API proxy mode with network-level IP routing. They solve completely different problems and can be used together in a hybrid setup.
Configuration Method |
Layer |
What Traffic It Routes |
Primary Use Case |
Where to Configure |
|---|---|---|---|---|
LAST30DAYS_API_MODE=proxy |
Application (API Gateway) |
Paid providers only (ScrapeCreators, xAI, Serper/Parallel) |
Accessing multiple paid data APIs with a single Last30Days API key |
Process environment variables |
YOUTUBE_PROXY |
Network ( yt-dlp only) |
YouTube transcript and metadata requests via yt-dlp |
Resolving cloud VPS datacenter IP restrictions on YouTube without spending paid API credits |
~/.config/last30days/.env |
HTTP_PROXY / HTTPS_PROXY |
System / Runtime |
Standard HTTP clients that honor system proxy variables |
Routing outbound traffic through a corporate gateway or static residential proxy |
Shell profile / Process env |
2. Production Configuration: Authenticated SOCKS5 & HTTP in .env
The official documentation shows local loopback examples like 127.0.0.1:1080. However, when deploying last30days-skill on a remote Linux VPS, Docker container, or CI/CD runner with Claude Code or Codex, there is no local proxy client running on 127.0.0.1. You must point YOUTUBE_PROXY to an authenticated remote proxy endpoint.
Step A: Edit ~/.config/last30days/.env
# ==========================================
# 1. Dedicated SOCKS5 Proxy for YouTube (yt-dlp)
# ==========================================
LAST30DAYS_YOUTUBE_BACKEND=yt-dlp
# Use socks5h:// to resolve DNS through the proxy (recommended for VPS/remote servers)
YOUTUBE_PROXY=socks5h://your_username:your_password@proxy.socks5.io:1080
# Or use HTTP/HTTPS proxy format:
# YOUTUBE_PROXY=http://your_username:your_password@proxy.socks5.io:8080
# ==========================================
# 2. Conservative Pacing for Free Public Sources
# ==========================================
# Reduce keyless Reddit request rate to minimize 429 errors cleanly
LAST30DAYS_REDDIT_KEYLESS_RATE=0.5
# Optional: Use ScrapeCreators as primary backend for Reddit/Socials
# SCRAPECREATORS_API_KEY=your_scrapecreators_key
# LAST30DAYS_REDDIT_BACKEND=scrapecreators
Step B: Global Proxy for Corporate Networks & VPS Shells
If your server requires all outbound Python/Node traffic to pass through a network gateway, export the standard environment variables before launching your coding agent (claude, codex, or CLI).
macOS / Linux (Bash/Zsh):
export HTTP_PROXY="http://your_username:your_password@proxy.socks5.io:8080"
export HTTPS_PROXY="http://your_username:your_password@proxy.socks5.io:8080"
export NO_PROXY="localhost,127.0.0.1"
Windows (PowerShell):
$env:HTTP_PROXY="http://your_username:your_password@proxy.socks5.io:8080"
$env:HTTPS_PROXY="http://your_username:your_password@proxy.socks5.io:8080"
$env:NO_PROXY="localhost,127.0.0.1"
Tip (
socks5://vs.socks5h://): Always prefersocks5h://when configuringYOUTUBE_PROXYon a remote server. Thehflag forces DNS resolution to happen on the proxy server rather than your local VPS, preventing DNS leaks and regional routing mismatches.
3. Component Compatibility Matrix
Because last30days-skill orchestrates multiple backends (Python HTTP clients, yt-dlp, and external APIs), global HTTP_PROXY variables do not behave identically across every module.
Data Source / Module |
Respects LAST30DAYS_API_MODE=proxy |
Respects YOUTUBE_PROXY |
Respects Global HTTP_PROXY |
Recommended Setup |
|---|---|---|---|---|
YouTube ( yt-dlp) |
No (unless routed via ScrapeCreators) |
Yes (Native) |
Partial (overridden by YOUTUBE_PROXY) |
Dedicated Static Residential SOCKS5 via YOUTUBE_PROXY |
Reddit (Public Keyless) |
No |
No |
Yes (Standard Python client) |
Direct + LAST30DAYS_REDDIT_KEYLESS_RATE=0.5 |
Hacker News / GitHub / Polymarket |
No |
No |
Yes (Standard Python client) |
Direct connection (no proxy needed) |
ScrapeCreators / xAI / Serper |
Yes |
No |
Yes |
Official API Proxy Mode or Direct API Key |
(Note: Behavior verified against last30days-skill v4.4.x CLI architecture. Direct provider keys take precedence over LAST30DAYS_API_MODE=proxy.)
4. Recommended Hybrid Architecture (Cost & Reliability)
Routing every single request through a commercial residential proxy wastes bandwidth on public APIs like GitHub and Hacker News. For production market research and localization QA, use a Hybrid Setup:
- Paid Providers → Official API Proxy (
LAST30DAYS_API_MODE=proxy): Keep paid API billing centralized without managing separate keys. - YouTube (
yt-dlp) → Static Residential SOCKS5 (YOUTUBE_PROXY): Datacenter IPs on AWS/GCP frequently failyt-dlpcaption extraction. A single YouTube proxy running over static residential SOCKS5 keepsyt-dlpfast and reliable without burning paid ScrapeCreators credits. - Public Sources (HN, GitHub, Polymarket, Reddit Keyless) → Direct + Pacing: Keep these local with conservative rate limits (
LAST30DAYS_REDDIT_KEYLESS_RATE=0.5) and built-in caching.
Need a reliable SOCKS5 endpoint for
YOUTUBE_PROXY? socks5.io provides compliant Static Residential Proxies with native SOCKS5 support, ideal for cloud-hosted AI research agents, automated QA, and localized market intelligence. Explore Static Residential Plans →
5. Common Troubleshooting & Pitfalls
1. Special Characters in Proxy Passwords
If your proxy password contains @, :, #, or %, yt-dlp and Python’s URL parser will fail to parse YOUTUBE_PROXY. Always URL-encode special characters:
@→%40:→%3A#→%23
2. Verifying Your SOCKS5 Endpoint Before Running last30days-skill
Test your proxy directly from the same VPS or terminal using curl to confirm authentication and exit IP location:
curl -x socks5h://your_username:your_password@proxy.socks5.io:1080 https://api.ipify.org?format=json
If this returns your static residential IP address in JSON format, your credentials and firewall rules are ready for YOUTUBE_PROXY. You can also verify your current exit IP and location quickly using our free What’s My IP checker.
3. LAST30DAYS_API_MODE=proxy Variables Not Loading
Unlike YOUTUBE_PROXY, the three API proxy variables (LAST30DAYS_API_MODE, LAST30DAYS_API_KEY, LAST30DAYS_API_BASE) should be exported in your process environment rather than relying solely on .env files, especially when invoking the skill inside Claude Code or Codex sub-shells.











