matrix-cli icon indicating copy to clipboard operation
matrix-cli copied to clipboard

Corporate Proxy variable is not being respected by the CLI

Open AlieGG opened this issue 7 years ago • 8 comments

The CLI is not respecting the http_proxy env variable

Error:


Upgrade Check Error:  { [Error: getaddrinfo ENOTFOUND raw.githubusercontent.com raw.githubusercontent.com:443]
  code: 'ENOTFOUND',
  errno: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'raw.githubusercontent.com',
  host: 'raw.githubusercontent.com',
  port: 443 }

AlieGG avatar Jun 01 '17 15:06 AlieGG

This was an issue with the version checks, which we've removed, since auto-upgrade turned out to be be one of those clever ideas that programmers come up with that turns out horrific in practice. These changes were made in the cli-modules, so your best bet would be to reinstall matrix-cli at this time and try again. Thanks!

eighteyes avatar Jun 01 '17 15:06 eighteyes

Just a note, we don't have a proxy handy so we were not able to test this. Please let us know how it works.

AlieGG avatar Jun 01 '17 15:06 AlieGG

Hi, The updated patch has removed the errors regarding the auto update, but now the matrix command seems to just hang for 10 - 45 seconds without doing anything, no matter what I pass into it.

I've tried with the debug var, and this is what I'm getting :

xxx@xxx:~$ DEBUG=* matrix register
  cli Env:  rc +0ms
xxx@xxx:~$

trybius avatar Jun 01 '17 15:06 trybius

Great, so it doesn't work. Let me give it another shot. You're specifically trying the register command?

eighteyes avatar Jun 01 '17 16:06 eighteyes

No matter what command I use (no command, register, use, login) it does the same thing, but with the delay changing from instant, to 60 seconds depending on the command.

trybius avatar Jun 01 '17 16:06 trybius

Shoot, it seems like request normally handles HTTP_PROXY fine so I'm not sure where this is going amiss.

Aha! Firebase! https://github.com/firebase/firebase-tools/issues/36

We definitely want to support proxies, so we'll keep this in our bug-tracker, but I hesitate to say this will get resolved quickly.

eighteyes avatar Jun 01 '17 16:06 eighteyes

Ah, that is a pity. I imagine some of your users like myself will be stuck behind a proxy.

Can you tell me what addresses / ports are accessed in and out of matrix? I can try to ask our IT guys to add rules based on that.

Could you also tell me if there is an alternative to using the matrix program? Is there a different way to upload programs to the device directly on the Pi, without needing the host CLI?

trybius avatar Jun 02 '17 10:06 trybius

FYI - I have been able to go through our proxy using a program called proxychains4 (https://github.com/rofl0r/proxychains-ng) in case any other users need to go through a proxy.

trybius avatar Jun 02 '17 11:06 trybius