Page 1 of 1

WDAP file for proxy autoconfiguration not working

PostPosted: Sep 9th, '14, 09:13
by jonnip
Hi
we are just trialing using a pac file for out machines.
on windows machines it works fine when set to autodetect settings.
however on mageia machines it is very hit and miss. even with the url explicitly entered into the network settings page it will not apply any settings.
I have downloaded the file to the machine at /etc/proxy.pac and i have set the location to file:///etc/proxy.pac and it does not detect the settings at all.

although the file works 100% of the time on my windows machines i still made a very basic config and that also does not work reliably.
can anyone offer any advice.
I have removed all of the additional config and just put a very basic one as below and that still does not work.

Code: Select all
function FindProxyForURL(url, host)
{
if (isInNet(myIpAddress(), "192.168.0.0", "255.255.255.0"))
return "PROXY 192.168.0.117:3128";
else
return "DIRECT";
}


thanks

Re: WDAP file for proxy autoconfiguration not working

PostPosted: Sep 9th, '14, 09:18
by jonnip
so i just realised why it isnt working
if i try

Code: Select all
hostname -i

i am not getting a local IP but a WAN IP, can anyone offer a solution for this.

thank you!

Re: WDAP file for proxy autoconfiguration not working

PostPosted: Sep 9th, '14, 22:28
by doktor5000
jonnip wrote:however on mageia machines it is very hit and miss. even with the url explicitly entered into the network settings page it will not apply any settings.

What network settings page exactly, and what browser?

For your IP issue, could you please show the output as root of
Code: Select all
netstat -rn
ifconfig -a


Apart from that, hostname -i is pretty unreliable.

Re: WDAP file for proxy autoconfiguration not working

PostPosted: Sep 10th, '14, 04:26
by jonnip
hi

the network settings is:
Code: Select all
gsettings set org.gnome.system.proxy autoconfig-url 'xxx.xxx.com'
gsettings set org.gnome.system.proxy mode 'auto'



netstat -rn
Code: Select all
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.88.1    0.0.0.0         UG        0 0          0 wlo1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 wlo1
192.168.88.0    0.0.0.0         255.255.255.0   U         0 0          0 wlo1


ifconfig
Code: Select all
eno1      Link encap:Ethernet  HWaddr A0:B3:CC:BF:82:FD 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:60 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4512 (4.4 KiB)  TX bytes:4512 (4.4 KiB)

wlo1      Link encap:Ethernet  HWaddr 08:ED:B9:6A:D4:0C 
          inet addr:192.168.88.75  Bcast:192.168.88.255  Mask:255.255.255.0
          inet6 addr: fe80::aed:b9ff:fe6a:d40c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16648 errors:0 dropped:1 overruns:0 frame:0
          TX packets:2082 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3188624 (3.0 MiB)  TX bytes:311771 (304.4 KiB)


there is a link http://xmodulo.com/2012/12/how-to-set-up-proxy-auto-config-on-ubuntu-desktop.html
that recommends using a script which basically grabs the address from ifconfig and then places it in the hosts file but i am home some troubles to get it to work with mageia.