2023-09-05 14:15:29 +02:00
|
|
|
|
---
|
|
|
|
|
title: 'Proxy Support for Grails'
|
|
|
|
|
date: 2011-06-28T11:59:43.000Z
|
|
|
|
|
draft: false
|
2023-10-19 01:04:39 +02:00
|
|
|
|
taxonomies:
|
|
|
|
|
tags: [ "jvm"]
|
|
|
|
|
categories: [ "programming"]
|
2023-09-05 14:15:29 +02:00
|
|
|
|
---
|
|
|
|
|
|
2023-10-19 01:04:39 +02:00
|
|
|
|
Not a big thing, actually for me it is. I am always struggling with
|
|
|
|
|
proxy settings. It requires a lot of different incantations to be
|
|
|
|
|
done, every program deals with it differently, support for platform
|
|
|
|
|
settings is flaky, ... Grails deals with this is a way which
|
|
|
|
|
pleasantly surprised me :
|
2023-09-05 14:15:29 +02:00
|
|
|
|
|
2023-10-19 01:04:39 +02:00
|
|
|
|
> grails add-proxy <name> --host=<hostname> --port=<portno> e.g. grails add-proxy client --host=proxy --port=3128
|
2023-09-05 14:15:29 +02:00
|
|
|
|
|
2023-10-19 01:04:39 +02:00
|
|
|
|
allows you to create a setting for a proxy and bind it to a name. It
|
|
|
|
|
also supports username/password. Switching to the setting involves
|
|
|
|
|
only
|
2023-09-05 14:15:29 +02:00
|
|
|
|
|
2023-10-19 01:04:39 +02:00
|
|
|
|
> grails set-proxy client
|
2023-09-05 14:15:29 +02:00
|
|
|
|
|
|
|
|
|
to enable the proxy setting, and
|
|
|
|
|
|
2023-10-19 01:04:39 +02:00
|
|
|
|
> grails clear-proxy
|
2023-09-05 14:15:29 +02:00
|
|
|
|
|
2023-10-19 01:04:39 +02:00
|
|
|
|
when I get back in a transparent environment. (for completeness there
|
|
|
|
|
is a **remove-proxy** command which is useful to remove those
|
|
|
|
|
passwords after the need has passed). I particularly impressed that
|
|
|
|
|
this was done in a simple and straightforward without the need fo
|
|
|
|
|
brain gymnastics trying to remember which arcane curse needs to be put
|
|
|
|
|
at what location in which file. Nice.
|