Endlesss.fm is the way to go for playing music with friends online for free.
Instead of trying to beat network latency (which is impossible) endlesss provides a shared looper and a clock to sync all your gear to. This way you can jam with people with zero audible latency, building up ideas. And a bonus is that every version (“riff”) is stored and can be revisited or exported into a DAW. It’s an incredible tool.