Brook v20240606: Support for developing your own user system

Updated at: 2024-05-13

Developing Your Own User System

  1. The client-side brook link supports appending a token used by your own user system to identify a unique user identity.
  2. The server-side brook --userAPI specifies the HTTP API of your user system used to verify if a token is correct.

For more information, see:

An sample implementation:

Difference from the Previous brook-manager

There was a similar implementation called brook-manager, which was designed to implement all related functions but resulted in being inflexible. For instance, when deploying a Brook Server, there could be multiple Brook Servers that clients can use based on different brook link parameter combinations. For example, customizing routing with brook relay might lead to a different Server IP for client connections than the one deployed. Similarly, using third-party CDN services could also lead to the client connecting to a different Server IP than the one deployed on the server.

Therefore, the new user system focuses only on --token and --userAPI, maintaining maximum flexibility, and users are no longer tied to ports, meaning that deploying a single Brook Server can serve multiple users. Different user systems can be developed to meet different needs. For example, the minimal sample implementation requires you to deploy your own Brook Server, generate one or more brook link, and then enter those brook links into your user system. Of course, you can develop an entirely new user system or expand this sample implementation to achieve more automation or additional features based on your own requirements.

A tip is that brook link --name supports emojis, for example: brook link -s -p hello --udpovertcp --name '🇺🇸 Server UoT'