Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
doroved committed Dec 4, 2024
1 parent f3847b2 commit f1f148c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Proxer

> **Subscribe to us on [Telegram](https://t.me/macproxer) to receive notifications about new versions and updates.**
Proxying TCP traffic on macOS with domain filtering via UI

![proxer screenshot](proxer.png)
Expand All @@ -26,7 +28,3 @@ In the future, releases will be signed with a certificate, and you will be able
```bash
curl -fsSL https://raw.githubusercontent.com/doroved/proxer/main/install.sh | bash
```

## Links

[Proxer Channel TG](https://t.me/macproxer) - subscribe to not miss important updates.
39 changes: 39 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# Check architecture
arch=$(uname -m)
if [[ "$arch" != "x86_64" && "$arch" != "arm64" ]]; then
echo "Error: Unsupported architecture $arch. Exiting script."
exit 1
fi

# Determine the appropriate architecture for the orb command
if [ "$arch" = "arm64" ]; then
short_arch="aarch64"
else
short_arch="x64"
fi

# Get version from API
version=$(curl -s "https://api.github.com/repos/doroved/proxer/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's/^v//')

# Name of the downloaded file
downloaded_file="proxer_${version}_${short_arch}.dmg"

# Download the file
curl -OL "https://github.com/doroved/proxer/releases/download/v${version}/$downloaded_file"

# Check if the file exists in ~/Downloads, if not - move it
if [ ! -f "$HOME/Downloads/$downloaded_file" ]; then
mv "$downloaded_file" "$HOME/Downloads/"
echo "File moved to ~/Downloads/"
fi

# Remove quarantine from the file
if xattr "$HOME/Downloads/$downloaded_file" | grep -q "com.apple.quarantine"; then
xattr -d com.apple.quarantine "$HOME/Downloads/$downloaded_file"
echo "Quarantine removed from file $HOME/Downloads/$downloaded_file"
fi

# Run the file
open "$HOME/Downloads/$downloaded_file"

0 comments on commit f1f148c

Please sign in to comment.