Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

launch firecracker and forward all traffic to it #64

Open
urbien opened this issue Nov 2, 2020 · 3 comments
Open

launch firecracker and forward all traffic to it #64

urbien opened this issue Nov 2, 2020 · 3 comments

Comments

@urbien
Copy link

urbien commented Nov 2, 2020

@pirate thank you for your guide!!
I am trying to figure out the following scenario, which Fly.io describes, but never described in a way that can be implemented:

app on mobile / web connects over the internet ->
  public IP addr on some container on bare metal Linux ->
     wireguard (borintun implementation) -> 
        1. checks client is legit and launches VM via FireCracker    
        2. routes encrypted traffic to code in VM

Why Boringtun? Because Windscribe released changes to add a script on client connect:
https://blog.windscribe.com/introducing-wireguard-76a1670700a6
https://github.com/Windscribe/boringtun

@pirate
Copy link
Owner

pirate commented Nov 3, 2020

if you're ok with having the VM always running, you could put some code in the VM that just sleeps your app until it gets a request.

Otherwise this gets a lot harder to do in a stable way, I assume it takes 10+sec for the VM to launch, so all your initial traffic is going to time out by time the VM is up and running.

@urbien
Copy link
Author

urbien commented Nov 3, 2020

would it still timeout with Firecracker's MicroVM startup time of 125ms?

@urbien
Copy link
Author

urbien commented Nov 3, 2020

even better, may it is possible to get IP of the newly launched MicroVM and tell wireguard client to re-connect directly to the wireguard running in MicroVM, bypassing a shared wireguard instance. Could this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants