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
3f846b9f
Commit
3f846b9f
authored
2 years ago
by
Pratik Lagaskar
Browse files
Options
Downloads
Patches
Plain Diff
few edits
parent
c89fb412
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-3
1 addition, 3 deletions
README.md
blacklist/subscription.go
+2
-2
2 additions, 2 deletions
blacklist/subscription.go
vpnhole/handler.go
+11
-0
11 additions, 0 deletions
vpnhole/handler.go
with
14 additions
and
5 deletions
README.md
+
1
−
3
View file @
3f846b9f
WIP
<p
align=
"center"
>
<img
width=
"285"
height=
"285"
src=
"https://0xacab.org/warlordsam/assets/-/raw/no-masters/vpn-hole
-
mascot.png"
>
<img
width=
"285"
height=
"285"
src=
"https://0xacab.org/warlordsam/assets/-/raw/no-masters/vpn-hole
_
mascot.png"
>
</p>
# **VPN-Hole**
...
...
This diff is collapsed.
Click to expand it.
blacklist/subscription.go
+
2
−
2
View file @
3f846b9f
...
...
@@ -40,7 +40,7 @@ func (b *Blacklist) updateList(ctx context.Context, blacklistURL, sum string) ([
b
.
subscriptions
[
blacklistURL
]
=
newSum
b
.
subscriptionsMu
.
Unlock
()
log
.
Println
(
"blacklist subscription updated"
,
blacklistURL
,
newSum
)
log
.
Println
(
"
\0
33[32m[+]
blacklist subscription updated
\0
33[0m
"
,
blacklistURL
,
newSum
)
return
hosts
,
nil
}
This diff is collapsed.
Click to expand it.
vpnhole/handler.go
+
11
−
0
View file @
3f846b9f
...
...
@@ -42,10 +42,21 @@ func Handler(rw dns.ResponseWriter, req *dns.Msg) {
return
}
// To debug what is causing the i/o timeout error
// pretty.Println(resp)
if
err
=
rw
.
WriteMsg
(
resp
);
err
!=
nil
{
log
.
Println
(
fmt
.
Errorf
(
"failed to reply: %w"
,
err
))
}
// To prevent the i/o timeout error from causing a panic that crashes vpnhole
// validate that the response is not nil before trying to access it
if
resp
.
Answer
==
nil
{
fmt
.
Println
(
"
\0
33[31m"
,
"[-] Issue resolving DNS Name."
,
"
\0
33[0m"
)
}
else
{
fmt
.
Println
(
resp
.
Answer
)
}
}
func
Block
(
rw
dns
.
ResponseWriter
,
req
*
dns
.
Msg
)
error
{
...
...
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