-
Notifications
You must be signed in to change notification settings - Fork 359
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
Remove socks5 authentication check from the TransportStrategy layer #5708
Remove socks5 authentication check from the TransportStrategy layer #5708
Conversation
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.
Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mojganii)
ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/PersistentProxyConfiguration+ViewModel.swift
line 24 at r1 (raw file):
) socks.username = config.authentication?.username ?? ""
Nit: I know that username and password are "" by default, but perhaps we could do something like the snippet below in order to make it clearer that we're only assigning username and password when we actually have authentication.
Code snippet:
config.authentication.flatMap { authentication in
socks.username = authentication.username
socks.password = authentication.password
}
f51c485
to
e21a122
Compare
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.
Reviewed 2 of 6 files at r2, all commit messages.
Reviewable status: 2 of 6 files reviewed, 1 unresolved discussion (waiting on @mojganii)
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.
Reviewed 4 of 6 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
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.
Reviewed 6 of 6 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
e21a122
to
986e7d5
Compare
We don't necessarily need a switch-case for SOCKS authentication that involves retrieving credentials in the
TransportStrategy
when we can achieve the same outcome using an optional value for the authentication part. This pull request transforms theSocksAuthentication
enum into a struct and makes it an optional variable inSocksConfiguration
.This change is