Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meskio
bitmask-vpn
Commits
60ea3443
There was a problem fetching the pipeline metadata.
Verified
Commit
60ea3443
authored
6 years ago
by
meskio
Browse files
Options
Downloads
Patches
Plain Diff
[bug] check for errors on vpn check
parent
909c059c
Branches
bug/44_vpn_check
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bitmask/vpn.go
+12
-1
12 additions, 1 deletion
bitmask/vpn.go
with
12 additions
and
1 deletion
bitmask/vpn.go
+
12
−
1
View file @
60ea3443
...
...
@@ -17,6 +17,7 @@ package bitmask
import
(
"errors"
"log"
)
// StartVPN for provider
...
...
@@ -52,7 +53,17 @@ func (b *Bitmask) VPNCheck() (helpers bool, priviledge bool, err error) {
if
err
!=
nil
{
return
false
,
false
,
err
}
return
res
[
"installed"
]
.
(
bool
),
res
[
"privcheck"
]
.
(
bool
),
nil
installed
,
ok
:=
res
[
"installed"
]
.
(
bool
)
if
!
ok
{
log
.
Printf
(
"Unexpected value for installed on 'vpn check': %v"
,
res
)
return
false
,
false
,
errors
.
New
(
"Invalid response format"
)
}
privcheck
,
ok
:=
res
[
"privcheck"
]
.
(
bool
)
if
!
ok
{
log
.
Printf
(
"Unexpected value for privcheck on 'vpn check': %v"
,
res
)
return
installed
,
false
,
errors
.
New
(
"Invalid response format"
)
}
return
installed
,
privcheck
,
nil
}
// ListGateways return the names of the gateways
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment