mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-02-11 00:00:08 +08:00
Break proto string into components in the properties class instead of configuration class
This commit is contained in:
@@ -57,8 +57,7 @@ NSString *const OpenVPNTLSCertProfileDefaultValue = @"default";
|
||||
OpenVPNTransportProtocolDefaultValue: @(OpenVPNTransportProtocolDefault)
|
||||
};
|
||||
|
||||
NSString *currentValue = [value length] == 0 ? OpenVPNTransportProtocolDefaultValue :
|
||||
[[value componentsSeparatedByString:@"-"] firstObject];
|
||||
NSString *currentValue = [value length] == 0 ? OpenVPNTransportProtocolDefaultValue :value;
|
||||
|
||||
NSNumber *transportProtocol = options[currentValue];
|
||||
NSAssert(transportProtocol != nil, @"Incorrect protocol value: %@", currentValue);
|
||||
|
||||
@@ -40,7 +40,7 @@ using namespace openvpn;
|
||||
|
||||
_remotePort = port;
|
||||
|
||||
NSString *currentProto = [NSString stringWithUTF8String:eval.remoteProto.c_str()];
|
||||
NSString *currentProto = [[[NSString stringWithUTF8String:eval.remoteProto.c_str()] componentsSeparatedByString:@"-"] firstObject];
|
||||
_remoteProto = [OpenVPNConfiguration getTransportProtocolFromValue:currentProto];
|
||||
|
||||
_servers = nil;
|
||||
|
||||
Reference in New Issue
Block a user