Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsupported URL with port #16

Open
cragia opened this issue Feb 28, 2020 · 1 comment
Open

unsupported URL with port #16

cragia opened this issue Feb 28, 2020 · 1 comment

Comments

@cragia
Copy link

cragia commented Feb 28, 2020

I have a private gitlab server that manages my git projects. We couldn't expose the server on the 443 port because it was already taken, so we exposed the service on a custom port.
For this reason when I do:

var autoupdater = new AutoUpdater({
  pathToJson: '',
  autoupdate: false,
  checkgit: true,
  jsonhost: 'gitlab.serinf.it:555',
  contenthost: 'xxx.com',
  progressDebounce: 0,
  devmode: true
});

it fails, and gives me the error:

download.error Error: getaddrinfo ENOTFOUND gitlab.serinf.it:555
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26) {
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'gitlab.serinf.it:555'
}

but obviously if I remove the ':555' port from the url, the connection is refused by the server...

how should I proceed?

thank you!

@juampi92
Copy link
Owner

juampi92 commented Mar 18, 2020

Sadly I didn't consider this when making this package, but you're welcome to add support for it!

You can make a manual check on the remoteDownloader function by adding a check, if : is present on opt.path, split it. Put the first item on opt.path, and the second item on opt.port.

Line: https://github.com/juampi92/auto-updater/blob/master/auto-updater.js#L402
Https documentation: https://nodejs.org/api/https.html#https_https_request_url_options_callback

:)

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

No branches or pull requests

2 participants