[haXe] [hxinst] Proxy settings

Eric Priou erixtekila at gmail.com
Wed Aug 22 00:30:42 CEST 2007


Le 19 août 07 à 14:15, Nicolas Cannasse a écrit :

> Eric Priou a écrit :
>> Hi,
>> Where do the haxe installer gets its proxy settings ?
>> I used a proxy before, but it's closed now.
>> The url was 127.0.0.1:8888
>> The installer tries to acces internet with that config.
>> Which is strange.
>> The preference pane of proxy is configured normally (osx 10.4).
>> Any clue ?
>
> Preferences are stored in
>
> /Library/Preferences/SystemConfiguration/preferences.plist
>
> Could you tell it there's some way to detect "disabled proxy" ?
> (see haxe/std/neko/net/ProxyDetect.hx , function detectOSX() )
Ok, I get it.

On a simple setting, there is only one interface to connect to : en0
Then the plist file just contains ONE xml node with the correct Proxy  
settings.

But there are other configuration, where one use a proxy for some  
different interfaces, for ex en1.

Unfortunatly, haxelib search the first node that have the prosy  
setting set to on and tries to connect with it in ProxyDetect.hx.
This is where my problem occurs :

for( nsname in Reflect.fields(data.NetworkServices) ) {
	var ns : Dynamic = Reflect.field(data.NetworkServices,nsname);
	if( ns.Proxies.HTTPEnable == 1 )
		return { host : ns.Proxies.HTTPProxy, port : ns.Proxies.HTTPPort,  
auth : null }; //<---- HERE
}

So maybe it should be better to check all the interfaces, depending  
of the one that is connected to the web…
Not an easy task anyhow.

HTH

----
Eric Priou
aka  erixtekila
Articles : http://www.v-i-a.net/inprogress
Oregano : http://www.v-i-a.net/inprogress/doku.php/oregano
Oregano forum : http://www.v-i-a.net/forum/





More information about the Haxe mailing list