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

WIP: add some network diagnostics #589

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Commits on Jul 13, 2022

  1. dune: add missing dependency on result

    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    f17ade8 View commit details
    Browse the repository at this point in the history
  2. Move RST handling into intercept_tcp

    Previously we had
    - Endpoint.input_tcp: which handled RST and then called
      intercept_tcp_syn with a default forwarding option (connect to (ip,
      port))
    - Endpoint.intercept_tcp_syn: also used by services like the HTTP proxy
    
    The RST handling wasn't clear for the HTTP proxy etc, so rename
    intercept_tcp_syn to intercept_tcp and ensure it handles RST packets
    too.
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    428ec4d View commit details
    Browse the repository at this point in the history
  3. extract a function which forwards to a TCP socket

    We will have a future function which forwards to a Unix socket.
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    108f669 View commit details
    Browse the repository at this point in the history
  4. Tcp.Flow: prepare to support other socket types

    For now we only track connected TCP sockets, but in a future patch
    we will add Unix sockets.
    
    Prepare by tagging the socket with `Tcp socket and move the close
    logic into the module.
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    06ae37b View commit details
    Browse the repository at this point in the history
  5. add a table of TCP -> Unix domain socket forwards

    This is modelled on the existing "Gateway_forwards"
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    d02e199 View commit details
    Browse the repository at this point in the history
  6. add command-line --forwards <json path>

    This reads and watches the <json path> for configuration updates,
    modelled on the existing `--gateway-forwards`
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    3d016c3 View commit details
    Browse the repository at this point in the history
  7. add transparent TCP -> Unix domain socket forwarding

    Define a simple handshake with a .json-formatted request and response.
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    ad7119e View commit details
    Browse the repository at this point in the history
  8. add a test for the TCP forwarder

    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    aeb2cf2 View commit details
    Browse the repository at this point in the history
  9. debug: add a vpnkit.exe curl <url> command

    This will allow testing of the I/O system.
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    cbc5f70 View commit details
    Browse the repository at this point in the history
  10. Add verbose debug printing around connect

    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    694e011 View commit details
    Browse the repository at this point in the history
  11. HACK: HTTP server always uses the forwarder

    Signed-off-by: David Scott <[email protected]>
    djs55 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    e64d913 View commit details
    Browse the repository at this point in the history