Post

Replies

Boosts

Views

Activity

Reply to Pac File shExpMatch
Yes, pac is being fetched. I’m having an issue specifically with the url string in the function . The host string works fine and executes. The second I switch the code from host to url it stopped working.
Topic: Safari & Web SubTopic: General Tags:
Nov ’22
Reply to Pac File shExpMatch
var blackhole = "PROXY 255.255.255.0:3421"; if (typeof(navigator) != "undefined" && navigator.appVersion.indexOf("Mac") != -1) { blackhole = "PROXY 0.0.0.0:3421"; } var localproxy = normal; var bypass = normal; /////////////////////////////////////////////////////////////////////////////// var isActive = 1; function FindProxyForURL(url, host) { //DEBUG alert("checking: url=" + url); // Suggestion from Quinten Martens // Make everything lower case. // WARNING: all shExpMatch rules following MUST be lowercase! url = url.toLowerCase(); host = host.toLowerCase(); if (0 || shExpMatch(url, "*.pdf") ) { // deny this request return blackhole; } else { return normal; } } function _dnsDomainIs(host, domain) { if (host.length > domain.length) { return (host.substring(host.length - domain.length - 1) == "."+domain); } return (host == domain); }```
Topic: Safari & Web SubTopic: General Tags:
Nov ’22
Reply to Pac File shExpMatch
Thanks, I posted the code below. The server is a local black hole that is reachable. I know it works because this || _dnsDomainIs(host, "api.giphy.com") blocks giphy.com I want to block all incoming pdf's to our devices.
Topic: Safari & Web SubTopic: General Tags:
Nov ’22
Reply to Pac File shExpMatch
Hey, just seeing if anyone has any ideas. Still experiencing this issue
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to Pac File shExpMatch
I set up an instance in aws with a net cat listener to log the pac file. I get a hot when I use the host var but not when I use the url var. Any ideas?
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Pac File shExpMatch
Yes, pac is being fetched. I’m having an issue specifically with the url string in the function . The host string works fine and executes. The second I switch the code from host to url it stopped working.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Pac File shExpMatch
So far nothing is working. Can anyone please post an example, from my testing it seems iOS just skips over url.substring(url.length-4) == ".pdf”
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Pac File shExpMatch
var blackhole = "PROXY 255.255.255.0:3421"; if (typeof(navigator) != "undefined" && navigator.appVersion.indexOf("Mac") != -1) { blackhole = "PROXY 0.0.0.0:3421"; } var localproxy = normal; var bypass = normal; /////////////////////////////////////////////////////////////////////////////// var isActive = 1; function FindProxyForURL(url, host) { //DEBUG alert("checking: url=" + url); // Suggestion from Quinten Martens // Make everything lower case. // WARNING: all shExpMatch rules following MUST be lowercase! url = url.toLowerCase(); host = host.toLowerCase(); if (0 || shExpMatch(url, "*.pdf") ) { // deny this request return blackhole; } else { return normal; } } function _dnsDomainIs(host, domain) { if (host.length > domain.length) { return (host.substring(host.length - domain.length - 1) == "."+domain); } return (host == domain); }```
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Pac File shExpMatch
Thanks, I posted the code below. The server is a local black hole that is reachable. I know it works because this || _dnsDomainIs(host, "api.giphy.com") blocks giphy.com I want to block all incoming pdf's to our devices.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’22