bubble-flexrouter provides HTTP/HTTPS proxy services for Bubble.
Some websites and apps refuse to respond to requests originating from a cloud IP address. Thus, when a user is connected to their Bubble, some sites and apps will not work.
With flex routing, Bubble can route these requests through a device connected to the Bubble that is running bubble-flexrouter. Now, from the perspective of the website or app, these requests will originate from a “clean” IP, and so a valid response will be sent.
Note that using flex routing does remove some privacy protection - sites and apps that are flex-routed will see one of your device’s real IP addresses.
To use the flex_init.sh
and flex_register.sh
tools, you’ll need to have some software installed:
On Windows, use Cygwin to install these.
htpasswd
is not available from Cygwin. See below for a workaround.
In order to use bubble-flexrouter, you must:
We’ll walk through each of these steps next.
This step only needs to be done once. After that, bubble-flexrouter will re-use the initialization settings.
If you’re using Windows, start by opening a Cygwin bash shell. That’s what you’ll use to run these commands.
To initialize your bubble-flexrouter, set the flexrouter master password and run the init script:
export BUBBLE_FR_PASS=some-plaintext-password
flex_init.sh
If you don’t have htpasswd
on your system, then you will need to manually bcrypt the password.
You can do this online at https://bcrypt-generator.com/
export BUBBLE_FR_PASS=some-bcrypted-password
flex_init.sh --bcrypt
Start the Bubble app and login. On Linux, run wg-quick up wg0
to connect.
Then run:
bubble-flexrouter
To see all available options:
bubble-flexrouter --help
Run:
flex_register.sh your-bubble-hostname.example.com
Where your-bubble-hostname.example.com
is the hostname of your Bubble.
If you’re not sure what the hostname is, click on “My Bubble” in the Bubble App and copy the hostname from your browser’s location bar.
On Linux, the hostname is not easily accessible, but you can use the IP address of your Bubble just the same. To get the IP address of your Bubble on Linux, run:
cat /etc/wireguard/wg0.conf | grep Endpoint | awk -F':' '{print $1}' | awk '{print $NF}'
Every time you start bubble-flexrouter, you need to run flex_register.sh
to register the router
with your Bubble.