Adium

Opened 15 years ago

Closed 10 years ago

Last modified 9 years ago

#224 closed defect (fixed)

proxy fails to work when network adapter has "Configure Proxies" set to "Using a PAC file"

Reported by: bradl001@hotmail.com Owned by: nobody
Milestone: Adium 1.4 Component: Adium Core
Version: 0.81 Severity: normal
Keywords: proxy, NeedsRadar Cc:
Patch Status:

Description

I am using OS 10.4.1 on a Ti PowerBook with 1GB RAM. My network location (in System Preferences) has "Configure Proxies" set to "Using a PAC file". When this condition is set and an account in Adium is setup to use "Systemwide HTTP Settings", the account cannot connect. I've tried this with AOL IM but I believe it's affecting all account types.

The workaround is to change "Configure Proxies" to "Manually" and then individually set the web and secure web proxies for Adium to connect.

Is it possible for Adium to use the specified PAC file to get the proxy information?

Change History (25)

comment:1 Changed 14 years ago by catfish_man

  • Milestone changed from Adium X 0.90 (Old) to Adium X 0.90

I can't tell if this is valid or not, so -> 0.9

More info is welcome

comment:2 Changed 14 years ago by Ksilebo

Perhaps your HTTP proxy does not allow IM services to go through it, or you need to set it to use Systemwide SOCKS4 settings, rather than HTTP.

comment:3 Changed 14 years ago by Evil Monkey

The problem remains in 10.4.3 and Adium 0.86. To be fair Adium isn't the only program that doesn't behave when it comes to PAC, but you guys really can do better.

A lot of times it is not up to the end user to decide what kind of proxy to use, so that SOCKS4 comment isn't really helpful.

comment:4 Changed 14 years ago by bradl001@…

My apologies for the delay. I am able to use IM with our HTTP proxies. We use PAC but I can work around the issue by manually setting proxies in Adium. My ideal situation is to have Adium use any of the network settings in System Preferences.

comment:5 Changed 14 years ago by bihiiREMOVE@…

I have exactly the same behaviour with 10.4.3 and Adium 0.87. Using HTTP proxy with proper values work whereas using Systemwide HTTP settings won't work. Manually changing settings works fine anyway.
You can also replace the use of a PAC file by manually entering proxies in network preferences (in System Preferences), then choosing Systemwide HTTP settings in Adium will work.

comment:6 Changed 14 years ago by evands

  • field_haspatch set to 0

I need sample PAC files to test an implementation of this. Please attach PAC files to this ticket.

comment:7 Changed 14 years ago by evands

  • Milestone Adium X 1.0 deleted

Unfortunately there's no public API for actually processing PAC files, though we can determine that one is in use as well as the URL for it. Apparently PAC files are Javascript which must be executed and evaluated... cute. And evil. I'll commit the code to AISystemNetworkDefaults which retrieves the URL for a PAC file; any interested coder is encouraged to wrtie a patch to make use of that URL, as I will not be working further on the issue unless Apple provides a public API.

comment:8 Changed 14 years ago by evands

(In [14815]) We now throw up an alert if reading proxy information would have depended upon processing a PAC file, which we can't do at this time. Refs #224.

comment:9 Changed 14 years ago by catfish_man

  • Keywords NeedsRadar added
  • Milestone set to Waiting on Apple

comment:10 in reply to: ↑ description Changed 13 years ago by adium

It's interesting how, for instance, automatic updates work fine using PAC files. There apparently is an API for making HTTP requests from Apple already, and it is in use somewhere within Adium. Just not for the "Proxy" settings.

FYI, this bug is still in existence (even though nobody seems to care) on Adium 0.89.1 w/ MacOS X 10.4.7. Using CFNetwork will support the PAC (or any other proxy settings) automatically. Perhaps the proxy code in Adium doesn't use CFNetwork? Good place to start looking.

comment:11 follow-up: Changed 13 years ago by evands

