Skip to content
Snippets Groups Projects
Commit 3c9a86e1 authored by jkito's avatar jkito :skull: Committed by jkito
Browse files

obfs4: filter out kcp bridges when transport is obfs4

in case of KCP the transport.Type is still obfs4, but it has
a different port than obfs4, without this commit KCP enabled
bridges were also considered as valid obfs4 bridges

in theory the same bridge can be running in both obfs4 and KCP
mode and listening on different ports, but the eip-service.json
schema separates this into different transport objects

this fixes a bug where after selecting obfs4 transport it was
trying connect to a KCP enabled bridge with plain obfs4 mode
parent 2844839b
No related branches found
No related tags found
1 merge request!239obfs4: stop obfs4 client and proxy in a go routine
......@@ -66,6 +66,9 @@ func (gw Gateway) isTransport(transport string) bool {
if transport == "kcp" {
return gw.Transport == "obfs4" && slices.Contains(gw.Protocols, "kcp")
}
if transport == "obfs4" {
return gw.Transport == "obfs4" && !slices.Contains(gw.Protocols, "kcp")
}
return transport == "any" || gw.Transport == transport
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment