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

virtionet: Add gvproxy support #50

Merged
merged 3 commits into from
Jul 10, 2023
Merged

virtionet: Add gvproxy support #50

merged 3 commits into from
Jul 10, 2023

Commits on Jul 7, 2023

  1. virtionet: Add gvproxy support

    This fixes --device virtio-net,unixSocketPath= which was non-functional
    until now, it was not using the correct socket type ("unix" instead of
    "unixgram"). This commit fixes this.
    Immediately after DialUnix("unixgram"), vfkit sends the magic string
    "VFKT" so that the other end knows where to send the data to (there is
    no `Accept` with unixgram sockets).
    There could be a better way but I'm not aware of it.
    
    This can be tested with gvproxy 0.6.2:
    
    term1$ gvproxy  --listen unix:///tmp/gvproxy-http.sock --listen-vfkit unixgram:///tmp/gvproxy.sock
    term2$ vfkit --device virtio-net,unixSocketPath=/tmp/gvproxy.sock,mac=5a:94:ef:e4:0c:ee [...]
    cfergeau committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    111462b View commit details
    Browse the repository at this point in the history
  2. virtionet: Move virtio-net code to its own file

    Trying to prevent vf/virtio.go from getting too big.
    cfergeau committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    6458be6 View commit details
    Browse the repository at this point in the history
  3. virtionet: Cleanup unix sockets on signals

    Adds adhoc signal catching to remove the unix socket file vfkit created.
    This should be moved to a higher level/made more generic/...
    cfergeau committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    a785feb View commit details
    Browse the repository at this point in the history