Add a CGI handler for /wpad.dat
[privoxy.git] / templates / wpad.dat
diff --git a/templates/wpad.dat b/templates/wpad.dat
new file mode 100644 (file)
index 0000000..d47d778
--- /dev/null
@@ -0,0 +1,11 @@
+function FindProxyForURL(url, host) {
+    var proxy = "PROXY @my-ip-address@:@my-port@; DIRECT";
+    var direct = "DIRECT";
+    if (isPlainHostName(host)) {
+        return direct;
+    }
+    if (url.substring(0, 4) == "ftp:" || url.substring(0, 6) == "rsync:") {
+        return direct;
+    }
+    return proxy;
+}