-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:geph-official/geph5
- Loading branch information
Showing
3 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# AppleScript to request administrator privileges and run the script | ||
osascript -e 'do shell script " | ||
# Get the list of network services | ||
network_services=$(networksetup -listallnetworkservices | tail -n +2) | ||
# Loop through each line using read | ||
while IFS= read -r service; do | ||
# Set HTTP and HTTPS proxies | ||
networksetup -setwebproxy "$service" "$proxy_server" $port | ||
networksetup -setwebproxystate "$service" on | ||
networksetup -setsecurewebproxy "$service" "$proxy_server" $port | ||
networksetup -setsecurewebproxystate "$service" on | ||
done <<< "$network_services" | ||
networksetup -setwebproxy \"$service\" \"$proxy_server\" $port | ||
networksetup -setwebproxystate \"$service\" on | ||
networksetup -setsecurewebproxy \"$service\" \"$proxy_server\" $port | ||
networksetup -setsecurewebproxystate \"$service\" on | ||
done <<< \"$network_services\" | ||
" with administrator privileges' | ||
|
||
# Note: You need to define the variables $proxy_server and $port before running the script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# AppleScript to request administrator privileges and run the script | ||
osascript -e 'do shell script " | ||
# Get the list of network services | ||
network_services=$(networksetup -listallnetworkservices | tail -n +2) | ||
# Loop through each line using read | ||
while IFS= read -r service; do | ||
# Disable HTTP and HTTPS proxies | ||
networksetup -setwebproxystate "$service" off | ||
networksetup -setsecurewebproxystate "$service" off | ||
done <<< "$network_services" | ||
networksetup -setwebproxystate \"$service\" off | ||
networksetup -setsecurewebproxystate \"$service\" off | ||
done <<< \"$network_services\" | ||
" with administrator privileges' |