From f08898257dbc46134520ff4cd68308240543325e Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 30 Nov 2021 22:26:07 +0100 Subject: [bug] avoid location corner case --- pkg/backend/api.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pkg/backend/api.go') 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) -- cgit v1.2.3