Repository navigation
Conversation
|
| Dial: dialer.DialStream, | ||
| ConnectionProviderInfo: ConnectionProviderInfo{ | ||
| ConnType: connType, | ||
| FirstHop: fallbackFirstHop, |
There was a problem hiding this comment.
The problem is that the IP routing doesn't really have a well defined first-hop. for the other IP rules, you will use a different first hop, so we can't say it's the fallback.
Could you please dig deeper and explain where the separator error is coming from? The fix most certainly belongs somewhere else.
There was a problem hiding this comment.
Oh, you're right, my fix isn't correct for this case. An iptable can have multiple routing paths, so we can't just use the fallback's first hop for the whole thing.
I traced the error a bit further. In parse.go, FirstHop is only set when the stream and packet first hops match. With an iptable, they may not match, so FirstHop ends up empty. Then createVpnTunnel() in client/electron/index.ts calls net.splitHostPort(request.firstHop) without checking for an empty value, which causes the host:port separator not found error.
This also looks related to #2686, since that issue seems to involve the same assumption about firstHop in more complex YAML configs. I'm not sure yet if it's exactly the same root cause, but I'll look into it and try to find something.
Fixes #2887
The
iptablestream dialer drops theFirstHopvalue from its fallback dialer. When TCP usesiptablewith a Shadowsocks fallback and UDP uses the same Shadowsocks endpoint, this causes the Windows client to fail withhost:port separator not found.This change preserves the fallback's
FirstHopand adds a regression test.Tested with
go test ./client/go/outline/configregistry.