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

Rework socks5 authentication. #302

Closed
wants to merge 1 commit into from
Closed

Conversation

riastradh-brave
Copy link
Contributor

@riastradh-brave riastradh-brave commented Jul 31, 2018

  • Work around Chromium's new in-line constructor size limits.

  • Get base::StringPiece forward declaration in url_auth_util.h.

  • Use `#if !defined(BRAVE_CHROMIUM_BUILD)', not #if 0.

  • Override and include, rather than patch, net_log_event_type_list.h.

  • Override and include host_port_pair.cc to reduce BUILD.gn diffs.

  • Override and include url_util.cc rather than add url_auth_util.cc.

  • Override and include socks5_client_socket.cc.

  • Don't patch HostPortPair(host, port) constructor.

    Instead, use a different constructor in proxy_server.cc.

    This adds another patch to our maintenance burden, but it avoids
    changing the semantics of (and adding parsing overhead to) the
    constructor that is used in a bazillion places all over Chromium.

This is a replacement for #290, in which during squashing or something I lost two files 9socks5_client_socket.cc/h) that were critical to the whole thing.

fix brave/brave-browser#666

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions

- Work around Chromium's new in-line constructor size limits.
- Get base::StringPiece forward declaration in url_auth_util.h.
- Use `#if !defined(BRAVE_CHROMIUM_BUILD)', not #if 0.
- Override and include, rather than patch, net_log_event_type_list.h.
- Override and include host_port_pair.cc to reduce BUILD.gn diffs.
- Override and include url_util.cc rather than add url_auth_util.cc.
- Override and include socks5_client_socket.cc.
- Don't patch HostPortPair(host, port) constructor.

  Instead, use a different constructor in proxy_server.cc.

  This adds another patch to our maintenance burden, but it avoids
  changing the semantics of (and adding parsing overhead to) the
  constructor that is used in a bazillion places all over Chromium.
@riastradh-brave
Copy link
Contributor Author

Redone in #311.

@bsclifton bsclifton deleted the riastradh-socks5-auth branch November 8, 2019 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reland SOCKS5 PR
1 participant