Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vpn Hole
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
leap
Vpn Hole
Commits
29027de1
Commit
29027de1
authored
2 years ago
by
Pratik Lagaskar
Browse files
Options
Downloads
Patches
Plain Diff
main does not create bindings
parent
aaab10c9
Branches
Branches containing commit
No related tags found
1 merge request
!3
Fixed entry point for the library
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
alter/vpnhole.go
+35
-0
35 additions, 0 deletions
alter/vpnhole.go
with
35 additions
and
0 deletions
alter/vpnhole.go
0 → 100644
+
35
−
0
View file @
29027de1
package
alter
import
(
"fmt"
)
var
ErrShutdown
=
fmt
.
Errorf
(
"vpnhole was shutdown gracefully"
)
type
Config
struct
{
Addr
string
SubscriptionsFilename
string
Upstream
string
Start
func
()
error
Stop
func
()
error
}
func
(
c
Config
)
String
()
string
{
return
fmt
.
Sprintf
(
"Config{Addr: %s, SubscriptionsFilename: %s, Upstream: %s}"
,
c
.
Addr
,
c
.
SubscriptionsFilename
,
c
.
Upstream
)
}
// parse the flags and return the config struct with the values
func
ParseFlags
()
Config
{
return
Config
{
Addr
:
":53"
,
SubscriptionsFilename
:
"subs.list"
,
Upstream
:
"1.1.1.1:53"
,
Start
:
func
()
error
{
return
nil
},
Stop
:
func
()
error
{
return
nil
},
}
}
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