-
Notifications
You must be signed in to change notification settings - Fork 357
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
Log if Same IP is used when starting a tunnel #5228
Conversation
IOS-326 Log when Same IP is being used
Log when the device uses the known Same IP IP. See linked desktop issue for details. |
.contains { $0 == ApplicationConfiguration.sameIPv6 } | ||
|
||
let isNotUsingSameIP = (hasIPv4SameAddress || hasIPv6SameAddress) == false ? " NOT " : " " | ||
providerLogger.debug("Same IP is\(isNotUsingSameIP)being used") |
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.
On first sight this really looked like it would miss a space between "is" and "being" when Same IP is being used. I'm not going to nitpick about your codebase, but if I wrote it I would have IsNotUsingSameIp
be empty when it is being used and otherwise "NOT " and adjust formatting string accordingly. :)
8d710c0
to
6ef69e6
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.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @faern)
ios/PacketTunnel/PacketTunnelProvider.swift
line 249 at r1 (raw file):
Previously, faern (Linus Färnstrand) wrote…
On first sight this really looked like it would miss a space between "is" and "being" when Same IP is being used. I'm not going to nitpick about your codebase, but if I wrote it I would have
IsNotUsingSameIp
be empty when it is being used and otherwise "NOT " and adjust formatting string accordingly. :)
You're right, I've reversed the check to make it (slightly) easier to read.
ios/Shared/ApplicationConfiguration.swift
line 43 at r1 (raw file):
Previously, faern (Linus Färnstrand) wrote…
Since the app in an ideal world should not need to know these IPs, I would add a comment, maybe a
// TODO
style comment, explaining that this is just temporary for aiding with debugging during migration to the Same IP system. And that it can be removed once the migration is done.To help avoid it becoming arcane code living forever for no reason :)
Done.
6ef69e6
to
366f7ab
Compare
366f7ab
to
cae5cdf
Compare
This change is