Skip to content

Snap: Set outbound Proxy #4780

Closed
Closed

Description

@irvingwa

Hey all running the latest rocket.chat with a snap install. What is the best way to set both proxy and no proxy lists with the snap install?

Activity

  1. geekgonecrazy commented on Nov 16, 2016

    @geekgonecrazy
    Contributor

    @irvingwa just so I understand. You want the ability to set an outbound proxy for Rocket.Chat?

  2. changed the title [-]Proxy/No Proxy Issues[/-] [+]Snap: Set outbound Proxy[/+] on Jan 4, 2017
  3. antoniogermano commented on Jan 12, 2017

    @antoniogermano

    I don't know what he wants, but my Rocket Chat server uses the internet via a corporate proxy. I need RocketChat to use the same proxy as the system, or to setup proxy inside RocketChat so that it can connect to the internet. My server does wget and yum install fine through proxy but RocketChat gets

    �[34mI20170112-15:56:56.633(-2) app.js:471 �[31mSystem ➔ error Error sending push to gateway (6 try) -> { [Error: connect ECONNREFUSED 45.55.199.111:443] code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect', address: '45.55.199.111', port: 443 }

  4. zbyte commented on Mar 15, 2017

    @zbyte

    this feature is very important for me

  5. holgerdell commented on Dec 3, 2017

    @holgerdell

    How do I make a rocket.chat snap instance aware of the HTTP_PROXY and HTTPS_PROXY environment variables?

    Using systemctl edit snap.rocketchat-server.rocketchat-server.service, I can edit the environment variables to be used inside the snap container as follows:

    [Service]
    Environment=HTTP_PROXY=http://my.proxy-server.example.com:3128
    Environment=HTTPS_PROXY=https://my.proxy-server.example.com:3128
    

    However, rocket.chat 0.59.3 appears to ignore this setting in my situation. Any ideas what I can do to debug this properly?

    Possible duplicates: #5090, #5896

  6. geekgonecrazy commented on Jan 3, 2018

    @geekgonecrazy
    Contributor

    if you edit it will be replaced any time the snap is updated. the systemd unit file is created by snapd automatically

  7. holgerdell commented on Jan 3, 2018

    @holgerdell

    @geekgonecrazy

    1. I just checked, and the edit did not get replaced in the last automatic updates.
    2. More importantly, the setting appears to have no effect. Can you help me solve/analyze the problem? I have no experience with snaps.
  8. geekgonecrazy commented on Jan 3, 2018

    @geekgonecrazy
    Contributor

    I'm not sure if it honors the proxy even when not using snap.. I've seen very mixed reports

  9. holgerdell commented on Jan 3, 2018

    @holgerdell

    @geekgonecrazy
    According to this, meteor is supposed to honor the HTTP_PROXY and HTTPS_PROXY environment variables. Is there a way I can issue the meteor update command inside a snap?

  10. geekgonecrazy commented on Jan 4, 2018

    @geekgonecrazy
    Contributor

    Meteor actually does not run inside the snap.

    Meteor is a node.js framework. When we cut a release we do a meteor build which produces a standalone meteor application.

    We will be adding a way to easily set these environment variables in the near future.

  11. holgerdell commented on Jan 5, 2018

    @holgerdell

    Sounds good, thanks!

    If possible, the snap should ideally just honor the host system's proxy variables in /etc/environment

  12. 4 remaining items

  13. reetp commented on Oct 29, 2018

    @reetp
    Collaborator

    Not sure if this gets closed by:
    #12351

  14. holgerdell commented on Oct 29, 2018

    @holgerdell

    @reetp How can I test this? Can you tell me an operation that causes the rocket.chat server to request a file from the web?

  15. reetp commented on Nov 4, 2018

    @reetp
    Collaborator

    Paste a link to a file online or a web page is probably easiest

  16. holgerdell commented on Nov 4, 2018

    @holgerdell

    Nothing happens when I do that.

  17. geekgonecrazy commented on Nov 7, 2018

    @geekgonecrazy
    Contributor

    This should technically get closed by #12351 it will allow setting environment variables

  18. geekgonecrazy commented on Dec 6, 2018

    @geekgonecrazy
    Contributor

    #12351 will allow setting of environment variables so any that will be possible with non-snap will now also be possible to set there. Will be released with 0.73.0

  19. modified the milestones: 0.70.0, on Dec 6, 2018
  20. Antairez commented on Dec 28, 2018

    @Antairez

    @geekgonecrazy Thanks for the info, are you saying that setting proxy the way just like @holgerdell did (by running sudo systemctl edit snap.rocketchat-server.rocketchat-server.service)will be possible after the release of 0.73.0 for snap users?

    [Service]
    Environment=HTTP_PROXY=http://proxy.example.com:8080/
    Environment=HTTPS_PROXY=http://proxy.example.com:8080/
    Environment=NO_PROXY='something.example.com,*.intranet.example.com'
    

    Or is there a recommended way to set it properly and make sure it persists across snap refreshes?

  21. geekgonecrazy commented on Dec 28, 2018

    @geekgonecrazy
    Contributor

    After the snap is released for 0.73.0 you will be able to set any environment variable for the snap by dropping a .env file in the common folder. I believe the docs will be updated soon. It will be a few days as usual before the snap release is available.

  22. Antairez commented on Jan 11, 2019

    @Antairez

    After the snap is released for 0.73.0 you will be able to set any environment variable for the snap by dropping a .env file in the common folder. I believe the docs will be updated soon. It will be a few days as usual before the snap release is available.

    @geekgonecrazy Now that 0.73 is out, would you mind pointing me to some instructions on how to set-up proxy using the new way? Thank you.

  23. reetp commented on Jan 18, 2019

    @reetp
    Collaborator
  24. geekgonecrazy commented on Jan 18, 2019

    @geekgonecrazy
    Contributor

    To clarify it was merged today as well as 0.73 released to stable channel today :) . But yes can now set environment variables as described in that document

  25. Antairez commented on Mar 7, 2019

    @Antairez

    @reetp Thanks my friend, how do I find a list of environment variables for changing proxy servers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions