Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Julian Merlin
bitmask-vpn
Commits
c6c0209a
Unverified
Commit
c6c0209a
authored
3 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[feat] log dns lookup if first cert fetch fails
parent
86d30f2a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/circumvention.rst
+17
-3
17 additions, 3 deletions
docs/circumvention.rst
pkg/vpn/bonafide/eip_service.go
+5
-5
5 additions, 5 deletions
pkg/vpn/bonafide/eip_service.go
pkg/vpn/diagnose.go
+19
-0
19 additions, 0 deletions
pkg/vpn/diagnose.go
pkg/vpn/openvpn.go
+3
-0
3 additions, 0 deletions
pkg/vpn/openvpn.go
with
44 additions
and
8 deletions
docs/circumvention.rst
+
17
−
3
View file @
c6c0209a
...
...
@@ -9,9 +9,23 @@ Bootstrapping the connection
There are two different steps where circumvention can be used: boostrapping the
connection (getting a certificate and the configuration files) and using an
obfuscated transport protocol. At the moment RiseupVPN offers obfs4 transport
"bridges" (you can try them with the `--obfs4` command line argument). For the
initial bootstrap, there are a couple of techniques that will be attempted.
obfuscated transport protocol.
For the initial bootstrap, there are a couple of techniques that will be
attempted. If this fails, please open an issue with the relevant log
information.
Obfuscated bridges
-----------------------------
At the moment RiseupVPN offers obfs4 transport "bridges" (you can try them with
the `--obfs4` command line argument, a way to enable them from the gui will be
following soon).
If you know you need bridges but the current ones do not work for you, please
get in contact. We're interested in learning what are the specific censorship
measures being deployed in your concrete location, and we could work together
to enable new bridges.
Getting certificates off-band
-----------------------------
...
...
This diff is collapsed.
Click to expand it.
pkg/vpn/bonafide/eip_service.go
+
5
−
5
View file @
c6c0209a
...
...
@@ -79,17 +79,17 @@ func (b *Bonafide) fetchEipJSON() error {
eip3API
:=
config
.
APIURL
+
"3/config/eip-service.json"
resp
,
err
:=
b
.
client
.
Post
(
eip3API
,
""
,
nil
)
for
err
!=
nil
{
log
.
Printf
(
"Error fetching eip v3 json: %v"
,
err
)
// TODO why exactly 1 retry? Make it configurable, for tests
time
.
Sleep
(
retryFetchJSONSeconds
*
time
.
Second
)
resp
,
err
=
b
.
client
.
Post
(
eip3API
,
""
,
nil
)
if
err
!=
nil
{
// TODO it might be that
it's not an
error, but an empty file or whatever done
// TODO it might be that
we get no
error, but an empty file or whatever done
// by DNS poisoning. Should try to parse the file.
uri
:=
b
.
getURLNoDNS
(
"eip"
)
log
.
Println
(
"Fetching "
,
uri
)
resp
,
err
=
b
.
client
.
Post
(
uri
,
""
,
nil
)
}
if
err
!=
nil
{
log
.
Printf
(
"Error fetching eip v3 json: %v"
,
err
)
time
.
Sleep
(
retryFetchJSONSeconds
*
time
.
Second
)
}
}
defer
resp
.
Body
.
Close
()
...
...
This diff is collapsed.
Click to expand it.
pkg/vpn/diagnose.go
0 → 100644
+
19
−
0
View file @
c6c0209a
package
vpn
import
(
"log"
"net"
)
func
logDnsLookup
(
domain
string
)
{
addrs
,
err
:=
net
.
LookupHost
(
domain
)
if
err
!=
nil
{
log
.
Println
(
"ERROR cannot resolve address:"
,
domain
)
log
.
Println
(
err
)
}
log
.
Println
(
"From here,"
,
domain
,
"resolves to:"
)
for
_
,
addr
:=
range
addrs
{
log
.
Println
(
addr
)
}
}
This diff is collapsed.
Click to expand it.
pkg/vpn/openvpn.go
+
3
−
0
View file @
c6c0209a
...
...
@@ -202,6 +202,8 @@ func (b *Bitmask) getCert() (certPath string, err error) {
}
}
if
failed
||
!
isValidCert
(
certPath
)
{
d
:=
config
.
APIURL
[
8
:
len
(
config
.
APIURL
)
-
1
]
logDnsLookup
(
d
)
cert
,
err
:=
b
.
bonafide
.
GetPemCertificateNoDNS
()
if
cert
!=
nil
{
log
.
Println
(
"Successfully did certificate bypass"
)
...
...
@@ -214,6 +216,7 @@ func (b *Bitmask) getCert() (certPath string, err error) {
failed
=
true
}
}
return
certPath
,
err
}
...
...
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