# Quick Start Guide for MacOS ## ๐Ÿš€ Get Started in 3 Steps ### 1. **Clone and Navigate** ```bash git clone cd zapret ``` ### 2. **Test Your System** ```bash # Test architecture detection ./scripts/test_macos_arch.sh # Test architecture management ./scripts/macos_arch_detect.sh detect ``` ### 3. **Build and Install** ```bash # Build for your architecture (automatic detection) make mac # Or build universal binary for both architectures make mac-universal # Install ./install_easy.sh ``` ## ๐Ÿ” What Happens Automatically - **Architecture Detection**: Scripts detect Intel vs Apple Silicon - **Target Setting**: Correct compilation targets are set - **Binary Selection**: Appropriate binaries are installed - **Configuration**: System is configured for your MacOS version ## ๐Ÿ› ๏ธ Manual Override (Optional) If you want to build for a specific architecture: ```bash # For Intel Macs export MACOS_TARGET="x86_64-apple-macos10.8" make mac # For Apple Silicon export MACOS_TARGET="arm64-apple-macos10.8" make mac ``` ## ๐Ÿ“ฑ Supported MacOS Versions - **Minimum**: macOS 10.8 (Mountain Lion) - **Recommended**: macOS 11+ (Big Sur) - **Latest**: macOS 14+ (Sonoma) ## ๐Ÿงช Testing Your Installation ```bash # Check if binaries are working ./binaries/my/tpws --version ./binaries/my/ip2net --help # Test the service sudo /opt/zapret/init.d/macos/zapret start sudo /opt/zapret/init.d/macos/zapret status ``` ## ๐Ÿ†˜ Troubleshooting ### Common Issues 1. **"Command not found: make"** ```bash xcode-select --install ``` 2. **"Permission denied"** ```bash chmod +x scripts/*.sh ``` 3. **"Architecture mismatch"** ```bash make clean make mac ``` ### Get Help - **Documentation**: `docs/MACOS_REFACTORING.md` - **Test Script**: `./scripts/test_macos_arch.sh` - **Architecture Script**: `./scripts/macos_arch_detect.sh help` ## ๐ŸŽฏ What You Get - โœ… **Automatic Detection** - No manual configuration - โœ… **Cross-Architecture** - Works on Intel and Apple Silicon - โœ… **Universal Support** - Single binary for both architectures - โœ… **Performance Optimized** - Native for your architecture - โœ… **Easy Installation** - One-command setup ## ๐Ÿ”„ Next Steps After successful installation: 1. **Configure**: Edit `/opt/zapret/config` 2. **Start Service**: `sudo /opt/zapret/init.d/macos/zapret start` 3. **Test**: Verify traffic is being processed 4. **Customize**: Add custom rules as needed --- **Need More Details?** See `docs/MACOS_REFACTORING.md` for comprehensive information.