Skip to content

joyent/triton-cns#22 Want support for reverse proxy zones#23

Open
arekinath wants to merge 1 commit intoTritonDataCenter:masterfrom
eait-itig:issues/22
Open

joyent/triton-cns#22 Want support for reverse proxy zones#23
arekinath wants to merge 1 commit intoTritonDataCenter:masterfrom
eait-itig:issues/22

Conversation

@arekinath
Copy link

See #22.

Tested on CoaL and by running auto-tests. Not sure about documentation for this, maybe we should visit that as a separate commit?

Copy link

@kusor kusor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arekinath other than minor copyright issues and a suggestion to use braces, looks good to me. Btw, feel free to ping me directly when you need a CR.

@@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) 2018, Joyent, Inc.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will give us build issues if you don't modify to Copyright 2020 Joyent, Inc. Mind to change that line too?

type: 'string'},
{field: 'proxy_networks', stringify: function (v) {
v = v || [];
if (v.length === 1 && v[0] === '*')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can we use braces for conditionals?

@@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) 2018, Joyent, Inc.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same copyright issue than above

* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) 2018, Joyent, Inc.
* Copyright 2016, 2020, The University of Queensland
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2016?. Shouldn't this just be 2020?


function isProxied(ent, config) {
var zoneConfig = config.forward_zones[ent.zone];
if (!zoneConfig.proxy_networks)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same braces thing than above. Also, why parentheses around the boolean keywords?

Comment on lines +304 to +305
if (isProxied(ent, config))
ip = config.forward_zones[ent.zone].proxy_addr;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces please :-)

use_alias: true,
forward_zones: {
'foo': { networks: ['*'] }
'foo': {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we bump Joyent Copyright notice of this file too, please?

Copy link
Contributor

@bahamat bahamat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also like to see some documentation as to how this gets used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants