Added PAC file and improved README
This commit is contained in:
parent
3f98738165
commit
c0dcdd68f4
28
README.md
28
README.md
|
@ -1,3 +1,29 @@
|
|||
# proxy-pac-file
|
||||
|
||||
Proxy PAC file that can be used to access the sites of publishers that require a CNR subscription.
|
||||
Proxy PAC file that can be used to access the sites of publishers that require a CNR subscription.
|
||||
This way, users can access content that would normally require authentication, as if they were on the internal CNR network.
|
||||
**Requirement:** VPN must be connected.
|
||||
|
||||
## Configuration
|
||||
The only configuration needed is to specify in the browser settings the permanent address of the _raw_ PAC file: [https://gitea-s2i2s.isti.cnr.it/ISTI-Applicazioni/proxy-pac-file/raw/branch/main/proxy-isti.pac](https://gitea-s2i2s.isti.cnr.it/ISTI-Applicazioni/proxy-pac-file/raw/branch/main/proxy-isti.pac)
|
||||
Any update to the online file will be automatically acquired at browser startup.
|
||||
|
||||
### Firefox
|
||||
* Open **Menu** and then **Settings**
|
||||
* Navigate to **Network Settings** and click **Settings**
|
||||
* Enable **Automatic proxy configuration URL** and in the underlying area specify **https://gitea-s2i2s.isti.cnr.it/ISTI-Applicazioni/proxy-pac-file/raw/branch/main/proxy-isti.pac**
|
||||
* Click **OK** and restart your browser to apply the changes
|
||||
|
||||
### Chrome
|
||||
* Open **Menu** and then **Settings**
|
||||
* Click **Advanced** and then **System**
|
||||
* Click **Open your computer's proxy settings**
|
||||
* Enable **Use setup script** and specify **https://gitea-s2i2s.isti.cnr.it/ISTI-Applicazioni/proxy-pac-file/raw/branch/main/proxy-isti.pac**
|
||||
* Click **Save** to save the configuration
|
||||
|
||||
### Safari
|
||||
* Open **Menu** and click **Preferences...**
|
||||
* Click **Advanced**
|
||||
* In the **Advanced tab**, go to **Proxies** and click **Change Settings...**
|
||||
* Select **Automatic proxy configuration** and in the URL area specify **https://gitea-s2i2s.isti.cnr.it/ISTI-Applicazioni/proxy-pac-file/raw/branch/main/proxy-isti.pac**
|
||||
* Click **OK** and restart your browser to apply the changes
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
const site_vector = [
|
||||
/* IEEE */ "https://ieeexplore.ieee.org/*",
|
||||
/* ACM */ "https://dl.acm.org/*",
|
||||
/* SPRINGER */ "https://link.springer.com/*",
|
||||
/* SCIENCE_DIRECT */ "https://www.sciencedirect.com/*",
|
||||
/* WEB_OF_SCIENCE */ "https://www.webofknowledge.com/*",
|
||||
/* WILEY */ "https://onlinelibrary.wiley.com/*",
|
||||
/* NATURE */ "https://www.nature.com/*",
|
||||
/* SAGE */ "https://journals.sagepub.com/*",
|
||||
/* TAYLOR_FRANCIS */ "https://www.tandfonline.com/*",
|
||||
/* MDPI */ "https://www.mdpi.com/*",
|
||||
/* FRONTIERS */ "https://www.frontiersin.org/*",
|
||||
/* MATH SCI NET */ "https://mathscinet.ams.org/*",
|
||||
/* REAXYS */ "https://www.reaxys.com/*",
|
||||
/* OXFORD */ "https://academic.oup.com/*",
|
||||
/* PNAS */ "https://www.pnas.org/*",
|
||||
/* CAMBRIDGE */ "https://www.cambridge.org/*",
|
||||
/* IOP */ "https://iopscience.iop.org/*",
|
||||
/* IOS */ "https://content.iospress.org/*",
|
||||
/* JSTOR */ "https://www.jstor.org/*",
|
||||
/* RSC */ "https://pubs.rsc.org/*",
|
||||
/* CHEM SPIDER */ "https://www.chemspider.com/*",
|
||||
/* CLARIVATE */ "https://jcr.clarivate.com/*",
|
||||
/* CLARIVATE ENDNOTE */ "https://www.myendnoteweb.com/*",
|
||||
/* SCIENTIFIC NET */ "https://www.scientific.net/*",
|
||||
/* AIP */ "https://aip.scitation.org/*",
|
||||
/* APS */ "https://journals.aps.org/*",
|
||||
/* PUBMED */ "https://pubmed.ncbi.nlm.nih.gov/*",
|
||||
/* SCIENCEMAG */ "https://www.sciencemag.org/*",
|
||||
/* SIAM */ "https://epubs.siam.org/*",
|
||||
/* AMERICAN_CHEMICAL */ "https://pubs.acs.org/*",
|
||||
/* AMERICAN_PHYSICAL */ "https://journals.aps.org/*",
|
||||
/* AMERICAN_PHYSICS */ "https://www.scitation.org/*",
|
||||
/* AMERICAN_SOCIETY */ "https://www.asme.org/*",
|
||||
/* AMERICAN_INSTITUTE */ "https://www.aiaa.org/*",
|
||||
/* AMERICAN_MATHEMATICAL */ "https://www.ams.org/*",
|
||||
/* AMERICAN_METEO */ "https://journals.ametsoc.org/*",
|
||||
/* AMERICAN_GEOPHYSICAL */ "https://www.agu.org/*",
|
||||
/* ANNUAL_REVIEWS */ "https://www.annualreviews.org/*",
|
||||
/* RIVISTE WEB */ "https://www.rivisteweb.it/*",
|
||||
/* DARWIN BOOKS */ "https://www.darwinbooks.it/*",
|
||||
];
|
||||
|
||||
function FindProxyForURL(url, host) {
|
||||
// Check if the requested URL is a paper repo
|
||||
for (var i = 0; i < site_vector.length; i++) {
|
||||
if (shExpMatch(url, site_vector[i])) {
|
||||
return "PROXY vpn-proxy.isti.cnr.it:3128";
|
||||
}
|
||||
}
|
||||
|
||||
// Default to direct connection for all other URLs
|
||||
return "DIRECT";
|
||||
}
|
Loading…
Reference in New Issue