diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-11-30 22:26:07 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-30 22:26:07 +0100 |
commit | f08898257dbc46134520ff4cd68308240543325e (patch) | |
tree | 5f30fb8b607f02fc7e946656c0cfbb00f3e68526 /pkg/backend | |
parent | de4534db33835783609fb002131fd80339f532a5 (diff) |
[bug] avoid location corner case
Diffstat (limited to 'pkg/backend')
-rw-r--r-- | pkg/backend/api.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 52c23c3..ba07adf 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -86,6 +86,13 @@ func SetTransport(label string) { log.Println(err) } if label == "obfs4" { + // XXX this is an expedite way of avoiding the corner case + // in which user has selected a manual location that does not offer bridges. + // In the future, we can be more delicate and 1. do the switch only if the manual location + // is incompatible with obfs4; 2. notify the user of the change. + // But tonight we're in problem-solving mode, and we can assume that user wants to use bridges, + // no matter what. So let's assume that "use obfs4" supersedes everything else and be done. + UseAutomaticGateway() ctx.cfg.SetUseObfs4(true) } else { ctx.cfg.SetUseObfs4(false) |