Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
tunnel
liberty-tunnel-client-library-apple
Commits
4222ee22
Commit
4222ee22
authored
Jul 05, 2018
by
Davide De Rosa
Browse files
Improve custom cfg code
parent
4784c748
Changes
1
Hide whitespace changes
Inline
Side-by-side
PIALibrary/Sources/VPN/PIATunnelProfile.swift
View file @
4222ee22
...
...
@@ -174,11 +174,11 @@ public class PIATunnelProfile: NetworkExtensionProfile {
cfg
.
providerBundleIdentifier
=
bundleIdentifier
var
customCfg
=
configuration
.
customConfiguration
if
let
piaCfg
=
customCfg
as?
PIATunnelProvider
.
Configuration
,
let
bestAddress
=
configuration
.
server
.
bestOpenVPNAddressForUDP
?
.
hostname
{
// XXX: UDP address = TCP address
if
let
piaCfg
=
customCfg
as?
PIATunnelProvider
.
Configuration
{
var
builder
=
piaCfg
.
builder
()
builder
.
resolvedAddresses
=
[
bestAddress
]
if
let
bestAddress
=
configuration
.
server
.
bestOpenVPNAddressForUDP
?
.
hostname
{
// XXX: UDP address = TCP address
builder
.
resolvedAddresses
=
[
bestAddress
]
}
customCfg
=
builder
.
build
()
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment