Updated at: 2024-05-13
https://github.com/txthinking/brook
brook link
supports appending a token
used by your own user system to identify a unique user identity.brook --userAPI
specifies the HTTP API of your user system used to verify if a token
is correct.For more information, see: https://github.com/txthinking/brook/blob/master/protocol/user.md
An sample implementation: https://github.com/txthinkinginc/brook-user-system
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 1.2.3.4:5 -p hello --udpovertcp --name '🇺🇸 Server UoT'