No, proxy code in Adium does not and can not use CFNetwork for performing the actual connect request,since that goes through the protocol libraries -- libgaim, joscar, etc. If you can provide code which queries CFNetwork and returns the proper proxy configuration (including using the PAC file), I will be thrilled to commit it.

Saying that "Nobody seems to care" is at complete odds with the fact I spent many, many hours working on this problem in January - a problem which has no impact on me or any other Adium developer directly.

The fact that I was unable to solve the problem doesn't mean it can't be done. I await a patch.

comment:12 in reply to: ↑ 11 Changed 13 years ago by chris@…

Yow... I didn't mean it that way, I'm sure we all appreciate the work going into it from Adium developers, especially those who work in big faceless corporations in which PAC files are the norm. By "Nobody seems to care" I meant that most people using Adium don't have to use PAC files on a daily basis. Out of the gazillions of people using Adium only a handfull of people have complained about this particular issue.

A quick google search finds this thread: http://lists.apple.com/archives/Macnetworkprog/2005/Aug/msg00010.html

"If you are writing a Cocoa app you can use a hidden WebView's stringByEvaluatingJavaScriptInString: to execute a PAC file."

There is apparently an rdar ticket out there that tracks the problem of not having a way to get a proxy back from a PAC-based configuration (there really should be as you suggest). But embedding a "hidden" web browser (even webkit based) is probably a lot more overhead than is needed given the relative lack of interest (by users of Adium, not the developers) in support for this feature. Given the above, a status of "Waiting on Apple" seems most appropriate. I was just trying to help since the built-in PAC-parsing capabilities of CFNetwork hadn't been mentioned in this ticket.

comment:13 Changed 13 years ago by mieslep

Still in 10.4.8, not surprising. But as I'm a new Mac user, add me to the list of 'somebodies who care' about this one.

comment:14 Changed 12 years ago by djmori

comment:15 Changed 11 years ago by bassclef

In 10.5 Apple snuck in a Cocoa API for evaluating the proxy when it's a PAC file.

CFNetworkCopyProxiesForAutoConfigurationScript()

See http://developer.apple.com/releasenotes/Networking/RN-CFNetwork/index.html for more info. That page says it is 10.5 only: I don't know which release of Adium is dropping 10.4 support.

There are other pages out there that discuss calling the javascript directly but this new API seems to add exactly what you were looking for in 2006. (be interested in your thoughts anyhow).

I obviously have a workaround for this one but it would be nice to get it off the list eventually.

comment:16 follow-up: Changed 11 years ago by evands

  • Resolution set to fixed
  • Status changed from new to closed

(In [25577]) This might implement PAC support for proxy configuration. Fixes #224 if so. Fixes #11364 if so.

Needs testing.... I use neither a proxy nor a PAC file and can't test it. :)

comment:17 Changed 11 years ago by Robby

  • Milestone changed from Waiting on Apple to Adium 1.4
  • Patch Status set to None
  • pending set to 0

comment:18 in reply to: ↑ 16 Changed 11 years ago by phoage

Doesn't appear to resolve the issue... as a matter of fact, it crashes with the 1.4svn build.

comment:19 Changed 11 years ago by Robby

  • Resolution fixed deleted
  • Status changed from closed to reopened

Thanks for the update.

comment:20 Changed 11 years ago by zacw

  • Component changed from AIM to Adium Core

comment:21 Changed 11 years ago by zacw

  • Milestone changed from Adium 1.4 to Adium 1.4.x

comment:22 Changed 10 years ago by Zachary West <zacw@…>

  • Resolution set to fixed
  • Status changed from new to closed

(In 017d57eb42f8) Use the account's hostname when looking up the proxy information, so we can use the host when looking for a PAC file. Fixes #224.

comment:23 Changed 10 years ago by zacw

  • Milestone changed from Adium 1.4.x to Adium 1.4

comment:24 Changed 9 years ago by Robby

Ticket #13769 has been marked as a duplicate of this ticket.

comment:25 Changed 9 years ago by jas8522

Ticket #14435 has been marked as a duplicate of this ticket.

Note: See TracTickets for help on using tickets.