mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-02-23 13:04:22 +01:00
localhost and 127.0.0.1 are always added to the gatekeeper cert, the current hostname will be set as default hostname, which can be changed during configuraion
This commit is contained in:
1
dist/setup.sh
vendored
1
dist/setup.sh
vendored
@@ -177,6 +177,7 @@ configure() {
|
||||
# configure features of cyphernode
|
||||
docker run -v $current_path:/data \
|
||||
-e DEFAULT_USER=$USER \
|
||||
-e DEFAULT_CERT_HOSTNAME=$(hostname) \
|
||||
--log-driver=none$pw_env \
|
||||
--network none \
|
||||
--rm$interactive cyphernode/cyphernodeconf:cyphernode-0.05 $(id -u):$(id -g) yo --no-insight cyphernode$gen_options $recreate
|
||||
|
||||
@@ -364,7 +364,7 @@ module.exports = class extends Generator {
|
||||
gatekeeper_keys: { configEntries: [], clientInformation: [] },
|
||||
gatekeeper_sslcert: '',
|
||||
gatekeeper_sslkey: '',
|
||||
gatekeeper_cns: '',
|
||||
gatekeeper_cns: process.env['DEFAULT_CERT_HOSTNAME'] || '',
|
||||
proxy_datapath: '',
|
||||
lightning_implementation: 'c-lightning',
|
||||
lightning_datapath: '',
|
||||
|
||||
@@ -64,6 +64,8 @@ module.exports = class Cert {
|
||||
async create( cns ) {
|
||||
cns = cns || [];
|
||||
|
||||
cns = cns.concat(['127.0.0.1','localhost']);
|
||||
|
||||
let args = defaultArgs.slice();
|
||||
|
||||
const certFileTmp = tmp.fileSync();
|
||||
@@ -84,9 +86,9 @@ module.exports = class Cert {
|
||||
|
||||
const conf = this.buildConfig( cns );
|
||||
fs.writeFileSync( confFileTmp.name, conf );
|
||||
|
||||
|
||||
const openssl = spawn('openssl', args, { stdio: ['ignore', 'ignore', 'ignore'] } );
|
||||
|
||||
|
||||
let code = await new Promise( function(resolve, reject) {
|
||||
openssl.on('exit', (code) => {
|
||||
resolve(code);
|
||||
|
||||
Reference in New Issue
Block a user