Skip to content

Commit d8e4e1f

Browse files
committed
Real-world testing
1 parent 6029cc1 commit d8e4e1f

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

kickstart/etc/dnsmasq-00proxy.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
dhcp-option=252,http://wpad.{{lan_domain}}/wpad.dat
2-
cname=wpad,{{posm_fqdn}}
1+
dhcp-option=252,"http://wpad.{{lan_domain}}/wpad.dat"

kickstart/etc/dnsmasq-posm.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ dhcp-option=option:ntp-server,0.0.0.0
8989
#dhcp-option=46,8 # netbios node type
9090

9191
# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave.
92-
dhcp-option=252,"\n"
92+
#dhcp-option=252,"\n"
9393

9494
# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client
9595
# probably doesn't support this......

kickstart/etc/hosts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
127.0.0.1 localhost
2-
{{posm_wlan_ip}} {{posm_fqdn}} {{osm_fqdn}} {{posm_hostname}}.{{lan_domain}} {{posm_hostname}}
2+
{{posm_wlan_ip}} {{posm_fqdn}} {{osm_fqdn}} {{posm_hostname}}.{{lan_domain}} {{posm_hostname}} wpan.{{lan_domain}} wpad
33
::1 localhost ip6-localhost ip6-loopback
44
ff02::1 ip6-allnodes
55
ff02::2 ip6-allrouters

kickstart/etc/nginx-posm.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ server {
8282
}
8383

8484
location /wpad.dat {
85-
return 200 'function FindProxyForURL(url, host) {\n if (shExpMatch(host, "{{posm_fqdn}}")) {\n return "DIRECT";\n }\n\n return "PROXY {{posm_wlan_ip}}:1080; DIRECT";\n}';
85+
return 200 'function FindProxyForURL(url, host) {\n if (shExpMatch(host.toLowerCase(), "*.{{posm_fqdn}}") || isInNet(dnsResolve(host), "{{posm_network}}.0.0", "255.240.0.0")) {\n return "DIRECT";\n }\n\n return "PROXY {{posm_wlan_ip}}:1080";\n}';
8686
add_header Content-Type application/x-ns-proxy-autoconfig;
8787
}
8888
}

0 commit comments

Comments
 (0)