Re: [Pharo-project] About HTTP proxies, settings and MacOS
Thanks Sven, that worked :) Thanks Marcus for pointing us to the right place to fix it.
Can we integrate it marcus for 1.3?
Yes! please add something machine readable to the bug tracker issue: http://code.google.com/p/pharo/issues/detail?id=4473 -- Marcus Denker -- denker@acm.org http://www.marcusdenker.de
So...now if I save the image in a place where I have a proxy (my work) and then I try to open it in another place that has no proxy (my home), it doesn't work. To solve that I did: startUp OSPlatform isMacOS ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [:p | NetworkSystemSettings useHTTPProxy: true. HTTPSocket useProxyServerNamed: p first port: p second asInteger]] ifFalse: [HTTPSocket stopUsingProxyServer. NetworkSystemSettings useHTTPProxy: false]] I added the ifFalse part to reset it. What do you think? At least it seems to work for me. Thanks On Wed, Jun 29, 2011 at 10:14 AM, Marcus Denker <marcus.denker@inria.fr>wrote:
Thanks Sven, that worked :) Thanks Marcus for pointing us to the right place to fix it.
Can we integrate it marcus for 1.3?
Yes! please add something machine readable to the bug tracker issue:
http://code.google.com/p/pharo/issues/detail?id=4473
-- Marcus Denker -- denker@acm.org http://www.marcusdenker.de
-- Mariano http://marianopeck.wordpress.com
On 29 Jun 2011, at 14:17, Mariano Martinez Peck wrote:
What do you think? At least it seems to work for me.
I added a fileout to the issue, http://code.google.com/p/pharo/issues/detail?id=4473 Mariano, please try once more before we include it... Sven
On Wed, Jun 29, 2011 at 5:17 AM, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
So...now if I save the image in a place where I have a proxy (my work) and then I try to open it in another place that has no proxy (my home), it doesn't work. To solve that I did:
startUp    OSPlatform isMacOS ifTrue: [       self useHTTPProxy ifTrue: [           (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [:p |             NetworkSystemSettings useHTTPProxy: true.              HTTPSocket useProxyServerNamed: p first port: p second asInteger]]       ifFalse: [HTTPSocket stopUsingProxyServer.          NetworkSystemSettings useHTTPProxy: false]]
Am I reading this right? If I was on, say, Windows behind a proxy, this would disable proxy use on startup? So, every time I started an image, I would have to manually re-enable proxy use? Would there be a way to detect if the proxy still exists on startUp, and if it doesn't, then temporarily disable the proxy instead? -Chris
On 29 Jun 2011, at 20:25, Chris Cunningham wrote:
Am I reading this right? If I was on, say, Windows behind a proxy, this would disable proxy use on startup? So, every time I started an image, I would have to manually re-enable proxy use?
Uhh, no, on Windows nothing at all would happen, this is Mariano's code, as I formatted it: startUp OSPlatform isMacOS ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [ :p | NetworkSystemSettings httpProxyServer: p first; httpProxyPort: p second asInteger; useHTTPProxy: true ] ] ifFalse: [ NetworkSystemSettings useHTTPProxy: false ] ] This does not take away anything that wasn't there before, as far as I can see. Sven
On Wed, Jun 29, 2011 at 12:17 PM, Sven Van Caekenberghe <sven@beta9.be> wrote:
On 29 Jun 2011, at 20:25, Chris Cunningham wrote:
Am I reading this right? Â If I was on, say, Windows behind a proxy, this would disable proxy use on startup? Â So, every time I started an image, I would have to manually re-enable proxy use?
Uhh, no, on Windows nothing at all would happen, this is Mariano's code, as I formatted it:
Good. I did read it wrong.
participants (4)
-
Chris Cunningham -
Marcus Denker -
Mariano Martinez Peck -
Sven Van Caekenberghe