Skip to content

Commit 916ed50

Browse files
committed
Fix VLESS proxy list displaying host instead of full URL, update description for XHTTP+MLKEM
1 parent 02a5977 commit 916ed50

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎submodules/SettingsUI/Sources/Data and Storage/ProxyListSettingsController.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ private enum ProxySettingsControllerEntry: ItemListNodeEntry {
125125
return .index(2)
126126
case let .server(_, _, _, settings, _, _, _, _, _):
127127
let displayHost: String
128-
if case .vless = settings.connection {
129-
displayHost = "vless://\(settings.host)"
128+
if case .vless = settings.connection, let vlessURL = settings.vlessProxyURL {
129+
displayHost = vlessURL
130130
} else {
131131
displayHost = settings.host
132132
}

‎submodules/SettingsUI/Sources/Data and Storage/ProxySettingsServerItem.swift‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,13 @@ private final class ProxySettingsServerItemNode: ItemListRevealOptionsItemNode {
243243
}
244244

245245
let titleAttributedString = NSMutableAttributedString()
246-
titleAttributedString.append(NSAttributedString(string: urlEncodedStringFromString(item.server.host), font: titleFont, textColor: item.theme.list.itemPrimaryTextColor))
247-
if !item.server.connection.isWebProxy {
248-
titleAttributedString.append(NSAttributedString(string: ":\(item.server.port)", font: titleFont, textColor: item.theme.list.itemSecondaryTextColor))
246+
if case .vless = item.server.connection, let vlessURL = item.server.vlessProxyURL {
247+
titleAttributedString.append(NSAttributedString(string: vlessURL, font: titleFont, textColor: item.theme.list.itemPrimaryTextColor))
248+
} else {
249+
titleAttributedString.append(NSAttributedString(string: urlEncodedStringFromString(item.server.host), font: titleFont, textColor: item.theme.list.itemPrimaryTextColor))
250+
if !item.server.connection.isWebProxy {
251+
titleAttributedString.append(NSAttributedString(string: ":\(item.server.port)", font: titleFont, textColor: item.theme.list.itemSecondaryTextColor))
252+
}
249253
}
250254
let statusAttributedString = NSAttributedString(string: item.label, font: statusFont, textColor: item.labelAccent ? item.theme.list.itemAccentColor : item.theme.list.itemSecondaryTextColor)
251255

‎submodules/TelegramUIPreferences/Sources/ForkPresentationLanguage.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public enum ForkProxyDescriptionStrings {
9898
}
9999

100100
public static var vless: String {
101-
return ForkPresentationLanguage.prefersRussianStrings ? "VLESS на основе Xray-core: TCP, WebSocket, gRPC, HTTPUpgrade и XHTTP; TLS/REALITY. Вставьте ссылку vless://. Соединения Telegram используют туннель, звонки — если включено «Использовать для звонков». Внешние сайты и Mini Apps могут использовать отдельные соединения." : "VLESS with an embedded Xray core: TCP, WebSocket, gRPC, HTTPUpgrade and XHTTP; TLS/REALITY. Paste a vless:// link. Telegram connections use the tunnel; calls do so when ‘Use for calls’ is enabled. External sites and Mini Apps may use separate connections."
101+
return ForkPresentationLanguage.prefersRussianStrings ? "VLESS на основе Xray-core: TCP, WebSocket, gRPC, HTTPUpgrade и XHTTP; TLS/REALITY/MLKEM. Вставьте ссылку vless://. Соединения Telegram используют туннель, звонки — если включено «Использовать для звонков». Внешние сайты и Mini Apps могут использовать отдельные соединения." : "VLESS with an embedded Xray core: TCP, WebSocket, gRPC, HTTPUpgrade and XHTTP; TLS/REALITY/MLKEM. Paste a vless:// link. Telegram connections use the tunnel; calls do so when ‘Use for calls’ is enabled. External sites and Mini Apps may use separate connections."
102102
}
103103

104104
/// Short one-liners for the add-proxy action sheet.

0 commit comments

Comments
 (0)