Zotero usage with Firefox Prox Manager (Foxy Proxy) or Proxy Automatic Configuration File (pac) file

edited May 18, 2022
Hello,

I have been using firefox extension foxy proxy for a long time to access institutionaly to the digital libraries. I used to use Zotero along with it. For example to access ieexplore, I have a configuration in the foxy proxy which detects the site and activates the proxy. The digital library sites become institutional access and let to access pdf versions of the papers.

Zotero used to not care the changes in the proxy and download the pdf paper without problem. Nowadays when proxy is activated by foxy proxy, Zotero connector is losing connection with Standalone Zotero application. Why?

How can I make Zotero use the proxy defined by the Firefox Proxy Manager (Foxy Proxy)?

I am using manjaro linux. There is no predefined system proxy in the OS level. Only gateway etc. is defined for the network connection. Any help is much appreciated.
  • edited February 12, 2021
    If I'm understanding what you're asking, see https://www.zotero.org/support/kb/connector_zotero_unavailable

    Basically, 127.0.0.1 needs to be excluded from any proxying (which it should be by default in any reasonable proxy system).
  • Hello, thank you for the response. Foxy Proxy has built in black patterns which covers non routable ip addresses, all sorts of protokol localhost, 127.0.0.1 and port combinations. You are right that I have failed to activate that. Now there is always connection with the zotero extension and the application, however zotero still fails to download non-open access pdf's from ieeexplore. I can download them manually. It can download open access ones.
  • Can you provide a Debug ID from Zotero for an attempt that fails?
  • Zotero downloads abstract and the citation information but fails to download the pdfs even though I can download them manually. As I said previously, it can download open access ones
  • Well, if you're using FoxyProxy to send only specific requests within Firefox to your proxy, I'm afraid you're not going to be able to download gated files in Zotero. It's the Zotero app that performs the download, and if it doesn't have access to the PDF through your default internet connection, it won't be able to download it.

    Zotero will use a system-wide proxy when one is configured.

    When you use a web-based proxy, the Zotero Connector passes the proxied URL and the cookies that give you access to the file on to Zotero, which then performs the download.

    But if you're just selectively sending some requests to an HTTP proxy within Firefox, neither of those apply — there's no system proxy for Zotero to use, and there are also no proxied URLs and cookies.

    The standard approach here is a system-wide PAC file that tells clients whether to use a configured proxy for specific domains. Zotero will use a PAC file if one is installed.
  • Hello, thank you for the reply. Where can I find information about creating pac file for zotero, the syntax, the place to put the file etc. I need to use proxy just to access academic resources, making system wide proxy just to be able to use zotero slows me down and defeats the whole purpose. I am now temporarily using a tool called proxyman to ease switching between proxy or no proxy connections and zotero respects that. I really prefer a solution within the zotero similar to foxyproxy, using a defined proxy based on the patterns with gui interface.
  • Could you provide a sample file to start with, if possible.
  • edited February 15, 2021
    By reading https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file#isplainhostname

    I have come up with following proxy.pac file which I tested with pacparser package in manjaro.

    function FindProxyForURL(url, host)
    {
    if (

    dnsDomainIs(host, "ieeexplore.ieee.org") ||
    dnsDomainIs(host, "www.scopus.com") ||
    dnsDomainIs(host, "onlinelibrary.wiley.com") ||
    dnsDomainIs(host, "link.springer.com") ||
    dnsDomainIs(host, "sciencedirect.com") ||
    dnsDomainIs(host, "dl.acm.org")

    )
    {
    return "HTTP ip:port"
    }
    else
    {
    return "DIRECT";
    }
    }

    Now, I really need to find a way to deploy this to zotero. How can I do that? At https://forums.zotero.org/discussion/66667/zotero-5-proxy-configuration-via-pac-file-failure-to-authenticate-regression, I have seen following parameters

    Network.proxy.type = 2 (Proxy auto-configuration PAC)
    Network.proxy.autoconfig_url pointing to my PAC file
    signon.autologin.proxy = true

    which I have set. But zotero still does not download gated files. With system wide proxy setup, zotero did ask me username and password, but with pac file, I have not been asked username and password.

    I have not seen any documentation relavant to pac file in zotero documentation, but also I can not find description of proxy relevant hidden parameters.

    https://www.zotero.org/support/preferences/hidden_preferences

    The same file is being honored with firefox. I switched to using this file instead of foxyproxy extension and it is working. Firefox asks the username password once and if saved, it does not ask username and password anymore and keeps working.

    I expect the very same behaivor from zotero but it does not work.

  • Zotero should prompt you for the proxy password at startup as long as one of the URLs in extensions.zotero.proxyAuthenticationURLs is set to go through the proxy.

    If you're not seeing that happen, can you generate debug output for Zotero startup by going to Help → Debug Output Logging → "Restart with Logging Enabled…", submit the output, and provide the Debug ID here?
  • edited February 15, 2021
    Debug id: D1040635070. I have typed every url that I need to go through proxy to extensions.zotero.proxyAuthenticationURLs. The problem persists.

    The content of the setting is as follows: https://www.acm.org,https://www.ebscohost.com,https://www.sciencedirect.com,https://ieeexplore.ieee.org,https://www.jstor.org,http://www.ovid.com,https://link.springer.com,https://www.tandfonline.com,https://dl.acm.org,https://onlinelibrary.wiley.com

  • PAC file installed from file:///home/[…]/.proxy.pac

    (3)(+0000000): Proxy not required for https://www.jstor.org

    (3)(+0000001): Proxy not required for https://www.tandfonline.com

    (3)(+0000001): Proxy not required for https://www.acm.org

    (3)(+0000001): Proxy not required for https://www.ebscohost.com

    (3)(+0000001): Proxy not required for http://www.ovid.com
  • Hello, I am sorry that I have not understood your response. What exactly do you point out? The links you provided are default links in the settings. I did not remove them. I have added mines in addition to them. For example, zotero does not ask username, password for https://ieeexplore.ieee.org.
  • I’m saying it implies that you’ve configured something wrong with the PAC file, since those domains aren’t being treated as needing a proxy.
  • Hello,

    Since this thread, https://forums.zotero.org/discussion/comment/408292#Comment_408292 is closed, I need to repeat the my question here to properly summarize the current condition and find a solution.

    My post at above link (edited, enhanced below) has stated as follows.

    -----

    I need to use proxy server of my institution for certain electronic libraries. However I do not want to use system wide settings since it affects all connections to internet. I would like to continue my high speed internet for daily things and use proxy server to access electronic libraries.

    I can do this with firefox via proxy automatic configuration file as described below links

    https://support.mozilla.org/en-US/kb/connection-settings-firefox
    https://en.wikipedia.org/wiki/Proxy_auto-config

    I would like to be able to do the same with zotero as I can do in firefox by using proxy automatic configuration file.

    I have following pac file (.mypacfile) working perfectly with firefox. (ip address and port number are disguised). Firefox automatically uses defined proxy for following urls and I can see that the sites are notifying me, my institutional access. I can download gated articles without problem manually from firefox.

    function FindProxyForURL(url, host)
    {
    if (
    dnsDomainIs(host, "ieeexplore.ieee.org") ||
    dnsDomainIs(host, "scopus.com") ||
    dnsDomainIs(host, "onlinelibrary.wiley.com") ||
    dnsDomainIs(host, "link.springer.com") ||
    dnsDomainIs(host, "sciencedirect.com") ||
    dnsDomainIs(host, "dl.acm.org") ||
    dnsDomainIs(host, "webofscience.com") ||
    dnsDomainIs(host, "dblp.org") ||
    dnsDomainIs(host, "orcid.org") ||
    dnsDomainIs(host, "turcademy.com") ||
    dnsDomainIs(host, "clarivate.com") ||
    dnsDomainIs(host, "spiedigitallibrary.org") ||
    dnsDomainIs(host, "siam.org" )
    )
    {
    return 'PROXY IP:PORT';
    }
    else
    {
    return 'DIRECT';
    }
    }

    To be able to use this in zotero, by looking at old post and googling, I have made following changes to zotero configuration.

    Network.proxy.type = 2 (Proxy auto-configuration PAC)
    Network.proxy.autoconfig_url = file:///home/user/.mypacfile
    signon.autologin.proxy = true

    I can not still download the gated articles for electronic libraries even though my institution has access to them. I can download manually with firefox.

    What am I missing? Are my settings correct, are there any other parameters to be corrected? Is this achievable in Zotero? Any help much appreciated.

    ----


  • Can you provide another Debug ID for Zotero startup, using the "Restart with Logging Enabled…" option?
  • Hello,

    Debug id is D1906092782.

    Since you objected to any other post, insisted to continue in this long post, and threaten me for banning from the forum and deleted my other post, I kindly would like you to answer following questions since I have not been able to find complete clear information about this elsewhere. I am asking these for reference in the same position like me. At least interested parties should find a complete information somewhere in this post.

    1. Could you please point out also the correct text book settings to achieve pac file proxy configuration, and anything missing, wrong in my setup based on above description.

    2. I have not been able to find description of full list of zotero advanced configuration parameters. They are partly available in zotero web site. I presume they are the same as firefox since names are the same. Could you verify this or point out a documentation of these parameters.

    I would like to also point out that I have been using zotero for almost I believe 7 years. I was a paid customer for I guess three years. I have been promoting zotero amongs other competing systems for years, even I introduced, thought zotero to university students. I have post very seldom in this forum and always use proper language.

    I really want you to know that I am very very offended about your treatment.

    Thanks.
  • edited May 19, 2022
    We always ask people not to create duplicate threads for the same issue, because it makes it much harder for us to help them and makes the forums messier for everyone else. In your case, I asked you to continue posting to your original thread, you did so, and then a few hours later, instead of waiting for a response, you opened yet another new thread for the same issue. If you're going to ignore our requests, then yes, you’ll be blocked from further posting until you stop trying to open new threads for the same issue, and we're going to delete the duplicate threads, as it says in our forum guidelines.

    Zotero uses the Firefox proxy system, and nothing has changed about this in Zotero in years, so this is simply a continuation of your original issue above.

    We'll take a look at your Debug ID.
  • edited May 20, 2022
    @toktay: That PAC file works for me, but none of the hosts from extensions.zotero.proxyAuthenticationURLs being tried are in your PAC file:
    (3)(+0000000): Proxy not required for https://www.jstor.org

    (3)(+0000000): Proxy not required for http://www.ovid.com

    (3)(+0000001): Proxy not required for https://www.ebscohost.com

    (3)(+0000000): Proxy not required for https://www.acm.org
    Zotero will only try a subset of the hosts there at each startup to trigger a proxy authentication prompt, so you should remove the ones that you're not handling.
Sign In or Register to comment.