Unify hopping and regular API
We want the client to have a unified API rather than being a socks server for "regular" mode and a transparent UDP proxy for "hopping" mode.
We chose to move to the transparent UDP proxy because socks+UDP support is missing/not particularly reliable.
On the client side it's simplest for the "regular" mode to be conceptually a "hopping" client that only has a single IP+port endpoint and doesn't bother to ever "hop" to any other endpoint. In that way we can go ahead and remove the other code path.
On the server side we do a similar thing, renaming the "HopServer" to "UDPServer" and depending on whether hopping is enabled we listen on a single port or many.
We leave the TCP server for now because our introducer code uses the obfsvpn.NewDialerFromCert method to create a dialer which depends on an obfsvpn server endpoint running on TCP mode.
Note that the client API (and FFI API) have changed so any upstream libraries need to reflect those changes.
ALSO: the openvpn client config has changed, including the protocol, the remote, and the removal of the socks parameters.
Merge request reports
Activity
changed milestone to %2024.06 LEAP VPN Release
added Doing label
requested review from @cyberta
assigned to @maxb
added 1 commit
- 64e4df21 - Set docker-compose "project" in integration tests
95 ProxyAddr: config.ProxyAddr, 96 hopEnabled: config.HoppingConfig.Enabled, 97 ctx: ctx, 98 hopJitter: config.HoppingConfig.HopJitter, 99 kcpConfig: config.KCPConfig, 100 obfs4Failures: map[string]int32{}, 101 minHopSeconds: config.HoppingConfig.MinHopSeconds, 102 newObfs4Conn: make(chan net.Conn), 103 obfs4Endpoints: obfs4Endpoints, 104 stop: stop, 105 state: stopped, 49 106 } 50 107 } 51 108 52 func (c *Client) Start() (bool, error) { 53 c.mux.Lock() lol I guess I shouldn't be surprised... d24eb3bb
@cyberta should we just add the start/stop lock back?
changed this line in version 5 of the diff
Doing a little thinking on this:
- I think we can pretty easily just tag the previous version as 0.0.1 and then this would be 1.0.0
- I can manually write up a changelog, but I think in general I'd love a tool that does some automation here. I'm not sure I necessarily want a fully automatic semantic commit -> changelog tool, but I also don't love depending on people to do this automatically every time...
I don't have a strong opinion about the versioning, in our updated code standards we thought about keeping the versioning formatted as major.minor.hotfix. In that case I would probably start with 0.1.0 and move to 1.0.0
I think we don't use any changelog creation tools and I think I never did. Which is why I would need to lookup for tools that do that. If you have proposals, please go ahead. Starting with a manual CHANGELOG would be totally fine with me.
It looks like @jkito added a
pkg/version
file to the bitmask-vpn repo: https://0xacab.org/leap/bitmask-vpn/-/blob/main/pkg/version?ref_type=headsIs that standard? I don't think I've ever seen that before?
Oh also the bitmask-vpn tags don't have the leading
v
: https://0xacab.org/leap/bitmask-vpn/-/tagsI was under the impression that for go we'd tag it like v0.1.0, v1.0.0, etc... right?
imo we can keep the v out of the version tag
I think go module dependency resolution requires the leading
v
? https://go.dev/doc/modules/version-numbers https://github.com/golang/go/issues/32945 https://github.com/golang/go/issues/34512Ok went with !38 (6336ea3e)
It looks like @jkito added a
pkg/version
file to the bitmask-vpn repo: https://0xacab.org/leap/bitmask-vpn/-/blob/main/pkg/version?ref_type=heads Is that standard? I don't think I've ever seen that before?that was a quick fix to create a release, i've addressed this in bitmask-vpn!200 (merged) which is standard practice in go projects
mentioned in issue #43 (closed)
175 177 flag.String(cfgFile, "", "The JSON config file to load") 176 178 177 179 flag.Bool(genkey, false, "Generate key material") 178 flag.Bool(hop, false, "Use UDP based hopping") 180 flag.Bool(hop, false, "Use hopping PT") 179 181 flag.Bool(kcp, false, "Use obfs4-KCP transport (UDP)") 182 flag.Bool(udp, false, "Use udp") - Edited by cyberta
changed this line in version 6 of the diff
@cyberta thanks for all the
feedback! I'll get on thesemarked this merge request as draft from 6dd40745