Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Detect whether my proxy is on?

Detect whether my proxy is on?
Thread Tools
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
May 30, 2003, 11:35 PM
 
I'm writing an AppleScript and I'd like to be able to tell whether my proxy settings (in Network) are on or off.

Is there a way I can do this by either using a unix command or maybe using defaults to read the current setting (I can't find the Network preferences anywhere).

Thanks in advance.
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
May 30, 2003, 11:54 PM
 
Originally posted by Xeo:
I'm writing an AppleScript and I'd like to be able to tell whether my proxy settings (in Network) are on or off.

Is there a way I can do this by either using a unix command or maybe using defaults to read the current setting (I can't find the Network preferences anywhere).

Thanks in advance.
I'm not sure how easy it is going to be to AppleScript this, but you can find out the System Configuration for this kind of thing using the command line utility scutil.

Here's an example of using it:
Code:
% scutil > open > get Setup:/Network/Service/0/Proxies > d.show <dictionary> { HTTPSPort : 3128 RTSPEnable : 0 HTTPSEnable : 1 HTTPProxy : proxy.my.local.domain ExceptionsList : <array> { 0 : *.my.local.domain 1 : my.local.domain } HTTPPort : 3128 SOCKSProxy : proxy.my.local.domain FTPPassive : 1 HTTPEnable : 1 FTPProxy : proxy.my.local.domain SOCKSEnable : 1 FTPPort : 3128 SOCKSPort : 1080 GopherEnable : 0 FTPEnable : 1 HTTPSProxy : proxy.my.local.domain } > quit %
Could be interesting trying to script it, but it does tell you the information you need.

- proton
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:09 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2