Linux counter

Cisco User Group

Accessi

TodayToday460
YeserdayYeserday565
This WeekThis Week4110
This MonthThis Month13758
All DaysAll Days520428
38.107.179.219
Guests 6
Registered Users 1
Registered Today 0

Mappa visitatori

Script Autocofigurazione Proxy PDF Stampa E-mail
(0 - user rating)
Scritto da Alessandro Pensato   
Venerdì 14 Gennaio 2011 11:44

Lo script VBS qui di seguito serve per impostare su un pc con sistema operativo Windows XP/Vista/7 la stringa per la ricerca del proxy.pac.

 

set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", ""
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride", ""
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL", "http://proxy.porkyhttp.no-ip.info/proxy.pac"

Mentre questo è un esempio di proxy.pac che utilizzo con Squid per mascherare le richieste verso gli host o domini definiti, mentre tutto il resto passa al di fuori del proxy.

function FindProxyForURL(url, host)
{
if (
shExpMatch(host, "*.pi.cnr.it") ||
shExpMatch(host, "*.ge.cnr.it") ||
shExpMatch(host, "*.bo.cnr.it") ||
shExpMatch(host, "*.aasldjournals.org") ||
shExpMatch(host, "*.sepmonline.org") ||
shExpMatch(host, "*.journal.informs.org") ||
localHostOrDomainIs(host, "ajp.amjpathol.org") ||
localHostOrDomainIs(host, "sviluppo.aiaf.it") ||
localHostOrDomainIs(host, "inscribe.iupress.org") ||
localHostOrDomainIs(host, "www.reaxys.com") ||
localHostOrDomainIs(host, "www.morganclaypool.com")
)
return "PROXY proxy.porkyhttp.no-ip.info:3128";
else
return "DIRECT";
}
 

Aggiungi commento


Codice di sicurezza
Aggiorna