Combine direct_split with TCB Desynchronization
Related to #46
Todo:
- [ ] Add more comments
- [ ] Discuss functionality of this dialer.
Thanks; how are you building and testing this? Or, is it PoC (which is also fine)?
PoC.patch.txt @ignoramous You can use this patch. Build and run it with adb or termux.
@ignoramous Does firestack have API(s) to configure dialers?
Does firestack have API(s) to configure dialers?
Yes; see [r|n|p|tls]dial.go in intra/dialers. Not the most stellar code.
@ignoramous Have you design how rethink-app side specifies a strategy? We are adding multiple circumvention strategies. Can we use AddProxy()? (Sorry, I'm not familiar with rethink-app) And dialers.SplitDial() may trigger residual censorship, I think we can make WeirdSplit the default strategy. (It doesn't break any load balancer but increases latency, cause servers to wait for retranssmission)
https://github.com/celzero/firestack/blob/e16959c082c3450bdb8d826da0285b787b315491/intra/dialers/rdial.go#L88-L91 Can we remove this filter?
Can we use AddProxy()? (Sorry, I'm not familiar with rethink-app)
Don't have to. ipn/exit.go (no fancy stuff, just plain old egress), ipn/base.go (splits ClientHello if TCP on ports 443 & 853), and ipn/ground.go (drops all egress) are pre-added "proxies" that use the underlying network as-is. In this case, we probably switch ipn/base.go to use WeirdDial (needs a better name) if you think it is better than SplitDial in all scenarios, with a fallback to SplitDial (but that can be implemented in a later commit).
overwrite_split_experiment branch @ignoramous Could you try it? Please run it on hardware devices, it doesn't work with SLIRP.
@ignoramous Do you have time to review my pull request next week?
Doesn't work on main branch.
Do you have time to review my pull request next week
I've reviewed this and nothing looks particularly concerning to me. There's a few linter remarks on the code, which could be addressed.
Received ICMP messages may not contain my payload, so the implementation of traceroute needs modification.
@ignoramous SwitchStrategy() doesn't work. Move it to ipn/exit.go?
SwitchStrategy() doesn't work. Move it to ipn/exit.go?
Could instead move var DialStrategy to config/settings.go as atomic.Int32, and the method DialStrat(int32) to android/tun2socks.go.
It's usable now. What's next? @ignoramous