ssbc / ssb-config

standard configuration for ssb
MIT License
23 stars 18 forks source link

update README: net external should be a string #76

Closed staltz closed 3 years ago

staltz commented 3 years ago

See this issue for context: https://github.com/ssb-js/secret-stack/issues/62

As far as I can see, ssb-config doesn't handle external at all, multiserver's net plugin handles it, and it seems like it has not supported array of strings, not in the recent past (up to 2 years ago), see: https://github.com/ssb-js/multiserver/blob/7d47892757c14732b47662d81e36dd21f3c16b6b/plugins/net.js#L108

There used to be a time that passing external as an array wouldn't crash, because stringify() returned ['net', host, port].join(':'), and if host was the array ['google.com', 'facebook.com'], then stringify() would return 'net:google.com,facebook.com:2850' which is not a valid multiserver address. Long story short: I don't think multiserver net ever supported arrays for this.

mixmix commented 3 years ago

Looks good to me too

austinfrey commented 3 years ago

@staltz @ahdinosaur this was handled in https://github.com/ssb-js/multiserver/pull/64 to take either a string or an array for external. This was in response to this issue: https://github.com/ssb-js/multiserver/issues/62. I had not seen this previous issue which recommended a doc update vs supporting the array though: https://github.com/ssb-js/secret-stack/issues/62