Closed te85va closed 5 months ago
For some custom network environment (like behind NAT) it will be useful to permit to specify a fixed host ip.
For example in my case the workaround that I have done for solve my problem was to insert this condition:
// FIX: if exists env HOMEY_HOST use this fixed ip instead of 172.17.0.1
const host = _(process.env && process.env.HOMEY_HOST) ? process.env.HOMEY_HOST :_ (process.platform === 'linux') ? isWsl // Windows Subsystem for Linux ? await new Promise((resolve, reject) => { childProcess.exec('wsl.exe hostname -I', (err, stdout) => { if (err) return reject(err); return resolve(stdout.trim()); }); }) : '172.17.0.1' : 'host.docker.internal';
For some custom network environment (like behind NAT) it will be useful to permit to specify a fixed host ip.
For example in my case the workaround that I have done for solve my problem was to insert this condition:
// FIX: if exists env HOMEY_HOST use this fixed ip instead of 172.17.0.1
const host = _(process.env && process.env.HOMEY_HOST) ? process.env.HOMEY_HOST :_ (process.platform === 'linux') ? isWsl // Windows Subsystem for Linux ? await new Promise((resolve, reject) => { childProcess.exec('wsl.exe hostname -I', (err, stdout) => { if (err) return reject(err); return resolve(stdout.trim()); }); }) : '172.17.0.1' : 'host.docker.internal';