[Pharo-project] About HTTP proxies, settings and MacOS

Chris Cunningham cunningham.cb at gmail.com
Wed Jun 29 14:25:24 EDT 2011

On Wed, Jun 29, 2011 at 5:17 AM, Mariano Martinez Peck
<marianopeck at 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?


More information about the Pharo-dev mailing list