-
Notifications
You must be signed in to change notification settings - Fork 893
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. #311
Conversation
- 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.
+ return OK; | ||
+} | ||
+ | ||
+int SOCKS5ClientSocket::DoAuth(int rv) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we put implementation of SOCKS5ClientSocket::DoAuth
, SOCKS5ClientSocket::auth_method
and SOCKS5ClientSocket::Authenticate
in chromium_src/net/socket/socks5_client_socket.cc
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in #336
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually you don't have to create a new branch for a new PR.
Just push a sequential commit should be fine and I won't ask you to squash it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will take a look at #336
Superseded by #336. |
Changes: ``` * cee363d - (44 minutes ago) Merge pull request #314 from brave/revert-sync-master — Pete Miller (HEAD -> master, origin/master, origin/HEAD) |\ | * 0ca4b73 - (56 minutes ago) Revert "sync v2" — Cezar Augusto | * a479cea - (56 minutes ago) Revert "Merge pull request #308 from brave/sync_img" — Cezar Augusto |/ * dd46eab - (19 hours ago) Merge pull request #247 from brave/c71-clock-period — Pete Miller |\ | * 20d2a61 - (7 weeks ago) Fix NTP clock for c71 — petemill (origin/c71-clock-period, c71-clock-period) * | 69a3399 - (19 hours ago) Merge pull request #305 from ryanml/android-rewards-title-fix — Pete Miller |\ \ | |/ |/| | * d92ce8f - (7 days ago) Fixing rewards toggle for long translations — ryanml (ryanml/android-rewards-title-fix, android-rewards-title-fix) |/ * 4692dfd - (25 hours ago) readme typos — Ross Moody * ca3e285 - (29 hours ago) Merge pull request #312 from emerick/rewards-backup-wallet-notification — Nejc Zdovc |\ | * 4dda1bc - (4 days ago) Add support for backupWallet notification — Emerick Rogul * | 0a5f56e - (4 days ago) Emoji Life — Ross Moody * | be16816 - (4 days ago) Readme formatting — Ross Moody * | 35b166d - (4 days ago) Brave UI Logo — Ross Moody * | fddeb8a - (4 days ago) Merge pull request #311 from brave/now-deploy-static — Cezar Augusto |\ \ | * | 6685301 - (5 days ago) Use new static deploy config for now instead of docker — petemill (origin/now-deploy-static, now-deploy-static) * | | eb49e8b - (4 days ago) remove list from README file — Cezar Augusto * | | 59eae8d - (4 days ago) remove outdated docs — Cezar Augusto * | | f04fecc - (4 days ago) do not count first letter if space in textareaclipboard — Cezar Augusto | |/ |/| * | 7ea9178 - (5 days ago) Merge pull request #308 from brave/sync_img — Cezar Augusto |\ \ | * | 470233f - (6 days ago) make sync images exportable — Cezar Augusto | |/ * | aa520cf - (5 days ago) Merge pull request #309 from brave/welcome_img — Pete Miller |\ \ | * | 870d3ba - (6 days ago) animation dial in — Ross Moody (origin/welcome_img, welcome_img) | * | 1c2525b - (6 days ago) make welcome page images exportable — Cezar Augusto | |/ * | 96ccb12 - (6 days ago) Merge pull request #307 from kirkins/patch-1 — Ryan Lanese |\ \ | * | f98a665 - (6 days ago) small typo — Philip Kirkbride * | | f3c38e1 - (6 days ago) v0.36.0 — ryanml (tag: v0.36.0) |/ / * | 46b3501 - (6 days ago) Merge pull request #304 from ryanml/disabled-panel — Nejc Zdovc |\ \ | * | 6be56a3 - (7 days ago) Adding disabledPanel component — ryanml (ryanml/disabled-panel) |/ / * | 79b16fb - (6 days ago) Merge pull request #299 from ryanml/fix-298 — Nejc Zdovc |\ \ | |/ |/| | * c79530c - (12 days ago) Fixes #298, uses string type for amount/tokens — ryanml (ryanml/fix-298, fix-298) * 6bf8054 - (8 days ago) v0.35.0 — Cezar Augusto (tag: v0.35.0, now-deploy-reliable) * 3535427 - (3 weeks ago) sync v2 — Cezar Augusto * 10f07c0 - (9 days ago) Merge pull request #300 from brave/site-banner-icon — Ryan Lanese |\ | * da3cc4b - (11 days ago) Site banner icon update — Ross Moody * 9064f12 - (9 days ago) Merge pull request #301 from emerick/rewards-insufficient-funds-notification — Ryan Lanese * 5300262 - (11 days ago) Add support for insufficientFunds notification — Emerick Rogul ```
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 (socks5_client_socket.cc/h) that were critical to the whole thing, and for #302, which was behind a Chromium update or something.
fix brave/brave-browser#666
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
On riastradh-socks5-auth-test-v2 (which only adds tests, doesn't touch anything used outside tests):
ninja -C src/out/Debug net:net_unittests
./src/out/Debug/net_unittests --gtest_filter='ProxyServerTest.*:SOCKS5ClientSocketTest.*'
Reviewer Checklist: