diff options
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt b/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt index c5e1c51..cb520bb 100644 --- a/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt +++ b/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt | |||
@@ -21,11 +21,11 @@ class TincVpnService : VpnService() { | |||
21 | this.netName = intent.getStringExtra(INTENT_EXTRA_NET_NAME) | 21 | this.netName = intent.getStringExtra(INTENT_EXTRA_NET_NAME) |
22 | 22 | ||
23 | val net = Builder().setSession(this.netName) | 23 | val net = Builder().setSession(this.netName) |
24 | net.apply(VpnInterfaceConfiguration(AppPaths.netConfFile(this, this.netName))) | 24 | net.apply(VpnInterfaceConfiguration(AppPaths.netConfFile(this.netName))) |
25 | applyIgnoringException(net::addDisallowedApplication, BuildConfig.APPLICATION_ID) | 25 | applyIgnoringException(net::addDisallowedApplication, BuildConfig.APPLICATION_ID) |
26 | 26 | ||
27 | try { | 27 | try { |
28 | Tincd.start(this, this.netName, net.establish().detachFd()) | 28 | Tincd.start(this.netName, net.establish().detachFd()) |
29 | } catch (e: IOException) { | 29 | } catch (e: IOException) { |
30 | e.printStackTrace() | 30 | e.printStackTrace() |
31 | } | 31 | } |
@@ -35,7 +35,7 @@ class TincVpnService : VpnService() { | |||
35 | 35 | ||
36 | override fun onDestroy() { | 36 | override fun onDestroy() { |
37 | try { | 37 | try { |
38 | Tinc.stop(this, this.netName) | 38 | Tinc.stop(this.netName) |
39 | } catch (e: IOException) { | 39 | } catch (e: IOException) { |
40 | e.printStackTrace() | 40 | e.printStackTrace() |
41 | } | 41 | } |