3 ms·
Too bad there isn't a way to use the network of the machine running the browser... Maybe one could write some code that intercepts any outgoing network traffic
by allanrbo 4y ago
Too bad there isn't a way to use the network of the machine running the browser... Maybe one could write some code that intercepts any outgoing network traffic from the VM, and instead of sending it via websockets to that 3rd party VPN, instead just finds packets that are part of a HTTP call and rewrites them to XMLHttpRequests. Would obviously only work for HTTP traffic, but that's probably a big majority. Might not work for HTTPS though. Oh, and DNS would have to respond with some sort of fantasy IP's that the Javascript host would have to keep track of.
- ratorx 4y agoHTTP support seems possible, but it’s unlikely to be useful by itself. HTTPS is probably the majority and that’s a lot trickier (you’d have to MITM TLS in JS). DNS is comparable to HTTP probably, since you could just use DNS-over-HTTPS and intercept DNS packets.
- ahachete 4y agoWait until the emulator can run a modern kernel with eBPF support. Then use eBPF to intercept the SSL calls pre encryption, push via a map the requests to userspace, and then translate them to HTTP as you wish. Simple! ;P
- lxgr 4y agoI'm sure it can run modern kernels just fine, but how would eBPF help with TLS (which is almost exclusively implemented in userspace)?
- saagarjha 4y agoYou’d probably be looking for something like https://en.wikipedia.org/wiki/Slirp https://en.wikipedia.org/wiki/Slirp.