Skip to content

Commit c7f0297

Browse files
acb-mvbuggmagnet
authored andcommitted
Update DAITA text, placing the warning at the front
1 parent 0b00536 commit c7f0297

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

ios/MullvadVPN/Coordinators/Settings/DAITA/SettingsDAITAView.swift

+7-6
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ extension SettingsDAITAView {
104104
"SETTINGS_INFO_DAITA_PAGE_1",
105105
tableName: "Settings",
106106
value: """
107+
**Attention: This increases network traffic and will also negatively affect speed, latency, \
108+
and battery usage. Use with caution on limited plans.**
109+
107110
DAITA (Defense against AI-guided Traffic Analysis) hides patterns in \
108111
your encrypted VPN traffic.
109112
110113
By using sophisticated AI it’s possible to analyze the traffic of data \
111114
packets going in and out of your device (even if the traffic is encrypted).
112-
113-
If an observer monitors these data packets, DAITA makes it significantly \
114-
harder for them to identify which websites you are visiting or with whom \
115-
you are communicating.
116115
""",
117116
comment: ""
118117
),
@@ -123,14 +122,16 @@ extension SettingsDAITAView {
123122
"SETTINGS_INFO_DAITA_PAGE_2",
124123
tableName: "Settings",
125124
value: """
125+
If an observer monitors these data packets, DAITA makes it significantly \
126+
harder for them to identify which websites you are visiting or with whom \
127+
you are communicating.
128+
126129
DAITA does this by carefully adding network noise and making all network \
127130
packets the same size.
128131
129132
Not all our servers are DAITA-enabled. Therefore, we use multihop \
130133
automatically to enable DAITA with any server.
131134
132-
Attention: Be cautious if you have a limited data plan as this feature \
133-
will increase your network traffic.
134135
""",
135136
comment: ""
136137
),

ios/MullvadVPN/Coordinators/Settings/Views/SettingsInfoView.swift

+15-8
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,21 @@ struct SettingsInfoView: View {
5050
.hidden()
5151
}
5252

53+
private func bodyText(_ page: SettingsInfoViewModelPage) -> some View {
54+
(try? AttributedString(
55+
markdown: page.body,
56+
options: AttributedString.MarkdownParsingOptions(interpretedSyntax: .inlineOnlyPreservingWhitespace)
57+
)).map(Text.init) ?? Text(page.body)
58+
}
59+
5360
private func contentView() -> some View {
5461
ForEach(viewModel.pages, id: \.self) { page in
5562
VStack {
5663
VStack(alignment: .leading, spacing: 16) {
5764
Image(page.image)
5865
.resizable()
5966
.aspectRatio(contentMode: .fit)
60-
Text(page.body)
67+
bodyText(page)
6168
.font(.subheadline)
6269
.opacity(0.6)
6370
}
@@ -130,15 +137,14 @@ struct SettingsInfoView: View {
130137
"SETTINGS_INFO_DAITA_PAGE_1",
131138
tableName: "Settings",
132139
value: """
140+
**Attention: This increases network traffic and will also negatively affect speed, latency, \
141+
and battery usage. Use with caution on limited plans.**
142+
133143
DAITA (Defense against AI-guided Traffic Analysis) hides patterns in \
134144
your encrypted VPN traffic.
135145
136146
By using sophisticated AI it’s possible to analyze the traffic of data \
137147
packets going in and out of your device (even if the traffic is encrypted).
138-
139-
If an observer monitors these data packets, DAITA makes it significantly \
140-
harder for them to identify which websites you are visiting or with whom \
141-
you are communicating.
142148
""",
143149
comment: ""
144150
),
@@ -149,14 +155,15 @@ struct SettingsInfoView: View {
149155
"SETTINGS_INFO_DAITA_PAGE_2",
150156
tableName: "Settings",
151157
value: """
158+
If an observer monitors these data packets, DAITA makes it significantly \
159+
harder for them to identify which websites you are visiting or with whom \
160+
you are communicating.
161+
152162
DAITA does this by carefully adding network noise and making all network \
153163
packets the same size.
154164
155165
Not all our servers are DAITA-enabled. Therefore, we use multihop \
156166
automatically to enable DAITA with any server.
157-
158-
Attention: Be cautious if you have a limited data plan as this feature \
159-
will increase your network traffic.
160167
""",
161168
comment: ""
162169
),

0 commit comments

Comments
 (0)