Skip to content

Repository files navigation

🚀 NetworkOptimizer

Fast, simple network optimization for macOS.

Maximize speed • Minimize latency • Zero buffering


📋 Table of Contents


⚡ Features

FeatureWhat it does
TCP Optimization4MB buffers, disabled delayed ACK for low latency
DNS OptimizationCloudflare 1.1.1.1 - fastest public DNS
VPN IntegrationCloudflare WARP with MASQUE/HTTP3 protocol
Firewall HardeningStealth mode, block unsolicited connections
Boot OptimizationAuto-apply settings on login (optional)
CLI ToolSimple netopt command for all controls

📦 Requirements

  • macOS Sonoma 14.x or later
  • Cloudflare WARP (optional, for VPN features): Download here
  • Admin access (for network settings)

🔧 Installation

Step 1: Clone the Repository

git clone https://github.com/Adi-gitX/NetworkOptimizer.git
cd NetworkOptimizer

Step 2: Make Scripts Executable

chmod +x scripts/*.sh scripts/netopt tools/*.sh

Step 3: Install CLI Tool (Recommended)

sudo cp scripts/netopt /usr/local/bin/netopt
sudo chmod +x /usr/local/bin/netopt

Now you can use netopt from anywhere!

Step 4: Enable Auto-Start on Boot (Optional)

# Copy the plist file
cp launchd/com.networkoptimizer.boot.plist ~/Library/LaunchAgents/
# Load it
launchctl load ~/Library/LaunchAgents/com.networkoptimizer.boot.plist

🚀 Quick Start

One Command Optimization

# If netopt installed globally:
netopt start
# Or run directly:
./scripts/netopt start

This applies ALL optimizations:

  • ✓ TCP buffers set to 4MB
  • ✓ Delayed ACK disabled
  • ✓ DNS set to Cloudflare 1.1.1.1
  • ✓ VPN connected (if WARP installed)
  • ✓ Firewall enabled with stealth mode

Check Status

netopt status

Run Speed Test

netopt speed

Stop Everything

netopt stop

📖 Usage

CLI Commands

netopt <command> [option]
CommandDescription
netopt startApply all optimizations
netopt stopStop VPN and reset DNS
netopt statusShow current network status
netopt speedRun speed and latency tests
netopt vpn on/off/statusControl VPN
netopt dns cloudflare/google/autoChange DNS server
netopt tcp apply/reset/statusControl TCP settings
netopt firewall on/off/stealthControl firewall
netopt resetReset everything to defaults
netopt helpShow help

Examples

# Connect VPN only
netopt vpn on
# Switch to Google DNS
netopt dns google
# Enable stealth firewall
netopt firewall stealth
# Check everything
netopt status

📁 Project Structure

NetworkOptimizer/
├── README.md # This file
├── LICENSE # MIT License
├── .gitignore # Git ignore rules
│
├── scripts/ # All scripts
│ ├── netopt # 🔥 Main CLI tool
│ ├── full-optimize.sh # Apply all optimizations
│ ├── tcp-optimize.sh # TCP/IP tuning
│ ├── dns-setup.sh # DNS configuration
│ ├── warp-config.sh # WARP VPN setup
│ ├── network-reset.sh # Reset network
│ ├── speed-test.sh # Speed testing
│ ├── health-check.sh # Diagnostics
│ └── network-boot.sh # Boot script
│
├── configs/ # Configuration files
│ ├── sysctl.conf # Persistent TCP settings
│ └── chrome-policies.json # Browser DNS bypass
│
├── launchd/ # Auto-start on boot
│ └── com.networkoptimizer.boot.plist
│
├── tools/ # Utilities
│ └── network-monitor.sh # Real-time monitoring
│
└── docs/ # Documentation
├── QUICK_START.md
├── TROUBLESHOOTING.md
├── SECURITY.md
└── BENCHMARKS.md

📜 Scripts Reference

Main CLI: netopt

The all-in-one command-line tool. Supports all network optimization features.

netopt start # Full optimization
netopt stop # Stop and reset
netopt status # View status
netopt speed # Speed test

Individual Scripts

ScriptPurpose
tcp-optimize.shApply TCP buffer and latency optimizations
dns-setup.shConfigure DNS (Cloudflare/Google/Auto)
warp-config.shConfigure WARP VPN with MASQUE
network-reset.shReset network and reconnect
speed-test.shComprehensive speed testing
health-check.shDiagnose network issues
full-optimize.shRun all optimizations at once

📊 Expected Results

MetricBeforeAfter
DNS Resolution50-100ms10-20ms
Network Latency50-80ms15-25ms
Packet Loss0.5-2%<0.1%
Download Speed80-90%95-100%
BufferingFrequentNone

🔧 Troubleshooting

VPN won't connect

# Check WARP status
warp-cli status
# Try tunnel-only mode
warp-cli mode tunnel_only
warp-cli connect

DNS not working

# Flush DNS cache
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
# Re-apply DNS
netopt dns cloudflare

Settings reset after reboot

# Make TCP settings persistent
sudo cp configs/sysctl.conf /etc/sysctl.conf
# Or enable auto-start
launchctl load ~/Library/LaunchAgents/com.networkoptimizer.boot.plist

Need to reset everything

netopt reset

See docs/TROUBLESHOOTING.md for more help.


🗑️ Uninstall

# Remove global CLI
sudo rm /usr/local/bin/netopt
# Remove auto-start
launchctl unload ~/Library/LaunchAgents/com.networkoptimizer.boot.plist
rm ~/Library/LaunchAgents/com.networkoptimizer.boot.plist
# Reset network to defaults
netopt reset
# or manually:
sudo networksetup -setdnsservers Wi-Fi Empty

📄 License

MIT License - see LICENSE


🙏 Credits

  • Cloudflare for WARP and 1.1.1.1
  • The macOS networking community

Made with ❤️ for faster networks

About

Fix VPN config and optimize network

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages