Leopard Lion Mavericks Monterey Snow Leopard Software

Control Skype updates and reducing traffic

Post Reply
macosx / lion     Views: 1468Prev .. Next
Control Skype updates and reduce trafficPosted: Wednesday, October 29, 2014 [04:06:25] - 1
rootPosted by:rootMember Since:
June 16 2010
Posts: 356
Since Micro$soft bought Skype, service quality is going down steady and fast.

One of the reasons is high traffic associated with Skype update procedure. Even if "Always keep Skype up to date" is not checked - according to "best Micro$oft practice" Skype still checks for updates.
Post 14569985 Image 1
How often does it check I am not sure but I have decided to track the server it connects to check for updates and it happens to be: ui.skype.com

So I decided to use /etc/hosts to deny the access:
View Code127.0.0.1 ui.skype.com
::1 ui.skype.com


In four weeks of editing hosts file my Skype experience changed for better especially when other party I am communicating with did the same on his end (he uses Mac too).
Skype is unaware of a new available software and hopefully it can stay on a version that works.
My idea of using software is: "If it aint' broke - don't fix it".

To see how to use /etc/hosts see my other post at: http://www.codemacs.com/macosx/lion/mac-os-x-lion-and-mountain-lion--etc-hosts-file-to-block-sites.3041521.htm

I also checked - new Skype version can be manually downloaded from their website and installed.There's no place like ~
RE: Control Skype updates and reduce trafficPosted: Wednesday, October 29, 2014 [04:23:22] - 2
rootPosted by:rootMember Since:
June 16 2010
Posts: 356
Here is a small Applescript to write/update /etc/hosts file:
View Codeset thepass to the text returned of (display dialog "Enter your Password to edit /etc/hosts file" default answer "")
set fdata to do shell script "echo " & "|perl -n -e 'open(F,\"</etc/hosts\");while(<F>){s/\\r|\\n//g;s/(\\n|\\r|\\x0d)//g;print\"$_\\n\";}close(F);'"
--display dialog fdata
if fdata contains "skype" then
set done to 1
else
set filetowrite to "/etc/hosts"
-- you can add more domains to block below
set fdata to fdata & "

127.0.0.1 ui.skype.com
::1 ui.skype.com
"
do shell script "cp " & filetowrite & " " & filetowrite & ".backup" with administrator privileges
delay 1
do shell script "echo " & quoted form of fdata & " > " & quoted form of filetowrite with administrator privileges
delay 1

tell application "System Events"
if not (exists process "Terminal") then
set wCounter to 1
tell application "Terminal"
activate
delay 2
end tell
else
delay 2
set wCounter to 0
tell application "Terminal"
activate
delay 2
delay 1
end tell
end if
end tell
tell application "Terminal"
activate
delay 2
tell application "System Events"
tell process "Terminal"
if wCounter < 1 then
keystroke "n" using {command down}
delay 1
end if
keystroke "k" using {command down}
delay 1
keystroke "sudo pico " & filetowrite
delay 1
keystroke return
delay 1
keystroke "a" using {command down}
delay 1
keystroke "c" using {command down}
delay 1
set screenData to (the clipboard) as text
if screenData contains "password" then
keystroke thepass
delay 2
keystroke return
delay 2
end if
keystroke return
delay 1
key code 51
delay 1
keystroke "x" using {control down}
delay 1
keystroke "y"
delay 1
keystroke return
delay 1
keystroke "hexdump -C " & filetowrite
delay 1
keystroke return
delay 2
keystroke "dscacheutil -flushcache"
delay 1
keystroke return
delay 2
end tell
end tell
end tell -- end tell Terminal
if wCounter > 0 then -- if Terminal was not active
tell application "Terminal" to quit
else -- Terminal was active
tell application "System Events"
tell process "Terminal"
keystroke "w" using {command down}
end tell
end tell
end if
end if
-- if skype word not present in /etc/hosts file


Script will automatically fire-up the Terminal for you and edit the hosts file. Although it will edit it if no word "Skype" found in /etc/hosts file.
Script will ask for your password twice. Sorry. It is dirty but it works.
I wrote it for my buddy as he is scared of Terminal.There's no place like ~
macosx / lionPrev .. Next
 
Post Reply
Home - Macosx: Leopard Lion Mavericks Monterey Snow Leopard Software
Our Telegram Group