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

proxy setting for downloading images is missing #53

Closed
marosg42 opened this issue Jan 22, 2018 · 8 comments
Closed

proxy setting for downloading images is missing #53

marosg42 opened this issue Jan 22, 2018 · 8 comments
Assignees
Milestone

Comments

@marosg42
Copy link

It would be nice to have a parameter which allows to specify proxy for download. Or if multipass honored http(s)_proxy environment variables

@albaguirre albaguirre self-assigned this Jan 22, 2018
@Saviq
Copy link
Collaborator

Saviq commented Jan 23, 2018

Note the daemon (multipassd) is a system service, so it should respect whatever is configured for that, and not what's set in your client's (multipass) environment?

@albaguirre
Copy link
Contributor

@Saviq, yeah correct.

I think the cleanest way is to introduce a "snap set multipass proxy.{http,https}=...", mirroring how you configure the proxy for snapd.

albaguirre added a commit to albaguirre/multipass that referenced this issue Jan 24, 2018
Allow proxy configuration via "snap set proxy.{http,https}=...". Fixes canonical#53
albaguirre added a commit that referenced this issue Jan 24, 2018
Allow proxy configuration via "snap set proxy.{http,https}=...". Fixes #53
@albaguirre
Copy link
Contributor

@marosg42,

with multipass revision 118 available in the edge channel, you can now do the following to configure the proxy:

snap set multipass proxy.http=http://myproxy:7777
snap restart multipass

@Saviq Saviq added this to the 2018.2.1 milestone Feb 21, 2018
albaguirre pushed a commit to albaguirre/multipass that referenced this issue Jun 22, 2018
Release 2018.2.1

- support JSON output in the CLI (canonical#65)
- switch to using a file socket for daemon-client IPC
- refactor ssh code and add unit tests for it
- switch to a patched libssh fork
  - improve mount performance (canonical#99)
- fix bash completion for mounts (canonical#40)
- wait for cloud-init on start (canonical#41)
- sanitize mount targets (canonical#17, canonical#47)
- support proxy configuratiion (canonical#53)
- default to a 5GB rootfs (canonical#29)
- randomize bridge subnet (canonical#49)
- fix a handful of mount bugs (canonical#71, canonical#64, canonical#78, canonical#77, canonical#83, canonical#82, canonical#81, canonical#104,
  canonical#105)
- add `--all` option to `info` (canonical#73)
- clean up networking on shutdown (canonical#75)
- set a 10s timeout for download progress (canonical#108)
- support rebooting instances (canonical#50)
- rename `connect` to `shell` to align with lxd (canonical#115)
Saviq added a commit that referenced this issue Feb 11, 2019
#113: Release 2018.12.1-full

Based on [upstream 2018.12.1](https://github.com/CanonicalLtd/multipass/releases/tag/2018.12.1)

The summary below is for Windows and Mac only, the rest can be found in the Release Notes above.

### Highlights

- Suspend/resume on Windows, too
- Improved `shell` performance on Windows
- Now keeping instance state in sync with Hyper-V
- Improved overall responsiveness on Windows

### Bugs fixed:
- [windows] not restoring instance state on startup (#104)
- "Default Switch" name assumption is wrong (#96)
- `--cpu` ignored on Windows (#77)
- [osx] if subdirs of a mounted directory have same name as dirs in host /, incorrect uid/gid are shown in the VM (#53)
@manuzhang
Copy link

Is there a way to set proxy on Mac ?

@Saviq
Copy link
Collaborator

Saviq commented Jul 15, 2019

@manuzhang if we're not respecting the system-wide proxy selection on macOS, please file a new issue.

We'll be adding an option (#756) to set the proxies for Multipass itself.

@Airren
Copy link

Airren commented Sep 3, 2021

worked with a proxy in Ubuntu 18.04

airren@NUC11:/etc/systemd/system/multi-user.target.wants$ ls -al |grep multipassd
lrwxrwxrwx  1 root root   53 9月   4 00:48 snap.multipass.multipassd.service -> /etc/systemd/system/snap.multipass.multipassd.service

## Set Proxy In [Service] Section
# Environment="HTTP_PROXY=$your_proxy "
# Environment="HTTPS_PROXY=$your_proxy "
# Environment="NO_PROXY=localhost,127.0.0.0/8,10.112.232.0/24"
airren@NUC11:/etc/systemd/system/multi-user.target.wants$ sudo vim /etc/systemd/system/snap.multipass.multipassd.service

# Restart the process
airren@NUC11:/etc/systemd/system/multi-user.target.wants$ sudo systemctl daemon-reload
airren@NUC11:/etc/systemd/system/multi-user.target.wants$ sudo systemctl restart snap.multipass.multipassd

# Check proxy is available
airren@NUC11:/etc/systemd/system/multi-user.target.wants$ sudo systemctl show --property Environment snap.multipass.multipassd
Environment=HTTP_PROXY=$your_proxy HTTPS_PROXY=$your_proxy NO_PROXY=localhost,127.0.0.0/8,10.112.232.0/24

# Work Normal 
airren@NUC11:/etc/systemd/system/multi-user.target.wants$ m launch -c 4 -m 6G

@Saviq
Copy link
Collaborator

Saviq commented Sep 3, 2021

$ sudo vim /etc/systemd/system/snap.multipass.multipassd.service

This will get overwritten on snap refresh, you should use sudo systemctl edit ... instead.

@Airren
Copy link

Airren commented Sep 10, 2021

This will get overwritten on snap refresh, you should use sudo systemctl edit ... instead.

Thanks for your info.

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

No branches or pull requests

5 participants