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

refactor(model/netx.go): TLSHandhaker now returns a TLSConn #1281

Merged
merged 8 commits into from
Sep 18, 2023

Commits on Sep 18, 2023

  1. refactor(model/netx.go): TLSHandhaker now returns a TLSConn

    I am making progress with ooni/probe#2531
    and I want to reactor model/netx.go such that the TLSHandshaker returns
    a model.TLSConn rather than a net.Conn.
    
    Returning a net.Conn and documenting it is a model.TLSConn is bad
    compared to returning a model.TLSConn directly.
    
    Note that we cannot apply the same transformation to netxlite's
    TLSDialer.DialTLSContext because such a method must be assignable
    to net/http and github.com/ooni/oohttp's Transport function also
    called DialTLSContext.
    
    The fact that we need code to be assignable to the Transport
    function is what historically led the TLSHandshaker to return
    a net.Conn as well. But it was quite clear from the get go
    that this choice led to some quirks (and, in fact, this behavior
    was explicitly documented as such). Not anymore.
    bassosimone committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    c2df657 View commit details
    Browse the repository at this point in the history
  2. x

    bassosimone committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    a9e9352 View commit details
    Browse the repository at this point in the history
  3. x

    bassosimone committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    e12222f View commit details
    Browse the repository at this point in the history
  4. fix failing test

    bassosimone committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    c9b908d View commit details
    Browse the repository at this point in the history
  5. x

    bassosimone committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    f6f6d5b View commit details
    Browse the repository at this point in the history
  6. x

    bassosimone committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    b3fae15 View commit details
    Browse the repository at this point in the history
  7. x

    bassosimone committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    09e01a3 View commit details
    Browse the repository at this point in the history
  8. mitigation

    bassosimone committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    8e78134 View commit details
    Browse the repository at this point in the history