Merge pull request #61 from passepartoutvpn/default-automatic-to-udp
Default "Automatic" protocol to UDP
This commit is contained in:
commit
16093c9fb7
|
@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- ProtonVPN provider. [#7](https://github.com/passepartoutvpn/passepartout-ios/issues/7)
|
||||
- Italian translations. [#58](https://github.com/passepartoutvpn/passepartout-ios/pull/58)
|
||||
|
||||
### Changed
|
||||
|
||||
- Automatic protocol defaults to UDP endpoints. [#61](https://github.com/passepartoutvpn/passepartout-ios/pull/61)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Some providers may crash on VPN activation. [#57](https://github.com/passepartoutvpn/passepartout-ios/issues/57)
|
||||
|
|
|
@ -148,8 +148,8 @@
|
|||
|
||||
"endpoint.sections.location_addresses.header" = "Addresses";
|
||||
"endpoint.sections.location_protocols.header" = "Protocols";
|
||||
"endpoint.cells.any_address.caption" = "Any";
|
||||
"endpoint.cells.any_protocol.caption" = "Any";
|
||||
"endpoint.cells.any_address.caption" = "Automatic";
|
||||
"endpoint.cells.any_protocol.caption" = "Automatic";
|
||||
|
||||
"provider.preset.cells.tech_details.caption" = "Technical details";
|
||||
//"provider.preset.sections.main.footer" = "Tap info button to disclose technical details.";
|
||||
|
|
|
@ -144,8 +144,8 @@
|
|||
|
||||
"endpoint.sections.location_addresses.header" = "Indirizzi";
|
||||
"endpoint.sections.location_protocols.header" = "Protocolli";
|
||||
"endpoint.cells.any_address.caption" = "Qualunque";
|
||||
"endpoint.cells.any_protocol.caption" = "Qualunque";
|
||||
"endpoint.cells.any_address.caption" = "Automatico";
|
||||
"endpoint.cells.any_protocol.caption" = "Automatico";
|
||||
|
||||
"provider.preset.cells.tech_details.caption" = "Dettagli tecnici";
|
||||
//"provider.preset.sections.main.footer" = "Tap info button to disclose technical details.";
|
||||
|
|
|
@ -132,7 +132,15 @@ public class ProviderConnectionProfile: ConnectionProfile, Codable, Equatable {
|
|||
if let proto = manualProtocol {
|
||||
builder.sessionConfiguration.endpointProtocols = [proto]
|
||||
} else {
|
||||
builder.sessionConfiguration.endpointProtocols = preset.configuration.sessionConfiguration.endpointProtocols
|
||||
|
||||
// restrict "Any" protocol to UDP, unless there are no UDP endpoints
|
||||
let allEndpoints = preset.configuration.sessionConfiguration.endpointProtocols
|
||||
var endpoints = allEndpoints?.filter { $0.socketType == .udp }
|
||||
if endpoints?.isEmpty ?? true {
|
||||
endpoints = allEndpoints
|
||||
}
|
||||
|
||||
builder.sessionConfiguration.endpointProtocols = endpoints
|
||||
// builder.sessionConfiguration.endpointProtocols = [
|
||||
// EndpointProtocol(.udp, 8080),
|
||||
// EndpointProtocol(.tcp, 443)
|
||||
|
|
|
@ -298,11 +298,11 @@ public enum L10n {
|
|||
public enum Endpoint {
|
||||
public enum Cells {
|
||||
public enum AnyAddress {
|
||||
/// Any
|
||||
/// Automatic
|
||||
public static let caption = L10n.tr("Localizable", "endpoint.cells.any_address.caption")
|
||||
}
|
||||
public enum AnyProtocol {
|
||||
/// Any
|
||||
/// Automatic
|
||||
public static let caption = L10n.tr("Localizable", "endpoint.cells.any_protocol.caption")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue