bx
ไทย — ภาษา

หน้านี้ยังไม่ได้แปลเป็นภาษาไทย จึงแสดงเป็นภาษาอื่น

Sharing bx with family and friends

You have set up your server, and your family and friends want to use it too. The old way was to give each person a link; then, whenever the server changed IP, you had to go and update every device of every person, one by one.

Now you can add them as your members, with you as the admin: each device scans a code once, and from then on, when you change a server address, add a second server or change rules, their devices follow along on their own, without them doing anything.

For now, members can be Mac, Linux and Windows computers with bx installed. iPhone cannot be a member yet; keep using the scan-a-link method there. All commands below are typed in a terminal; no sudo needed. This whole flow has not yet been walked through on a real machine; if you run into problems, please tell us.

What you (the admin) do

1. Become the admin

On the computer you use most:

bx fleet init --admin <your-name>
bx fleet backup ~/bx-fleet-backup

The name is shown to members ("Join 's bx"). The backup asks for a passphrase twice.

Always make the backup, and store it somewhere other than this computer. The admin key lives only on this computer; if the computer is lost and there is no backup, you have to start over, and every device has to scan a new code. When you switch computers, run bx fleet restore <backup-file> on the new one. A backup reflects the moment it was made: members and servers added afterwards are not in it. After restoring, run bx fleet server add / bx fleet member add again for them (newly added members have to scan again); earlier members keep receiving updates as usual.

2. Hand your servers over to bx

The server must already be in your server list (visible in bx server list). Name it whatever you like: a server named by its IP will have its name changed to the new IP when the IP changes, and bx still recognizes it as the same server.

bx fleet server add home --ssh root@<server-address>

bx logs in to the server over SSH to add people, so this computer must be able to SSH into it. If the login user is not root, that user's sudo must not require a password; if that is not the case, bx says so directly and changes nothing. If the bx on the server is too old, it says so as well; run sudo bx update on the server first.

If you have a second server, add it the same way. Two servers are better than one: when one changes IP, members' devices can get the new address through the other.

3. Add people

bx fleet member add Alex

bx adds Alex on each server, and finally draws a QR code in the terminal. All of Alex's devices use this same code.

4. Day to day

5. Check on everyone's devices

On a Mac: menu → Members…. In a terminal: bx fleet members (--refresh asks again right now).

One row per person, with each of their devices below:

bx checks on the servers only while your protection is on (and the checks also go through the encrypted tunnel), so right after opening it first shows Checking…; this takes a minute or two. If the bottom of the page says the bx on some servers is old and cannot show status, run sudo bx update on those servers; only then can you see the devices on them. If it says some servers could not be reached this time, devices on those servers are shown as they were last seen.

6. Receive diagnostics from members

When a member runs into a problem and presses Send to , a new report appears under Reports from members at the bottom of the Members… page (unread ones in bold). In a terminal: bx fleet reports; read one in full with bx fleet report show <number>, delete it with bx fleet report rm <number>.

A report contains: the sentence they wrote and the site that had the problem, which path that site takes on their device, their bx's own checks (addresses and links scrubbed), and, if they recorded a clip, which places each app connected to during that time, and whether it went through the tunnel or direct.

Common use: some app is slow for them because its traffic detours abroad. In the details, every destination that goes through the tunnel has Add as shared direct rule next to it: click it, and that direct rule is added to your rules and automatically sent to all members — on their side it usually switches to direct within 15 minutes. Rules that are too broad (for example a whole cloud provider's domain) are stopped first with a question to you. In the terminal, bx fleet report show prints a line bx direct add … for each destination that goes through the tunnel; review it and type it yourself — bx does not add it for you.

After reading, you can delete it (you are asked first): the copy on your side and the one on the server are deleted together.

7. Ask someone to leave

bx fleet member rm Alex

All of Alex's devices stop working at once (they can no longer connect to your servers); nobody else is affected. If a server cannot be reached at the time, bx tells you which servers still hold their credentials; after fixing it, type the command again.

What members do

First install bx as described in Client (you can start with a plain link the admin gives you). Then, on each device:

bx fleet join '<code>'

bx asks "Join 's bx as ?"; answer y. After that:

Devices already using bx also have to scan the code once; devices that don't scan will not follow updates.

Slow or not loading: "record" a clip and send it to the admin

Example: sending files in WeChat is very slow, and you want the admin to look into why.

On a Mac:

  1. Menu → Send to ….
  2. Under Site, fill in the site or address that won't load (optional), then write a sentence, for example "WeChat file transfer is slow".
  3. Click Record…, then immediately go do the slow thing (send a file in WeChat). Recording lasts at most 2 minutes; when you're done, click Stop.
  4. The site and note you typed above, plus what is listed at the bottom of the window, is everything that will be sent: the list starts with "plus your note and website above" (it does not copy them out again), then shows each part bx adds (how that site is routed on your device, bx's own check of this Mac), which places each recorded app connected to, and whether it went through the tunnel or direct. If you don't want to send the recording, click Remove Recording. Nothing is sent until you click Send.
  5. Click Send. Once you see Sent to , you're done. If the server you are using cannot be reached, bx sends it through another of the admin's servers, or saves it first and sends it automatically once reconnected.

In a terminal it is the same thing (it likewise shows you the full text and asks you before sending):

bx fleet report --site <site> --note 'WeChat file transfer is slow' --record 60

--record is how many seconds to record, at most 120; while it records, go do the slow thing.

To leave:

bx fleet leave

The server list stays as it is; the admin's rules no longer take effect. If it says "bx is applying an update…", wait a minute and try again.

FAQ

The admin changed the server IP and my device still can't connect? Devices get the new address through another of the admin's servers; when the admin has only one server and its IP changed, devices cannot get it, and the only way is for the admin to send you the new link (bx server add '<new-link>'). bx recognizes it as the same server in your list with a changed address: it swaps in the new address in place, keeps your own credentials (they are not replaced with the admin's), and no extra server appears. That is why two servers are recommended.

Can the admin see which websites I visit? Not normally. The admin sees only a brief status for each of your devices: device name and OS, whether it's online, whether the tunnel works, whether it has caught up, the bx version, which server it uses, and whether there have been problems recently. Only when you yourself press "Send to admin", review the full text and click Send does the admin see the diagnostics for that moment; the recorded clip (at most 2 minutes) also exists only after you press Record…. What gets recorded is which addresses each app connected to, not page content.

Does a server change alter my exit IP? When the server you are using changes its address, yes (the exit is that server's new address). When the admin deletes the server you are using, bx does not switch you to another server for you; it stays as it is. The admin adding a direct rule does not change your exit: that site goes local-direct on your side, and everything else still goes through the same server as before.