Legacy Browser Compatibility Proxy β Transform modern web content for older devices like iPads and iPods running iOS 9+.
Give your old iPad 2, iPad Mini, or iPod Touch a second life by making modern websites work again!
- π§ JavaScript Transpilation β Babel transforms modern JS (optional chaining, nullish coalescing, async/await) to ES5/ES6
- π¨ CSS Transformation β PostCSS adds vendor prefixes and transforms modern CSS features
- π HTML Modification β Injects polyfills and can remove ads/tracking scripts
- π HTTPS Interception β Transparent SSL/TLS interception with auto-generated certificates
- 𧦠SOCKS5 Proxy β Device-wide traffic routing (recommended for iOS)
- π HTTP Proxy β Alternative proxy method
- π¦ Smart Caching β Memory + disk caching for faster repeat visits
- π User-Agent Spoofing β Bypass browser detection (optional)
- π« Ad & Tracking Removal β Block common ad networks and trackers
- π± Easy Setup β Built-in captive portal for certificate installation
- Promise.finally, Promise.allSettled β Modern Promise methods
- fetch API β Full fetch/Headers/Response polyfill
- IntersectionObserver β Lazy loading support
- ResizeObserver β Element resize detection
- MutationObserver β DOM mutation detection (enhanced)
- WeakMap/WeakSet β Weak reference collections
- Web Components β Custom Elements v1 and basic Shadow DOM
- Intl API β Basic DateTimeFormat and NumberFormat
- Service Worker Bypass β Disables SW registration for compatibility
- Lazy Loading β Polyfill for
loading="lazy"attribute
- CSS Grid β Flexbox Fallback β Auto-generate flexbox fallbacks for CSS Grid
- Dark Mode Stripping β Remove
prefers-color-schememedia queries - Vendor Prefixes β Automatic -webkit- prefixes for Safari 9
- π Metrics Dashboard β Real-time web UI at
/__revamp__/metrics - π³ Docker Support β Production and development Dockerfiles
- π PAC File Generation β Auto-generate proxy config files
- βοΈ External Config β JSON config for blocked domains
- π§΅ Babel Worker Pool β JavaScript transforms run in parallel worker threads via tinypool
- β‘ Async Compression β Non-blocking gzip compression/decompression
- ποΈ Configurable Compression β Adjustable gzip level (1-9) for speed vs size tradeoff
- π Up to 9x speedup β Parallel compression achieves significant performance gains
# Clone the repository
git clone https://github.com/lifeart/revamp.git
cd revamp
# Install dependencies (pnpm recommended)
pnpm install
# Start the proxy
pnpm start
# Or in development mode (auto-reload)
pnpm dev# Build and run with Docker
docker build -t revamp .
docker run -p 1080:1080 -p 8080:8080 -p 8888:8888 revamp
# Or use Docker Compose
docker-compose up -d
# Development mode with hot-reload
docker-compose --profile dev up revamp-dev- Start Revamp on your computer
- Open the setup page on your legacy device:
- Navigate to
http://YOUR_COMPUTER_IP:8888
- Navigate to
- Install the certificate and enable trust (see detailed instructions below)
- Configure proxy in Wi-Fi settings
When you start Revamp, a CA certificate is generated at .revamp-certs/ca.crt.
On iOS:
- Open
http://YOUR_COMPUTER_IP:8888in Safari - Tap "Download Certificate"
- Go to Settings β General β VPN & Device Management
- Install the downloaded profile
- Go to Settings β General β About β Certificate Trust Settings
- Enable full trust for "Revamp Proxy CA"
On macOS:
- Open the
.revamp-certs/ca.crtfile - Add to Keychain Access
- Find "Revamp Proxy CA", double-click, expand Trust
- Set "When using this certificate" to "Always Trust"
SOCKS5 (Recommended for iOS):
- Settings β Wi-Fi β [Your Network] β Configure Proxy
- Select Manual
- Server:
YOUR_COMPUTER_IP - Port:
1080
HTTP Proxy (Alternative):
- Server:
YOUR_COMPUTER_IP - Port:
8080
Edit src/config/index.ts or pass options when creating the server:
import { createRevampServer } from "revamp";
const server = createRevampServer({
// Server ports
socks5Port: 1080,
httpProxyPort: 8080,
captivePortalPort: 8888,
// Target browsers (Browserslist format)
targets: ["safari 9", "ios 9"],
// Feature toggles
transformJs: true, // Babel transpilation
transformCss: true, // PostCSS transformation
transformHtml: true, // HTML polyfill injection
removeAds: true, // Block ad domains
removeTracking: true, // Block tracking domains
injectPolyfills: true, // Add polyfills for missing APIs
spoofUserAgent: true, // Send modern User-Agent to servers
spoofUserAgentInJs: true, // Override navigator.userAgent
// Cache settings
cacheEnabled: true,
cacheTTL: 3600, // seconds
// Performance tuning
compressionLevel: 4, // gzip level 1-9 (1=fastest, 9=smallest)
});
server.start();You can change settings at runtime via the config API:
// From your legacy device's browser console or code:
fetch("http://any-proxied-site/__revamp__/config", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
transformJs: false, // Disable JS transformation
removeAds: false, // Allow ads
}),
});βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Legacy Device ββββββΆβ SOCKS5 Proxy ββββββΆβ Target Server β
β (iOS 9+) β β (port 1080) β β β
βββββββββββββββββββ ββββββββββ¬βββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β Transformation Pipeline β
βββββββββββββββββββββββββββββββββββββββββββ€
β 1. Intercept request β
β 2. Check cache β
β 3. Fetch from origin server β
β 4. Transform content: β
β β’ JS β Babel (ES5/ES6) β
β β’ CSS β PostCSS (prefixes) β
β β’ HTML β Cheerio (polyfills) β
β 5. Cache transformed result β
β 6. Return to client β
βββββββββββββββββββββββββββββββββββββββββββ
src/
βββ index.ts # Main entry point
βββ config/ # Configuration management
β βββ index.ts # Config defaults and getters
β βββ client-options.ts # Single source of truth for client options
βββ proxy/ # Proxy servers
β βββ http-proxy.ts # HTTP/HTTPS proxy
β βββ socks5.ts # SOCKS5 proxy
β βββ socks5-protocol.ts # SOCKS5 protocol implementation
β βββ http-client.ts # HTTP request utilities
β βββ shared.ts # Shared utilities
β βββ revamp-api.ts # API endpoint handler
β βββ types.ts # Type definitions
βββ transformers/ # Content transformation
β βββ js.ts # JavaScript (Babel worker pool)
β βββ js-worker.ts # Babel worker thread
β βββ css.ts # CSS (PostCSS)
β βββ css-grid-fallback.ts # CSS Grid β Flexbox
β βββ dark-mode-strip.ts # Dark mode CSS removal
β βββ html.ts # HTML (Cheerio)
β βββ image.ts # Image optimization
β βββ polyfills/ # 25+ polyfill scripts
βββ metrics/ # Metrics collection
βββ pac/ # PAC file generation
βββ cache/ # Caching system
βββ certs/ # Certificate generation
βββ portal/ # Captive portal
βββ benchmarks/ # Performance benchmarks
tests/ # E2E tests (Playwright)
config/ # External configuration (blocked domains)
All API endpoints are available on any proxied domain at /__revamp__/*:
| Endpoint | Description |
|---|---|
/__revamp__/config |
GET/POST/DELETE proxy configuration |
/__revamp__/metrics |
HTML metrics dashboard |
/__revamp__/metrics/json |
JSON metrics data |
/__revamp__/pac/socks5 |
SOCKS5 PAC file download |
/__revamp__/pac/http |
HTTP PAC file download |
/__revamp__/pac/combined |
Combined PAC file download |
Access real-time statistics at http://any-proxied-site/__revamp__/metrics:
- Uptime and connection stats
- Cache hit rate
- Transformation counts (JS/CSS/HTML/Images)
- Bandwidth usage
- Blocked requests count
PAC (Proxy Auto-Config) files make device setup easier:
# Get PAC file URL for iOS configuration
http://YOUR_COMPUTER_IP:8888/__revamp__/pac/socks5Configure iOS: Settings β Wi-Fi β [Network] β Configure Proxy β Automatic β Enter PAC URL
# Unit tests
pnpm test:unit # Watch mode
pnpm test:unit:run # Single run
# E2E tests
pnpm test # Run all
pnpm test:headed # With browser
pnpm test:ui # Interactive mode
# Type checking
pnpm typecheck
# Performance benchmarks
pnpm build && pnpm tsx src/benchmarks/parallel-transform.tsOn a typical machine (8-core CPU), parallel performance improvements:
| Operation | Sequential | Parallel | Speedup |
|---|---|---|---|
| JS Transform | ~42ms | ~40ms | 1.05x |
| CSS Transform | ~5ms | ~4ms | 1.37x |
| Gzip Compress | ~0.4ms | ~0.04ms | 9.36x |
| Gzip Decompress | ~0.06ms | ~0.04ms | 1.52x |
The worker pool's main benefit is keeping the main event loop responsive during heavy concurrent load, preventing request queuing and latency spikes.
"Not Trusted" warning:
- Ensure you've enabled trust in Settings β General β About β Certificate Trust Settings
- Try regenerating certificates: delete
.revamp-certs/and restart
Certificate won't install:
- Make sure you're using Safari (not Chrome) on iOS
- The certificate must be downloaded via HTTP, not HTTPS
Can't connect to proxy:
- Verify your computer's IP address
- Check firewall settings (ports 1080, 8080, 8888)
- Ensure both devices are on the same network
Websites not loading:
- Check the Revamp console for errors
- Some sites may have additional protections
- Try disabling transformations to isolate issues
Slow page loads:
- Enable caching if disabled
- Consider disabling transformations for specific sites
- Check available disk space for cache
| Package | Purpose |
|---|---|
@babel/core |
JavaScript transpilation |
postcss |
CSS transformation |
cheerio |
HTML parsing/manipulation |
node-forge |
Certificate generation |
sharp |
Image optimization |
tinypool |
Worker thread pool for parallel transforms |
Contributions are welcome! Please read our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
MIT Β© Alex Kanunnikov
- Babel team for the amazing transpiler
- PostCSS team for CSS tooling
- node-forge for certificate generation
- All contributors and users!
Give your old devices new life! π