@@ -1,3 +1,65 @@ | |||
bubble | |||
====== | |||
# Bubble: a privacy-first VPN | |||
Bubble helps you start and manage your own private VPN. | |||
It also adds tools to this VPN to improve your internet experience by modifying your traffic: to | |||
remove ads, block malware, and much more. | |||
## Operating System Support | |||
Once your Bubble is running, any device can connect to it: Windows, Linux, Mac, iOS, Android; if it supports VPN connections, | |||
it will probably work just fine. | |||
However, to launch your own Bubble using this software, you will need a Linux machine to run the launcher. | |||
It *probably* works on MacOS, but it has not been tested and there are likely to be issues. Pull requests are welcome! | |||
If you'd like to enjoy all the benefits of Bubble without going through this hassle, please try out the Bubble launching | |||
service available on [bubblev.com](https://bubblev.com). Any Bubble you launch from [bubblev.com](https://bubblev.com) | |||
will also be "yours only" -- all Bubbles disconnect from their launcher during configuration. | |||
## Getting Started | |||
### Install OpenJDK 11 | |||
Install [Java 11](https://openjdk.java.net/install/) from OpenJDK. | |||
It will probably be easier to install using an OS package, for example `sudo apt install openjdk-11-jre-headless` | |||
### Install PostgreSQL and Redis | |||
Install [PostgreSQL 10](https://www.postgresql.org/download/) if it is not installed on your system. | |||
It will probably be easier to install using an OS package, for example `sudo apt install postgresql` | |||
Install [Redis](https://redis.io/download) if it is not already installed on your system. | |||
It will probably be easier to install using an OS package, for example `sudo apt install redis` | |||
### Configure PostgreSQL | |||
The Bubble launcher connects to a PostgreSQL database named 'bubble' as the PostgreSQL user 'bubble'. | |||
If your current OS user account has permissions to create PostgreSQL databases and users, you can skip this step | |||
since the database and user will be created upon startup. | |||
Otherwise, please either: | |||
* Update the PostgreSQL `pg_hba.conf` file to allow your current OS user to create databases and DB users, OR | |||
* Create a PostgreSQL database named `bubble` and a database user named `bubble`. Set a password for the `bubble` user, | |||
and set the environment variable `BUBBLE_PG_PASSWORD` to this password when starting the Bubble launcher. | |||
### Download a Bubble Distribution | |||
Download and unzip the latest [Bubble Distribution ZIP](https://bubblev.com/download). | |||
### Start the Bubble launcher | |||
Run the `./bin/run.sh` script to start the Bubble launcher. Once the server is running, it will try to open a browser window | |||
to continue configuration. It will also print out the URL, so if the browser doesn't start correctly, you can paste this | |||
into your browser's location bar. | |||
### Activate your local Bubble | |||
Your Bubble is running locally in a "blank" mode. It needs an initial "root" account and some basic services configured. | |||
#### Activate via Web UI | |||
The browser-based admin UI should be displaying an "Activate" page. Complete the information on this page and submit the | |||
data. The Bubble Launcher will create an initial "root" account and other basic system configurations. | |||
#### Activate via command line | |||
Copy the file in `config/activation.json`, then edit the file. There are comments in the file to guide you. | |||
After saving the updated file, run this command: | |||
`./bin/bactivate /path/to/activation.json` | |||
### Launch a new Bubble! | |||
Using the web UI, click "Bubbles", select "New Bubble". Fill out and submit the New Bubble form, and your Bubble will be created! |
@@ -57,6 +57,7 @@ public class AccountSshKey extends IdentifiableBase implements HasAccount { | |||
@Type(type=ENCRYPTED_STRING) @Column(updatable=false, columnDefinition="varchar("+(10000+ENC_PAD)+") NOT NULL") | |||
@Getter private String sshPublicKey; | |||
public AccountSshKey setSshPublicKey(String k) { | |||
if (k == null) k = ""; | |||
this.sshPublicKey = k.trim(); | |||
if (!empty(sshPublicKey)) this.sshPublicKeyHash = sha256_hex(sshPublicKey); | |||
return this; | |||
@@ -67,6 +67,7 @@ public class FlexRouter extends IdentifiableBase implements HasAccount { | |||
@Getter private String key; | |||
public boolean hasKey () { return !empty(key); } | |||
public FlexRouter setKey(String k) { | |||
if (k == null) k = ""; | |||
this.key = k.trim(); | |||
if (!empty(key)) this.keyHash = sha256_hex(key); | |||
return this; | |||
@@ -1,65 +0,0 @@ | |||
# Bubble: a privacy-first VPN | |||
Bubble helps you start and manage your own private VPN. | |||
It also adds tools to this VPN to improve your Internet experience by modifying your traffic: to | |||
remove ads, block malware, and much more. | |||
## Operating System Support | |||
Once your Bubble is running, any device can connect to it: Windows, Linux, Mac, iOS, Android; if it supports VPN connections, | |||
it will probably work just fine. | |||
However, to launch your own Bubble using this software, you will need a Linux machine to run the launcher. | |||
It *probably* works on MacOS, but it has not been tested and there are likely to be issues. Pull requests are welcome! | |||
If you'd like to enjoy all the benefits of Bubble without going through this hassle, please try out the Bubble launching | |||
service available on [bubblev.com](https://bubblev.com). Any Bubble you launch from [bubblev.com](https://bubblev.com) | |||
will also be "yours only" -- all Bubbles disconnect from their launcher during configuration. | |||
## Getting Started | |||
### Install OpenJDK 11 | |||
Install [Java 11](https://openjdk.java.net/install/) from OpenJDK. | |||
It will probably be easier to install using an OS package, for example `sudo apt install openjdk-11-jre-headless` | |||
### Install PostgreSQL and Redis | |||
Install [PostgreSQL 10](https://www.postgresql.org/download/) if it is not installed on your system. | |||
It will probably be easier to install using an OS package, for example `sudo apt install postgresql` | |||
Install [Redis](https://redis.io/download) if it is not already installed on your system. | |||
It will probably be easier to install using an OS package, for example `sudo apt install redis` | |||
### Configure PostgreSQL | |||
The Bubble launcher connects to a PostgreSQL database named 'bubble' as the PostgreSQL user 'bubble'. | |||
If your current OS user account has permissions to create PostgreSQL databases and users, you can skip this step | |||
since the database and user will be created upon startup. | |||
Otherwise, please either: | |||
* Update the PostgreSQL `pg_hba.conf` file to allow your current OS user to create databases and DB users, OR | |||
* Create a PostgreSQL database named `bubble` and a database user named `bubble`. Set a password for the `bubble` user, | |||
and set the environment variable `BUBBLE_PG_PASSWORD` to this password when starting the Bubble launcher. | |||
### Download a Bubble Distribution | |||
Download and unzip the latest [Bubble Distribution ZIP](https://bubblev.com/download). | |||
### Start the Bubble launcher | |||
Run the `./bin/run.sh` script to start the Bubble launcher. Once the server is running, it will try to open a browser window | |||
to continue configuration. It will also print out the URL, so if the browser doesn't start correctly, you can paste this | |||
into your browser's location bar. | |||
### Activate your local Bubble | |||
Your Bubble is running locally in a "blank" mode. It needs an initial "root" account and some basic services configured. | |||
#### Activate via Web UI | |||
The browser-based admin UI should be displaying an "Activate" page. Complete the information on this page and submit the | |||
data. The Bubble Launcher will create an initial "root" account and other basic system configurations. | |||
#### Activate via command line | |||
Copy the file in `config/activation.json`, then edit the file. There are comments in the file to guide you. | |||
After saving the updated file, run this command: | |||
`./bin/bactivate /path/to/activation.json` | |||
### Launch a new Bubble! | |||
Using the web UI, click "Bubbles", select "New Bubble". Fill out and submit the New Bubble form, and your Bubble will be created! |
@@ -2,8 +2,8 @@ bubble | |||
====== | |||
# Development Setup | |||
The instructions presume you are running a newly setup Ubuntu 18.04 system. Either the Ubuntu Server or Desktop distribution will work. | |||
These instructions presume you are running a newly setup Ubuntu 20.04 system. | |||
Either the Ubuntu Server or Desktop distribution will work. | |||
## First-Time System Setup | |||
After you clone this repository, run: | |||
@@ -14,9 +14,11 @@ If you are running on a non-Ubuntu system, copy that file to something like: | |||
./bin/first_time_myoperatingsystem.sh | |||
And then edit it such that all the same packages get installed. Then submit a pull request and we can add support for your operating system to the main repository. | |||
And then edit it such that all the same packages get installed. | |||
Then submit a pull request and we can add support for your operating system to the main repository. | |||
You only need to run this command once, ever, on a development system. It ensures that the appropriate packages are installed and proper databases and database users exist. | |||
You only need to run this command once, ever, on a development system. | |||
It ensures that the appropriate packages are installed and proper databases and database users exist. | |||
## First-Time Dev Setup | |||
After running the system setup above, run: | |||
@@ -28,13 +30,16 @@ This will grab all the submodules and perform an initial build of all components | |||
## Bubble environment file | |||
You will need a file named `${HOME}/.bubble.env` which contains various environment variables required to run the server. | |||
Talk to another developer to get a copy of this file. Do not ever send this file over email or any other unencrypted channel. | |||
Always use `scp` to copy this file from one machine to another. | |||
Talk to another developer to get a copy of this file. | |||
Do not ever send this file over email or any other unencrypted channel, it contains secret keys to various cloud | |||
services that your Bubble will use. Always use `scp` to copy this file from one machine to another. | |||
After you have the env file in place, create a symlink called `${HOME}/.bubble-test.env` | |||
If you will be running any tests, create a symlink called `${HOME}/.bubble-test.env` | |||
cd ${HOME} && ln -s .bubble.env .bubble-test.env | |||
The `.bubble-test.env` file is used by the test suite. | |||
## Subsequent Updates | |||
If you want to grab the latest code, and ensure that all git submodules are properly in sync with the main repository, run: | |||
@@ -43,4 +48,5 @@ If you want to grab the latest code, and ensure that all git submodules are prop | |||
This will update and rebuild all submodules, and the main bubble jar file. | |||
## Running in development | |||
Assuming you ran the commands above, you can run a test server using the method described in the bubble-web [README](https://git.bubblev.org/bubbleV/bubble-web/src/branch/master/README.md). | |||
Assuming you ran the commands above, you can run a test server using the method described in | |||
the bubble-web [README](https://git.bubblev.org/bubblev/bubble-web/src/branch/master/README.md). |